From 0f77d8701552f6bb98b34b542d5cef2161cd495a Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 15 Oct 2008 20:38:50 +0000 Subject: [PATCH] Let's do this again, without all the breakages... (bug 15925) Properly bold rc bytes changed in all cases. Patch by Happy-melon and FunPika. --- CREDITS | 2 ++ RELEASE-NOTES | 4 ++++ includes/DefaultSettings.php | 2 +- includes/RecentChange.php | 20 +++++++++++++------- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CREDITS b/CREDITS index c91eb79a0d..1ff4746262 100644 --- a/CREDITS +++ b/CREDITS @@ -46,6 +46,8 @@ following names for their contribution to the product. * Brad Jorsch * Daniel Arnold * Danny B. +* FunPika +* Happy-melon * Jeremy Baron * Juliano F. Ravasi * Louperivois diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 56342169f0..1e15a714f5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -48,6 +48,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN whitelist on or off. * Added $wgRenderHashAppend to append some string to the parser cache and the sitenotice cache keys. +* $wgRCChangedSizeThreshold is now a positive integer by default, === Migrated extensions === The following extensions are migrated into MediaWiki 1.14: @@ -264,6 +265,9 @@ 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/DefaultSettings.php b/includes/DefaultSettings.php index 123e23abed..88d2727a77 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1468,7 +1468,7 @@ $wgRCShowChangedSize = true; * before and after the edit is below that value, the value will be * highlighted on the RC page. */ -$wgRCChangedSizeThreshold = -500; +$wgRCChangedSizeThreshold = 500; /** * Show "Updated (since my last visit)" marker in RC view, watchlist and history diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 93de9437f1..e388758306 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -686,14 +686,20 @@ class RecentChange $formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape'), $wgLang->formatNum($szdiff) ); - if( $szdiff < $wgRCChangedSizeThreshold ) { - return '(' . $formatedSize . ')'; - } elseif( $szdiff === 0 ) { - return '(' . $formatedSize . ')'; + + if( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) { + $tag = 'strong'; + } + else{ + $tag = 'span'; + } + + if( $szdiff === 0 ) { + return "<$tag class='mw-plusminus-null'>($formatedSize)"; } elseif( $szdiff > 0 ) { - return '(+' . $formatedSize . ')'; - } else { - return '(' . $formatedSize . ')'; + return "<$tag class='mw-plusminus-pos'>(+$formatedSize)"; + } else { + return "<$tag class='mw-plusminus-neg'>($formatedSize)"; } } } -- 2.20.1