Followup r96369: update child classes and a few callers
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 6 Sep 2011 20:51:10 +0000 (20:51 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 6 Sep 2011 20:51:10 +0000 (20:51 +0000)
includes/db/CloneDatabase.php
includes/db/DatabaseIbm_db2.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
includes/search/SearchOracle.php

index 3357268..f29e0b2 100644 (file)
@@ -93,10 +93,10 @@ class CloneDatabase {
                        # fix back and forth so tableName() works right.
                        
                        self::changePrefix( $this->oldTablePrefix );
-                       $oldTableName = $this->db->tableName( $tbl, false );
+                       $oldTableName = $this->db->tableName( $tbl, 'raw' );
                        
                        self::changePrefix( $this->newTablePrefix );
-                       $newTableName = $this->db->tableName( $tbl, false );
+                       $newTableName = $this->db->tableName( $tbl, 'raw' );
                        
                        if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres' ) ) ) {
                                $this->db->dropTable( $tbl, __METHOD__ );
index 147b9d5..056ad9b 100644 (file)
@@ -748,7 +748,7 @@ class DatabaseIbm_db2 extends DatabaseBase {
         * @param $name Boolean
         * @return String
         */
-       public function tableName( $name, $quoted = true ) {
+       public function tableName( $name, $format = 'quoted' ) {
                // we want maximum compatibility with MySQL schema
                return $name;
        }
index cdc25f7..fa7a86f 100644 (file)
@@ -654,7 +654,7 @@ class DatabaseOracle extends DatabaseBase {
                return $retval;
        }
 
-       function tableName( $name, $quoted = true ) {
+       function tableName( $name, $format = 'quoted' ) {
                /*
                Replace reserved words with better ones
                Using uppercase because that's the only way Oracle can handle
@@ -669,7 +669,7 @@ class DatabaseOracle extends DatabaseBase {
                                break;
                }
 
-               return parent::tableName( strtoupper( $name ), $quoted );
+               return parent::tableName( strtoupper( $name ), $format );
        }
 
        function tableNameInternal( $name ) {
index 742a8b5..f0655b5 100644 (file)
@@ -39,7 +39,7 @@ AND relname=%s
 AND attname=%s;
 SQL;
 
-               $table = $db->tableName( $table, false );
+               $table = $db->tableName( $table, 'raw' );
                $res = $db->query(
                        sprintf( $q,
                                $db->addQuotes( $wgDBmwschema ),
@@ -622,7 +622,7 @@ class DatabasePostgres extends DatabaseBase {
                return $res;
        }
 
-       function tableName( $name, $quoted = true ) {
+       function tableName( $name, $format = 'quoted' ) {
                # Replace reserved words with better ones
                switch( $name ) {
                        case 'user':
@@ -630,7 +630,7 @@ class DatabasePostgres extends DatabaseBase {
                        case 'text':
                                return 'pagecontent';
                        default:
-                               return parent::tableName( $name, $quoted );
+                               return parent::tableName( $name, $format );
                }
        }
 
@@ -737,7 +737,7 @@ class DatabasePostgres extends DatabaseBase {
                if ( !$schema ) {
                        $schema = $wgDBmwschema;
                }
-               $table = $this->tableName( $table, false );
+               $table = $this->tableName( $table, 'raw' );
                $etable = $this->addQuotes( $table );
                $eschema = $this->addQuotes( $schema );
                $SQL = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "
index 924fc87..b2eb1c6 100644 (file)
@@ -319,15 +319,15 @@ class DatabaseSqlite extends DatabaseBase {
         * Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks
         *
         * @param $name
-        * @param bool $quoted
+        * @param $format String
         * @return string
         */
-       function tableName( $name, $quoted = true ) {
+       function tableName( $name, $format = 'quoted' ) {
                // table names starting with sqlite_ are reserved
                if ( strpos( $name, 'sqlite_' ) === 0 ) {
                        return $name;
                }
-               return str_replace( '"', '', parent::tableName( $name, $quoted ) );
+               return str_replace( '"', '', parent::tableName( $name, $format ) );
        }
 
        /**
index 85337ca..2d6fc3e 100644 (file)
@@ -257,9 +257,9 @@ class SearchOracle extends SearchEngine {
                //     ALTER SESSION SET CURRENT_SCHEMA = ...
                // was used.
                $dbw->query( "CALL ctx_ddl.sync_index(" . 
-                       $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx', false ) ) . ")" );
+                       $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx', 'raw' ) ) . ")" );
                $dbw->query( "CALL ctx_ddl.sync_index(" . 
-                       $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx', false ) ) . ")" );
+                       $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx', 'raw' ) ) . ")" );
        }
 
        /**