Revert broken r42078 "(bug 15925) Properly bold rc bytes changed in all cases. Patch...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 15 Oct 2008 00:06:51 +0000 (00:06 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 15 Oct 2008 00:06:51 +0000 (00:06 +0000)
Bad HTML output breaks things entirely, plus the code is much harder to read. Plus it's unclear if this behavior is desirable.

CREDITS
RELEASE-NOTES
includes/RecentChange.php

diff --git a/CREDITS b/CREDITS
index 66e3f79..c91eb79 100644 (file)
--- 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
index ff309b5..bac626d 100644 (file)
@@ -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 ===
 
index 8f0085a..93de943 100644 (file)
@@ -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 . ')</span>';
-
+               if( $szdiff < $wgRCChangedSizeThreshold ) {
+                       return '<strong class=\'mw-plusminus-neg\'>(' . $formatedSize . ')</strong>';
+               } elseif( $szdiff === 0 ) {
+                       return '<span class=\'mw-plusminus-null\'>(' . $formatedSize . ')</span>';
+               } elseif( $szdiff > 0 ) {
+                       return '<span class=\'mw-plusminus-pos\'>(+' . $formatedSize . ')</span>';
+               } else {
+                       return '<span class=\'mw-plusminus-neg\'>(' . $formatedSize . ')</span>';
+               }
        }
 }