Disable $wgUseGzip by default since it's wildly incompatible with
[lhc/web/wiklou.git] / includes / SpecialListusers.php
1 <?php
2 #
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.
6
7 require_once("QueryPage.php");
8
9 class ListUsersPage extends QueryPage {
10
11 function getName() {
12 return "Listusers";
13 }
14
15 function getSQL() {
16 $dbr =& wfGetDB( DB_SLAVE );
17 $usertable = $dbr->tableName( 'user' );
18 $userspace = Namespace::getUser();
19 return "SELECT user_rights as type, $userspace as namespace, user_name as title, " .
20 "user_name as value FROM $usertable";
21 }
22
23 function sortDescending() {
24 return false;
25 }
26
27 function formatResult( $skin, $result ) {
28 global $wgLang;
29 $name = $skin->makeLink( $wgLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
30 if( '' != $result->type ) {
31 $name .= ' (' .
32 $skin->makeLink( wfMsg( "administrators" ), $result->type) .
33 ')';
34 }
35 return $name;
36 }
37 }
38
39 function wfSpecialListusers() {
40 global $wgUser, $wgOut, $wgLang;
41
42 list( $limit, $offset ) = wfCheckLimits();
43
44 $slu = new ListUsersPage();
45
46 return $slu->doQuery( $offset, $limit );
47 }
48
49 ?>