Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SpecialListusers.php

Go to the documentation of this file.
00001 <?php 00002 # 00003 # This class is used to get a list of user. The ones with specials 00004 # rights (sysop, bureaucrat, developer) will have them displayed 00005 # next to their names. 00006 00007 require_once("QueryPage.php"); 00008 00009 class ListUsersPage extends QueryPage { 00010 00011 function getName() { 00012 return "Listusers"; 00013 } 00014 00015 function getSQL() { 00016 global $wgIsPg; 00017 $usertable = $wgIsPg?'"user"':'user'; 00018 $userspace = Namespace::getUser(); 00019 return "SELECT user_rights as type, $userspace as namespace, user_name as title, user_name as value FROM $usertable"; 00020 } 00021 00022 function sortDescending() { 00023 return false; 00024 } 00025 00026 function formatResult( $skin, $result ) { 00027 global $wgLang; 00028 $name = $skin->makeKnownLink( $wgLang->getNsText($result->namespace) . ':' . $result->title, $result->title ); 00029 if( '' != $result->type ) { 00030 $name .= ' (' . 00031 $skin->makeKnownLink( wfMsg( "administrators" ), $result->type) . 00032 ')'; 00033 } 00034 return $name; 00035 } 00036 } 00037 00038 function wfSpecialListusers() { 00039 global $wgUser, $wgOut, $wgLang, $wgIsPg; 00040 00041 list( $limit, $offset ) = wfCheckLimits(); 00042 00043 $slu = new ListUsersPage(); 00044 00045 return $slu->doQuery( $offset, $limit ); 00046 } 00047 00048 ?>

Generated on Tue Jun 29 23:40:07 2004 for Mediawiki by doxygen 1.3.7