r60912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60911‎ | r60912 | r60913 >
Date:23:24, 10 January 2010
Author:simetrical
Status:ok
Tags:
Comment:
Use string interpolation, not .

Prompted by r60731, although that didn't actually add the concatenation
(which should have had more spaces, too).
Modified paths:
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -833,7 +833,7 @@
834834 function fieldExists( $table, $field, $fname = 'DatabaseOracle::fieldExists' ) {
835835 $table = trim( $table, '"' );
836836
837 - if (isset($this->mFieldInfoCache[$table.'.'.$field])) {
 837+ if (isset($this->mFieldInfoCache["$table.$field"])) {
838838 return true;
839839 } elseif ( !isset( $this->fieldInfo_stmt ) ) {
840840 $this->fieldInfo_stmt = oci_parse( $this->mConn, 'SELECT * FROM wiki_field_info_full WHERE table_name = upper(:tab) and column_name = UPPER(:col)' );
@@ -849,7 +849,7 @@
850850 }
851851 $res = new ORAResult( $this, $this->fieldInfo_stmt );
852852 if ($res->numRows() != 0) {
853 - $this->mFieldInfoCache[$table.'.'.$field] = new ORAField( $res->fetchRow() );
 853+ $this->mFieldInfoCache["$table.$field"] = new ORAField( $res->fetchRow() );
854854 return true;
855855 } else {
856856 return false;
@@ -859,8 +859,8 @@
860860 function fieldInfo( $table, $field ) {
861861 $table = trim( $table, '"' );
862862
863 - if (isset($this->mFieldInfoCache[$table.'.'.$field])) {
864 - return $this->mFieldInfoCache[$table.'.'.$field];
 863+ if (isset($this->mFieldInfoCache["$table.$field"])) {
 864+ return $this->mFieldInfoCache["$table.$field"];
865865 } elseif ( !isset( $this->fieldInfo_stmt ) ) {
866866 $this->fieldInfo_stmt = oci_parse( $this->mConn, 'SELECT * FROM wiki_field_info_full WHERE table_name = upper(:tab) and column_name = UPPER(:col)' );
867867 }
@@ -874,8 +874,8 @@
875875 return false;
876876 }
877877 $res = new ORAResult( $this, $this->fieldInfo_stmt );
878 - $this->mFieldInfoCache[$table.'.'.$field] = new ORAField( $res->fetchRow() );
879 - return $this->mFieldInfoCache[$table.'.'.$field];
 878+ $this->mFieldInfoCache["$table.$field"] = new ORAField( $res->fetchRow() );
 879+ return $this->mFieldInfoCache["$table.$field"];
880880 }
881881
882882 function begin( $fname = '' ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60731Fixed variable name typo from r60665. (problems while sending file in previou...freakolowsky14:00, 6 January 2010

Status & tagging log