From: Niklas Laxström Date: Sun, 24 Jul 2005 08:52:49 +0000 (+0000) Subject: Rename percent to wfPercent X-Git-Tag: 1.5.0beta4~42 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/supprimer.php?a=commitdiff_plain;h=6e85cd9adae4cf8a60636ca62ef4e84ca8f9aa9d;p=lhc%2Fweb%2Fwiklou.git Rename percent to wfPercent --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index c0c9e0abaf..5011a01170 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1282,7 +1282,7 @@ function wfIncrStats( $key ) { * @param bool $round Whether or not to round the value, default true * @return float */ -function percent( $nr, $acc = 2, $round = true ) { +function wfPercent( $nr, $acc = 2, $round = true ) { $ret = sprintf( "%.${acc}f", $nr ); return $round ? round( $ret, $acc ) . '%' : "$ret%"; } diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 8cb6510ff9..b2cd971594 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -188,7 +188,7 @@ class ParserTest { } } if( $total > 0 ) { - $ratio = percent( 100 * $success / $total ); + $ratio = wfPercent( 100 * $success / $total ); print $this->termColor( 1 ) . "\nPassed $success of $total tests ($ratio) "; if( $success == $total ) { print $this->termColor( 32 ) . "PASSED!";