'SpecialBlankpage' => 'includes/specials/SpecialBlankpage.php',
'SpecialBlockme' => 'includes/specials/SpecialBlockme.php',
'SpecialBookSources' => 'includes/specials/SpecialBooksources.php',
+ 'SpecialCategories' => 'includes/specials/SpecialCategories.php',
'SpecialComparePages' => 'includes/specials/SpecialComparePages.php',
'SpecialExport' => 'includes/specials/SpecialExport.php',
'SpecialFilepath' => 'includes/specials/SpecialFilepath.php',
# List of pages
'Allpages' => 'SpecialAllpages',
'Prefixindex' => 'SpecialPrefixindex',
- 'Categories' => array( 'SpecialPage', 'Categories' ),
+ 'Categories' => 'SpecialCategories',
'Disambiguations' => array( 'SpecialPage', 'Disambiguations' ),
'Listredirects' => array( 'SpecialPage', 'Listredirects' ),
* @ingroup SpecialPage
*/
-function wfSpecialCategories( $par=null ) {
- global $wgOut, $wgRequest;
+/**
+ * @ingroup SpecialPage
+ */
+class SpecialCategories extends SpecialPage {
+
+ function __construct() {
+ parent::__construct( 'Categories' );
+ }
- if( $par == '' ) {
- $from = $wgRequest->getText( 'from' );
- } else {
- $from = $par;
+ function execute( $par ) {
+ global $wgOut, $wgRequest;
+
+ $this->setHeaders();
+ $this->outputHeader();
+
+ $from = $wgRequest->getText( 'from', $par );
+
+ $cap = new CategoryPager( $from );
+ $cap->doQuery();
+
+ $wgOut->addHTML(
+ Html::openElement( 'div', array( 'class' => 'mw-spcontent' ) ) .
+ wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) .
+ $cap->getStartForm( $from ) .
+ $cap->getNavigationBar() .
+ '<ul>' . $cap->getBody() . '</ul>' .
+ $cap->getNavigationBar() .
+ Html::closeElement( 'div' )
+ );
}
- $cap = new CategoryPager( $from );
- $cap->doQuery();
- $wgOut->addHTML(
- Xml::openElement( 'div', array('class' => 'mw-spcontent') ) .
- wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) .
- $cap->getStartForm( $from ) .
- $cap->getNavigationBar() .
- '<ul>' . $cap->getBody() . '</ul>' .
- $cap->getNavigationBar() .
- Xml::closeElement( 'div' )
- );
}
/**