(bug 24722) Only show blockinfo if user is actually blocked for list=allusers
authorX! <soxred93@users.mediawiki.org>
Sun, 8 Aug 2010 15:33:43 +0000 (15:33 +0000)
committerX! <soxred93@users.mediawiki.org>
Sun, 8 Aug 2010 15:33:43 +0000 (15:33 +0000)
RELEASE-NOTES
includes/api/ApiQueryAllUsers.php

index c0c25bf..b921d9e 100644 (file)
@@ -336,7 +336,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   allpages, and allusers
 * (bug 24236) Add add, remove, add-self, remove-self tags to meta=siteinfo&siprop=usergroups
 * (bug 24484) Add prop=pageprops module 
-* (bug 24330) Add &redirect parameter to ?action=edit  
+* (bug 24330) Add &redirect parameter to ?action=edit 
+* (bug 24722) For list=allusers&auprop=blockinfo, only show blockedby and blockreason if 
+  the user is actually blocked.
 
 === Languages updated in 1.17 ===
 
index f3e469d..5cc5602 100644 (file)
@@ -157,7 +157,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                // Record new user's data
                                $lastUser = $row->user_name;
                                $lastUserData = array( 'name' => $lastUser );
-                               if ( $fld_blockinfo ) {
+                               if ( $fld_blockinfo && !is_null( $row->blocker_name ) ) {
                                        $lastUserData['blockedby'] = $row->blocker_name;
                                        $lastUserData['blockreason'] = $row->ipb_reason;
                                }