http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71835

Revision: 71835
Author:   reedy
Date:     2010-08-28 00:54:16 +0000 (Sat, 28 Aug 2010)

Log Message:
-----------
Followup r71831, it's not mutually exclusive!

Add missing if

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiQueryImageInfo.php
    trunk/phase3/includes/api/ApiQueryRevisions.php

Modified: trunk/phase3/includes/api/ApiQueryImageInfo.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryImageInfo.php     2010-08-28 00:52:38 UTC 
(rev 71834)
+++ trunk/phase3/includes/api/ApiQueryImageInfo.php     2010-08-28 00:54:16 UTC 
(rev 71835)
@@ -201,7 +201,8 @@
 
                        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' ) ) {

Modified: trunk/phase3/includes/api/ApiQueryRevisions.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryRevisions.php     2010-08-28 00:52:38 UTC 
(rev 71834)
+++ trunk/phase3/includes/api/ApiQueryRevisions.php     2010-08-28 00:54:16 UTC 
(rev 71835)
@@ -372,7 +372,8 @@
                        } else {
                                if ( $this->fld_user ) {
                                        $vals['user'] = 
$revision->getUserText();
-                               } else {
+                               }
+                               if ( $this->fld_userid ) {
                                        $user = User::newFromText( 
$revision->getUserText() );
                                        $vals['userid'] = $user->getId();
                                }



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to