From: Platonides Date: Tue, 12 Apr 2011 16:57:44 +0000 (+0000) Subject: No need to quote just to avoid the prefixes. X-Git-Tag: 1.31.0-rc.0~30908 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=d61ffabeead21bd1c2f74730046216e194248cc0;p=lhc%2Fweb%2Fwiklou.git No need to quote just to avoid the prefixes. --- 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}" ) );