From: Tim Starling Date: Sun, 26 Feb 2006 01:12:47 +0000 (+0000) Subject: Show the job queue length in Special:Statistics X-Git-Tag: 1.6.0~274 X-Git-Url: http://git.cyclocoop.org/%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/Special:BookSources/1234567890?a=commitdiff_plain;h=5c8708ae35cb63e6e332c2fd7a9050e8c13a9b06;p=lhc%2Fweb%2Fwiklou.git Show the job queue length in Special:Statistics --- 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).",