Merge "API: Fix prop=revisions&rvdiffto= without rvprop=content"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 20 May 2014 01:34:12 +0000 (01:34 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 20 May 2014 01:34:12 +0000 (01:34 +0000)
1  2 
includes/api/ApiQueryRevisions.php

@@@ -37,7 -37,7 +37,7 @@@ class ApiQueryRevisions extends ApiQuer
        private $diffto, $difftotext, $expandTemplates, $generateXML, $section,
                $token, $parseContent, $contentFormat;
  
 -      public function __construct( $query, $moduleName ) {
 +      public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'rv' );
        }
  
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
                }
  
-               if ( isset( $prop['content'] ) || !is_null( $this->difftotext ) ) {
+               if ( isset( $prop['content'] ) || !is_null( $this->diffto ) || !is_null( $this->difftotext ) ) {
                        // For each page we will request, the user must have read rights for that page
                        $user = $this->getUser();
                        /** @var $title Title */