From a5f3d4502b3275fdc5a18d1a206ddb7cebef2145 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 14 Oct 2008 12:56:25 +0000 Subject: [PATCH] (bug 15925) Properly bold rc bytes changed in all cases. Patch by Happy-melon. --- CREDITS | 1 + RELEASE-NOTES | 2 ++ includes/RecentChange.php | 16 +++++++--------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CREDITS b/CREDITS index c91eb79a0d..66e3f79a80 100644 --- a/CREDITS +++ b/CREDITS @@ -46,6 +46,7 @@ following names for their contribution to the product. * Brad Jorsch * Daniel Arnold * Danny B. +* Happy-melon * Jeremy Baron * Juliano F. Ravasi * Louperivois diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bac626d4a8..ff309b5e12 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -259,6 +259,8 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 15846) Categories "leak" from older revisions in certain circumstances * (bug 15928) Special pages dropdown should be inline in non-MonoBook skins * (bug 14178) Some uses of UserLoadFromSession hook cause segfault +* (bug 15925) Postitive bytes added on recentchanges and watchlists are now bolded + if above the threshold, previously it only worked for negatives === API changes in 1.14 === diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 93de9437f1..8f0085af0b 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -686,14 +686,12 @@ class RecentChange $formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape'), $wgLang->formatNum($szdiff) ); - if( $szdiff < $wgRCChangedSizeThreshold ) { - return '(' . $formatedSize . ')'; - } elseif( $szdiff === 0 ) { - return '(' . $formatedSize . ')'; - } elseif( $szdiff > 0 ) { - return '(+' . $formatedSize . ')'; - } else { - return '(' . $formatedSize . ')'; - } + return '<' + . ( abs($szdiff) > abs($wgRCChangedSizeThreshold) ? 'strong' : 'span' ) + . ' class="mw-plusminus-' + . ( $szdiff == 0 ? 'null' : ( $szdiff > 0 ? 'pos' : 'neg' )) + . '/>(' . ( $szdiff > 0 ? '+' : '' ) + . $formatedSize . ')'; + } } -- 2.20.1