MediaWiki r42110 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r42109‎ | r42110 (on ViewVC)‎ | r42111 >
Date:20:38, 15 October 2008
Author:demon
Status:old (Comments)
Tags:
Comment:
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.
Modified paths:

Diff [purge]

Index: trunk/phase3/CREDITS
===================================================================
--- trunk/phase3/CREDITS	(revision 42109)
+++ trunk/phase3/CREDITS	(revision 42110)
@@ -46,6 +46,8 @@
 * Brad Jorsch
 * Daniel Arnold
 * Danny B.
+* FunPika
+* Happy-melon
 * Jeremy Baron
 * Juliano F. Ravasi
 * Louperivois
Index: trunk/phase3/includes/RecentChange.php
===================================================================
--- trunk/phase3/includes/RecentChange.php	(revision 42109)
+++ trunk/phase3/includes/RecentChange.php	(revision 42110)
@@ -686,14 +686,20 @@
 		$formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape'),
 			$wgLang->formatNum($szdiff) );
 
-		if( $szdiff < $wgRCChangedSizeThreshold ) {
-			return '<strong class=\'mw-plusminus-neg\'>(' . $formatedSize . ')</strong>';
-		} elseif( $szdiff === 0 ) {
-			return '<span class=\'mw-plusminus-null\'>(' . $formatedSize . ')</span>';
+		
+		if( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) {
+			$tag = 'strong';
+		} 
+		else{
+		    $tag = 'span';
+		}
+
+		if( $szdiff === 0 ) {
+			return "<$tag class='mw-plusminus-null'>($formatedSize)</$tag>";
 		} elseif( $szdiff > 0 ) {
-			return '<span class=\'mw-plusminus-pos\'>(+' . $formatedSize . ')</span>';
-		} else {
-			return '<span class=\'mw-plusminus-neg\'>(' . $formatedSize . ')</span>';
+			return "<$tag class='mw-plusminus-pos'>(+$formatedSize)</$tag>";
+	    } else {
+			return "<$tag class='mw-plusminus-neg'>($formatedSize)</$tag>";
 		}
 	}
 }
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 42109)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 42110)
@@ -1468,7 +1468,7 @@
  * 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
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 42109)
+++ trunk/phase3/RELEASE-NOTES	(revision 42110)
@@ -48,6 +48,7 @@
   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,7 +265,10 @@
 * (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 ===
 
 * Registration time of users registered before the DB field was created is now

Comments

#Comment by Brion VIBBER (Talk | contribs)   20:42, 15 October 2008

Lookin' good :D

Status & tagging log

  • 15:36, 12 September 2011 Meno25 (Talk | contribs) changed the status of r42110 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox