* (bug 24166) API error when using rvprop=tags
authorSam Reed <reedy@users.mediawiki.org>
Wed, 1 Sep 2010 16:47:21 +0000 (16:47 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 1 Sep 2010 16:47:21 +0000 (16:47 +0000)
Move addition of revision table to after other joins

RELEASE-NOTES
includes/api/ApiQueryRevisions.php

index b3f45dc..cbe2d84 100644 (file)
@@ -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 ===
 
index 610dd0b..3f97a33 100644 (file)
@@ -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'];