From: Sam Reed Date: Sat, 28 Aug 2010 00:54:16 +0000 (+0000) Subject: Followup r71831, it's not mutually exclusive! X-Git-Tag: 1.31.0-rc.0~35292 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=68b89f0b6bd9f048791df32232f85d45b80fedc6;p=lhc%2Fweb%2Fwiklou.git Followup r71831, it's not mutually exclusive! Add missing if --- 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(); }