[pLog-svn] r3198 - plog/trunk

oscar at devel.lifetype.net oscar at devel.lifetype.net
Thu Apr 6 20:26:25 GMT 2006


Author: oscar
Date: 2006-04-06 20:26:24 +0000 (Thu, 06 Apr 2006)
New Revision: 3198

Modified:
   plog/trunk/wizard.php
Log:
damn, this was a tricky one... All checks were being unsuccessful in the wizard template because the objects that was being passed in the array were not the same objects that were being instantiated and executed.
I also turned the iconv requirement into an optional one, or else I wouldn't be able to install the development version in my own computer :)


Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php	2006-04-06 11:49:20 UTC (rev 3197)
+++ plog/trunk/wizard.php	2006-04-06 20:26:24 UTC (rev 3198)
@@ -225,8 +225,9 @@
         
         function validate() 
         {
+        	print("WizardValidator::validate() -- ".$this->_valid."<br/>");
             return( $this->_valid );
-        }
+        }        
     }
     
     class WizardPhpVersionValidator extends WizardValidator
@@ -242,7 +243,7 @@
         function validate()
         {
             $this->_valid = version_compare( phpversion(), $this->_minVersion ) >= 0;
-            return( parent::validate());            
+            return( parent::validate());
         }
     }
     
@@ -366,7 +367,7 @@
         {
             $this->WizardValidator( "Checking if <b>iconv</b> functions are available", 
                                     "LifeType requires support for some resource metadata conversion and some LifeType plugins requires support for multi-byte language encoding/decoding.",
-                                    true );
+                                    false );
         }
     
         function validate()
@@ -462,7 +463,7 @@
                "fileUploads" => new WizardFileUploadsValidator()
             );
             
-            $checkGroups['PHP functions avaiibility checking'] = Array(
+            $checkGroups['PHP functions availability checking'] = Array(
                "sessions" => new WizardSessionFunctionsAvailableValidator(),
                "mysql" => new WizardMySQLFunctionsAvailableValidator(),
                "xml" => new WizardXmlFunctionsAvailableValidator(),
@@ -474,12 +475,12 @@
             
             // run the checks
             $ok = true;
-            foreach( $checkGroups as $checks ) {
+            foreach( $checkGroups as $checkGroup => $checks ) {
 	            foreach( $checks as $id => $check ) {
-	                $valid = $checks["$id"]->validate();
+	                $valid = $checkGroups[$checkGroup][$id]->validate();
 	                // if it doesn't validate but it's not critical, then we can proced too
-	                if( !$checks["$id"]->isCritical())
-	                    $valid = true;          
+	                if( !$checkGroups[$checkGroup][$id]->isCritical())
+	                    $valid = true;  
 	                $ok = ($ok && $valid);
 	            }
 	        }



More information about the pLog-svn mailing list