r23157 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23156‎ | r23157 | r23158 >
Date:11:50, 21 June 2007
Author:robchurch
Status:old
Tags:
Comment:
Minor code refactoring
Modified paths:
  • /trunk/phase3/includes/SpecialListusers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialListusers.php
@@ -122,31 +122,23 @@
123123 $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
124124 '<fieldset>' .
125125 Xml::element( 'legend', array(), wfMsg( 'listusers' ) );
126 -
127 - # Title
128126 $out .= Xml::hidden( 'title', $self->getPrefixedUrl() );
129127
130128 # Username field
131129 $out .= Xml::label( wfMsg( 'listusersfrom' ), 'offset' ) . ' ' .
132130 Xml::input( 'username', 20, $this->requestedUser, array( 'id' => 'offset' ) ) . ' ';
133131
134 - if( $this->mLimit )
135 - $out .= Xml::hidden( 'limit', $this->mLimit );
136 -
137132 # Group drop-down list
138133 $out .= Xml::label( wfMsg( 'group' ), 'group' ) . ' ' .
139134 Xml::openElement('select', array( 'name' => 'group', 'id' => 'group' ) ) .
140 - Xml::option( wfMsg( 'group-all' ), '' ); # Item for "all groups"
141 -
142 - $groups = User::getAllGroups();
143 - foreach( $groups as $group ) {
144 - $attribs = array( 'value' => $group );
145 - $attribs['selected'] = ( $group == $this->requestedGroup ) ? 'selected' : '';
146 - $out .= Xml::option( User::getGroupName( $group ), $attribs['value'], $attribs['selected'] );
147 - }
 135+ Xml::option( wfMsg( 'group-all' ), '' );
 136+ foreach( User::getAllGroups() as $group )
 137+ $out .= Xml::option( User::getGroupName( $group ), $group, $group == $this->requestedGroup );
148138 $out .= Xml::closeElement( 'select' ) . ' ';
149139
150140 # Submit button and form bottom
 141+ if( $this->mLimit )
 142+ $out .= Xml::hidden( 'limit', $this->mLimit );
151143 $out .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) .
152144 '</fieldset>' .
153145 Xml::closeElement( 'form' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r23203Merged revisions 23120-23202 via svnmerge from...david09:07, 22 June 2007

Status & tagging log