Merge "Fix the (un)watch token to include the namespace name."
[lhc/web/wiklou.git] / includes / specials / SpecialListusers.php
index 367adef..993285f 100644 (file)
@@ -191,9 +191,8 @@ class UsersPager extends AlphabeticPager {
                }
 
                $edits = '';
-               global $wgEdititis;
-               if ( !$this->including && $wgEdititis ) {
-                       // @fixme i18n issue: Hardcoded square brackets.
+               if ( !$this->including && $this->getConfig()->get( 'Edititis' ) ) {
+                       // @todo fixme i18n issue: Hardcoded square brackets.
                        $edits = ' [' .
                                $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped() .
                                ']';
@@ -232,14 +231,12 @@ class UsersPager extends AlphabeticPager {
         * @return string
         */
        function getPageHeader() {
-               global $wgScript;
-
                list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
 
                # Form tag
                $out = Xml::openElement(
                        'form',
-                       array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' )
+                       array( 'method' => 'get', 'action' => wfScript(), 'id' => 'mw-listusers-form' )
                ) .
                        Xml::fieldset( $this->msg( 'listusers' )->text() ) .
                        Html::hidden( 'title', $self );
@@ -399,6 +396,18 @@ class SpecialListUsers extends IncludableSpecialPage {
                $this->getOutput()->addHTML( $s );
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit = 10 ) {
+               $subpages = User::getAllGroups();
+               return self::prefixSearchArray( $search, $limit, $subpages );
+       }
+
        protected function getGroupName() {
                return 'users';
        }