r87388 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87387‎ | r87388 | r87389 >
Date:10:43, 4 May 2011
Author:freakolowsky
Status:ok
Tags:
Comment:
* fixed tableName handling for internal purposes (bug if using sharedDB as i need raw table name)
Modified paths:
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -662,6 +662,10 @@
663663 return parent::tableName( strtoupper( $name ), $quoted );
664664 }
665665
 666+ function tableNameInternal( $name ) {
 667+ $name = $this->tableName( $name );
 668+ return preg_replace( '/.*\.(.*)/', '$1', $name);
 669+ }
666670 /**
667671 * Return the next in a sequence, save the value for retrieval via insertId()
668672 */
@@ -913,7 +917,7 @@
914918 private function fieldInfoMulti( $table, $field ) {
915919 $field = strtoupper( $field );
916920 if ( is_array( $table ) ) {
917 - $table = array_map( array( &$this, 'tableName' ), $table );
 921+ $table = array_map( array( &$this, 'tableNameInternal' ), $table );
918922 $tableWhere = 'IN (';
919923 foreach( $table as &$singleTable ) {
920924 $singleTable = $this->removeIdentifierQuotes($singleTable);
@@ -924,7 +928,7 @@
925929 }
926930 $tableWhere = rtrim( $tableWhere, ',' ) . ')';
927931 } else {
928 - $table = $this->removeIdentifierQuotes($table);
 932+ $table = $this->removeIdentifierQuotes( $this->tableNameInternal( $table ) );
929933 if ( isset( $this->mFieldInfoCache["$table.$field"] ) ) {
930934 return $this->mFieldInfoCache["$table.$field"];
931935 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r87390* MFT r87388freakolowsky10:44, 4 May 2011

Status & tagging log