Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1566,7 +1566,11 @@ |
1567 | 1567 | $database = ( !$quoted || $this->isQuotedIdentifier( $database ) ? $database : $this->addIdentifierQuotes( $database ) ); |
1568 | 1568 | $prefix = ''; |
1569 | 1569 | } |
1570 | | - $table = ( !$quoted || $this->isQuotedIdentifier( $table ) ? $table : $this->addIdentifierQuotes( "{$prefix}{$table}" ) ); |
| 1570 | + |
| 1571 | + $table = "{$prefix}{$table}"; |
| 1572 | + if ( $quoted && !$this->isQuotedIdentifier( $table ) ) { |
| 1573 | + $table = $this->addIdentifierQuotes( "{$table}" ); |
| 1574 | + } |
1571 | 1575 | |
1572 | 1576 | # Merge our database and table into our final table name. |
1573 | 1577 | $tableName = ( isset( $database ) ? "{$database}.{$table}" : "{$table}" ); |
— | — | @@ -2316,6 +2320,8 @@ |
2317 | 2321 | * Note that unlike most database abstraction functions, this function does not |
2318 | 2322 | * automatically append database prefix, because it works at a lower |
2319 | 2323 | * abstraction level. |
| 2324 | + * The table names passed to this function shall not be quoted (this |
| 2325 | + * function calls addIdentifierQuotes when needed). |
2320 | 2326 | * |
2321 | 2327 | * @param $oldName String: name of table whose structure should be copied |
2322 | 2328 | * @param $newName String: name of table to be created |