* (bug 2568) Fixed a logic error in the Special:Statistics code which caused
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 28 Jun 2005 14:52:51 +0000 (14:52 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 28 Jun 2005 14:52:51 +0000 (14:52 +0000)
  the displayed percentage of admins to be totally off.

RELEASE-NOTES
includes/SpecialStatistics.php

index cc378d1..3c050f4 100644 (file)
@@ -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 ===
 
index 8706e8b..d9acfd0 100644 (file)
@@ -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 );