9 require_once("QueryPage.php");
12 * This class is used to get a list of user. The ones with specials
13 * rights (sysop, bureaucrat, developer) will have them displayed
14 * next to their names.
17 class ListUsersPage
extends QueryPage
{
24 $dbr =& wfGetDB( DB_SLAVE
);
25 $user = $dbr->tableName( 'user' );
26 $user_rights = $dbr->tableName( 'user_rights' );
27 $userspace = Namespace::getUser();
28 return "SELECT r.user_rights as type, $userspace as namespace, u.user_name as title, " .
29 "u.user_name as value FROM $user u LEFT JOIN $user_rights r ON u.user_id = r.user_id";
32 function sortDescending() {
36 function formatResult( $skin, $result ) {
38 $name = $skin->makeLink( $wgLang->getNsText($result->namespace) . ':' . $result->title
, $result->title
);
39 if( '' != $result->type
) {
41 $skin->makeLink( wfMsg( "administrators" ), $result->type
) .
51 function wfSpecialListusers() {
52 global $wgUser, $wgOut, $wgLang;
54 list( $limit, $offset ) = wfCheckLimits();
56 $slu = new ListUsersPage();
58 return $slu->doQuery( $offset, $limit );