From: Ævar Arnfjörð Bjarmason Date: Tue, 28 Jun 2005 14:52:51 +0000 (+0000) Subject: * (bug 2568) Fixed a logic error in the Special:Statistics code which caused X-Git-Tag: 1.5.0beta2~162 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=09fa508d2b994832e2e0942b0ab9de66621eef23;p=lhc%2Fweb%2Fwiklou.git * (bug 2568) Fixed a logic error in the Special:Statistics code which caused the displayed percentage of admins to be totally off. --- 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 );