Enable autocompletion for Special:ListUsers
authorSouthparkfan <southparkfan223@hotmail.com>
Tue, 8 Sep 2015 17:25:37 +0000 (19:25 +0200)
committerSouthparkfan <southparkfan223@hotmail.com>
Tue, 8 Sep 2015 17:25:37 +0000 (19:25 +0200)
The "display users starting at" inputbox will now show some suggestions.

Bug: T105569
Change-Id: I5d9fd5ea34d247ea688b32102700e6cef2c1e527

includes/specials/SpecialListusers.php

index 9e7dc00..31200c8 100644 (file)
@@ -263,6 +263,8 @@ class UsersPager extends AlphabeticPager {
        function getPageHeader() {
                list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
 
+               $this->getOutput()->addModules( 'mediawiki.userSuggest' );
+
                # Form tag
                $out = Xml::openElement(
                        'form',
@@ -271,13 +273,14 @@ class UsersPager extends AlphabeticPager {
                        Xml::fieldset( $this->msg( 'listusers' )->text() ) .
                        Html::hidden( 'title', $self );
 
-               # Username field
+               # Username field (with autocompletion support)
                $out .= Xml::label( $this->msg( 'listusersfrom' )->text(), 'offset' ) . ' ' .
                        Html::input(
                                'username',
                                $this->requestedUser,
                                'text',
                                array(
+                                       'class' => 'mw-autocomplete-user',
                                        'id' => 'offset',
                                        'size' => 20,
                                        'autofocus' => $this->requestedUser === ''