From: Chad Horohoe Date: Sat, 23 Oct 2010 17:04:45 +0000 (+0000) Subject: Remove action=raw from Special:Statistics. We wanted to keep it for back-compat ... X-Git-Tag: 1.31.0-rc.0~34355 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=084eb03bf3bcc58dd639c5996e6f5e0cc99f9140;p=lhc%2Fweb%2Fwiklou.git Remove action=raw from Special:Statistics. We wanted to keep it for back-compat (see lists.wikimedia.org/pipermail/wikitech-l/2008-August/039202.html), but it's been two years since then. All of this info is available through the API with meta=siteinfo&siprop=statistics. Also a followup to r65059, finalize removal of job queue from Special:Statistics. --- diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index 7eb1a2fb05..e2d5bf698c 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -30,7 +30,7 @@ class SpecialStatistics extends SpecialPage { private $views, $edits, $good, $images, $total, $users, - $activeUsers, $admins, $numJobs = 0; + $activeUsers, $admins = 0; public function __construct() { parent::__construct( 'Statistics' ); @@ -50,7 +50,6 @@ class SpecialStatistics extends SpecialPage { $this->users = SiteStats::users(); $this->activeUsers = SiteStats::activeUsers(); $this->admins = SiteStats::numberingroup('sysop'); - $this->numJobs = SiteStats::jobs(); $this->hook = ''; # Staticic - views @@ -69,11 +68,6 @@ class SpecialStatistics extends SpecialPage { $wgMemc->set( $key, '1', 24*3600 ); // don't update for 1 day } } - - # Do raw output - if( $wgRequest->getVal( 'action' ) == 'raw' ) { - $this->doRawOutput(); - } $text = Xml::openElement( 'table', array( 'class' => 'wikitable mw-statistics-table' ) ); @@ -310,20 +304,4 @@ class SpecialStatistics extends SpecialPage { return $return; } - - /** - * Do the action=raw output for this page. Legacy, but we support - * it for backwards compatibility - * http://lists.wikimedia.org/pipermail/wikitech-l/2008-August/039202.html - */ - private function doRawOutput() { - global $wgOut; - $wgOut->disable(); - header( 'Pragma: nocache' ); - echo "total=" . $this->total . ";good=" . $this->good . ";views=" . - $this->views . ";edits=" . $this->edits . ";users=" . $this->users . ";"; - echo "activeusers=" . $this->activeUsers . ";admins=" . $this->admins . - ";images=" . $this->images . ";jobs=" . $this->numJobs . "\n"; - return; - } -} \ No newline at end of file +}