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

Oscar Renalias oscar at renalias.net
Sat Mar 25 16:14:09 GMT 2006


If any of you would like to add extra checks:

1) create your own class extending WizardValidator and provide 3  
parameters in the constructor:

- The check description
- A possible solution/suggestion, that only be shown in case the  
check fails
- Whether the check is critical or not (i.e. if it should stop the  
installation process)

2) Implement the validate() method doing the necessary checks

3) Add an instance of your new class to the $check array in the  
action class WizardChecks::perform(). The action class will then  
execute all the checks and pass the result to the view, which will  
choose the most suitable way to display the results.

As long as there is at least one critical check that did not pass,  
the installation will not proceed.

These are the current checks:

-config file writable
-tmp/ folder writable
-gallery/ folder writable
-minimum php version
-session support compiled in
-mysql support compiled in
-xml support compiled in
-safe mode enabled (not critical, only displays a warning with a link  
to a page in our wiki where we will describe the limitations of LT  
under safe mode)

If there's any other check we should do, let me know or go ahead and  
code it yourselves.

Oscar


On 25 Mar 2006, at 17:46, oscar at devel.lifetype.net wrote:

> Author: oscar
> Date: 2006-03-25 15:46:56 +0000 (Sat, 25 Mar 2006)
> New Revision: 3122
>
> Added:
>    plog/trunk/install/changes_10_11.properties.php
>    plog/trunk/install/defaultconfig.properties.php
>    plog/trunk/templates/wizard/checks.template
> Modified:
>    plog/trunk/install/dbschemas.properties.php
>    plog/trunk/wizard.php
> Log:
> added an initial step for the wizard to make some checks. Right now  
> it checks some files and folders to see if they're writable, if  
> there is suppotr for xml, mysql and sessions and if the safe mode  
> is enabled. More checks can be easily added by extending one class  
> and adding teh new class to an array, and the code will take care  
> of the rest.
>
> I've also moved the db schema and the rows that need to be inserted  
> in the config table to their own files under the install/ table, to  
> make the code in wizard.php look a bit more tidy.



More information about the pLog-svn mailing list