r96324 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96323‎ | r96324 | r96325 >
Date:12:23, 6 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/SpecialWantedcategories.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWantedcategories.php
@@ -54,14 +54,14 @@
5555 * @return string
5656 */
5757 function formatResult( $skin, $result ) {
58 - global $wgLang, $wgContLang;
 58+ global $wgContLang;
5959
6060 $nt = Title::makeTitle( $result->namespace, $result->title );
6161 $text = htmlspecialchars( $wgContLang->convert( $nt->getText() ) );
6262
6363 $plink = $this->isCached() ?
64 - $skin->link( $nt, $text ) :
65 - $skin->link(
 64+ Linker::link( $nt, $text ) :
 65+ Linker::link(
6666 $nt,
6767 $text,
6868 array(),
@@ -69,8 +69,8 @@
7070 array( 'broken' )
7171 );
7272
73 - $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
74 - $wgLang->formatNum( $result->value ) );
75 - return wfSpecialList($plink, $nlinks);
 73+ $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
 74+ $this->getLang()->formatNum( $result->value ) );
 75+ return wfSpecialList( $plink, $nlinks );
7676 }
7777 }

Status & tagging log