summaryrefslogtreecommitdiff
path: root/includes/SpecialStatistics.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
commitd81f562b712f2387fa02290bf2ca86392ab356f2 (patch)
treed666cdefbe6ac320827a2c6cb473581b46e22c4c /includes/SpecialStatistics.php
parent183851b06bd6c52f3cae5375f433da720d410447 (diff)
Aktualisierung auf Version 1.8.1
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 );
+ }
+ }
+
}
}
?>