r98354 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98353‎ | r98354 | r98355 >
Date:19:22, 28 September 2011
Author:ialex
Status:ok
Tags:
Comment:
* Use local context instead of global variables
* Call Linker methods statically
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPopularpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPopularpages.php
@@ -36,6 +36,7 @@
3737 # page_counter is not indexed
3838 return true;
3939 }
 40+
4041 function isSyndicated() { return false; }
4142
4243 function getQueryInfo() {
@@ -54,17 +55,13 @@
5556 * @return string
5657 */
5758 function formatResult( $skin, $result ) {
58 - global $wgLang, $wgContLang;
 59+ global $wgContLang;
5960 $title = Title::makeTitle( $result->namespace, $result->title );
60 - $link = $skin->linkKnown(
 61+ $link = Linker::linkKnown(
6162 $title,
6263 htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
6364 );
64 - $nv = wfMsgExt(
65 - 'nviews',
66 - array( 'parsemag', 'escape'),
67 - $wgLang->formatNum( $result->value )
68 - );
69 - return wfSpecialList($link, $nv);
 65+ $nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped();
 66+ return wfSpecialList($link, $nv );
7067 }
7168 }

Status & tagging log