r71835 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71834‎ | r71835 | r71836 >
Date:00:54, 28 August 2010
Author:reedy
Status:ok
Tags:
Comment:
Followup r71831, it's not mutually exclusive!

Add missing if
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRevisions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -201,7 +201,8 @@
202202
203203 if ( isset( $prop['user'] ) ) {
204204 $vals['user'] = $file->getUser();
205 - } else if ( isset( $prop['userid'] ) ) {
 205+ }
 206+ if ( isset( $prop['userid'] ) ) {
206207 $vals['userid'] = $file->getUser( 'id' );
207208 }
208209 if ( !$file->getUser( 'id' ) ) {
Index: trunk/phase3/includes/api/ApiQueryRevisions.php
@@ -372,7 +372,8 @@
373373 } else {
374374 if ( $this->fld_user ) {
375375 $vals['user'] = $revision->getUserText();
376 - } else {
 376+ }
 377+ if ( $this->fld_userid ) {
377378 $user = User::newFromText( $revision->getUserText() );
378379 $vals['userid'] = $user->getId();
379380 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71831Part of Bug 19195 - Make user IDs more readily available with the API...reedy00:37, 28 August 2010

Status & tagging log