From: Brad Jorsch Date: Fri, 2 May 2014 14:41:25 +0000 (-0400) Subject: API: Fix prop=revisions&rvdiffto= without rvprop=content X-Git-Tag: 1.31.0-rc.0~15648^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=4e5b1a4ecd2fbebce8bb4ba186f8fcc75ed749f3;p=lhc%2Fweb%2Fwiklou.git API: Fix prop=revisions&rvdiffto= without rvprop=content Make sure $this->section is initialized (and other stuff is checked) when rvdiffto is used. Bug: 64744 Change-Id: Ie6c50ad946ed5150819d004dabfe898a131a0a07 --- diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 61509953b6..41bc8d4d08 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -209,7 +209,7 @@ class ApiQueryRevisions extends ApiQueryBase { $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 */