From: Alexandre Emsenhuber Date: Sun, 2 Oct 2011 16:30:59 +0000 (+0000) Subject: * Use local context instead of global variables X-Git-Tag: 1.31.0-rc.0~27317 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=79935a9ce2e7673f557cbae3076527c2ecfdfce9;p=lhc%2Fweb%2Fwiklou.git * Use local context instead of global variables * Call Linker methods statically --- 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}]"