(bug 5372) Add number of files to Special:Statistics
authorRob Church <robchurch@users.mediawiki.org>
Mon, 27 Mar 2006 23:45:28 +0000 (23:45 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Mon, 27 Mar 2006 23:45:28 +0000 (23:45 +0000)
RELEASE-NOTES
includes/SpecialStatistics.php
languages/Messages.php

index d539b3e..d7f1076 100644 (file)
@@ -389,6 +389,7 @@ Special Pages:
 * (bug 3047) Don't mention talk pages on Special:Movepage when there isn't one
 * Show links to user page, talk page and contributions page on Special:Newpages
 * Special:Export can now export a list of all contributors to an article (off by default)
+* (bug 5372) Add number of files to Special:Statistics
 
 Misc.:
 * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect
index 080e6d8..f5583fe 100644 (file)
@@ -50,11 +50,12 @@ function wfSpecialStatistics() {
 
        $admins = $dbr->selectField( 'user_groups', 'COUNT(*)', array( 'ug_group' => 'sysop' ), $fname );
        $numJobs = $dbr->selectField( 'job', 'COUNT(*)', '', $fname );
+       $numFiles = $dbr->selectField( 'image', 'COUNT(*)', '', $fname );
 
        if ($action == 'raw') {
                $wgOut->disable();
                header( 'Pragma: nocache' );
-               echo "total=$total;good=$good;views=$views;edits=$edits;users=$users;admins=$admins\n";
+               echo "total=$total;good=$good;views=$views;edits=$edits;users=$users;admins=$admins;files=$numFiles\n";
                return;
        } else {
                $text = '==' . wfMsg( 'sitestats' ) . "==\n" ;
@@ -65,7 +66,8 @@ function wfSpecialStatistics() {
                        $wgLang->formatNum( $edits ),
                        $wgLang->formatNum( sprintf( '%.2f', $total ? $edits / $total : 0 ) ),
                        $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ),
-                       $wgLang->formatNum( $numJobs )
+                       $wgLang->formatNum( $numJobs ),
+                       $wgLang->formatNum( $numFiles )
                );
 
                $text .= "\n==" . wfMsg( 'userstats' ) . "==\n";
index ad14e2c..55233b2 100644 (file)
@@ -917,7 +917,7 @@ this old version, (rev) = revert to this old version.
 This includes \"talk\" pages, pages about {{SITENAME}}, minimal \"stub\"
 pages, redirects, and others that probably don't qualify as content pages.
 Excluding those, there are '''$2''' pages that are probably legitimate
-content pages.
+content pages. We have '''$8''' files uploaded.
 
 There have been a total of '''$3''' page views, and '''$4''' page edits
 since the wiki was setup.