X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialStatistics.php;h=1a0ad9932980d3d7497c61d45ad9c6c2a136bbfd;hb=d238b93290c86e2495e3e67d99630d9cdace2471;hp=ca827501db80d73bf3070bdf409c8bbd784f9de5;hpb=90155b8a9719ada6522a320a3315b4e698fdd970;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/SpecialStatistics.php b/includes/SpecialStatistics.php
index ca827501db..1a0ad99329 100644
--- a/includes/SpecialStatistics.php
+++ b/includes/SpecialStatistics.php
@@ -1,6 +1,8 @@
addHTML( "
" . wfMsg( "sitestats" ) . "
\n" );
+ $wgOut->addHTML( '' . wfMsg( 'sitestats' ) . "
\n" );
$dbr =& wfGetDB( DB_SLAVE );
- extract( $dbr->tableNames( 'cur', 'site_stats', 'user', 'user_rights' ) );
+ extract( $dbr->tableNames( 'page', 'site_stats', 'user', 'user_rights' ) );
- $sql = "SELECT COUNT(cur_id) AS total FROM $cur";
+ $sql = "SELECT COUNT(page_namespace) AS total FROM $page";
$res = $dbr->query( $sql, $fname );
$row = $dbr->fetchObject( $res );
$total = $row->total;
@@ -28,35 +30,33 @@ function wfSpecialStatistics() {
$edits = $row->ss_total_edits;
$good = $row->ss_good_articles;
- $text = wfMsg( "sitestatstext",
+ $text = wfMsg( 'sitestatstext',
$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 ) ) );
+ $wgLang->formatNum( sprintf( '%.2f', $total ? $edits / $total : 0 ) ),
+ $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ) );
$wgOut->addWikiText( $text );
- $wgOut->addHTML( "" . wfMsg( "userstats" ) . "
\n" );
+ $wgOut->addHTML( '' . wfMsg( 'userstats' ) . "
\n" );
$sql = "SELECT COUNT(user_id) AS total FROM $user";
$res = $dbr->query( $sql, $fname );
$row = $dbr->fetchObject( $res );
$total = $row->total;
- $sql = "SELECT COUNT(user_id) AS total FROM $user_rights WHERE user_rights LIKE '%sysop%'";
+ $sql = "SELECT COUNT(ur_user) AS total FROM $user_rights WHERE ur_rights LIKE '%sysop%'";
$res = $dbr->query( $sql, $fname );
$row = $dbr->fetchObject( $res );
$admins = $row->total;
$sk = $wgUser->getSkin();
- $ap = "[[" . wfMsg( "administrators" ) . "]]";
+ $ap = '[[' . wfMsg( 'administrators' ) . ']]';
- $text = wfMsg( "userstatstext",
+ $text = wfMsg( 'userstatstext',
$wgLang->formatNum( $total ),
$wgLang->formatNum( $admins ), $ap );
$wgOut->addWikiText( $text );
-
}
-
?>