From: Alexandre Emsenhuber Date: Tue, 11 Oct 2011 13:12:40 +0000 (+0000) Subject: * Use local context instead of global variables X-Git-Tag: 1.31.0-rc.0~27148 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=6550899bddeee2da930e99014dd7bfd314fb3df0;p=lhc%2Fweb%2Fwiklou.git * Use local context instead of global variables * Call Linker methods statically --- diff --git a/includes/specials/SpecialListredirects.php b/includes/specials/SpecialListredirects.php index acf5fbd9c1..a5adb61ec8 100644 --- a/includes/specials/SpecialListredirects.php +++ b/includes/specials/SpecialListredirects.php @@ -98,7 +98,7 @@ class ListredirectsPage extends QueryPage { function formatResult( $skin, $result ) { # Make a link to the redirect itself $rd_title = Title::makeTitle( $result->namespace, $result->title ); - $rd_link = $skin->link( + $rd_link = Linker::link( $rd_title, null, array(), @@ -108,10 +108,10 @@ class ListredirectsPage extends QueryPage { # Find out where the redirect leads $target = $this->getRedirectTarget( $result ); if( $target ) { - global $wgLang; # Make a link to the destination page - $arr = $wgLang->getArrow() . $wgLang->getDirMark(); - $targetLink = $skin->link( $target ); + $lang = $this->getLang(); + $arr = $lang->getArrow() . $lang->getDirMark(); + $targetLink = Linker::link( $target ); return "$rd_link $arr $targetLink"; } else { return "$rd_link";