tableName has to be encoded before field type checking
authorJure Kajzer <freakolowsky@users.mediawiki.org>
Sat, 20 Feb 2010 18:27:00 +0000 (18:27 +0000)
committerJure Kajzer <freakolowsky@users.mediawiki.org>
Sat, 20 Feb 2010 18:27:00 +0000 (18:27 +0000)
includes/db/DatabaseOracle.php

index 0cfcaa6..9778b4c 100644 (file)
@@ -283,9 +283,9 @@ class DatabaseOracle extends DatabaseBase {
 
        function doQuery( $sql ) {
                wfDebug( "SQL: [$sql]\n" );
-               if ( !mb_check_encoding( $sql ) ) {
-                       throw new MWException( "SQL encoding is invalid\n$sql" );
-               }
+        if ( !mb_check_encoding( $sql ) ) {
+            throw new MWException( "SQL encoding is invalid\n$sql" );
+        }
 
                // handle some oracle specifics
                // remove AS column/table/subquery namings
@@ -1024,6 +1024,7 @@ class DatabaseOracle extends DatabaseBase {
                if (is_array($table)) {
                        $table = array_map( array( &$this, 'tableName' ), $table );
                }
+               $table = $this->tableName($table);
                
                $conds2 = array();
                $conds = ($conds != null && !is_array($conds)) ? array($conds) : $conds;