'SpecialImport' => 'includes/specials/SpecialImport.php',
'SpecialListFiles' => 'includes/specials/SpecialListfiles.php',
'SpecialListGroupRights' => 'includes/specials/SpecialListgrouprights.php',
+ 'SpecialListUsers' => 'includes/specials/SpecialListusers.php',
'SpecialLockdb' => 'includes/specials/SpecialLockdb.php',
'SpecialLog' => 'includes/specials/SpecialLog.php',
'SpecialMergeHistory' => 'includes/specials/SpecialMergeHistory.php',
'Preferences' => 'SpecialPreferences',
'Contributions' => 'SpecialContributions',
'Listgrouprights' => 'SpecialListGroupRights',
- 'Listusers' => array( 'SpecialPage', 'Listusers' ),
+ 'Listusers' => 'SpecialListUsers' ,
'Listadmins' => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ),
'Listbots' => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ),
'Activeusers' => 'SpecialActiveUsers',
}
/**
- * constructor
- * $par string (optional) A group to list users from
+ * @ingroup SpecialPage
*/
-function wfSpecialListusers( $par = null ) {
- global $wgOut;
-
- $up = new UsersPager($par);
-
- # getBody() first to check, if empty
- $usersbody = $up->getBody();
- $s = Xml::openElement( 'div', array('class' => 'mw-spcontent') );
- $s .= $up->getPageHeader();
- if( $usersbody ) {
- $s .= $up->getNavigationBar();
- $s .= '<ul>' . $usersbody . '</ul>';
- $s .= $up->getNavigationBar() ;
- } else {
- $s .= '<p>' . wfMsgHTML('listusers-noresult') . '</p>';
- };
- $s .= Xml::closeElement( 'div' );
- $wgOut->addHTML( $s );
+class SpecialListUsers extends SpecialPage {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct( 'Listusers' );
+ }
+
+ /**
+ * Show the special page
+ *
+ * @param $par string (optional) A group to list users from
+ */
+ public function execute( $par ) {
+ global $wgOut;
+
+ $this->setHeaders();
+ $this->outputHeader();
+
+ $up = new UsersPager( $par );
+
+ # getBody() first to check, if empty
+ $usersbody = $up->getBody();
+
+ $s = $up->getPageHeader();
+ if( $usersbody ) {
+ $s .= $up->getNavigationBar();
+ $s .= Html::rawElement( 'ul', array(), $usersbody );
+ $s .= $up->getNavigationBar();
+ } else {
+ $s .= wfMessage( 'listusers-noresult' )->parseBlock();
+ }
+
+ $wgOut->addHTML( $s );
+ }
}