* Use local context instead of global variables
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 6 Oct 2011 10:48:05 +0000 (10:48 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 6 Oct 2011 10:48:05 +0000 (10:48 +0000)
* Call Linker methods statically

includes/specials/SpecialDisambiguations.php

index 431dfe7..51cb4db 100644 (file)
@@ -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";
        }