-function wfSpecialStatistics() {
- global $wgUser, $wgOut, $wgLang;
- $fname = "wfSpecialStatistics";
-
- $wgOut->addHTML( "<h2>" . wfMsg( "sitestats" ) . "</h2>\n" );
-
- $dbr =& wfGetDB( DB_SLAVE );
- extract( $dbr->tableNames( 'cur', 'site_stats', 'user', 'user_rights' ) );
-
- $sql = "SELECT COUNT(cur_id) AS total FROM $cur";
- $res = $dbr->query( $sql, $fname );
- $row = $dbr->fetchObject( $res );
- $total = $row->total;
-
- $sql = "SELECT ss_total_views, ss_total_edits, ss_good_articles " .
- "FROM $site_stats WHERE ss_row_id=1";
- $res = $dbr->query( $sql, $fname );
- $row = $dbr->fetchObject( $res );
- $views = $row->ss_total_views;
- $edits = $row->ss_total_edits;
- $good = $row->ss_good_articles;
+function wfSpecialStatistics( $par = '' ) {
+ global $wgOut, $wgLang, $wgRequest;
+ $dbr = wfGetDB( DB_SLAVE );