From: Alexandre Emsenhuber Date: Thu, 6 Oct 2011 10:48:05 +0000 (+0000) Subject: * Use local context instead of global variables X-Git-Tag: 1.31.0-rc.0~27239 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=2d724c98d78309a1d8eeaa5b7b8ac568679e1067;p=lhc%2Fweb%2Fwiklou.git * Use local context instead of global variables * Call Linker methods statically --- diff --git a/includes/specials/SpecialDisambiguations.php b/includes/specials/SpecialDisambiguations.php index 431dfe76f0..51cb4dbb44 100644 --- a/includes/specials/SpecialDisambiguations.php +++ b/includes/specials/SpecialDisambiguations.php @@ -122,16 +122,14 @@ class DisambiguationsPage extends PageQueryPage { } function formatResult( $skin, $result ) { - global $wgLang; - $title = Title::newFromID( $result->value ); $dp = Title::makeTitle( $result->namespace, $result->title ); - $from = $skin->link( $title ); - $edit = $skin->link( $title, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ) , + $from = Linker::link( $title ); + $edit = Linker::link( $title, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ) , array(), array( 'redirect' => 'no', 'action' => 'edit' ) ); - $arr = $wgLang->getArrow(); - $to = $skin->link( $dp ); + $arr = $this->getLang()->getArrow(); + $to = Linker::link( $dp ); return "$from $edit $arr $to"; }