aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/database.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index 34ff3b305..76ca6c193 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -91,14 +91,14 @@ function establish_db_link($dblinkname = "readwrite") {
}
// Connect to database
- if (!$dblink[$dblinkname] = mysql_connect($CONFIG->dbhost, $CONFIG->dbuser, $CONFIG->dbpass, true)) {
+ if (!$dblink[$dblinkname] = mysql_connect($dbhost, $dbuser, $dbpass, true)) {
$msg = sprintf(elgg_echo('DatabaseException:WrongCredentials'),
- $CONFIG->dbuser, $CONFIG->dbhost, "****");
+ $dbuser, $dbhost, "****");
throw new DatabaseException($msg);
}
- if (!mysql_select_db($CONFIG->dbname, $dblink[$dblinkname])) {
- $msg = sprintf(elgg_echo('DatabaseException:NoConnect'), $CONFIG->dbname);
+ if (!mysql_select_db($dbname, $dblink[$dblinkname])) {
+ $msg = sprintf(elgg_echo('DatabaseException:NoConnect'), $dbname);
throw new DatabaseException($msg);
}