From: Sam Reed Date: Wed, 1 Sep 2010 16:47:21 +0000 (+0000) Subject: * (bug 24166) API error when using rvprop=tags X-Git-Tag: 1.31.0-rc.0~35247 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=5b23cea5c74b33fbf2dc2cdaf8a3c6feb632ca9f;p=lhc%2Fweb%2Fwiklou.git * (bug 24166) API error when using rvprop=tags Move addition of revision table to after other joins --- 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'];