From: Siebrand Mazeland Date: Tue, 3 Aug 2010 18:42:14 +0000 (+0000) Subject: Weigh reverse with factor 20 so coloring takes effect more quickly. X-Git-Tag: 1.31.0-rc.0~35760 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=062839df85a084feacb0db86efdd1180ef4a8cf4;p=lhc%2Fweb%2Fwiklou.git Weigh reverse with factor 20 so coloring takes effect more quickly. --- diff --git a/maintenance/language/StatOutputs.php b/maintenance/language/StatOutputs.php index f1e935b4bb..839d0095c5 100644 --- a/maintenance/language/StatOutputs.php +++ b/maintenance/language/StatOutputs.php @@ -52,6 +52,10 @@ class wikiStatsOutput extends statsOutput { function formatPercent( $subset, $total, $revert = false, $accuracy = 2 ) { $v = @round( 255 * $subset / $total ); if ( $revert ) { + # Weigh reverse with factor 20 so coloring takes effect more quickly as + # this option is used solely for reporting 'bad' percentages. + $v = $v * 20; + if ( $v > 255 ) $v = 255; $v = 255 - $v; } if ( $v < 128 ) {