From 79935a9ce2e7673f557cbae3076527c2ecfdfce9 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 2 Oct 2011 16:30:59 +0000 Subject: [PATCH] * Use local context instead of global variables * Call Linker methods statically --- includes/specials/SpecialShortpages.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialShortpages.php b/includes/specials/SpecialShortpages.php index 3b785018b7..eee036fd89 100644 --- a/includes/specials/SpecialShortpages.php +++ b/includes/specials/SpecialShortpages.php @@ -86,23 +86,22 @@ class ShortPagesPage extends QueryPage { } function formatResult( $skin, $result ) { - global $wgLang; - $dm = $wgLang->getDirMark(); + $dm = $this->getLang()->getDirMark(); $title = Title::makeTitle( $result->namespace, $result->title ); if ( !$title ) { return ''; } - $hlink = $skin->linkKnown( + $hlink = Linker::linkKnown( $title, wfMsgHtml( 'hist' ), array(), array( 'action' => 'history' ) ); $plink = $this->isCached() - ? $skin->link( $title ) - : $skin->linkKnown( $title ); - $size = wfMessage( 'nbytes', $wgLang->formatNum( $result->value ) )->escaped(); + ? Linker::link( $title ) + : Linker::linkKnown( $title ); + $size = $this->msg( 'nbytes' )->numParams( $result->value )->escaped(); return $title->exists() ? "({$hlink}) {$dm}{$plink} {$dm}[{$size}]" -- 2.20.1