summaryrefslogtreecommitdiff
path: root/includes/db
diff options
context:
space:
mode:
Diffstat (limited to 'includes/db')
-rw-r--r--includes/db/Database.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/db/Database.php b/includes/db/Database.php
index 9d517e4a..f3e84675 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -1973,7 +1973,9 @@ abstract class DatabaseBase implements DatabaseType {
# Quote the $database and $table and apply the prefix if not quoted.
if ( isset( $database ) ) {
- $database = ( $format == 'quoted' || $this->isQuotedIdentifier( $database ) ? $database : $this->addIdentifierQuotes( $database ) );
+ if ( $format == 'quoted' && !$this->isQuotedIdentifier( $database ) ) {
+ $database = $this->addIdentifierQuotes( $database );
+ }
}
$table = "{$prefix}{$table}";