From: Jure Kajzer Date: Wed, 4 May 2011 10:43:34 +0000 (+0000) Subject: * fixed tableName handling for internal purposes (bug if using sharedDB as i need... X-Git-Tag: 1.31.0-rc.0~30419 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=b6418393ac3931b9a41d1833b1e2faaa57452b03;p=lhc%2Fweb%2Fwiklou.git * fixed tableName handling for internal purposes (bug if using sharedDB as i need raw table name) --- 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"]; }