* Use local context instead of global variables
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 6 Sep 2011 12:23:47 +0000 (12:23 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 6 Sep 2011 12:23:47 +0000 (12:23 +0000)
* Call Linker methods statically

includes/specials/SpecialWantedcategories.php

index 800e940..9a17adc 100644 (file)
@@ -54,14 +54,14 @@ class WantedCategoriesPage extends WantedQueryPage {
         * @return string
         */
        function formatResult( $skin, $result ) {
-               global $wgLang, $wgContLang;
+               global $wgContLang;
 
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = htmlspecialchars( $wgContLang->convert( $nt->getText() ) );
 
                $plink = $this->isCached() ?
-                       $skin->link( $nt, $text ) :
-                       $skin->link(
+                       Linker::link( $nt, $text ) :
+                       Linker::link(
                                $nt,
                                $text,
                                array(),
@@ -69,8 +69,8 @@ class WantedCategoriesPage extends WantedQueryPage {
                                array( 'broken' )
                        );
 
-               $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'),
-                       $wgLang->formatNum( $result->value ) );
-               return wfSpecialList($plink, $nlinks);
+               $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
+                       $this->getLang()->formatNum( $result->value ) );
+               return wfSpecialList( $plink, $nlinks );
        }
 }