http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89252

Revision: 89252
Author:   freakolowsky
Date:     2011-06-01 08:46:31 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
* MFT r89250. only the tableExists function ad 1.17 already supports 
user-dbname difference

Modified Paths:
--------------
    branches/REL1_17/phase3/includes/db/DatabaseOracle.php

Modified: branches/REL1_17/phase3/includes/db/DatabaseOracle.php
===================================================================
--- branches/REL1_17/phase3/includes/db/DatabaseOracle.php      2011-06-01 
08:41:44 UTC (rev 89251)
+++ branches/REL1_17/phase3/includes/db/DatabaseOracle.php      2011-06-01 
08:46:31 UTC (rev 89252)
@@ -936,8 +936,9 @@
         * Query whether a given table exists (in the given schema, or the 
default mw one if not given)
         */
        function tableExists( $table ) {
-               $table = trim($this->tableName($table), '"');
-               $SQL = "SELECT 1 FROM user_tables WHERE table_name='$table'";
+               $table = trim( $this->tableName($table), '"' );
+               $owner = strtoupper( $this->mDBname );
+               $SQL = "SELECT 1 FROM all_tables WHERE owner='$owner' AND 
table_name='$table'";
                $res = $this->doQuery( $SQL );
                if ( $res ) {
                        $count = $res->numRows();
@@ -945,7 +946,7 @@
                } else {
                        $count = 0;
                }
-               return $count;
+               return $count!=0;
        }
 
        /**


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to