mirror of https://github.com/BOINC/boinc.git
Added a pathMod variable to db_init so that files in /forums could use it properly.
svn path=/trunk/boinc/; revision=2097
This commit is contained in:
parent
29492ebfd3
commit
5a3e4273d6
|
@ -1,15 +1,17 @@
|
|||
<?php
|
||||
|
||||
require_once('util.inc');
|
||||
|
||||
// database-related functions.
|
||||
// Presentation code (HTML) shouldn't be here
|
||||
|
||||
function db_init() {
|
||||
function db_init($pathMod='') {
|
||||
$retval = mysql_connect();
|
||||
if (!$retval) {
|
||||
echo "Unable to connect to database - please try again later";
|
||||
exit();
|
||||
}
|
||||
$db_name = parse_config("<db_name>"); // TODO: Change to a specific db for testing.
|
||||
$db_name = parse_config("<db_name>", $pathMod);
|
||||
if(!mysql_select_db($db_name)) {
|
||||
echo "Unable to select database - please try again later";
|
||||
exit();
|
||||
|
|
Loading…
Reference in New Issue