[pLog-svn] r603 - plog/trunk

oscar at devel.plogworld.net oscar at devel.plogworld.net
Wed Dec 29 14:31:56 GMT 2004


Author: oscar
Date: 2004-12-29 14:31:56 +0000 (Wed, 29 Dec 2004)
New Revision: 603

Modified:
   plog/trunk/wizard.php
Log:
cleaned up the code a bit

Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php	2004-12-29 14:10:55 UTC (rev 602)
+++ plog/trunk/wizard.php	2004-12-29 14:31:56 UTC (rev 603)
@@ -639,6 +639,7 @@
             }
                 
             $this->setCommonData();
+			return true;
         }
     }
 
@@ -887,6 +888,8 @@
                 $this->_view = new WizardView( "step2" );
                 $this->_view->setValue( "message", $message );                
             }
+			
+			return true;
         }
     }
 
@@ -940,7 +943,6 @@
             $this->_confirmPassword = $this->_request->getValue( "userPasswordCheck" );
             $this->_userEmail = $this->_request->getValue( "userEmail" );
             $this->_userFullName = $this->_request->getValue( "userFullName" );
-            $errors = false;
         
             $db = connectDb();
 
@@ -981,7 +983,7 @@
             $userPerms = "INSERT INTO {dbprefix}users_permissions(user_id,blog_id,permission_id) VALUES(
                       $userId, 0, 1 );";
             $query = str_replace( "{dbprefix}", $dbPrefix, $userPerms );
-            $result = $db->Execute( $query );
+            $db->Execute( $query );
 
             $this->_view = new Wizardview( "step4" );
             $this->_view->setValue( "ownerid", $userId );
@@ -1189,9 +1191,6 @@
 
         function validate()
         {
-            // otherwise, continue with the normal process
-            $errors = false;
-
             $configFile = new ConfigFileStorage();
             $this->_dbPrefix = $configFile->getValue( "db_prefix" );
 
@@ -1285,6 +1284,8 @@
                 WizardStepTwo::setDbConfigValues( $this->_view );
                 $this->_view->setErrorMessage( $message );
             }
+			
+			return true;
         }
     }
 
@@ -1301,6 +1302,8 @@
 	       if( $statusStr == 'published' ) return POST_STATUS_PUBLISHED;
 	       if( $statusStr == 'draft' ) return POST_STATUS_DRAFT;
 	       if( $statusStr == 'deleted' ) return POST_STATUS_DELETED;
+		   
+		   return false;
 	   }
 	
         function perform()
@@ -1358,7 +1361,6 @@
 			
 			// if everyhting's fine, say so...
             $this->_view = new WizardView( "update3" );
-            $this->_view->setValue( "message", $message );
             $this->_view->setValue( "numPosts", $numPosts );
 			
 			return true;
@@ -1517,7 +1519,7 @@
 		
 			while( $row = $result->FetchRow()) {
                 $resId = $row["id"];
-				$normName = $this->t->normalizeText( $row["name"] );
+				//$normName = $this->t->normalizeText( $row["name"] );
 				$normDescription = $this->t->normalizeText( $row["description"] );
 				$query = "UPDATE {$dbPrefix}gallery_resources
 				          SET normalized_description = '$normDescription', date = date




More information about the pLog-svn mailing list