Rename percent to wfPercent
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sun, 24 Jul 2005 08:52:49 +0000 (08:52 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sun, 24 Jul 2005 08:52:49 +0000 (08:52 +0000)
includes/GlobalFunctions.php
maintenance/parserTests.inc

index c0c9e0a..5011a01 100644 (file)
@@ -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%";
 }
index 8cb6510..b2cd971 100644 (file)
@@ -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!";