From 4da779f123c04af8a4fa1fa547a56bedd2daea45 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 12 Sep 2010 15:15:30 +0000 Subject: [PATCH] (bug 24987) Special:ListUsers does not take external groups into account. Patch by Mathias Ertl --- CREDITS | 1 + RELEASE-NOTES | 1 + includes/specials/SpecialListusers.php | 7 +++---- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CREDITS b/CREDITS index 861f8879b8..0ca55dd88f 100644 --- a/CREDITS +++ b/CREDITS @@ -102,6 +102,7 @@ following names for their contribution to the product. * Marcin Cieślak * Marcus Buck * Marooned +* Mathias Ertl * Matthew Britton * mati * Max Sikström diff --git a/RELEASE-NOTES b/RELEASE-NOTES index abbb8b3361..710a7e68bf 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -315,6 +315,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 6204) TOC not properly rendered when using $wgMaxTocLevel * (bug 24977) The accesskey in history page now lead directly to the diff instead of alterning focus between the two buttons. +* (bug 24987) Special:ListUsers does not take external groups into account === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 8d53f571e9..d959f5f534 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -125,13 +125,12 @@ class UsersPager extends AlphabeticPager { $userPage = Title::makeTitle( NS_USER, $row->user_name ); $name = $this->getSkin()->link( $userPage, htmlspecialchars( $userPage->getText() ) ); - if( $row->numgroups > 1 || ( $this->requestedGroup && $row->numgroups == 1 ) ) { + $groups_list = self::getGroups( $row->user_id ); + if( count( $groups_list ) > 0 ) { $list = array(); - foreach( self::getGroups( $row->user_id ) as $group ) + foreach( $groups_list as $group ) $list[] = self::buildGroupLink( $group ); $groups = $wgLang->commaList( $list ); - } elseif( $row->numgroups == 1 ) { - $groups = self::buildGroupLink( $row->singlegroup ); } else { $groups = ''; } -- 2.20.1