[Openfirst-cvscommit] SF.net SVN: openfirst: [179] trunk/src/config/first.php
Brought to you by:
xtimg
From: <ast...@us...> - 2006-06-22 02:17:22
|
Revision: 179 Author: astronouth7303 Date: 2006-06-21 19:17:18 -0700 (Wed, 21 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=179&view=rev Log Message: ----------- Double check that connection is good. Fixes bug #162. Modified Paths: -------------- trunk/src/config/first.php Modified: trunk/src/config/first.php =================================================================== --- trunk/src/config/first.php 2006-06-21 23:08:28 UTC (rev 178) +++ trunk/src/config/first.php 2006-06-22 02:17:18 UTC (rev 179) @@ -110,7 +110,9 @@ include_once($ogHeader); // This a series of statements, each of which are executed. If an error condition occurs, that // branch is ran. - if (!$ogDB->createDB($ogSQLDatabase, $ogSQLTablePrefix)) { + if (!$ogDB->check()) { + echo '<p class="error">DB error: was unable to connect to the server.</p>'; + } else if (!$ogDB->createDB($ogSQLDatabase, $ogSQLTablePrefix)) { // Do this as an optional root user? echo '<p class="error">DB creation error: '.htmlentities($ogDB->errorString()).'</p>'; } else if (($err = $base->install()) !== true) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |