Move ApiFormatYaml_spyc.php to spyc.php as per r71763
[lhc/web/wiklou.git] / includes / api / ApiQueryDeletedrevs.php
index f940ff0..b4ec7de 100644 (file)
@@ -1,10 +1,9 @@
 <?php
-
 /**
- * Created on Jul 2, 2007
- *
  * API for MediaWiki 1.8+
  *
+ * Created on Jul 2, 2007
+ *
  * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@home.nl
  *
  * This program is free software; you can redistribute it and/or modify
@@ -21,6 +20,8 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
  */
 
 if ( !defined( 'MEDIAWIKI' ) ) {
@@ -41,7 +42,6 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
 
        public function execute() {
                global $wgUser;
-               $this->getMain()->setVaryCookie();
                // Before doing anything at all, let's check permissions
                if ( !$wgUser->isAllowed( 'deletedhistory' ) ) {
                        $this->dieUsage( 'You don\'t have permission to view deleted revision information', 'permissiondenied' );
@@ -62,7 +62,6 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                $result = $this->getResult();
                $pageSet = $this->getPageSet();
                $titles = $pageSet->getTitles();
-               $data = array();
 
                // This module operates in three modes:
                // 'revs': List deleted revs for certain titles
@@ -115,7 +114,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
 
                if ( $limit == 'max' ) {
                        $limit = $this->getMain()->canApiHighLimits() ? $botMax : $userMax;
-                       $this->getResult()->addValue( 'limits', $this->getModuleName(), $limit );
+                       $this->getResult()->setParsedLimit( $this->getModuleName(), $limit );
                }
 
                $this->validateLimit( 'limit', $limit, 1, $userMax, $botMax );
@@ -210,8 +209,6 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        $title = Title::makeTitle( $row->ar_namespace, $row->ar_title );
 
                        if ( $fld_parsedcomment ) {
-                               global $wgUser;
-                               $this->getMain()->setVaryCookie();
                                $rev['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->ar_comment, $title );
                        }
                        if ( $fld_minor && $row->ar_minor_edit == 1 ) {
@@ -368,4 +365,4 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
-}
\ No newline at end of file
+}