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.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php
index c2dd40cd..91d98b86 100644
--- a/includes/specials/SpecialCategories.php
+++ b/includes/specials/SpecialCategories.php
@@ -69,16 +69,20 @@ class CategoryPager extends AlphabeticPager {
$this->mOffset = $from;
}
}
-
+
function getQueryInfo() {
return array(
'tables' => array( 'category' ),
'fields' => array( 'cat_title','cat_pages' ),
- 'conds' => array( 'cat_pages > 0' ),
+ 'conds' => array( 'cat_pages > 0' ),
'options' => array( 'USE INDEX' => 'cat_title' ),
);
}
+ function getTitle() {
+ return SpecialPage::getTitleFor( 'Categories' );
+ }
+
function getIndexField() {
# return array( 'abc' => 'cat_title', 'count' => 'cat_pages' );
return 'cat_title';
@@ -116,19 +120,18 @@ class CategoryPager extends AlphabeticPager {
function formatRow($result) {
global $wgLang;
$title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
- $titleText = $this->getSkin()->link( $title, htmlspecialchars( $title->getText() ) );
+ $titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) );
$count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
$wgLang->formatNum( $result->cat_pages ) );
- return Xml::tags('li', null, "$titleText ($count)" ) . "\n";
+ return Xml::tags('li', null, wfSpecialList( $titleText, $count ) ) . "\n";
}
-
+
public function getStartForm( $from ) {
global $wgScript;
- $t = SpecialPage::getTitleFor( 'Categories' );
-
+
return
Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ),
- Html::hidden( 'title', $t->getPrefixedText() ) .
+ Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
Xml::fieldset( wfMsg( 'categories' ),
Xml::inputLabel( wfMsg( 'categoriesfrom' ),
'from', 'from', 20, $from ) .