From 8b48a982e829a9ee30d3d382b3543df7bb0589c2 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 28 Sep 2011 19:22:19 +0000 Subject: [PATCH] * Use local context instead of global variables * Call Linker methods statically --- includes/specials/SpecialPopularpages.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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 ); } } -- 2.20.1