r99476 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99475‎ | r99476 | r99477 >
Date:13:12, 11 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/SpecialListredirects.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialListredirects.php
@@ -98,7 +98,7 @@
9999 function formatResult( $skin, $result ) {
100100 # Make a link to the redirect itself
101101 $rd_title = Title::makeTitle( $result->namespace, $result->title );
102 - $rd_link = $skin->link(
 102+ $rd_link = Linker::link(
103103 $rd_title,
104104 null,
105105 array(),
@@ -108,10 +108,10 @@
109109 # Find out where the redirect leads
110110 $target = $this->getRedirectTarget( $result );
111111 if( $target ) {
112 - global $wgLang;
113112 # Make a link to the destination page
114 - $arr = $wgLang->getArrow() . $wgLang->getDirMark();
115 - $targetLink = $skin->link( $target );
 113+ $lang = $this->getLang();
 114+ $arr = $lang->getArrow() . $lang->getDirMark();
 115+ $targetLink = Linker::link( $target );
116116 return "$rd_link $arr $targetLink";
117117 } else {
118118 return "<del>$rd_link</del>";

Status & tagging log