Merge "Add SpecialListUsers::prefixSearchSubpages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 18 Jul 2014 16:22:02 +0000 (16:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 18 Jul 2014 16:22:02 +0000 (16:22 +0000)
includes/specials/SpecialListusers.php

index 367adef..cf11881 100644 (file)
@@ -399,6 +399,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 integer $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';
        }