2004-02-18 02:15:00 +00:00
|
|
|
<?php
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
|
|
|
|
*
|
2004-09-03 23:00:01 +00:00
|
|
|
* @package MediaWiki
|
|
|
|
|
* @subpackage SpecialPage
|
2004-09-02 23:28:24 +00:00
|
|
|
*/
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
2004-06-12 20:14:55 +00:00
|
|
|
require_once("QueryPage.php");
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
|
|
|
|
* This class is used to get a list of user. The ones with specials
|
|
|
|
|
* rights (sysop, bureaucrat, developer) will have them displayed
|
|
|
|
|
* next to their names.
|
|
|
|
|
*
|
2004-09-03 23:00:01 +00:00
|
|
|
* @package MediaWiki
|
|
|
|
|
* @subpackage SpecialPage
|
2004-09-02 23:28:24 +00:00
|
|
|
*/
|
2004-06-12 20:14:55 +00:00
|
|
|
class ListUsersPage extends QueryPage {
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2004-06-12 20:14:55 +00:00
|
|
|
function getName() {
|
|
|
|
|
return "Listusers";
|
|
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2004-06-12 20:14:55 +00:00
|
|
|
function getSQL() {
|
2004-07-18 08:48:43 +00:00
|
|
|
$dbr =& wfGetDB( DB_SLAVE );
|
2004-08-24 20:41:07 +00:00
|
|
|
$user = $dbr->tableName( 'user' );
|
|
|
|
|
$user_rights = $dbr->tableName( 'user_rights' );
|
2004-06-12 20:14:55 +00:00
|
|
|
$userspace = Namespace::getUser();
|
2004-10-24 09:21:53 +00:00
|
|
|
return "SELECT ur_rights as type, $userspace as namespace, user_name as title, " .
|
2004-10-24 09:51:13 +00:00
|
|
|
"user_name as value FROM $user LEFT JOIN $user_rights ON user_id = ur_user";
|
2004-06-12 20:14:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function sortDescending() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2004-06-12 20:14:55 +00:00
|
|
|
function formatResult( $skin, $result ) {
|
2004-09-24 16:24:43 +00:00
|
|
|
global $wgContLang;
|
|
|
|
|
$name = $skin->makeLink( $wgContLang->getNsText($result->namespace) . ':' . $result->title, $result->title );
|
2004-06-12 20:14:55 +00:00
|
|
|
if( '' != $result->type ) {
|
|
|
|
|
$name .= ' (' .
|
2004-09-24 18:24:01 +00:00
|
|
|
$skin->makeLink( wfMsgForContent( "administrators" ), $result->type) .
|
2004-06-12 20:14:55 +00:00
|
|
|
')';
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
2004-06-12 20:14:55 +00:00
|
|
|
return $name;
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
2004-06-12 20:14:55 +00:00
|
|
|
}
|
|
|
|
|
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
|
|
|
|
* constructor
|
|
|
|
|
*/
|
2004-06-12 20:14:55 +00:00
|
|
|
function wfSpecialListusers() {
|
2004-07-10 03:09:26 +00:00
|
|
|
global $wgUser, $wgOut, $wgLang;
|
2004-06-12 20:14:55 +00:00
|
|
|
|
|
|
|
|
list( $limit, $offset ) = wfCheckLimits();
|
|
|
|
|
|
|
|
|
|
$slu = new ListUsersPage();
|
|
|
|
|
|
|
|
|
|
return $slu->doQuery( $offset, $limit );
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|