From 68b89f0b6bd9f048791df32232f85d45b80fedc6 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 28 Aug 2010 00:54:16 +0000 Subject: [PATCH] Followup r71831, it's not mutually exclusive! Add missing if --- includes/api/ApiQueryImageInfo.php | 3 ++- includes/api/ApiQueryRevisions.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index e58f7ea569..d3c785bc32 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -201,7 +201,8 @@ class ApiQueryImageInfo extends ApiQueryBase { if ( isset( $prop['user'] ) ) { $vals['user'] = $file->getUser(); - } else if ( isset( $prop['userid'] ) ) { + } + if ( isset( $prop['userid'] ) ) { $vals['userid'] = $file->getUser( 'id' ); } if ( !$file->getUser( 'id' ) ) { diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 77c41b9d2b..610dd0b0bd 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -372,7 +372,8 @@ class ApiQueryRevisions extends ApiQueryBase { } else { if ( $this->fld_user ) { $vals['user'] = $revision->getUserText(); - } else { + } + if ( $this->fld_userid ) { $user = User::newFromText( $revision->getUserText() ); $vals['userid'] = $user->getId(); } -- 2.20.1