[pLog-svn] r4088 - plog/branches/lifetype-1.1.1

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Oct 4 21:01:35 GMT 2006


Author: oscar
Date: 2006-10-04 21:01:34 +0000 (Wed, 04 Oct 2006)
New Revision: 4088

Modified:
   plog/branches/lifetype-1.1.1/wizard.php
Log:
show an error message if we were not able to connect to the database, instead of crashing


Modified: plog/branches/lifetype-1.1.1/wizard.php
===================================================================
--- plog/branches/lifetype-1.1.1/wizard.php	2006-10-04 19:55:00 UTC (rev 4087)
+++ plog/branches/lifetype-1.1.1/wizard.php	2006-10-04 21:01:34 UTC (rev 4088)
@@ -853,6 +853,13 @@
             // create the database
             if( $createDb ) {
                 $this->_db = connectDb( false, false );
+				if( !$this->_db ) {
+                    $this->_view = new WizardView( "step1" );
+                    $this->setDbConfigValues( $this->_view );
+                    $this->_view->setErrorMessage( $message );
+                    $this->setCommonData( true );
+                    return false;					
+				}
                 if( !$this->_db->Execute( "CREATE DATABASE ".$this->_database )) {
                     $message = "Error creating the database: ".$this->_db->ErrorMsg();
                     $this->_view = new WizardView( "step1" );



More information about the pLog-svn mailing list