r99084 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99083‎ | r99084 | r99085 >
Date:10:48, 6 October 2011
Author:ialex
Status:ok
Tags:
Comment:
* Use local context instead of global variables
* Call Linker methods statically
Modified paths:
  • /trunk/phase3/includes/specials/SpecialDisambiguations.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialDisambiguations.php
@@ -122,16 +122,14 @@
123123 }
124124
125125 function formatResult( $skin, $result ) {
126 - global $wgLang;
127 -
128126 $title = Title::newFromID( $result->value );
129127 $dp = Title::makeTitle( $result->namespace, $result->title );
130128
131 - $from = $skin->link( $title );
132 - $edit = $skin->link( $title, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ) ,
 129+ $from = Linker::link( $title );
 130+ $edit = Linker::link( $title, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ) ,
133131 array(), array( 'redirect' => 'no', 'action' => 'edit' ) );
134 - $arr = $wgLang->getArrow();
135 - $to = $skin->link( $dp );
 132+ $arr = $this->getLang()->getArrow();
 133+ $to = Linker::link( $dp );
136134
137135 return "$from $edit $arr $to";
138136 }

Status & tagging log