r84431 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84430‎ | r84431 | r84432 >
Date:22:46, 20 March 2011
Author:reedy
Status:ok
Tags:
Comment:
As I've removed most of Roans reason to use php magic variables, completely remove them this time.

Followup r84430
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBase.php
@@ -251,18 +251,12 @@
252252 * @return ResultWrapper
253253 */
254254 protected function select( $method, $extraQuery = array() ) {
255 - $tables = $this->tables;
256 - $fields = $this->fields;
257 - $where = $this->where;
258 - $options = $this->options;
259 - $join_conds = $this->join_conds;
260255
261 - // Merge $this->tables with $extraQuery['tables'], $this->fields with $extraQuery['fields'], etc.
262 - foreach ( array( 'tables', 'fields', 'where', 'options', 'join_conds' ) as $var ) {
263 - if ( isset( $extraQuery[$var] ) ) {
264 - $$var = array_merge( $$var, (array)$extraQuery[$var] );
265 - }
266 - }
 256+ $tables = array_merge( $this->tables, isset( $extraQuery['tables'] ) ? (array)$extraQuery['tables'] : array() );
 257+ $fields = array_merge( $this->fields, isset( $extraQuery['fields'] ) ? (array)$extraQuery['fields'] : array() );
 258+ $where = array_merge( $this->where, isset( $extraQuery['where'] ) ? (array)$extraQuery['where'] : array() );
 259+ $options = array_merge( $this->options, isset( $extraQuery['options'] ) ? (array)$extraQuery['options'] : array() );
 260+ $join_conds = array_merge( $this->join_conds, isset( $extraQuery['join_conds'] ) ? (array)$extraQuery['join_conds'] : array() );
267261
268262 // getDB has its own profileDBIn/Out calls
269263 $db = $this->getDB();

Follow-up revisions

RevisionCommit summaryAuthorDate
r85435MFT: r84431, r84464, r84543, r84553, r84573, r84574, r84577, r84729, r84765, ...demon14:00, 5 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84430Followup r84392...reedy22:35, 20 March 2011

Status & tagging log