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

includes/specials/SpecialAncientpages.php

index cbb5df8..680a948 100644 (file)
@@ -59,14 +59,14 @@ class AncientPagesPage extends QueryPage {
        }
 
        function formatResult( $skin, $result ) {
-               global $wgLang, $wgContLang;
+               global $wgContLang;
 
-               $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $result->value ), true );
+               $d = $this->getLang()->timeanddate( wfTimestamp( TS_MW, $result->value ), true );
                $title = Title::makeTitle( $result->namespace, $result->title );
-               $link = $skin->linkKnown(
+               $link = Linker::linkKnown(
                        $title,
                        htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
                );
-               return wfSpecialList( $link, htmlspecialchars($d) );
+               return wfSpecialList( $link, htmlspecialchars( $d ) );
        }
 }