From d61ffabeead21bd1c2f74730046216e194248cc0 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 12 Apr 2011 16:57:44 +0000 Subject: [PATCH] No need to quote just to avoid the prefixes. --- includes/db/Database.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index 3a5da57a85..19a125c8ad 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1547,12 +1547,6 @@ abstract class DatabaseBase implements DatabaseType { } $prefix = $this->mTablePrefix; # Default prefix - # A database name has been specified in input. Quote the table name - # because we don't want any prefixes added. - if ( isset( $database ) ) { - $table = ( $this->isQuotedIdentifier( $table ) ? $table : $this->addIdentifierQuotes( $table ) ); - } - # 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. @@ -1568,6 +1562,7 @@ abstract class DatabaseBase implements DatabaseType { # Quote the $database and $table and apply the prefix if not quoted. if ( isset( $database ) ) { $database = ( $this->isQuotedIdentifier( $database ) ? $database : $this->addIdentifierQuotes( $database ) ); + $prefix = ''; } $table = ( $this->isQuotedIdentifier( $table ) ? $table : $this->addIdentifierQuotes( "{$prefix}{$table}" ) ); -- 2.20.1