Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -632,8 +632,7 @@ |
633 | 633 | return $retval; |
634 | 634 | } |
635 | 635 | |
636 | | - function tableName( $name ) { |
637 | | - global $wgSharedDB, $wgSharedPrefix, $wgSharedTables; |
| 636 | + function tableName( $name, $quoted ) { |
638 | 637 | /* |
639 | 638 | Replace reserved words with better ones |
640 | 639 | Using uppercase because that's the only way Oracle can handle |
— | — | @@ -648,7 +647,7 @@ |
649 | 648 | break; |
650 | 649 | } |
651 | 650 | |
652 | | - return parent::tableName( strtoupper( $name ) ); |
| 651 | + return parent::tableName( strtoupper( $name ), $quoted ); |
653 | 652 | } |
654 | 653 | |
655 | 654 | /** |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -611,7 +611,7 @@ |
612 | 612 | return $res; |
613 | 613 | } |
614 | 614 | |
615 | | - function tableName( $name ) { |
| 615 | + function tableName( $name, $quoted = true ) { |
616 | 616 | # Replace reserved words with better ones |
617 | 617 | switch( $name ) { |
618 | 618 | case 'user': |
— | — | @@ -619,7 +619,7 @@ |
620 | 620 | case 'text': |
621 | 621 | return 'pagecontent'; |
622 | 622 | default: |
623 | | - return $name; |
| 623 | + return parent::tableName( $name, $quoted ); |
624 | 624 | } |
625 | 625 | } |
626 | 626 | |
Index: trunk/phase3/includes/db/DatabaseMssql.php |
— | — | @@ -510,35 +510,6 @@ |
511 | 511 | } |
512 | 512 | |
513 | 513 | /** |
514 | | - * Format a table name ready for use in constructing an SQL query |
515 | | - * |
516 | | - * This does two important things: it brackets table names which as necessary, |
517 | | - * and it adds a table prefix if there is one. |
518 | | - * |
519 | | - * All functions of this object which require a table name call this function |
520 | | - * themselves. Pass the canonical name to such functions. This is only needed |
521 | | - * when calling query() directly. |
522 | | - * |
523 | | - * @param $name String: database table name |
524 | | - */ |
525 | | - function tableName( $name ) { |
526 | | - global $wgSharedDB; |
527 | | - # Skip quoted literals |
528 | | - if ( $name != '' && $name { 0 } != '[' ) { |
529 | | - if ( $this->mTablePrefix !== '' && strpos( '.', $name ) === false ) { |
530 | | - $name = "{$this->mTablePrefix}$name"; |
531 | | - } |
532 | | - if ( isset( $wgSharedDB ) && "{$this->mTablePrefix}user" == $name ) { |
533 | | - $name = "[$wgSharedDB].[$name]"; |
534 | | - } else { |
535 | | - # Standard quoting |
536 | | - if ( $name != '' ) $name = "[$name]"; |
537 | | - } |
538 | | - } |
539 | | - return $name; |
540 | | - } |
541 | | - |
542 | | - /** |
543 | 514 | * Return the next in a sequence, save the value for retrieval via insertId() |
544 | 515 | */ |
545 | 516 | function nextSequenceValue( $seqName ) { |