r62869 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62868‎ | r62869 | r62870 >
Date:10:38, 23 February 2010
Author:freakolowsky
Status:ok (Comments)
Tags:
Comment:
tableName calls moved inside fieldInfoMulti and removed call that existed only for this call
Modified paths:
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -734,7 +734,6 @@
735735
736736 # Returns the size of a text field, or -1 for "unlimited"
737737 function textFieldSize( $table, $field ) {
738 - $table = $this->tableName( $table );
739738 $fieldInfoData = $this->fieldInfo( $table, $field);
740739 if ( $fieldInfoData->type == "varchar" ) {
741740 $size = $row->size - 4;
@@ -834,6 +833,7 @@
835834 $tableWhere = '';
836835 $field = strtoupper($field);
837836 if (is_array($table)) {
 837+ $table = array_map( array( &$this, 'tableName' ), $table );
838838 $tableWhere = 'IN (';
839839 foreach($table as &$singleTable) {
840840 $singleTable = strtoupper(trim( $singleTable, '"' ));
@@ -844,7 +844,7 @@
845845 }
846846 $tableWhere = rtrim($tableWhere, ',').')';
847847 } else {
848 - $table = strtoupper(trim( $table, '"' ));
 848+ $table = strtoupper(trim( $this->tableName($table), '"' ));
849849 if (isset($this->mFieldInfoCache["$table.$field"])) {
850850 return $this->mFieldInfoCache["$table.$field"];
851851 }
@@ -1021,11 +1021,6 @@
10221022 function selectRow( $table, $vars, $conds, $fname = 'DatabaseOracle::selectRow', $options = array(), $join_conds = array() ) {
10231023 global $wgLang;
10241024
1025 - if (is_array($table)) {
1026 - $table = array_map( array( &$this, 'tableName' ), $table );
1027 - }
1028 - $table = $this->tableName($table);
1029 -
10301025 $conds2 = array();
10311026 $conds = ($conds != null && !is_array($conds)) ? array($conds) : $conds;
10321027 foreach ( $conds as $col => $val ) {
@@ -1089,10 +1084,6 @@
10901085 public function delete( $table, $conds, $fname = 'DatabaseOracle::delete' ) {
10911086 global $wgLang;
10921087
1093 - if (is_array($table)) {
1094 - $table = array_map( array( &$this, 'tableName' ), $table );
1095 - }
1096 -
10971088 if ( $wgLang != null ) {
10981089 $conds2 = array();
10991090 $conds = ($conds != null && !is_array($conds)) ? array($conds) : $conds;

Follow-up revisions

RevisionCommit summaryAuthorDate
r62876Backport r62869freakolowsky13:43, 23 February 2010

Comments

#Comment by MaxSem (talk | contribs)   11:30, 23 February 2010

Need to be backported to 1.16

#Comment by Bryan (talk | contribs)   13:53, 23 February 2010

Do not mark your own code as resolved; set it to new unless somebody else has reviewed it.

Status & tagging log