* (bug 19479) Show proper error message when unable to connect to PostgreSQL database...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 26 Jul 2009 20:09:14 +0000 (20:09 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 26 Jul 2009 20:09:14 +0000 (20:09 +0000)
RELEASE-NOTES
config/index.php

index 9fafa8d..9d0ac6e 100644 (file)
@@ -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 ==
 
index 12b45b7..7417ec8 100644 (file)
@@ -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() ) . "</li>\n";
+                               $errs["DBserver"] = "Could not connect to database as user";
+                               $errs["DBuser"] = "Check username";
+                               $errs["DBpassword"] = "and password";
+                               continue;
                        } else {
                                $myver = $wgDatabase->getServerVersion();
                        }