From bf63e619a649dd35d9d4f6cc9930c1c06f756ea7 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 13 May 2008 20:02:25 +0000 Subject: [PATCH] Actually, page not always selected. Add this only when needed. --- includes/api/ApiQueryRevisions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1