From 005666d19b54d5aef654f96fd7b555d954cf425f Mon Sep 17 00:00:00 2001 From: icewing Date: Tue, 10 Jun 2008 14:37:11 +0000 Subject: Marcus Povey * Debug added to db connect git-svn-id: https://code.elgg.org/elgg/trunk@847 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/database.php | 2 +- languages/en.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/lib/database.php b/engine/lib/database.php index 55ff021e5..69f6f4c0f 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -48,7 +48,7 @@ // Connect to database if (!$dblink[$dblinkname] = mysql_connect($CONFIG->dbhost, $CONFIG->dbuser, $CONFIG->dbpass, true)) - throw new DatabaseException(elgg_echo('DatabaseException:WrongCredentials')); + throw new DatabaseException(sprintf(elgg_echo('DatabaseException:WrongCredentials'), $CONFIG->dbuser, $CONFIG->dbhost, $CONFIG->debug ? $CONFIG->dbpass : "****")); if (!mysql_select_db($CONFIG->dbname, $dblink[$dblinkname])) throw new DatabaseException(sprintf(elgg_echo('DatabaseException:NoConnect'), $CONFIG->dbname)); diff --git a/languages/en.php b/languages/en.php index c177ba305..c5a55fa60 100644 --- a/languages/en.php +++ b/languages/en.php @@ -24,7 +24,7 @@ 'notfound' => "The requested resource could not be found, or you do not have access to it.", 'SecurityException:Codeblock' => "Denied access to execute privileged code block", - 'DatabaseException:WrongCredentials' => "Elgg couldn't connect to the database using the given credentials.", + 'DatabaseException:WrongCredentials' => "Elgg couldn't connect to the database using the given credentials %s@%s (pw: %s).", 'DatabaseException:NoConnect' => "Elgg couldn't select the database %s.", 'SecurityException:FunctionDenied' => "Access to privileged function '%s' is denied.", 'DatabaseException:DBSetupIssues' => "There were a number of issues: ", -- cgit v1.2.3