From f5e050668c9cac03c8b55df52b30af6a400e1f56 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 17 Sep 2011 19:04:05 +0000 Subject: [PATCH] * Use local context instead of global variables * Call Linker methods statically --- includes/specials/SpecialBrokenRedirects.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/includes/specials/SpecialBrokenRedirects.php b/includes/specials/SpecialBrokenRedirects.php index 21a098a0f5..35770713bb 100644 --- a/includes/specials/SpecialBrokenRedirects.php +++ b/includes/specials/SpecialBrokenRedirects.php @@ -77,8 +77,6 @@ class BrokenRedirectsPage extends PageQueryPage { * @return String */ function formatResult( $skin, $result ) { - global $wgUser, $wgLang; - $fromObj = Title::makeTitle( $result->namespace, $result->title ); if ( isset( $result->rd_title ) ) { $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title ); @@ -93,35 +91,35 @@ class BrokenRedirectsPage extends PageQueryPage { // $toObj may very easily be false if the $result list is cached if ( !is_object( $toObj ) ) { - return '' . $skin->link( $fromObj ) . ''; + return '' . Linker::link( $fromObj ) . ''; } - $from = $skin->linkKnown( + $from = Linker::linkKnown( $fromObj, null, array(), array( 'redirect' => 'no' ) ); $links = array(); - $links[] = $skin->linkKnown( + $links[] = Linker::linkKnown( $fromObj, wfMsgHtml( 'brokenredirects-edit' ), array(), array( 'action' => 'edit' ) ); - $to = $skin->link( + $to = Linker::link( $toObj, null, array(), array(), array( 'broken' ) ); - $arr = $wgLang->getArrow(); + $arr = $this->getLang()->getArrow(); $out = $from . wfMsg( 'word-separator' ); - if( $wgUser->isAllowed( 'delete' ) ) { - $links[] = $skin->linkKnown( + if( $this->getUser()->isAllowed( 'delete' ) ) { + $links[] = Linker::linkKnown( $fromObj, wfMsgHtml( 'brokenredirects-delete' ), array(), @@ -129,7 +127,7 @@ class BrokenRedirectsPage extends PageQueryPage { ); } - $out .= wfMsg( 'parentheses', $wgLang->pipeList( $links ) ); + $out .= wfMsg( 'parentheses', $this->getLang()->pipeList( $links ) ); $out .= " {$arr} {$to}"; return $out; } -- 2.20.1