From b8d5d54be82283a197c810ace4afc31c8d0d44ad Mon Sep 17 00:00:00 2001 From: Rob Church Date: Mon, 27 Mar 2006 23:45:28 +0000 Subject: [PATCH] (bug 5372) Add number of files to Special:Statistics --- RELEASE-NOTES | 1 + includes/SpecialStatistics.php | 6 ++++-- languages/Messages.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d539b3e4d0..d7f10761b5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/SpecialStatistics.php b/includes/SpecialStatistics.php index 080e6d8844..f5583fe35b 100644 --- a/includes/SpecialStatistics.php +++ b/includes/SpecialStatistics.php @@ -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"; diff --git a/languages/Messages.php b/languages/Messages.php index ad14e2c6e8..55233b2765 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -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. -- 2.20.1