diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-07-28 11:52:48 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-07-28 11:52:48 +0200 |
commit | 222b01f5169f1c7e69762e0e8904c24f78f71882 (patch) | |
tree | 8e932e12546bb991357ec48eb1638d1770be7a35 /includes/specials/SpecialCategories.php | |
parent | 00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff) |
update to MediaWiki 1.16.0
Diffstat (limited to 'includes/specials/SpecialCategories.php')
-rw-r--r-- | includes/specials/SpecialCategories.php | 13 |
1 files changed, 4 insertions, 9 deletions
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() . '<ul>' . $cap->getBody() . '</ul>' . @@ -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"; |