From: Alexandre Emsenhuber Date: Wed, 28 Sep 2011 19:22:19 +0000 (+0000) Subject: * Use local context instead of global variables X-Git-Tag: 1.31.0-rc.0~27386 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=8b48a982e829a9ee30d3d382b3543df7bb0589c2;p=lhc%2Fweb%2Fwiklou.git * Use local context instead of global variables * Call Linker methods statically --- diff --git a/includes/specials/SpecialPopularpages.php b/includes/specials/SpecialPopularpages.php index 7c7190ad42..74e6268aaf 100644 --- a/includes/specials/SpecialPopularpages.php +++ b/includes/specials/SpecialPopularpages.php @@ -36,6 +36,7 @@ class PopularPagesPage extends QueryPage { # page_counter is not indexed return true; } + function isSyndicated() { return false; } function getQueryInfo() { @@ -54,17 +55,13 @@ class PopularPagesPage extends QueryPage { * @return string */ function formatResult( $skin, $result ) { - global $wgLang, $wgContLang; + global $wgContLang; $title = Title::makeTitle( $result->namespace, $result->title ); - $link = $skin->linkKnown( + $link = Linker::linkKnown( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); - $nv = wfMsgExt( - 'nviews', - array( 'parsemag', 'escape'), - $wgLang->formatNum( $result->value ) - ); - return wfSpecialList($link, $nv); + $nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped(); + return wfSpecialList($link, $nv ); } }