From b6418393ac3931b9a41d1833b1e2faaa57452b03 Mon Sep 17 00:00:00 2001 From: Jure Kajzer Date: Wed, 4 May 2011 10:43:34 +0000 Subject: [PATCH] * fixed tableName handling for internal purposes (bug if using sharedDB as i need raw table name) --- includes/db/DatabaseOracle.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 32ffcc9098..1d8c58c2bf 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -662,6 +662,10 @@ class DatabaseOracle extends DatabaseBase { return parent::tableName( strtoupper( $name ), $quoted ); } + function tableNameInternal( $name ) { + $name = $this->tableName( $name ); + return preg_replace( '/.*\.(.*)/', '$1', $name); + } /** * Return the next in a sequence, save the value for retrieval via insertId() */ @@ -913,7 +917,7 @@ class DatabaseOracle extends DatabaseBase { private function fieldInfoMulti( $table, $field ) { $field = strtoupper( $field ); if ( is_array( $table ) ) { - $table = array_map( array( &$this, 'tableName' ), $table ); + $table = array_map( array( &$this, 'tableNameInternal' ), $table ); $tableWhere = 'IN ('; foreach( $table as &$singleTable ) { $singleTable = $this->removeIdentifierQuotes($singleTable); @@ -924,7 +928,7 @@ class DatabaseOracle extends DatabaseBase { } $tableWhere = rtrim( $tableWhere, ',' ) . ')'; } else { - $table = $this->removeIdentifierQuotes($table); + $table = $this->removeIdentifierQuotes( $this->tableNameInternal( $table ) ); if ( isset( $this->mFieldInfoCache["$table.$field"] ) ) { return $this->mFieldInfoCache["$table.$field"]; } -- 2.20.1