[Openfirst-cvscommit] base/config dbase.php,1.17,1.18
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:25:35
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11298/config Modified Files: dbase.php Log Message: Removed any remenents of PEAR support, because there isn't any Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dbase.php 6 Jan 2005 22:01:07 -0000 1.17 --- dbase.php 13 Mar 2005 01:25:21 -0000 1.18 *************** *** 42,49 **** $newlink = "", $intclientflags = "") { global $dbasetype, $peardb, $connectdsn; ! if($peardb) { ! $connectdsn = "$dbasetype://$username:$password@$server/"; ! return(0); ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_connect") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 42,46 ---- $newlink = "", $intclientflags = "") { global $dbasetype, $peardb, $connectdsn; ! if($dbasetype == "mysql") { if(function_exists("mysql_connect") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 76,82 **** function ofirst_select_db($databasename, $linkidentifier = "") { global $dbasetype, $peardb, $connectdsn; ! if($peardb) { ! return($connectdsn =& DB::connect("$connectdsn$databasename")); ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_select_db") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 73,77 ---- function ofirst_select_db($databasename, $linkidentifier = "") { global $dbasetype, $peardb, $connectdsn; ! if($dbasetype == "mysql") { if(function_exists("mysql_select_db") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 103,113 **** function ofirst_dberrno($linkidentifier = "") { global $dbasetype, $peardb; ! if($peardb) { ! if($linkidentifier != "") { ! return(DB_Error::getCode($linkidentifier)); ! } else { ! return(DB_Error::getCode()); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_errno") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 98,102 ---- function ofirst_dberrno($linkidentifier = "") { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_errno") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 138,148 **** function ofirst_dberror($linkidentifier = "") { global $dbasetype, $peardb; ! if($peardb) { ! if($linkidentifier != "") { ! return(DB_Error::getMessage($linkidentifier)); ! } else { ! return(DB_Error::getMessage()); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_error") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 127,131 ---- function ofirst_dberror($linkidentifier = "") { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_error") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 175,187 **** $lastquery = "\$string = \"$string\", \$linkidentifier = \"$linkidentifier\", \$batchsize = \"$batchsize\""; ! if($peardb) { ! if($batchsize != "") { ! return($sqlconnection->query($string, $linkidentifier, $batchsize)); ! } elseif($linkidentifier != "") { ! return($sqlconnection->query($string, $linkidentifier)); ! } else { ! return($sqlconnection->query($string)); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_query") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 158,162 ---- $lastquery = "\$string = \"$string\", \$linkidentifier = \"$linkidentifier\", \$batchsize = \"$batchsize\""; ! if($dbasetype == "mysql") { if(function_exists("mysql_query") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 215,226 **** function ofirst_dbfetch_object($resource, $rownumber = "") { global $dbasetype, $peardb; ! if($peardb) { ! if($rownumber != "") { ! return(DB_FETCHMODE_OBJECT($resource, $rownumber)); ! } else { ! return(DB_FETCHMODE_OBJECT($resource)); ! } ! ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_fetch_object") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 190,194 ---- function ofirst_dbfetch_object($resource, $rownumber = "") { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_fetch_object") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 249,259 **** function ofirst_dbnum_rows($resource) { global $dbasetype, $peardb; ! if($peardb) { ! if($resource != "") { ! return(DB_result::numRows($resource)); ! } else { ! return(DB_result::numRows()); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_num_rows") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 217,221 ---- function ofirst_dbnum_rows($resource) { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_num_rows") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 280,286 **** function ofirst_dbname_version() { global $dbasetype, $peardb; ! if($peardb) { ! return "PEAR DB"; ! } elseif($dbasetype == "mysql") { $v = ofirst_dbfetch_object(ofirst_dbquery("SELECT VERSION() AS mysql_version")); return "MySQL $v->mysql_version"; --- 242,246 ---- function ofirst_dbname_version() { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { $v = ofirst_dbfetch_object(ofirst_dbquery("SELECT VERSION() AS mysql_version")); return "MySQL $v->mysql_version"; |