[pLog-svn] r3184 - in plog/trunk: . install
mark at devel.lifetype.net
mark at devel.lifetype.net
Tue Apr 4 15:03:40 GMT 2006
Author: mark
Date: 2006-04-04 15:03:40 +0000 (Tue, 04 Apr 2006)
New Revision: 3184
Added:
plog/trunk/install/installation.class.php
Modified:
plog/trunk/admin.php
plog/trunk/index.php
Log:
Move the installation check to install/installation.class.php.
Now, we have more clear install check.
If the config.properties is empty, we will show him a link to the wizard.
Else, we will show him a message to remove the wizard.php
Modified: plog/trunk/admin.php
===================================================================
--- plog/trunk/admin.php 2006-04-04 10:32:37 UTC (rev 3183)
+++ plog/trunk/admin.php 2006-04-04 15:03:40 UTC (rev 3184)
@@ -24,9 +24,8 @@
// a security check, or else people might forget to remove the wizard.php script
//
if( File::isReadable( "wizard.php")) {
- print("<span style=\"color:red\">The wizard.php script has to be removed after the installation process.</span><br/><br/>
- Please remove it first to continue.");
- die();
+ include_once( PLOG_CLASS_PATH."install/installation.class.php" );
+ Installation::check();
}
// initialize the session
Modified: plog/trunk/index.php
===================================================================
--- plog/trunk/index.php 2006-04-04 10:32:37 UTC (rev 3183)
+++ plog/trunk/index.php 2006-04-04 15:03:40 UTC (rev 3184)
@@ -30,9 +30,8 @@
// a security check, or else people might forget to remove the wizard.php script
//
if( File::isReadable( "wizard.php")) {
- print("<span style=\"color:red\">The wizard.php script has to be removed after the installation process.</span><br/><br/>
- Please remove it first to continue.");
- die();
+ include_once( PLOG_CLASS_PATH."install/installation.class.php" );
+ Installation::check();
}
// initialize the session
Added: plog/trunk/install/installation.class.php
===================================================================
--- plog/trunk/install/installation.class.php 2006-04-04 10:32:37 UTC (rev 3183)
+++ plog/trunk/install/installation.class.php 2006-04-04 15:03:40 UTC (rev 3184)
@@ -0,0 +1,18 @@
+<?php
+ class Installation
+ {
+ function check()
+ {
+ include_once( PLOG_CLASS_PATH."config/config.properties.php" );
+
+ if ( $config["db_host"] == '' || $config["db_username"] == '' || $config["db_database"] == '' ) {
+ // If those parameters are empty
+ echo 'LifeType does not install yet, you\'ll have to <font color="red"><b><a href="wizard.php" title="Install LifeType">Install LifeType</a></b></font> first!';
+ } else {
+ echo 'The <font color="red"><b>wizard.php</b></font> has to be removed after the installation process. Please remove it first to <font color="green"><b><a href="'.$_SERVER['PHP_SELF'].'" title="'.end( split( "/", $_SERVER['PHP_SELF'] ) ).'">continue</a></b></font>.';
+ }
+
+ die();
+ }
+ }
+?>
\ No newline at end of file
More information about the pLog-svn
mailing list