]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make database connection error messages less verbose
authorMichael Gapczynski <mtgap@owncloud.com>
Tue, 22 Jan 2013 03:53:32 +0000 (22:53 -0500)
committerMichael Gapczynski <mtgap@owncloud.com>
Tue, 22 Jan 2013 03:53:32 +0000 (22:53 -0500)
lib/db.php

index 756901d86434aca3f5f87f3ab067352937bc9d79..a1faa4b70860606aed6599362e446397ad4b8d8e 100644 (file)
@@ -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();
                        }