From 6e85cd9adae4cf8a60636ca62ef4e84ca8f9aa9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sun, 24 Jul 2005 08:52:49 +0000 Subject: [PATCH] Rename percent to wfPercent --- includes/GlobalFunctions.php | 2 +- maintenance/parserTests.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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!"; -- 2.20.1