fixed error handling (at least partially)
[mediawiki.git] / includes / SpecialListadmins.php
blob8518c43eafb0ac286c5a1ea9f9608bb89a9bcda8
1 <?php
3 # This class is used to get a list of users flagged with "sysop"
4 # right.
6 require_once("QueryPage.php");
8 class ListAdminsPage extends PageQueryPage {
10 function getName() {
11 return 'Listadmins';
14 function sortDescending() {
15 return false;
18 function getSQL() {
19 global $wgIsPg;
20 $usertable = $wgIsPg?'"user"':'user';
21 $userspace = Namespace::getUser();
22 return 'SELECT user_rights as type,'.$userspace.' as namespace,'.
23 'user_name as title, user_name as value '.
24 "FROM $usertable ".
25 'WHERE user_rights LIKE "%sysop%"';
29 function wfSpecialListadmins() {
30 list( $limit, $offset ) = wfCheckLimits();
32 $sla = new ListAdminsPage();
34 return $sla->doQuery( $offset, $limit );