From 238003d9e1298e3f9e8789a51384ee43236e7193 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 20 Nov 2011 19:15:39 +0000 Subject: [PATCH] Use local context to get messages --- includes/specials/SpecialCategories.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index 16ca322565..a2b569506d 100644 --- a/includes/specials/SpecialCategories.php +++ b/includes/specials/SpecialCategories.php @@ -42,7 +42,7 @@ class SpecialCategories extends SpecialPage { $this->getOutput()->addHTML( Html::openElement( 'div', array( 'class' => 'mw-spcontent' ) ) . - wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) . + $this->msg( 'categoriespagetext', $cap->getNumRows() )->parseAsBlock() . $cap->getStartForm( $from ) . $cap->getNavigationBar() . '' . @@ -114,10 +114,8 @@ class CategoryPager extends AlphabeticPager { function formatRow($result) { $title = Title::makeTitle( NS_CATEGORY, $result->cat_title ); $titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) ); - $lang = $this->getLang(); - $count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ), - $lang->formatNum( $result->cat_pages ) ); - return Xml::tags('li', null, $lang->specialList( $titleText, $count ) ) . "\n"; + $count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped(); + return Xml::tags( 'li', null, $this->getLang()->specialList( $titleText, $count ) ) . "\n"; } public function getStartForm( $from ) { @@ -126,10 +124,10 @@ class CategoryPager extends AlphabeticPager { return Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ), Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . - Xml::fieldset( wfMsg( 'categories' ), - Xml::inputLabel( wfMsg( 'categoriesfrom' ), + Xml::fieldset( $this->msg( 'categories' )->text(), + Xml::inputLabel( $this->msg( 'categoriesfrom' )->text(), 'from', 'from', 20, $from ) . ' ' . - Xml::submitButton( wfMsg( 'allpagessubmit' ) ) ) ); + Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) ) ); } } -- 2.20.1