Merge "API: Fix simplified continuation module skipping"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 30 Oct 2014 23:23:47 +0000 (23:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 30 Oct 2014 23:23:47 +0000 (23:23 +0000)
includes/api/ApiQueryBase.php
includes/api/ApiResult.php

index b1581f3..998cc91 100644 (file)
@@ -70,6 +70,10 @@ abstract class ApiQueryBase extends ApiBase {
        /**
         * Override this method to request extra fields from the pageSet
         * using $pageSet->requestField('fieldName')
+        *
+        * Note this only makes sense for 'prop' modules, as 'list' and 'meta'
+        * modules should not be using the pageset.
+        *
         * @param ApiPageSet $pageSet
         */
        public function requestExtraData( $pageSet ) {
index 946977d..5bc2efb 100644 (file)
@@ -481,10 +481,14 @@ class ApiResult extends ApiBase {
                        $continue = explode( '||', $continue );
                        $this->dieContinueUsageIf( count( $continue ) !== 2 );
                        $this->generatorDone = ( $continue[0] === '-' );
+                       $skip = explode( '|', $continue[1] );
                        if ( !$this->generatorDone ) {
                                $this->generatorParams = explode( '|', $continue[0] );
+                       } else {
+                               // When the generator is complete, don't run any modules that
+                               // depend on it.
+                               $skip += $this->continueGeneratedModules;
                        }
-                       $skip = explode( '|', $continue[1] );
                }
 
                $this->continueAllModules = array();