From cb31c44903421c6004cf3b183151c56e567f4fff Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 8 Oct 2011 09:12:42 +0000 Subject: [PATCH] * Use local context instead of global variables * Call Linker methods statically --- includes/specials/SpecialDoubleRedirects.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/includes/specials/SpecialDoubleRedirects.php b/includes/specials/SpecialDoubleRedirects.php index ec899d8ab5..7dd337d5d9 100644 --- a/includes/specials/SpecialDoubleRedirects.php +++ b/includes/specials/SpecialDoubleRedirects.php @@ -76,8 +76,6 @@ class DoubleRedirectsPage extends PageQueryPage { } function formatResult( $skin, $result ) { - global $wgLang; - $titleA = Title::makeTitle( $result->namespace, $result->title ); if ( $result && !isset( $result->nsb ) ) { @@ -91,19 +89,20 @@ class DoubleRedirectsPage extends PageQueryPage { } } if ( !$result ) { - return '' . $skin->link( $titleA, null, array(), array( 'redirect' => 'no' ) ) . ''; + return '' . Linker::link( $titleA, null, array(), array( 'redirect' => 'no' ) ) . ''; } $titleB = Title::makeTitle( $result->nsb, $result->tb ); $titleC = Title::makeTitle( $result->nsc, $result->tc ); - $linkA = $skin->linkKnown( + $linkA = Linker::linkKnown( $titleA, null, array(), array( 'redirect' => 'no' ) ); - $edit = $skin->linkKnown( + + $edit = Linker::linkKnown( $titleA, wfMsgExt( 'parentheses', array( 'escape' ), wfMsg( 'editlink' ) ), array(), @@ -112,14 +111,18 @@ class DoubleRedirectsPage extends PageQueryPage { 'action' => 'edit' ) ); - $linkB = $skin->linkKnown( + + $linkB = Linker::linkKnown( $titleB, null, array(), array( 'redirect' => 'no' ) ); - $linkC = $skin->linkKnown( $titleC ); - $arr = $wgLang->getArrow() . $wgLang->getDirMark(); + + $linkC = Linker::linkKnown( $titleC ); + + $lang = $this->getLang(); + $arr = $lang->getArrow() . $lang->getDirMark(); return( "{$linkA} {$edit} {$arr} {$linkB} {$arr} {$linkC}" ); } -- 2.20.1