From 222b01f5169f1c7e69762e0e8904c24f78f71882 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 11:52:48 +0200 Subject: update to MediaWiki 1.16.0 --- includes/specials/SpecialCategories.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'includes/specials/SpecialCategories.php') diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index c6e73f2b..a649eafd 100644 --- a/includes/specials/SpecialCategories.php +++ b/includes/specials/SpecialCategories.php @@ -13,9 +13,10 @@ function wfSpecialCategories( $par=null ) { $from = $par; } $cap = new CategoryPager( $from ); + $cap->doQuery(); $wgOut->addHTML( XML::openElement( 'div', array('class' => 'mw-spcontent') ) . - wfMsgExt( 'categoriespagetext', array( 'parse' ) ) . + wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) . $cap->getStartForm( $from ) . $cap->getNavigationBar() . '' . @@ -35,10 +36,7 @@ class CategoryPager extends AlphabeticPager { parent::__construct(); $from = str_replace( ' ', '_', $from ); if( $from !== '' ) { - global $wgCapitalLinks, $wgContLang; - if( $wgCapitalLinks ) { - $from = $wgContLang->ucfirst( $from ); - } + $from = Title::capitalize( $from, NS_CATEGORY ); $this->mOffset = $from; } } @@ -74,9 +72,6 @@ class CategoryPager extends AlphabeticPager { /* Override getBody to apply LinksBatch on resultset before actually outputting anything. */ public function getBody() { - if (!$this->mQueryDone) { - $this->doQuery(); - } $batch = new LinkBatch; $this->mResult->rewind(); @@ -92,7 +87,7 @@ class CategoryPager extends AlphabeticPager { function formatRow($result) { global $wgLang; $title = Title::makeTitle( NS_CATEGORY, $result->cat_title ); - $titleText = $this->getSkin()->makeLinkObj( $title, htmlspecialchars( $title->getText() ) ); + $titleText = $this->getSkin()->link( $title, htmlspecialchars( $title->getText() ) ); $count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->cat_pages ) ); return Xml::tags('li', null, "$titleText ($count)" ) . "\n"; -- cgit v1.2.3-54-g00ecf