From 5c8708ae35cb63e6e332c2fd7a9050e8c13a9b06 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 26 Feb 2006 01:12:47 +0000 Subject: [PATCH] Show the job queue length in Special:Statistics --- includes/SpecialStatistics.php | 10 +++++----- languages/Messages.php | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/includes/SpecialStatistics.php b/includes/SpecialStatistics.php index 57b7232e99..ad4a1baa54 100644 --- a/includes/SpecialStatistics.php +++ b/includes/SpecialStatistics.php @@ -48,10 +48,8 @@ function wfSpecialStatistics() { $users = $userRow->total; } - $sql = "SELECT COUNT(*) AS total FROM $user_groups WHERE ug_group='sysop'"; - $res = $dbr->query( $sql, $fname ); - $row = $dbr->fetchObject( $res ); - $admins = $row->total; + $admins = $dbr->selectField( 'user_groups', 'COUNT(*)', array( 'ug_group' => 'sysop' ), $fname ); + $numJobs = $dbr->selectField( 'job', 'COUNT(*)', '', $fname ); if ($action == 'raw') { $wgOut->disable(); @@ -66,7 +64,9 @@ function wfSpecialStatistics() { $wgLang->formatNum( $views ), $wgLang->formatNum( $edits ), $wgLang->formatNum( sprintf( '%.2f', $total ? $edits / $total : 0 ) ), - $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ) ); + $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ), + $wgLang->formatNum( $numJobs ) + ); $text .= "\n==" . wfMsg( 'userstats' ) . "==\n"; diff --git a/languages/Messages.php b/languages/Messages.php index 6dc24cd4bf..25f4bb529a 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -877,7 +877,9 @@ content pages. There have been a total of '''$3''' page views, and '''$4''' page edits since the wiki was setup. -That comes to '''$5''' average edits per page, and '''$6''' views per edit.", +That comes to '''$5''' average edits per page, and '''$6''' views per edit. + +The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''$7'''.", 'userstatstext' => "There are '''$1''' registered users, of which '''$2''' (or '''$4%''') are administrators (see $3).", -- 2.20.1