r47467 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47466‎ | r47467 | r47468 >
Date:20:34, 18 February 2009
Author:raymond
Status:ok
Tags:
Comment:
* Special:ListUsers: Sort list of usergroups by alphabet
* Add an ID to the inputform
* Use specific Xml::fieldset function
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListusers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialListusers.php
@@ -171,10 +171,9 @@
172172 $self = $this->getTitle();
173173
174174 # Form tag
175 - $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
176 - '<fieldset>' .
177 - Xml::element( 'legend', array(), wfMsg( 'listusers' ) );
178 - $out .= Xml::hidden( 'title', $self->getPrefixedDbKey() );
 175+ $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
 176+ Xml::fieldset( wfMsg( 'listusers' ) ) .
 177+ Xml::hidden( 'title', $self->getPrefixedDbKey() );
179178
180179 # Username field
181180 $out .= Xml::label( wfMsg( 'listusersfrom' ), 'offset' ) . ' ' .
@@ -198,17 +197,22 @@
199198 $out .= Xml::hidden( 'limit', $this->mLimit );
200199 $out .= Xml::submitButton( wfMsg( 'allpagessubmit' ) );
201200 wfRunHooks( 'SpecialListusersHeader', array( $this, &$out ) );
202 - $out .= '</fieldset>' .
 201+ $out .= Xml::closeElement( 'fieldset' ) .
203202 Xml::closeElement( 'form' );
204203
205204 return $out;
206205 }
207206
 207+ /**
 208+ * Get a list of all explicit groups
 209+ * @return array
 210+ */
208211 function getAllGroups() {
209212 $result = array();
210213 foreach( User::getAllGroups() as $group ) {
211214 $result[$group] = User::getGroupName( $group );
212215 }
 216+ asort( $result );
213217 return $result;
214218 }
215219
Index: trunk/phase3/RELEASE-NOTES
@@ -110,6 +110,7 @@
111111 * (bug 14981) Shared repositories can now have display names, located at
112112 Mediawiki:Shared-repo-name-REPONAME, where REPONAME is the name in
113113 $wgForeignFileRepos
 114+* Special:ListUsers: Sort list of usergroups by alphabet
114115
115116 === Bug fixes in 1.15 ===
116117 * (bug 16968) Special:Upload no longer throws useless warnings.

Status & tagging log