Merge "Spellchecked /includes directory"
[lhc/web/wiklou.git] / includes / specials / SpecialListusers.php
index ea598c3..ed21396 100644 (file)
@@ -36,7 +36,7 @@ class UsersPager extends AlphabeticPager {
 
        /**
         * @param $context IContextSource
-        * @param $par array (Default null)
+        * @param array $par (Default null)
         * @param $including boolean Whether this page is being transcluded in
         * another page
         */
@@ -116,7 +116,7 @@ class UsersPager extends AlphabeticPager {
                $options['GROUP BY'] = $this->creationSort ? 'user_id' : 'user_name';
 
                $query = array(
-                       'tables' => array( 'user', 'user_groups', 'ipblocks'),
+                       'tables' => array( 'user', 'user_groups', 'ipblocks' ),
                        'fields' => array(
                                'user_name' => $this->creationSort ? 'MAX(user_name)' : 'user_name',
                                'user_id' => $this->creationSort ? 'user_id' : 'MAX(user_id)',
@@ -212,17 +212,26 @@ class UsersPager extends AlphabeticPager {
                list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
 
                # Form tag
-               $out  = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
+               $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
                        Xml::fieldset( $this->msg( 'listusers' )->text() ) .
                        Html::hidden( 'title', $self );
 
                # Username field
                $out .= Xml::label( $this->msg( 'listusersfrom' )->text(), 'offset' ) . ' ' .
-                       Xml::input( 'username', 20, $this->requestedUser, array( 'id' => 'offset' ) ) . ' ';
+                       Html::input(
+                               'username',
+                               $this->requestedUser,
+                               'text',
+                               array(
+                                       'id' => 'offset',
+                                       'size' => 20,
+                                       'autofocus' => $this->requestedUser === ''
+                               )
+                       ) . ' ';
 
                # Group drop-down list
                $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ' .
-                       Xml::openElement('select',  array( 'name' => 'group', 'id' => 'group' ) ) .
+                       Xml::openElement( 'select', array( 'name' => 'group', 'id' => 'group' ) ) .
                        Xml::option( $this->msg( 'group-all' )->text(), '' );
                foreach( $this->getAllGroups() as $group => $groupText )
                        $out .= Xml::option( $groupText, $group, $group == $this->requestedGroup );
@@ -288,8 +297,8 @@ class UsersPager extends AlphabeticPager {
        /**
         * Format a link to a group description page
         *
-        * @param $group String: group name
-        * @param $username String Username
+        * @param string $group group name
+        * @param string $username Username
         * @return string
         */
        protected static function buildGroupLink( $group, $username ) {
@@ -312,7 +321,7 @@ class SpecialListUsers extends IncludableSpecialPage {
        /**
         * Show the special page
         *
-        * @param $par string (optional) A group to list users from
+        * @param string $par (optional) A group to list users from
         */
        public function execute( $par ) {
                $this->setHeaders();
@@ -338,4 +347,8 @@ class SpecialListUsers extends IncludableSpecialPage {
 
                $this->getOutput()->addHTML( $s );
        }
+
+       protected function getGroupName() {
+               return 'users';
+       }
 }