From 88248815af5a01dcc40fd60839daa200d45aebf2 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Fri, 25 Apr 2008 19:18:48 +0000 Subject: [PATCH] Tweak Special:Listusers for CentralAuth --- includes/SpecialListusers.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/includes/SpecialListusers.php b/includes/SpecialListusers.php index 924bb5d990..102c242cbc 100644 --- a/includes/SpecialListusers.php +++ b/includes/SpecialListusers.php @@ -140,8 +140,8 @@ class UsersPager extends AlphabeticPager { $out .= Xml::label( wfMsg( 'group' ), 'group' ) . ' ' . Xml::openElement('select', array( 'name' => 'group', 'id' => 'group' ) ) . Xml::option( wfMsg( 'group-all' ), '' ); - foreach( User::getAllGroups() as $group ) - $out .= Xml::option( User::getGroupName( $group ), $group, $group == $this->requestedGroup ); + foreach( $this->getAllGroups() as $group => $groupText ) + $out .= Xml::option( $groupText, $group, $group == $this->requestedGroup ); $out .= Xml::closeElement( 'select' ) . ' '; wfRunHooks( 'SpecialListusersHeaderForm', array( $this, &$out ) ); @@ -157,6 +157,14 @@ class UsersPager extends AlphabeticPager { return $out; } + function getAllGroups() { + $result = array(); + foreach( User::getAllGroups() as $group ) { + $result[$group] = User::getGroupName( $group ); + } + return $result; + } + /** * Preserve group and username offset parameters when paging * @return array @@ -195,7 +203,7 @@ class UsersPager extends AlphabeticPager { * @param string $group * @return string */ - private static function buildGroupLink( $group ) { + protected static function buildGroupLink( $group ) { static $cache = array(); if( !isset( $cache[$group] ) ) $cache[$group] = User::makeGroupLinkHtml( $group, User::getGroupMember( $group ) ); -- 2.20.1