[Openfirst-cvscommit] base/config first.php,1.36,1.37
Brought to you by:
xtimg
From: Tim G. <xt...@us...> - 2004-04-12 19:58:01
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3248 Modified Files: first.php Log Message: Add PEAR DB support. Most of the credit for this goes to Daniel Schilling. Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** first.php 11 Apr 2004 16:18:52 -0000 1.36 --- first.php 12 Apr 2004 19:44:08 -0000 1.37 *************** *** 83,90 **** \$ostype = '" . $_POST["ostype"] . "'; if (\$ostype == \"windows\") { ! ini_set(\"include_path\",\"../config/;.\"); include_once('dbase.php'); } else { ! ini_set(\"include_path\",\"../config/:.\"); include_once('dbase.php'); } --- 83,90 ---- \$ostype = '" . $_POST["ostype"] . "'; if (\$ostype == \"windows\") { ! ini_set(\"include_path\", ini_get(\"include_path\") . \"../config/;.\"); include_once('dbase.php'); } else { ! ini_set(\"include_path\", ini_get(\"include_path\") . \"../config/:.\"); include_once('dbase.php'); } *************** *** 101,107 **** die(\"Your version of PHP has not been compiled with MySQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request MySQL support for your version of PHP.\"); } - \$sqlconnection = ofirst_dbconnect(\"\$sqlserver\",\"\$sqluser\",\"\$sqlpassword\"); - ofirst_select_db(\$sqldatabase); $cookielogins $allowreg --- 101,113 ---- die(\"Your version of PHP has not been compiled with MySQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request MySQL support for your version of PHP.\"); } + \$sqlconnection = ofirst_dbconnect(\"\$sqlserver\",\"\$sqluser\",\"\$sqlpassword\"); + + if(\$peardb) { + \$sqlconnection = ofirst_select_db(\$sqldatabase); + } else { + ofirst_select_db(\$sqldatabase); + } + $cookielogins $allowreg |