r84485 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84484‎ | r84485 | r84486 >
Date:21:20, 21 March 2011
Author:greg
Status:ok
Tags:
Comment:
Do not depend on the lack of a server for connecting: Postgres has a valid and common use case where the server name (aka host) is empty, as the connection is via a Unix socket. Instead, check if a $user has been sent to the function, as all databases can agree that we need at least that much before doing an open. Fixes bug 28167.
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -518,7 +518,7 @@
519519 $this->mTablePrefix = $tablePrefix;
520520 }
521521
522 - if ( $server ) {
 522+ if ( $user ) {
523523 $this->open( $server, $user, $password, $dbName );
524524 }
525525 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r84532Cleanup r80892, r84485: Check user also in sqlite for consistency.demon15:59, 22 March 2011

Status & tagging log