From: Aaron Schulz Date: Tue, 13 May 2008 20:02:25 +0000 (+0000) Subject: Actually, page not always selected. Add this only when needed. X-Git-Tag: 1.31.0-rc.0~47656 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=bf63e619a649dd35d9d4f6cc9930c1c06f756ea7;p=lhc%2Fweb%2Fwiklou.git Actually, page not always selected. Add this only when needed. --- diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index fb6ed480d1..d39c62db56 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -88,6 +88,7 @@ class ApiQueryRevisions extends ApiQueryBase { if ( $this->tok_rollback || ( $this->fld_content && $this->expandTemplates ) || $pageCount > 0) { $this->addTables( 'page' ); + $this->addWhere('page_id=rev_page'); $this->addFields( Revision::selectPageFields() ); } @@ -165,7 +166,6 @@ class ApiQueryRevisions extends ApiQueryBase { // Get all revision IDs $this->addWhereFld('rev_id', array_keys($pageSet->getRevisionIDs())); - $this->addWhere('page_id=rev_page'); // assumption testing -- we should never get more then $revCount rows. $limit = $revCount;