r84264 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84263‎ | r84264 | r84265 >
Date:20:50, 18 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Improve query building if's to cater for addition of columns
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryFilearchive.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryFilearchive.php
@@ -73,10 +73,9 @@
7474 if ( $fld_user ) {
7575 $this->addFields( array( 'fa_user', 'fa_user_text' ) );
7676 }
77 - $this->addFieldsIf( 'fa_size', $fld_size );
7877
79 - if ( $fld_dimensions ) {
80 - $this->addFields( array( 'fa_height', 'fa_width' ) );
 78+ if ( $fld_dimensions || $fld_size ) {
 79+ $this->addFields( array( 'fa_height', 'fa_width', 'fa_size' ) );
8180 }
8281
8382 $this->addFieldsIf( 'fa_description', $fld_description );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84261Followup r84260, normalise API behaviour, and fixup descriptionreedy20:30, 18 March 2011

Status & tagging log