From d06f254e3acc4c4a3b587781313493ad7e18055d Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 25 Jul 2011 20:08:49 +0000 Subject: [PATCH] r85886 broke $wgSharedPrefix --- includes/db/Database.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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}"; -- 2.20.1