From 4a5ae9a4a9e81b19c6f3fa71137a5f49d263c57f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 14 Jul 2008 19:10:47 +0000 Subject: [PATCH] * Cleanup for r37375. Split duplicated code into function and really fix it --- includes/Linker.php | 11 +++++++++++ includes/PageHistory.php | 9 +-------- includes/specials/SpecialMergeHistory.php | 8 +------- includes/specials/SpecialProtectedpages.php | 9 +-------- includes/specials/SpecialRevisiondelete.php | 4 ++-- includes/specials/SpecialUndelete.php | 7 +------ 6 files changed, 17 insertions(+), 31 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index 7af49ad381..7dfb60d5e6 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1211,6 +1211,17 @@ class Linker { return $block; } + public function formatRevisionSize( $size ) { + if ( $size == 0 ) { + $stxt = wfMsgExt( 'historyempty', 'parsemag' ); + } else { + $stxt = wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $size ) ); + $stxt = "($stxt)"; + } + $stxt = htmlspecialchars( $stxt ); + return "$stxt"; + } + /** @todo document */ function tocIndent() { return "\n