From 0b2ba3f5a62b8d1d0a2fa15ba2df2cc3b9bae341 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 15 Oct 2008 00:06:51 +0000 Subject: [PATCH] Revert broken r42078 "(bug 15925) Properly bold rc bytes changed in all cases. Patch by Happy-melon." Bad HTML output breaks things entirely, plus the code is much harder to read. Plus it's unclear if this behavior is desirable. --- CREDITS | 1 - RELEASE-NOTES | 2 -- includes/RecentChange.php | 16 +++++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CREDITS b/CREDITS index 66e3f79a80..c91eb79a0d 100644 --- a/CREDITS +++ b/CREDITS @@ -46,7 +46,6 @@ 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 ff309b5e12..bac626d4a8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -259,8 +259,6 @@ 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 8f0085af0b..93de9437f1 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -686,12 +686,14 @@ class RecentChange $formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape'), $wgLang->formatNum($szdiff) ); - return '<' - . ( abs($szdiff) > abs($wgRCChangedSizeThreshold) ? 'strong' : 'span' ) - . ' class="mw-plusminus-' - . ( $szdiff == 0 ? 'null' : ( $szdiff > 0 ? 'pos' : 'neg' )) - . '/>(' . ( $szdiff > 0 ? '+' : '' ) - . $formatedSize . ')'; - + if( $szdiff < $wgRCChangedSizeThreshold ) { + return '(' . $formatedSize . ')'; + } elseif( $szdiff === 0 ) { + return '(' . $formatedSize . ')'; + } elseif( $szdiff > 0 ) { + return '(+' . $formatedSize . ')'; + } else { + return '(' . $formatedSize . ')'; + } } } -- 2.20.1