r70398 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70397‎ | r70398 | r70399 >
Date:18:42, 3 August 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Weigh reverse with factor 20 so coloring takes effect more quickly.
Modified paths:
  • /trunk/phase3/maintenance/language/StatOutputs.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/StatOutputs.php
@@ -52,6 +52,10 @@
5353 function formatPercent( $subset, $total, $revert = false, $accuracy = 2 ) {
5454 $v = @round( 255 * $subset / $total );
5555 if ( $revert ) {
 56+ # Weigh reverse with factor 20 so coloring takes effect more quickly as
 57+ # this option is used solely for reporting 'bad' percentages.
 58+ $v = $v * 20;
 59+ if ( $v > 255 ) $v = 255;
5660 $v = 255 - $v;
5761 }
5862 if ( $v < 128 ) {

Status & tagging log