[pLog-svn] r3161 - in plog/trunk: . imgs imgs/summary templates/wizard

mark at devel.lifetype.net mark at devel.lifetype.net
Thu Mar 30 17:14:28 GMT 2006


Author: mark
Date: 2006-03-30 17:14:27 +0000 (Thu, 30 Mar 2006)
New Revision: 3161

Added:
   plog/trunk/imgs/summary/
   plog/trunk/imgs/summary/icon_accept-16.png
   plog/trunk/imgs/summary/icon_cancel-16.png
   plog/trunk/imgs/summary/icon_info-16.png
   plog/trunk/imgs/summary/icon_warning-16.png
Modified:
   plog/trunk/templates/wizard/checks.template
   plog/trunk/wizard.php
Log:
Some installtion wizard improvement.

1. Add check for session.auto_start, iconv and mbstring
2. Change the warning message from text to image. I think it makes it easier to understand.

Added: plog/trunk/imgs/summary/icon_accept-16.png
===================================================================
(Binary files differ)


Property changes on: plog/trunk/imgs/summary/icon_accept-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: plog/trunk/imgs/summary/icon_cancel-16.png
===================================================================
(Binary files differ)


Property changes on: plog/trunk/imgs/summary/icon_cancel-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: plog/trunk/imgs/summary/icon_info-16.png
===================================================================
(Binary files differ)


Property changes on: plog/trunk/imgs/summary/icon_info-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: plog/trunk/imgs/summary/icon_warning-16.png
===================================================================
(Binary files differ)


Property changes on: plog/trunk/imgs/summary/icon_warning-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: plog/trunk/templates/wizard/checks.template
===================================================================
--- plog/trunk/templates/wizard/checks.template	2006-03-29 20:55:45 UTC (rev 3160)
+++ plog/trunk/templates/wizard/checks.template	2006-03-30 17:14:27 UTC (rev 3161)
@@ -22,18 +22,26 @@
    
    {foreach from=$checks item=check key=checkId}
     {** loop through the checks and show an error message if not passed, unless not critical **}
-    {$check->getDesc()}:<br/>
+    <div style="float:left; margin-right: 5px;  margin-top: 10px;">
     {if $check->isValid()}
-        <span style="color:green;font-weight:bold">PASSED</span>
+        <img src="imgs/summary/icon_accept-16.png" alt="PASSED" />
     {else}
         {if $check->isCritical()}
-            <span style="color:red;font-weight:bold">ERROR</span>
+            <img src="imgs/summary/icon_cancel-16.png" alt="ERROR" />
         {else}
-            <span style="color:yellow">NOT CRITICAL</span>
+            <img src="imgs/summary/icon_warning-16.png" alt="NOT CRITICAL" />
         {/if}
-        <br/>{$check->getSolution()}
     {/if}
-    <br/><br/>
+    </div>
+    <div style="padding-bottom:5px; margin-top: 10px;">
+    {$check->getDesc()}
+    {if !$check->isValid()}
+        <div style="float:left; margin-right: 5px;  margin-top: 5px;">
+        	<img src="imgs/summary/icon_info-16.png" alt="SOLUTION" />
+        </div>
+    	<div style="margin-left: 21px; margin-top: 5px;">{$check->getSolution()}</div>
+    {/if}
+    </div>
    {/foreach}
    
    </fieldset>

Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php	2006-03-29 20:55:45 UTC (rev 3160)
+++ plog/trunk/wizard.php	2006-03-30 17:14:27 UTC (rev 3161)
@@ -195,7 +195,7 @@
         function WizardValidator( $desc = "", $solution = "", $critical = true )
         {            
             $this->_desc = $desc;
-            $this->_critical = true;
+            $this->_critical = $critical;
             $this->_valid = false;
             $this->_solution = $solution;
         }
