From: Leon Weber Date: Wed, 20 Dec 2006 16:37:27 +0000 (+0000) Subject: Made the change size value on recentchanges show minuses instead of dashs. Workaround... X-Git-Tag: 1.31.0-rc.0~54831 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=40b3805dbfe1b698b1b41ab407f1799187e0ef29;p=lhc%2Fweb%2Fwiklou.git Made the change size value on recentchanges show minuses instead of dashs. Workaround until they've fixed bug 8327. --- diff --git a/includes/RecentChange.php b/includes/RecentChange.php index af555431df..2721d9c882 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -556,13 +556,15 @@ class RecentChange $szdiff = $new - $old; if( $szdiff < $wgRCChangedSizeThreshold ) { - return '(' . $wgLang->formatNum( $szdiff ) . ')'; + // workaround to make it show a minus char instead of a dash. formatNum() doesn't do that. + return '(−' . $wgLang->formatNum( abs( $szdiff ) ) . ')'; } elseif( $szdiff === 0 ) { return '(' . $wgLang->formatNum( $szdiff ) . ')'; } elseif( $szdiff > 0 ) { return '(+' . $wgLang->formatNum( $szdiff ) . ')'; } else { - return '(' . $wgLang->formatNum( $szdiff ) . ')'; + // same workaround. + return '(−' . $wgLang->formatNum( abs( $szdiff ) ) . ')'; } } }