r87390 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87389‎ | r87390 | r87391 >
Date:10:44, 4 May 2011
Author:freakolowsky
Status:ok
Tags:
Comment:
* MFT r87388
Modified paths:
  • /branches/REL1_17/phase3/includes/db/DatabaseOracle.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/includes/db/DatabaseOracle.php
@@ -704,6 +704,11 @@
705705 return strtoupper( $tableName );
706706 }
707707
 708+ function tableNameInternal( $name ) {
 709+ $name = $this->tableName( $name );
 710+ return preg_replace( '/.*\."(.*)"/', '$1', $name);
 711+ }
 712+
708713 /**
709714 * Return the next in a sequence, save the value for retrieval via insertId()
710715 */
@@ -955,7 +960,7 @@
956961 private function fieldInfoMulti( $table, $field ) {
957962 $field = strtoupper( $field );
958963 if ( is_array( $table ) ) {
959 - $table = array_map( array( &$this, 'tableName' ), $table );
 964+ $table = array_map( array( &$this, 'tableNameInternal' ), $table );
960965 $tableWhere = 'IN (';
961966 foreach( $table as &$singleTable ) {
962967 $singleTable = strtoupper( trim( $singleTable, '"' ) );
@@ -966,7 +971,7 @@
967972 }
968973 $tableWhere = rtrim( $tableWhere, ',' ) . ')';
969974 } else {
970 - $table = strtoupper( trim( $this->tableName( $table ), '"' ) );
 975+ $table = strtoupper( trim( $this->tableNameInternal( $table ), '"' ) );
971976 if ( isset( $this->mFieldInfoCache["$table.$field"] ) ) {
972977 return $this->mFieldInfoCache["$table.$field"];
973978 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87388* fixed tableName handling for internal purposes (bug if using sharedDB as i ...freakolowsky10:43, 4 May 2011

Status & tagging log