using LIKE "%sysop%" to allow listing of sysops with other rights.
[lhc/web/wiklou.git] / includes / SpecialListadmins.php
1 <?php
2
3 require_once("QueryPage.php");
4
5 class ListAdminsPage extends PageQueryPage {
6
7 function getName() {
8 return 'Listadmins';
9 }
10
11 function sortDescending() {
12 return false;
13 }
14
15 function getSQL() {
16 global $wgIsPg;
17 $usertable = $wgIsPg?'"user"':'user';
18 $userspace = Namespace::getUser();
19 return 'SELECT user_rights as type,'.$userspace.' as namespace,'.
20 'user_name as title, user_name as value '.
21 "FROM $usertable ".
22 'WHERE user_rights LIKE "%sysop%"';
23 }
24 }
25
26 function wfSpecialListadmins() {
27 list( $limit, $offset ) = wfCheckLimits();
28
29 $sla = new ListAdminsPage();
30
31 return $sla->doQuery( $offset, $limit );
32 }
33
34 ?>