* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE * Converted to use SQL wrapper functions instead of direct SQL in various places * Experimental method for preserving the chronological order of events when slave servers are used. Untested. * Fixes to the new post-parse existence test feature * Some.. other stuff
37 lines
734 B
PHP
37 lines
734 B
PHP
<?php
|
|
#
|
|
# This class is used to get a list of users flagged with "sysop"
|
|
# right.
|
|
|
|
require_once("QueryPage.php");
|
|
|
|
class ListAdminsPage extends PageQueryPage {
|
|
|
|
function getName() {
|
|
return 'Listadmins';
|
|
}
|
|
|
|
function sortDescending() {
|
|
return false;
|
|
}
|
|
|
|
function getSQL() {
|
|
$dbr =& wfGetDB( DB_SLAVE );
|
|
$user = $dbr->tableName( 'user' );
|
|
$userspace = Namespace::getUser();
|
|
return 'SELECT user_rights as type,'.$userspace.' as namespace,'.
|
|
'user_name as title, user_name as value '.
|
|
"FROM $user ".
|
|
'WHERE user_rights LIKE "%sysop%"';
|
|
}
|
|
}
|
|
|
|
function wfSpecialListadmins() {
|
|
list( $limit, $offset ) = wfCheckLimits();
|
|
|
|
$sla = new ListAdminsPage();
|
|
|
|
return $sla->doQuery( $offset, $limit );
|
|
}
|
|
|
|
?>
|