From 5cd84a171b9e5c008bf8596ee71d4dc4a8a687f9 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 1 Jul 2011 09:03:15 +0000 Subject: [PATCH] Replaced calls to Skin::formatSize() by Language::formatSize() where escaping is not needed (the former is just a wrapper to the latter with a call to htmlspecialchars()) --- includes/media/Generic.php | 10 ++++------ includes/specials/SpecialSearch.php | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/includes/media/Generic.php b/includes/media/Generic.php index 0c6de7830a..2a526835d3 100644 --- a/includes/media/Generic.php +++ b/includes/media/Generic.php @@ -413,10 +413,9 @@ abstract class MediaHandler { * @return string */ function getLongDesc( $file ) { - global $wgUser; - $sk = $wgUser->getSkin(); + global $wgLang; return wfMsgExt( 'file-info', 'parseinline', - $sk->formatSize( $file->getSize() ), + $wgLang->formatSize( $file->getSize() ), $file->getMimeType() ); } @@ -436,10 +435,9 @@ abstract class MediaHandler { * @return string */ static function getGeneralLongDesc( $file ) { - global $wgUser; - $sk = $wgUser->getSkin(); + global $wgLang; return wfMsgExt( 'file-info', 'parseinline', - $sk->formatSize( $file->getSize() ), + $wgLang->formatSize( $file->getSize() ), $file->getMimeType() ); } diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 2b1ce5686c..0534abfa96 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -582,7 +582,7 @@ class SpecialSearch extends SpecialPage { $size = wfMsgExt( 'search-result-size', array( 'parsemag', 'escape' ), - $this->sk->formatSize( $byteSize ), + $wgLang->formatSize( $byteSize ), $wgLang->formatNum( $wordCount ) ); -- 2.20.1