@@ -249,7 +249,7 @@
     {
         function WizardPhpVersionValidator( $minVersion = MIN_PHP_VERSION )
         {
-            $this->WizardValidator( "Checking if the installed PHP version is at least <b>$minVersion</b>", 
+            $this->WizardValidator( "Checking if the installed <b>PHP</b> version is at least $minVersion", 
                                     "Please upgrade your version of PHP to $minVersion or newer",
                                     true );
             $this->_minVersion = $minVersion;
@@ -266,7 +266,7 @@
     {
         function WizardSessionFunctionsAvailableValidator()
         {
-            $this->WizardValidator( "Checking if session functions are available", 
+            $this->WizardValidator( "Checking if <b>session</b> functions are available", 
                                     "LifeType requires support for sessions to be part of your PHP installation",
                                     true );
         }
@@ -282,12 +282,28 @@
             return( parent::validate());            
         }
     }
+
+    class WizardSessionSettingsValidator extends WizardValidator
+    {
+        function WizardSessionSettingsValidator()
+        {
+            $this->WizardValidator( "Checking if <b>session.auto_start</b> is disabled", 
+                                    "LifeType can only run when session.auto_start is disabled.",           
+                                    false );
+        }    
     
+        function validate()
+        {
+            $this->_valid = (ini_get( "session.auto_start" ) == "0");
+            return( parent::validate());    
+        }
+    }
+       
     class WizardMySQLFunctionsAvailableValidator extends WizardValidator
     {
         function WizardMySQLFunctionsAvailableValidator()
         {
-            $this->WizardValidator( "Checking if MySQL functions are available", 
+            $this->WizardValidator( "Checking if <b>MySQL</b> functions are available", 
                                     "LifeType requires support for MySQL to be part of your PHP installation",
                                     true );
         }
@@ -308,7 +324,7 @@
     {
         function WizardXmlFunctionsAvailableValidator()
         {
-            $this->WizardValidator( "Checking if XML functions are available", 
+            $this->WizardValidator( "Checking if <b>XML</b> functions are available", 
                                     "LifeType requires support for XML to be part of your PHP installation",
                                     true );
         }    
@@ -329,7 +345,7 @@
     {
         function WizardSafeModeValidator()
         {
-            $this->WizardValidator( "Checking if safe mode is enabled", 
+            $this->WizardValidator( "Checking if <b>safe mode</b> is enabled", 
                                     "LifeType can run when PHP's safe mode is enabled, but please see <a href=\"<span style=\"color:red;font-weight:bold\">ERROR</span>the project wiki</a> for more details",           
                                     false );
         }    
@@ -340,7 +356,39 @@
             return( parent::validate());    
         }
     }
+
+    class WizardIconvFunctionsAvailableValidator extends WizardValidator
+    {
+        function WizardIconvFunctionsAvailableValidator()
+        {
+            $this->WizardValidator( "Checking if <b>iconv</b> functions are available", 
+                                    "LifeType requires support for some resource metadata conversion.",
+                                    true );
+        }
     
+        function validate()
+        {
+            $this->_valid = function_exists( "iconv" );
+            return( parent::validate());                            
+        }        
+    }
+
+    class WizardMbstringFunctionsAvailableValidator extends WizardValidator
+    {
+        function WizardMbstringFunctionsAvailableValidator()
+        {
+            $this->WizardValidator( "Checking if <b>mbstring</b> functions are available", 
+                                    "Some LifeType plugins requires support for multi-byte language encoding/decoding.",
+                                    false );
+        }
+    
+        function validate()
+        {
+            $this->_valid = function_exists( "mb_convert_encoding" );
+            return( parent::validate());                            
+        }        
+    }       
+    
     class WizardChecks extends Action
     {        
         function perform()
@@ -352,9 +400,12 @@
                "writeGalleryFolder" => new WizardWritableFileValidator( "gallery" ),
                "php" => new WizardPhpVersionValidator(),
                "sessions" => new WizardSessionFunctionsAvailableValidator(),
+               "sessionSettings" => new WizardSessionSettingsValidator(),
                "mysql" => new WizardMySQLFunctionsAvailableValidator(),
                "xml" => new WizardXmlFunctionsAvailableValidator(),
-               "safemode" => new WizardSafeModeValidator()
+               "safemode" => new WizardSafeModeValidator(),
+               "iconv" => new WizardIconvFunctionsAvailableValidator(),
+               "mbstring" => new WizardMbstringFunctionsAvailableValidator
             );
             
             // run the checks



More information about the pLog-svn mailing list