Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -690,6 +690,7 @@ |
691 | 691 | 'SpecialImport' => 'includes/specials/SpecialImport.php', |
692 | 692 | 'SpecialListFiles' => 'includes/specials/SpecialListfiles.php', |
693 | 693 | 'SpecialListGroupRights' => 'includes/specials/SpecialListgrouprights.php', |
| 694 | + 'SpecialListUsers' => 'includes/specials/SpecialListusers.php', |
694 | 695 | 'SpecialLockdb' => 'includes/specials/SpecialLockdb.php', |
695 | 696 | 'SpecialLog' => 'includes/specials/SpecialLog.php', |
696 | 697 | 'SpecialMergeHistory' => 'includes/specials/SpecialMergeHistory.php', |
Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -272,25 +272,42 @@ |
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
276 | | - * constructor |
277 | | - * $par string (optional) A group to list users from |
| 276 | + * @ingroup SpecialPage |
278 | 277 | */ |
279 | | -function wfSpecialListusers( $par = null ) { |
280 | | - global $wgOut; |
| 278 | +class SpecialListUsers extends SpecialPage { |
281 | 279 | |
282 | | - $up = new UsersPager($par); |
| 280 | + /** |
| 281 | + * Constructor |
| 282 | + */ |
| 283 | + public function __construct() { |
| 284 | + parent::__construct( 'Listusers' ); |
| 285 | + } |
283 | 286 | |
284 | | - # getBody() first to check, if empty |
285 | | - $usersbody = $up->getBody(); |
286 | | - $s = Xml::openElement( 'div', array('class' => 'mw-spcontent') ); |
287 | | - $s .= $up->getPageHeader(); |
288 | | - if( $usersbody ) { |
289 | | - $s .= $up->getNavigationBar(); |
290 | | - $s .= '<ul>' . $usersbody . '</ul>'; |
291 | | - $s .= $up->getNavigationBar() ; |
292 | | - } else { |
293 | | - $s .= '<p>' . wfMsgHTML('listusers-noresult') . '</p>'; |
294 | | - }; |
295 | | - $s .= Xml::closeElement( 'div' ); |
296 | | - $wgOut->addHTML( $s ); |
| 287 | + /** |
| 288 | + * Show the special page |
| 289 | + * |
| 290 | + * @param $par string (optional) A group to list users from |
| 291 | + */ |
| 292 | + public function execute( $par ) { |
| 293 | + global $wgOut; |
| 294 | + |
| 295 | + $this->setHeaders(); |
| 296 | + $this->outputHeader(); |
| 297 | + |
| 298 | + $up = new UsersPager( $par ); |
| 299 | + |
| 300 | + # getBody() first to check, if empty |
| 301 | + $usersbody = $up->getBody(); |
| 302 | + |
| 303 | + $s = $up->getPageHeader(); |
| 304 | + if( $usersbody ) { |
| 305 | + $s .= $up->getNavigationBar(); |
| 306 | + $s .= Html::rawElement( 'ul', array(), $usersbody ); |
| 307 | + $s .= $up->getNavigationBar(); |
| 308 | + } else { |
| 309 | + $s .= wfMessage( 'listusers-noresult' )->parseBlock(); |
| 310 | + } |
| 311 | + |
| 312 | + $wgOut->addHTML( $s ); |
| 313 | + } |
297 | 314 | } |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -134,7 +134,7 @@ |
135 | 135 | 'Preferences' => 'SpecialPreferences', |
136 | 136 | 'Contributions' => 'SpecialContributions', |
137 | 137 | 'Listgrouprights' => 'SpecialListGroupRights', |
138 | | - 'Listusers' => array( 'SpecialPage', 'Listusers' ), |
| 138 | + 'Listusers' => 'SpecialListUsers' , |
139 | 139 | 'Listadmins' => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ), |
140 | 140 | 'Listbots' => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ), |
141 | 141 | 'Activeusers' => 'SpecialActiveUsers', |