Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-01-22 07:53:32 +0400
committerMichael Gapczynski <mtgap@owncloud.com>2013-01-22 07:53:32 +0400
commit5136f6d818d1cb567cdedc468657fb0d0ed82f85 (patch)
treef75adcdd8a8a3f55b21c85536ed562b3dfc07bd3 /lib/db.php
parentd58cee2f7651a2a8cc9ef75a28f54883e2e01a67 (diff)
Make database connection error messages less verbose
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/db.php b/lib/db.php
index 756901d8643..a1faa4b7086 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -181,12 +181,13 @@ class OC_DB {
try{
self::$PDO=new PDO($dsn, $user, $pass, $opts);
}catch(PDOException $e) {
+ OC_Log::write('core', $e->getMessage(), OC_Log::FATAL);
OC_User::setUserId(null);
// send http status 503
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
- OC_Template::printErrorPage('Failed to connect to '.$type.' database. ('.$e->getMessage().')' );
+ OC_Template::printErrorPage('Failed to connect to database');
die();
}
// We always, really always want associative arrays
@@ -288,7 +289,7 @@ class OC_DB {
// send http status 503
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
- OC_Template::printErrorPage('Failed to connect to '.$type.' database. ('.self::$MDB2->getUserInfo().')' );
+ OC_Template::printErrorPage('Failed to connect to database');
die();
}