From 09fa508d2b994832e2e0942b0ab9de66621eef23 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Jun 2005 14:52:51 +0000 Subject: [PATCH] * (bug 2568) Fixed a logic error in the Special:Statistics code which caused the displayed percentage of admins to be totally off. --- RELEASE-NOTES | 3 ++- includes/SpecialStatistics.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index cc378d1275..3c050f428a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -395,7 +395,8 @@ Various bugfixes, small features, and a few experimental things: * upgrade1_5.php uses insert ignore, allows to skip image info initialization * Fix namespaces in category list. * Add rebuildImages.php to update image metadata fields - +* (bug 2568) Fixed a logic error in the Special:Statistics code which caused + the displayed percentage of admins to be totally off. === Caveats === diff --git a/includes/SpecialStatistics.php b/includes/SpecialStatistics.php index 8706e8b60d..d9acfd00e9 100644 --- a/includes/SpecialStatistics.php +++ b/includes/SpecialStatistics.php @@ -75,7 +75,7 @@ function wfSpecialStatistics() { $wgLang->formatNum( $admins ), '[[' . wfMsg( 'administrators' ) . ']]', // should logically be after #admins, danm backwards compatability! - $wgLang->formatNum( round( $admins / $total * 100, 2 ) ) + $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) ) ); $wgOut->addWikiText( $text ); -- 2.20.1