* Special:ListUsers: Sort list of usergroups by alphabet
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 18 Feb 2009 20:34:13 +0000 (20:34 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 18 Feb 2009 20:34:13 +0000 (20:34 +0000)
* Add an ID to the inputform
* Use specific Xml::fieldset function

RELEASE-NOTES
includes/specials/SpecialListusers.php

index f17e3bc..0b5aaab 100644 (file)
@@ -110,6 +110,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14981) Shared repositories can now have display names, located at
   Mediawiki:Shared-repo-name-REPONAME, where REPONAME is the name in 
   $wgForeignFileRepos
+* Special:ListUsers: Sort list of usergroups by alphabet
 
 === Bug fixes in 1.15 ===
 * (bug 16968) Special:Upload no longer throws useless warnings.
index ff9e57e..418b9eb 100644 (file)
@@ -171,10 +171,9 @@ class UsersPager extends AlphabeticPager {
                $self = $this->getTitle();
 
                # Form tag
-               $out  = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
-                       '<fieldset>' .
-                       Xml::element( 'legend', array(), wfMsg( 'listusers' ) );
-               $out .= Xml::hidden( 'title', $self->getPrefixedDbKey() );
+               $out  = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
+                       Xml::fieldset( wfMsg( 'listusers' ) ) .
+                       Xml::hidden( 'title', $self->getPrefixedDbKey() );
 
                # Username field
                $out .= Xml::label( wfMsg( 'listusersfrom' ), 'offset' ) . ' ' .
@@ -198,17 +197,22 @@ class UsersPager extends AlphabeticPager {
                $out .= Xml::hidden( 'limit', $this->mLimit );
                $out .= Xml::submitButton( wfMsg( 'allpagessubmit' ) );
                wfRunHooks( 'SpecialListusersHeader', array( $this, &$out ) );
-               $out .= '</fieldset>' .
+               $out .= Xml::closeElement( 'fieldset' ) .
                        Xml::closeElement( 'form' );
 
                return $out;
        }
 
+       /**
+        * Get a list of all explicit groups
+        * @return array
+        */
        function getAllGroups() {
                $result = array();
                foreach( User::getAllGroups() as $group ) {
                        $result[$group] = User::getGroupName( $group );
                }
+               asort( $result );
                return $result;
        }