[pLog-svn] r3842 - plog/trunk/class/summary/controller

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sat Aug 5 17:36:31 GMT 2006


Author: oscar
Date: 2006-08-05 17:36:30 +0000 (Sat, 05 Aug 2006)
New Revision: 3842

Modified:
   plog/trunk/class/summary/controller/registrationcontroller.class.php
Log:
fixed an issue where if 'summary_show_agreement' was set to 'no', the first step of the registration process would need to be done twice


Modified: plog/trunk/class/summary/controller/registrationcontroller.class.php
===================================================================
--- plog/trunk/class/summary/controller/registrationcontroller.class.php	2006-08-05 17:21:51 UTC (rev 3841)
+++ plog/trunk/class/summary/controller/registrationcontroller.class.php	2006-08-05 17:36:30 UTC (rev 3842)
@@ -1,6 +1,7 @@
 <?php
 
 	include_once( PLOG_CLASS_PATH."class/controller/sequentialcontroller.class.php" );
+	include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
 	
 	/**
 	 * \ingroup Controller
@@ -19,14 +20,26 @@
 		 */
 		function RegistrationController()
 		{
-			$this->SequentialController( Array (
-				"doReadAgreement",
-				"doUserRegister",
-				"doUserCreation",
-				"doBlogRegistration",
-				"doFinishRegister"
-			));
+			$config =& Config::getConfig();
 			
+			if( $config->getValue( "summary_show_agreement", true )) {			
+				$this->SequentialController( Array (
+					"doReadAgreement",
+					"doUserRegister",
+					"doUserCreation",
+					"doBlogRegistration",
+					"doFinishRegister"
+				));
+			}
+			else {
+				$this->SequentialController( Array (
+					"doUserRegister",
+					"doUserCreation",
+					"doBlogRegistration",
+					"doFinishRegister"
+				));				
+			}
+			
 			$this->setActionFolderPath( PLOG_CLASS_PATH."class/summary/action/" );			
 		}	
 	}	



More information about the pLog-svn mailing list