Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1547,12 +1547,6 @@ |
1548 | 1548 | } |
1549 | 1549 | $prefix = $this->mTablePrefix; # Default prefix |
1550 | 1550 | |
1551 | | - # A database name has been specified in input. Quote the table name |
1552 | | - # because we don't want any prefixes added. |
1553 | | - if ( isset( $database ) ) { |
1554 | | - $table = ( $this->isQuotedIdentifier( $table ) ? $table : $this->addIdentifierQuotes( $table ) ); |
1555 | | - } |
1556 | | - |
1557 | 1551 | # Note that we use the long format because php will complain in in_array if |
1558 | 1552 | # the input is not an array, and will complain in is_array if it is not set. |
1559 | 1553 | if ( !isset( $database ) # Don't use shared database if pre selected. |
— | — | @@ -1568,6 +1562,7 @@ |
1569 | 1563 | # Quote the $database and $table and apply the prefix if not quoted. |
1570 | 1564 | if ( isset( $database ) ) { |
1571 | 1565 | $database = ( $this->isQuotedIdentifier( $database ) ? $database : $this->addIdentifierQuotes( $database ) ); |
| 1566 | + $prefix = ''; |
1572 | 1567 | } |
1573 | 1568 | $table = ( $this->isQuotedIdentifier( $table ) ? $table : $this->addIdentifierQuotes( "{$prefix}{$table}" ) ); |
1574 | 1569 | |