Make Math rendering options user settable strings in MediaWiki namespace. Last batch
[mediawiki.git] / includes / SpecialListusers.php
blob5a317f2a020b45ce17b72e38027fdf60a2e232cc
1 <?php
3 # This class is used to get a list of user. The ones with specials
4 # rights (sysop, bureaucrat, developer) will have them displayed
5 # next to their names.
7 require_once("QueryPage.php");
9 class ListUsersPage extends QueryPage {
11 function getName() {
12 return "Listusers";
15 function getSQL() {
16 $usertable = wfTableName( 'user', DB_READ );
17 $userspace = Namespace::getUser();
18 return "SELECT user_rights as type, $userspace as namespace, user_name as title, user_name as value FROM $usertable";
21 function sortDescending() {
22 return false;
25 function formatResult( $skin, $result ) {
26 global $wgLang;
27 $name = $skin->makeKnownLink( $wgLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
28 if( '' != $result->type ) {
29 $name .= ' (' .
30 $skin->makeKnownLink( wfMsg( "administrators" ), $result->type) .
31 ')';
33 return $name;
37 function wfSpecialListusers() {
38 global $wgUser, $wgOut, $wgLang;
40 list( $limit, $offset ) = wfCheckLimits();
42 $slu = new ListUsersPage();
44 return $slu->doQuery( $offset, $limit );