From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- includes/specials/SpecialCategories.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'includes/specials/SpecialCategories.php') 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 ) . -- cgit v1.2.2