Remove action=raw from Special:Statistics. We wanted to keep it for back-compat ...
authorChad Horohoe <demon@users.mediawiki.org>
Sat, 23 Oct 2010 17:04:45 +0000 (17:04 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sat, 23 Oct 2010 17:04:45 +0000 (17:04 +0000)
includes/specials/SpecialStatistics.php

index 7eb1a2f..e2d5bf6 100644 (file)
@@ -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
+}