fixed prefixed links (for arabic wikipedia)
[lhc/web/wiklou.git] / includes / SpecialStatistics.php
index f28882a..a6433aa 100644 (file)
@@ -2,7 +2,7 @@
 
 function wfSpecialStatistics()
 {
-       global $wgUser, $wgOut;
+       global $wgUser, $wgOut, $wgLang;
        $fname = "wfSpecialStatistics";
 
        $wgOut->addHTML( "<h2>" . wfMsg( "sitestats" ) . "</h2>\n" );
@@ -21,11 +21,14 @@ function wfSpecialStatistics()
        $good = $row->ss_good_articles;
 
        $text = wfMsg( "sitestatstext",
-               $total, $good, $views, $edits,
-               sprintf( "%.2f", $total ? $edits / $total : 0 ),
-               sprintf( "%.2f", $edits ? $views / $edits : 0 ) );
-
-       $wgOut->addHTML( $text );
+               $wgLang->formatNum( $total ),
+               $wgLang->formatNum( $good ),
+               $wgLang->formatNum( $views ),
+               $wgLang->formatNum( $edits ),
+               $wgLang->formatNum( sprintf( "%.2f", $total ? $edits / $total : 0 ) ),
+               $wgLang->formatNum( sprintf( "%.2f", $edits ? $views / $edits : 0 ) ) );
+
+       $wgOut->addWikiText( $text );
        $wgOut->addHTML( "<h2>" . wfMsg( "userstats" ) . "</h2>\n" );
 
        $sql = "SELECT COUNT(user_id) AS total FROM user";
@@ -40,10 +43,12 @@ function wfSpecialStatistics()
        $admins = $row->total;
 
        $sk = $wgUser->getSkin();
-       $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
+       $ap = "[[" . wfMsg( "administrators" ) . "]]";
 
-       $text = wfMsg( "userstatstext", $total, $admins, $ap );
-       $wgOut->addHTML( $text );
+       $text = wfMsg( "userstatstext",
+               $wgLang->formatNum( $total ),
+               $wgLang->formatNum( $admins ), $ap );
+       $wgOut->addWikiText( $text );
 }
 
 ?>