Changed doQuery() -> query()
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 15 Dec 2010 20:59:29 +0000 (20:59 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 15 Dec 2010 20:59:29 +0000 (20:59 +0000)
includes/installer/OracleInstaller.php
includes/installer/OracleUpdater.php
includes/installer/PostgresInstaller.php
includes/installer/PostgresUpdater.php
includes/search/SearchPostgres.php

index d9bc098..feb7e72 100644 (file)
@@ -195,7 +195,7 @@ class OracleInstaller extends DatabaseInstaller {
        public function createTables() {
                $status = parent::createTables();
 
-               $this->db->doQuery( 'BEGIN fill_wiki_info; END;' );
+               $this->db->query( 'BEGIN fill_wiki_info; END;' );
 
                return $status;
        }
index df46ba3..a60c668 100644 (file)
@@ -93,7 +93,7 @@ class OracleUpdater extends DatabaseUpdater {
        public function doUpdates( $purge = true ) {
                parent::doUpdates();
                
-               $this->db->doQuery( 'BEGIN fill_wiki_info; END;' );
+               $this->db->query( 'BEGIN fill_wiki_info; END;' );
        }
 
 }
index 9d832f9..72e94e9 100644 (file)
@@ -129,14 +129,14 @@ class PostgresInstaller extends DatabaseInstaller {
                $ctest = 'mediawiki_test_table';
                $safeschema = $conn->addIdentifierQuotes( $schema );
                if ( $conn->tableExists( $ctest, $schema ) ) {
-                       $conn->doQuery( "DROP TABLE $safeschema.$ctest" );
+                       $conn->query( "DROP TABLE $safeschema.$ctest" );
                }
-               $res = $conn->doQuery( "CREATE TABLE $safeschema.$ctest(a int)" );
+               $res = $conn->query( "CREATE TABLE $safeschema.$ctest(a int)" );
                if ( !$res ) {
                        $status->fatal( 'config-install-pg-schema-failed',
                                $this->getVar( 'wgDBuser'), $schema );
                }
-               $conn->doQuery( "DROP TABLE $safeschema.$ctest" );
+               $conn->query( "DROP TABLE $safeschema.$ctest" );
 
                return $status;
        }
index c6abcc3..629ccba 100644 (file)
@@ -523,7 +523,7 @@ END;
 
                $safeuser = $this->db->addQuotes( $wgDBuser );
                $SQL = "SELECT array_to_string(useconfig,'*') FROM pg_catalog.pg_user WHERE usename = $safeuser";
-               $config = pg_fetch_result( $this->db->doQuery( $SQL ), 0, 0 );
+               $config = pg_fetch_result( $this->db->query( $SQL ), 0, 0 );
                $conf = array();
                foreach ( explode( '*', $config ) as $c ) {
                        list( $x, $y ) = explode( '=', $c );
@@ -546,8 +546,8 @@ END;
                }
                $search_path = str_replace( ', ,', ',', $search_path );
                if ( array_key_exists( 'search_path', $conf ) === false || $search_path != $conf['search_path'] ) {
-                       $this->db->doQuery( "ALTER USER $wgDBuser SET search_path = $search_path" );
-                       $this->db->doQuery( "SET search_path = $search_path" );
+                       $this->db->query( "ALTER USER $wgDBuser SET search_path = $search_path" );
+                       $this->db->query( "SET search_path = $search_path" );
                } else {
                        $path = $conf['search_path'];
                        $this->output( "... search_path for user \"$wgDBuser\" looks correct ($path)\n" );
@@ -562,8 +562,8 @@ END;
                foreach ( $goodconf as $key => $value ) {
                        if ( !array_key_exists( $key, $conf ) or $conf[$key] !== $value ) {
                                $this->output( "Setting $key to '$value' for user \"$wgDBuser\"\n" );
-                               $this->db->doQuery( "ALTER USER $wgDBuser SET $key = '$value'" );
-                               $this->db->doQuery( "SET $key = '$value'" );
+                               $this->db->query( "ALTER USER $wgDBuser SET $key = '$value'" );
+                               $this->db->query( "SET $key = '$value'" );
                        } else {
                                $this->output( "... default value of \"$key\" is correctly set to \"$value\" for user \"$wgDBuser\"\n" );
                        }
index 8c9e293..9d6d153 100644 (file)
@@ -148,7 +148,7 @@ class SearchPostgres extends SearchEngine {
 
                ## We need a separate query here so gin does not complain about empty searches
                $SQL = "SELECT to_tsquery($prefix $searchstring)";
-               $res = $this->db->doQuery($SQL);
+               $res = $this->db->query($SQL);
                if (!$res) {
                        ## TODO: Better output (example to catch: one 'two)
                        die ("Sorry, that was not a valid search string. Please go back and try again");
@@ -206,7 +206,7 @@ class SearchPostgres extends SearchEngine {
                $SQL = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN ".
                                "(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) . 
                                " ORDER BY rev_text_id DESC OFFSET 1)";
-               $this->db->doQuery($SQL);
+               $this->db->query($SQL);
                return true;
        }