Merge "DefaultSettings: Fix doxygen warning for missing @endcond"
[lhc/web/wiklou.git] / includes / api / ApiQuery.php
index 9196dc7..ac89419 100644 (file)
@@ -169,9 +169,7 @@ class ApiQuery extends ApiBase {
         */
        public function getNamedDB( $name, $db, $groups ) {
                if ( !array_key_exists( $name, $this->mNamedDB ) ) {
-                       $this->profileDBIn();
                        $this->mNamedDB[$name] = wfGetDB( $db, $groups );
-                       $this->profileDBOut();
                }
 
                return $this->mNamedDB[$name];
@@ -251,16 +249,6 @@ class ApiQuery extends ApiBase {
        public function execute() {
                $this->mParams = $this->extractRequestParams();
 
-               if ( $this->mParams['continue'] === null && !$this->mParams['rawcontinue'] ) {
-                       $this->logFeatureUsage( 'action=query&!rawcontinue&!continue' );
-                       $this->setWarning(
-                               'Formatting of continuation data will be changing soon. ' .
-                               'To continue using the current formatting, use the \'rawcontinue\' parameter. ' .
-                               'To begin using the new format, pass an empty string for \'continue\' ' .
-                               'in the initial query.'
-                       );
-               }
-
                // Instantiate requested modules
                $allModules = array();
                $this->instantiateModules( $allModules, 'prop' );
@@ -295,10 +283,8 @@ class ApiQuery extends ApiBase {
                        $params = $module->extractRequestParams();
                        $cacheMode = $this->mergeCacheMode(
                                $cacheMode, $module->getCacheMode( $params ) );
-                       $module->profileIn();
                        $module->execute();
                        Hooks::run( 'APIQueryAfterExecute', array( &$module ) );
-                       $module->profileOut();
                }
 
                // Set the cache mode
@@ -308,6 +294,18 @@ class ApiQuery extends ApiBase {
                $this->getResult()->endContinuation(
                        $this->mParams['continue'] === null ? 'raw' : 'standard'
                );
+
+               if ( $this->mParams['continue'] === null && !$this->mParams['rawcontinue'] &&
+                       array_key_exists( 'query-continue', $this->getResult()->getData() )
+               ) {
+                       $this->logFeatureUsage( 'action=query&!rawcontinue&!continue' );
+                       $this->setWarning(
+                               'Formatting of continuation data will be changing soon. ' .
+                               'To continue using the current formatting, use the \'rawcontinue\' parameter. ' .
+                               'To begin using the new format, pass an empty string for \'continue\' ' .
+                               'in the initial query.'
+                       );
+               }
        }
 
        /**