From 5aa96b71baed172915c42a2c7dc98cdb6a71a708 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 26 Jul 2009 20:09:14 +0000 Subject: [PATCH] * (bug 19479) Show proper error message when unable to connect to PostgreSQL database with username/password in MediaWiki's setup --- RELEASE-NOTES | 2 ++ config/index.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9fafa8d3f3..9d0ac6ea4f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -336,6 +336,8 @@ this. Was used when mwEmbed was going to be an extension. * (bug 18799) Special:Userlogin now handles correctly the returnto parameter to not link back to Special:Userlogout when user's language isn't the same as content's language +* (bug 19479) Show proper error message when unable to connect to PostgreSQL + database with username/password in MediaWiki's setup == API changes in 1.16 == diff --git a/config/index.php b/config/index.php index 12b45b7010..7417ec8bc4 100644 --- a/config/index.php +++ b/config/index.php @@ -1047,6 +1047,10 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1); if (!$wgDatabase->isOpen()) { print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "\n"; + $errs["DBserver"] = "Could not connect to database as user"; + $errs["DBuser"] = "Check username"; + $errs["DBpassword"] = "and password"; + continue; } else { $myver = $wgDatabase->getServerVersion(); } -- 2.20.1