From: Platonides Date: Mon, 25 Jul 2011 20:08:49 +0000 (+0000) Subject: r85886 broke $wgSharedPrefix X-Git-Tag: 1.31.0-rc.0~28631 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=d06f254e3acc4c4a3b587781313493ad7e18055d;p=lhc%2Fweb%2Fwiklou.git r85886 broke $wgSharedPrefix --- diff --git a/includes/db/Database.php b/includes/db/Database.php index a3a439cb6e..dabe3acfbc 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1883,6 +1883,12 @@ abstract class DatabaseBase implements DatabaseType { } $prefix = $this->mTablePrefix; # Default prefix + # A database name has been specified in input. We don't want any + # prefixes added. + if ( isset( $database ) ) { + $prefix = ''; + } + # Note that we use the long format because php will complain in in_array if # the input is not an array, and will complain in is_array if it is not set. if ( !isset( $database ) # Don't use shared database if pre selected. @@ -1898,7 +1904,6 @@ abstract class DatabaseBase implements DatabaseType { # Quote the $database and $table and apply the prefix if not quoted. if ( isset( $database ) ) { $database = ( !$quoted || $this->isQuotedIdentifier( $database ) ? $database : $this->addIdentifierQuotes( $database ) ); - $prefix = ''; } $table = "{$prefix}{$table}";