$this->mModuleMgr->addModules( self::$QueryMetaModules, 'meta' );
$this->mModuleMgr->addModules( $config->get( 'APIMetaModules' ), 'meta' );
+ Hooks::run( 'ApiQuery::moduleManager', array( $this->mModuleMgr ) );
+
// Create PageSet that will process titles/pageids/revids/generator
$this->mPageSet = new ApiPageSet( $this );
}
*/
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];
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' );
$params = $module->extractRequestParams();
$cacheMode = $this->mergeCacheMode(
$cacheMode, $module->getCacheMode( $params ) );
- $module->profileIn();
$module->execute();
- wfRunHooks( 'APIQueryAfterExecute', array( &$module ) );
- $module->profileOut();
+ Hooks::run( 'APIQueryAfterExecute', array( &$module ) );
}
// Set the cache mode
$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.'
+ );
+ }
}
/**
}
if ( count( $pages ) ) {
+ $pageSet->populateGeneratorData( $pages );
+
if ( $this->mParams['indexpageids'] ) {
$pageIDs = array_keys( $pages );
// json treats all map keys as strings - converting to match