Index: trunk/phase3/includes/search/SearchOracle.php |
— | — | @@ -257,9 +257,9 @@ |
258 | 258 | // ALTER SESSION SET CURRENT_SCHEMA = ... |
259 | 259 | // was used. |
260 | 260 | $dbw->query( "CALL ctx_ddl.sync_index(" . |
261 | | - $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx', false ) ) . ")" ); |
| 261 | + $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx', 'raw' ) ) . ")" ); |
262 | 262 | $dbw->query( "CALL ctx_ddl.sync_index(" . |
263 | | - $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx', false ) ) . ")" ); |
| 263 | + $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx', 'raw' ) ) . ")" ); |
264 | 264 | } |
265 | 265 | |
266 | 266 | /** |
Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -654,7 +654,7 @@ |
655 | 655 | return $retval; |
656 | 656 | } |
657 | 657 | |
658 | | - function tableName( $name, $quoted = true ) { |
| 658 | + function tableName( $name, $format = 'quoted' ) { |
659 | 659 | /* |
660 | 660 | Replace reserved words with better ones |
661 | 661 | Using uppercase because that's the only way Oracle can handle |
— | — | @@ -669,7 +669,7 @@ |
670 | 670 | break; |
671 | 671 | } |
672 | 672 | |
673 | | - return parent::tableName( strtoupper( $name ), $quoted ); |
| 673 | + return parent::tableName( strtoupper( $name ), $format ); |
674 | 674 | } |
675 | 675 | |
676 | 676 | function tableNameInternal( $name ) { |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | AND attname=%s; |
41 | 41 | SQL; |
42 | 42 | |
43 | | - $table = $db->tableName( $table, false ); |
| 43 | + $table = $db->tableName( $table, 'raw' ); |
44 | 44 | $res = $db->query( |
45 | 45 | sprintf( $q, |
46 | 46 | $db->addQuotes( $wgDBmwschema ), |
— | — | @@ -622,7 +622,7 @@ |
623 | 623 | return $res; |
624 | 624 | } |
625 | 625 | |
626 | | - function tableName( $name, $quoted = true ) { |
| 626 | + function tableName( $name, $format = 'quoted' ) { |
627 | 627 | # Replace reserved words with better ones |
628 | 628 | switch( $name ) { |
629 | 629 | case 'user': |
— | — | @@ -630,7 +630,7 @@ |
631 | 631 | case 'text': |
632 | 632 | return 'pagecontent'; |
633 | 633 | default: |
634 | | - return parent::tableName( $name, $quoted ); |
| 634 | + return parent::tableName( $name, $format ); |
635 | 635 | } |
636 | 636 | } |
637 | 637 | |
— | — | @@ -737,7 +737,7 @@ |
738 | 738 | if ( !$schema ) { |
739 | 739 | $schema = $wgDBmwschema; |
740 | 740 | } |
741 | | - $table = $this->tableName( $table, false ); |
| 741 | + $table = $this->tableName( $table, 'raw' ); |
742 | 742 | $etable = $this->addQuotes( $table ); |
743 | 743 | $eschema = $this->addQuotes( $schema ); |
744 | 744 | $SQL = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n " |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -748,7 +748,7 @@ |
749 | 749 | * @param $name Boolean |
750 | 750 | * @return String |
751 | 751 | */ |
752 | | - public function tableName( $name, $quoted = true ) { |
| 752 | + public function tableName( $name, $format = 'quoted' ) { |
753 | 753 | // we want maximum compatibility with MySQL schema |
754 | 754 | return $name; |
755 | 755 | } |
Index: trunk/phase3/includes/db/CloneDatabase.php |
— | — | @@ -93,10 +93,10 @@ |
94 | 94 | # fix back and forth so tableName() works right. |
95 | 95 | |
96 | 96 | self::changePrefix( $this->oldTablePrefix ); |
97 | | - $oldTableName = $this->db->tableName( $tbl, false ); |
| 97 | + $oldTableName = $this->db->tableName( $tbl, 'raw' ); |
98 | 98 | |
99 | 99 | self::changePrefix( $this->newTablePrefix ); |
100 | | - $newTableName = $this->db->tableName( $tbl, false ); |
| 100 | + $newTableName = $this->db->tableName( $tbl, 'raw' ); |
101 | 101 | |
102 | 102 | if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres' ) ) ) { |
103 | 103 | $this->db->dropTable( $tbl, __METHOD__ ); |
Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -319,15 +319,15 @@ |
320 | 320 | * Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks |
321 | 321 | * |
322 | 322 | * @param $name |
323 | | - * @param bool $quoted |
| 323 | + * @param $format String |
324 | 324 | * @return string |
325 | 325 | */ |
326 | | - function tableName( $name, $quoted = true ) { |
| 326 | + function tableName( $name, $format = 'quoted' ) { |
327 | 327 | // table names starting with sqlite_ are reserved |
328 | 328 | if ( strpos( $name, 'sqlite_' ) === 0 ) { |
329 | 329 | return $name; |
330 | 330 | } |
331 | | - return str_replace( '"', '', parent::tableName( $name, $quoted ) ); |
| 331 | + return str_replace( '"', '', parent::tableName( $name, $format ) ); |
332 | 332 | } |
333 | 333 | |
334 | 334 | /** |