From 0f6085a585b3380525892f933f7f6be43d8e0222 Mon Sep 17 00:00:00 2001 From: X! Date: Sun, 8 Aug 2010 15:33:43 +0000 Subject: [PATCH] (bug 24722) Only show blockinfo if user is actually blocked for list=allusers --- RELEASE-NOTES | 4 +++- includes/api/ApiQueryAllUsers.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c0c25bf95b..b921d9ebb8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index f3e469d169..5cc560246d 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -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; } -- 2.20.1