Add SpecialListUsers::prefixSearchSubpages
This shows the existing user groups as subpages on search suggestion Change-Id: I8c31c31d420287dd9d668186d1d5555488a9a3e9
This commit is contained in:
parent
c19e8359c5
commit
a305939bdd
1 changed files with 12 additions and 0 deletions
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue