|
From: Ulf E. <ulf...@us...> - 2005-05-24 20:50:03
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16539 Modified Files: install.php Log Message: Use DB::isError for error checking Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- install.php 25 Oct 2004 12:06:57 -0000 1.40 +++ install.php 24 May 2005 20:49:55 -0000 1.41 @@ -148,7 +148,7 @@ $db = DB::Connect($dsn); // Simple error checking on returned DB object to check connection to db - if (get_class($db) == 'db_error') { + if (DB::isError($db)) { include('templates/default/install-dbfailure.html'); exit; } else { @@ -184,7 +184,7 @@ /*!! BAD! Must figure out how to get db_version from config-dist.php... */ $query = preg_replace(array_keys($tables), array_values($tables), 'INSERT INTO '.TBL_CONFIGURATION.' (varname,varvalue,description,vartype) VALUES (\'DB_VERSION\', './*!!!*/4/*!!!*/.', \'Database Version <b>Warning:</b> Changing this might make things go horribly wrong, so don\\\'t change it.\', \'mixed\')'); $res = $db->query($query); - if (PEAR::isError($res)) { + if (DB::isError($res)) { echo 'DB_VERSION not set!'; } } |