summaryrefslogtreecommitdiff
path: root/includes/SpecialStatistics.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SpecialStatistics.php')
-rw-r--r--includes/SpecialStatistics.php26
1 files changed, 23 insertions, 3 deletions
diff --git a/includes/SpecialStatistics.php b/includes/SpecialStatistics.php
index 5903546a..4a51efd9 100644
--- a/includes/SpecialStatistics.php
+++ b/includes/SpecialStatistics.php
@@ -75,12 +75,32 @@ function wfSpecialStatistics() {
$text .= wfMsg( 'userstatstext',
$wgLang->formatNum( $users ),
$wgLang->formatNum( $admins ),
- '[[' . wfMsgForContent( 'administrators' ) . ']]',
- // should logically be after #admins, damn backwards compatability!
- $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) )
+ '[[' . wfMsgForContent( 'grouppage-sysop' ) . ']]', # TODO somehow remove, kept for backwards compatibility
+ $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) ),
+ User::makeGroupLinkWiki( 'sysop' )
);
$wgOut->addWikiText( $text );
+
+ global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang, $wgContLang;
+ if( !$wgDisableCounters && !$wgMiserMode ) {
+ $sql = "SELECT page_namespace, page_title, page_counter FROM {$page} WHERE page_is_redirect = 0 AND page_counter > 0 ORDER BY page_counter DESC";
+ $sql = $dbr->limitResult($sql, 10, 0);
+ $res = $dbr->query( $sql, $fname );
+ if( $res ) {
+ $wgOut->addHtml( '<h2>' . wfMsgHtml( 'statistics-mostpopular' ) . '</h2>' );
+ $skin =& $wgUser->getSkin();
+ $wgOut->addHtml( '<ol>' );
+ while( $row = $dbr->fetchObject( $res ) ) {
+ $link = $skin->makeKnownLinkObj( Title::makeTitleSafe( $row->page_namespace, $row->page_title ) );
+ $dirmark = $wgContLang->getDirMark();
+ $wgOut->addHtml( '<li>' . $link . $dirmark . ' [' . $wgLang->formatNum( $row->page_counter ) . ']</li>' );
+ }
+ $wgOut->addHtml( '</ol>' );
+ $dbr->freeResult( $res );
+ }
+ }
+
}
}
?>