00001 <?php 00002 # 00003 # This class is used to get a list of users flagged with "sysop" 00004 # right. 00005 00006 require_once("QueryPage.php"); 00007 00008 class ListAdminsPage extends PageQueryPage { 00009 00010 function getName() { 00011 return 'Listadmins'; 00012 } 00013 00014 function sortDescending() { 00015 return false; 00016 } 00017 00018 function getSQL() { 00019 global $wgIsPg; 00020 $usertable = $wgIsPg?'"user"':'user'; 00021 $userspace = Namespace::getUser(); 00022 return 'SELECT user_rights as type,'.$userspace.' as namespace,'. 00023 'user_name as title, user_name as value '. 00024 "FROM $usertable ". 00025 'WHERE user_rights LIKE "%sysop%"'; 00026 } 00027 } 00028 00029 function wfSpecialListadmins() { 00030 list( $limit, $offset ) = wfCheckLimits(); 00031 00032 $sla = new ListAdminsPage(); 00033 00034 return $sla->doQuery( $offset, $limit ); 00035 } 00036 00037 ?>