$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 ) );
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
* @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 ) );