[pLog-svn] r3163 - in plog/trunk: . templates/wizard

mark at devel.lifetype.net mark at devel.lifetype.net
Thu Mar 30 18:45:04 GMT 2006


Author: mark
Date: 2006-03-30 18:45:03 +0000 (Thu, 30 Mar 2006)
New Revision: 3163

Modified:
   plog/trunk/templates/wizard/checks.template
   plog/trunk/wizard.php
Log:
1. Now we can fill those checking into different groups:
- File permission
- PHP Version
- PHP Configuration
- PHP Function Availibility

2. Some cosmetic changes


Modified: plog/trunk/templates/wizard/checks.template
===================================================================
--- plog/trunk/templates/wizard/checks.template	2006-03-30 18:03:52 UTC (rev 3162)
+++ plog/trunk/templates/wizard/checks.template	2006-03-30 18:45:03 UTC (rev 3163)
@@ -20,28 +20,32 @@
      </div>
    {/if}
    
-   {foreach from=$checks item=check key=checkId}
-    {** loop through the checks and show an error message if not passed, unless not critical **}
-    <div style="float:left; margin-right: 5px;  margin-top: 10px;">
-    {if $check->isValid()}
-        <img src="imgs/summary/icon_accept-16.png" alt="PASSED" />
-    {else}
-        {if $check->isCritical()}
-            <img src="imgs/summary/icon_cancel-16.png" alt="ERROR" />
-        {else}
-            <img src="imgs/summary/icon_warning-16.png" alt="NOT CRITICAL" />
-        {/if}
-    {/if}
-    </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 from=$checkGroups item=checks key=checkGroup}
+       <div style="font-size: 12px; font-weight: bold; margin:5px 0px; text-decoration: underline">{$checkGroup}</div>
+	   {foreach from=$checks item=check key=checkId}
+	    {** loop through the checks and show an error message if not passed, unless not critical **}
+	    {if $check->isValid()}
+	        <img src="imgs/summary/icon_accept-16.png" style="float:left; margin: 10px 5px 0px 0px;" alt="PASSED" />
+	    {else}
+	        {if $check->isCritical()}
+	            <img src="imgs/summary/icon_cancel-16.png" style="float:left; margin: 10px 5px 0px 0px;" alt="ERROR" />
+	        {else}
+	            <img src="imgs/summary/icon_warning-16.png" style="float:left; margin: 10px 5px 0px 0px;" alt="NOT CRITICAL" />
+	        {/if}
+	    {/if}
+	    <div style="padding-bottom:5px; margin-top: 10px;">
+	    {$check->getDesc()}
+	    {if !$check->isValid()}
+	    	<div style="margin-left: 20px; margin-top: 5px;">
+	    	{if $check->isCritical()}
+	    		<span style="color: red;">{$check->getSolution()}</span>
+	    	{else}
+	    		<span style="color: green;">{$check->getSolution()}</span>
+	    	{/if}
+	    	</div>
+	    {/if}
+	    </div>
+	   {/foreach}
    {/foreach}
    
    </fieldset>

Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php	2006-03-30 18:03:52 UTC (rev 3162)
+++ plog/trunk/wizard.php	2006-03-30 18:45:03 UTC (rev 3163)
@@ -427,36 +427,47 @@
         function perform()
         {
             // build the array with checks
-            $checks = Array(
-               "php" => new WizardPhpVersionValidator(),
+            $checkGroups['File permissions checking'] = Array(
                "writeConfigFile" => new WizardWritableFileValidator( "config/config.properties.php" ),
                "writeTmpFolder" => new WizardWritableFileValidator( "tmp" ),
-               "writeGalleryFolder" => new WizardWritableFileValidator( "gallery" ),
+               "writeGalleryFolder" => new WizardWritableFileValidator( "gallery" )
+            );
+            
+            $checkGroups['PHP version checking'] = Array(
+               "php" => new WizardPhpVersionValidator()
+            );
+
+            $checkGroups['PHP configuration checking'] = Array(
+               "sessionSettings" => new WizardSessionSettingsValidator(),
+               "safemode" => new WizardSafeModeValidator(),
+               "fileUploads" => new WizardFileUploadsValidator()
+            );
+            
+            $checkGroups['PHP functions avaiibility checking'] = Array(
                "sessions" => new WizardSessionFunctionsAvailableValidator(),
-               "sessionSettings" => new WizardSessionSettingsValidator(),
                "mysql" => new WizardMySQLFunctionsAvailableValidator(),
                "xml" => new WizardXmlFunctionsAvailableValidator(),
-               "safemode" => new WizardSafeModeValidator(),
                "iconv" => new WizardIconvFunctionsAvailableValidator(),
                "mbstring" => new WizardMbstringFunctionsAvailableValidator(),
-               "gd" => new WizardGdFunctionsAvailableValidator(),
-               "fileUploads" => new WizardFileUploadsValidator()
-            );
+               "gd" => new WizardGdFunctionsAvailableValidator()
+            );                                    
             
             // run the checks
             $ok = true;
-            foreach( $checks as $id => $check ) {
-                $valid = $checks["$id"]->validate();
-                // if it doesn't validate but it's not critical, then we can proced too
-                if( !$checks["$id"]->isCritical())
-                    $valid = true;          
-                $ok = ($ok && $valid);
-            }
+            foreach( $checkGroups as $checks ) {
+	            foreach( $checks as $id => $check ) {
+	                $valid = $checks["$id"]->validate();
+	                // if it doesn't validate but it's not critical, then we can proced too
+	                if( !$checks["$id"]->isCritical())
+	                    $valid = true;          
+	                $ok = ($ok && $valid);
+	            }
+	        }
             
             // create the view and pass the results
             $this->_view = new WizardView( "checks" );
             $this->_view->setValue( "ok", $ok );
-            $this->_view->setValue( "checks", $checks );
+            $this->_view->setValue( "checkGroups", $checkGroups );
             
             if( WizardTools::isNewInstallation())
                 $this->_view->setValue( "mode", "install" );



More information about the pLog-svn mailing list