r48986 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48985‎ | r48986 | r48987 >
Date:10:11, 29 March 2009
Author:midom
Status:ok
Tags:
Comment:
don't do custom number formatting for bytes changed in misermode
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -106,9 +106,14 @@
107107 * @returns string
108108 */
109109 public static function showCharacterDifference( $old, $new ) {
110 - global $wgRCChangedSizeThreshold, $wgLang;
 110+ global $wgRCChangedSizeThreshold, $wgLang, $wgMiserMode;
111111 $szdiff = $new - $old;
112 - $formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape' ), $wgLang->formatNum( $szdiff ) );
 112+
 113+ $formatedSize = ( $wgMiserMode?
 114+ $wgLang->formatNum($szdiff) : // avoid expensive calculations
 115+ wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape' ), $wgLang->formatNum( $szdiff ) )
 116+ );
 117+
113118 if( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) {
114119 $tag = 'strong';
115120 } else {

Status & tagging log