summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialCategories.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialCategories.php')
-rw-r--r--includes/specials/SpecialCategories.php38
1 files changed, 24 insertions, 14 deletions
diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php
index 9040c640..d01bfd7d 100644
--- a/includes/specials/SpecialCategories.php
+++ b/includes/specials/SpecialCategories.php
@@ -42,12 +42,12 @@ class SpecialCategories extends SpecialPage {
$this->getOutput()->addHTML(
Html::openElement( 'div', array( 'class' => 'mw-spcontent' ) ) .
- $this->msg( 'categoriespagetext', $cap->getNumRows() )->parseAsBlock() .
- $cap->getStartForm( $from ) .
- $cap->getNavigationBar() .
- '<ul>' . $cap->getBody() . '</ul>' .
- $cap->getNavigationBar() .
- Html::closeElement( 'div' )
+ $this->msg( 'categoriespagetext', $cap->getNumRows() )->parseAsBlock() .
+ $cap->getStartForm( $from ) .
+ $cap->getNavigationBar() .
+ '<ul>' . $cap->getBody() . '</ul>' .
+ $cap->getNavigationBar() .
+ Html::closeElement( 'div' )
);
}
@@ -66,7 +66,7 @@ class CategoryPager extends AlphabeticPager {
function __construct( IContextSource $context, $from ) {
parent::__construct( $context );
$from = str_replace( ' ', '_', $from );
- if( $from !== '' ) {
+ if ( $from !== '' ) {
$from = Title::capitalize( $from, NS_CATEGORY );
$this->setOffset( $from );
$this->setIncludeOffset( true );
@@ -90,8 +90,10 @@ class CategoryPager extends AlphabeticPager {
function getDefaultQuery() {
parent::getDefaultQuery();
unset( $this->mDefaultQuery['from'] );
+
return $this->mDefaultQuery;
}
+
# protected function getOrderTypeMessages() {
# return array( 'abc' => 'special-categories-sort-abc',
# 'count' => 'special-categories-sort-count' );
@@ -113,6 +115,7 @@ class CategoryPager extends AlphabeticPager {
}
$batch->execute();
$this->mResult->rewind();
+
return parent::getBody();
}
@@ -120,19 +123,26 @@ class CategoryPager extends AlphabeticPager {
$title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
$titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) );
$count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped();
+
return Xml::tags( 'li', null, $this->getLanguage()->specialList( $titleText, $count ) ) . "\n";
}
public function getStartForm( $from ) {
global $wgScript;
- return
- Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ),
- Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
- Xml::fieldset( $this->msg( 'categories' )->text(),
- Xml::inputLabel( $this->msg( 'categoriesfrom' )->text(),
+ return Xml::tags(
+ 'form',
+ array( 'method' => 'get', 'action' => $wgScript ),
+ Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
+ Xml::fieldset(
+ $this->msg( 'categories' )->text(),
+ Xml::inputLabel(
+ $this->msg( 'categoriesfrom' )->text(),
'from', 'from', 20, $from ) .
- ' ' .
- Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) ) );
+ ' ' .
+ Xml::submitButton( $this->msg( 'allpagessubmit' )->text()
+ )
+ )
+ );
}
}