DB error log
[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 global $wgIsPg;
17 $usertable = $wgIsPg?'"user"':'user';
18 $userspace = Namespace::getUser();
19 return "SELECT user_rights as type, $userspace as namespace, user_name as title, user_name as value FROM $usertable";
20 }
21
22 function sortDescending() {
23 return false;
24 }
25
26 function formatResult( $skin, $result ) {
27 global $wgLang;
28 $name = $skin->makeKnownLink( $wgLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
29 if( '' != $result->type ) {
30 $name .= ' (' .
31 $skin->makeKnownLink( wfMsg( "administrators" ), $result->type) .
32 ')';
33 }
34 return $name;
35 }
36 }
37
38 function wfSpecialListusers() {
39 global $wgUser, $wgOut, $wgLang, $wgIsPg;
40
41 list( $limit, $offset ) = wfCheckLimits();
42
43 $slu = new ListUsersPage();
44
45 return $slu->doQuery( $offset, $limit );
46 }
47
48 ?>