From 5b23cea5c74b33fbf2dc2cdaf8a3c6feb632ca9f Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 1 Sep 2010 16:47:21 +0000 Subject: [PATCH] * (bug 24166) API error when using rvprop=tags Move addition of revision table to after other joins --- RELEASE-NOTES | 1 + includes/api/ApiQueryRevisions.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b3f45dc664..cbe2d843b3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -376,6 +376,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * For required string parameters, if '' is provided, this is now classed as missing * (bug 24724) list=allusers is out by 1 (shows total users - 1) +* (bug 24166) API error when using rvprop=tags === Languages updated in 1.17 === diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 610dd0b0bd..3f97a33349 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -136,7 +136,7 @@ class ApiQueryRevisions extends ApiQueryBase { } $db = $this->getDB(); - $this->addTables( array( 'page', 'revision' ) ); + $this->addTables( 'page' ); $this->addFields( Revision::selectFields() ); $this->addWhere( 'page_id = rev_page' ); @@ -202,6 +202,9 @@ class ApiQueryRevisions extends ApiQueryBase { } } + //Bug 24166 - API error when using rvprop=tags + $this->addTables( 'revision' ); + $userMax = ( $this->fld_content ? ApiBase::LIMIT_SML1 : ApiBase::LIMIT_BIG1 ); $botMax = ( $this->fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2 ); $limit = $params['limit']; -- 2.20.1