Support offsets in prefix searching
[lhc/web/wiklou.git] / includes / specials / SpecialListusers.php
index 993285f..fa20994 100644 (file)
@@ -69,7 +69,9 @@ class UsersPager extends AlphabeticPager {
                $this->editsOnly = $request->getBool( 'editsOnly' );
                $this->creationSort = $request->getBool( 'creationSort' );
                $this->including = $including;
-               $this->mDefaultDirection = $request->getBool( 'desc' );
+               $this->mDefaultDirection = $request->getBool( 'desc' )
+                       ? IndexPager::DIR_DESCENDING
+                       : IndexPager::DIR_ASCENDING;
 
                $this->requestedUser = '';
 
@@ -192,10 +194,8 @@ class UsersPager extends AlphabeticPager {
 
                $edits = '';
                if ( !$this->including && $this->getConfig()->get( 'Edititis' ) ) {
-                       // @todo fixme i18n issue: Hardcoded square brackets.
-                       $edits = ' [' .
-                               $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped() .
-                               ']';
+                       $count = $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped();
+                       $edits = $this->msg( 'word-separator' )->escaped() . $this->msg( 'brackets', $count )->escaped();
                }
 
                $created = '';
@@ -397,15 +397,12 @@ class SpecialListUsers extends IncludableSpecialPage {
        }
 
        /**
-        * Return an array of subpages beginning with $search that this special page will accept.
+        * Return an array of subpages 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
+        * @return string[] subpages
         */
-       public function prefixSearchSubpages( $search, $limit = 10 ) {
-               $subpages = User::getAllGroups();
-               return self::prefixSearchArray( $search, $limit, $subpages );
+       public function getSubpagesForPrefixSearch() {
+               return User::getAllGroups();
        }
 
        protected function getGroupName() {