* Moved content from liveCmdLine.inc into commandLine.inc, obsoleting the former.
[mediawiki.git] / includes / SpecialListusers.php
blob08229f8d653a6de9dc00779394062cfb3be58b67
1 <?php
3 require_once("QueryPage.php");
5 class ListUsersPage extends QueryPage {
7 function getName() {
8 return "Listusers";
11 function getSQL() {
12 global $wgIsPg;
13 $usertable = $wgIsPg?'"user"':'user';
14 $userspace = Namespace::getUser();
15 return "SELECT user_rights as type, $userspace as namespace, user_name as title, user_name as value FROM $usertable";
18 function sortDescending() {
19 return false;
22 function formatResult( $skin, $result ) {
23 global $wgLang;
24 $name = $skin->makeKnownLink( $wgLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
25 if( '' != $result->type ) {
26 $name .= ' (' .
27 $skin->makeKnownLink( wfMsg( "administrators" ), $result->type) .
28 ')';
30 return $name;
34 function wfSpecialListusers() {
35 global $wgUser, $wgOut, $wgLang, $wgIsPg;
37 list( $limit, $offset ) = wfCheckLimits();
39 $slu = new ListUsersPage();
41 return $slu->doQuery( $offset, $limit );