=== Configuration changes in 1.26 ===
* $wgEnableParserCache was deprecated, set $wgParserCacheType to CACHE_NONE
instead if you want to disable the parser cache.
+* New-style continuation is now the default for API action=continue. Clients may
+ use the 'rawcontinue' parameter to receive raw query-continue data, but the
+ new style is encouraged as it's harder to implement incorrectly.
=== New features in 1.26 ===
* Change tags can now be hidden in the interface by disabling the associated
* (T65198) Talk page tabs now have a "rel=discussion" attribute
=== Action API changes in 1.26 ===
+* New-style continuation is now the default for action=continue. Clients may
+ use the 'rawcontinue' parameter to receive raw query-continue data, but the
+ new style is encouraged as it's harder to implement incorrectly.
* API action=query&list=tags: The displayname can now be boolean false if the
tag is meant to be hidden from user interfaces.
* action=import no longer allows both the namespace= and rootpage= parameters
// Write the continuation data into the result
$this->setContinuationManager( null );
- if ( $this->mParams['continue'] === null ) {
+ if ( $this->mParams['rawcontinue'] ) {
$data = $continuationManager->getRawContinuation();
if ( $data ) {
$this->getResult()->addValue( null, 'query-continue', $data,
$continuationManager->setContinuationIntoResult( $this->getResult() );
}
+ /// @todo: Remove this after a suitable period of time. When REL1_26 is cut, if not before.
if ( $this->mParams['continue'] === null && !$this->mParams['rawcontinue'] &&
- $this->getResult()->getResultData( 'query-continue' ) !== null
+ $this->getResult()->getResultData( 'continue' ) !== null
) {
- $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.'
+ 'Formatting of continuation data has changed. ' .
+ 'To receive raw query-continue data, use the \'rawcontinue\' parameter. ' .
+ 'To silence this warning, pass an empty string for \'continue\' in the initial query.'
);
}
}
public function setGeneratorContinue( $module, $paramName, $paramValue ) {
wfDeprecated( __METHOD__, '1.24' );
$this->getContinuationManager()->addGeneratorContinueParam( $module, $paramName, $paramValue );
- return $this->getParameter( 'continue' ) !== null;
+ return !$this->getParameter( 'rawcontinue' );
}
/**
'export' => false,
'exportnowrap' => false,
'iwurl' => false,
- 'continue' => null,
+ 'continue' => array(
+ ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
+ ),
'rawcontinue' => false,
);
if ( $flags ) {
"apihelp-query-param-export": "Export the current revisions of all given or generated pages.",
"apihelp-query-param-exportnowrap": "Return the export XML without wrapping it in an XML result (same format as [[Special:Export]]). Can only be used with $1export.",
"apihelp-query-param-iwurl": "Whether to get the full URL if the title is an interwiki link.",
- "apihelp-query-param-continue": "When present, formats query-continue as key-value pairs that should simply be merged into the original request. This parameter must be set to an empty string in the initial query.\n\nThis parameter is recommended for all new development, and will be made default in the next API version.",
- "apihelp-query-param-rawcontinue": "Currently ignored. In the future, <var>$1continue</var> will become the default and this will be needed to receive the raw <samp>query-continue</samp> data.",
+ "apihelp-query-param-rawcontinue": "Return raw <samp>query-continue</samp> data for continuation.",
"apihelp-query-example-revisions": "Fetch [[Special:ApiHelp/query+siteinfo|site info]] and [[Special:ApiHelp/query+revisions|revisions]] of <kbd>Main Page</kbd>.",
"apihelp-query-example-allpages": "Fetch revisions of pages beginning with <kbd>API/</kbd>.",
"apihelp-query-param-export": "{{doc-apihelp-param|query|export}}",
"apihelp-query-param-exportnowrap": "{{doc-apihelp-param|query|exportnowrap}}",
"apihelp-query-param-iwurl": "{{doc-apihelp-param|query|iwurl}}",
- "apihelp-query-param-continue": "{{doc-apihelp-param|query|continue}}",
"apihelp-query-param-rawcontinue": "{{doc-apihelp-param|query|rawcontinue}}",
"apihelp-query-example-revisions": "{{doc-apihelp-example|query}}",
"apihelp-query-example-allpages": "{{doc-apihelp-example|query}}",
} else {
$params['action'] = 'query';
}
- if ( $useContinue && !isset( $params['continue'] ) ) {
+ // Silence warning
+ if ( !isset( $params['continue'] ) ) {
$params['continue'] = '';
- } else {
- $params['rawcontinue'] = '1';
}
$count = 0;
$result = array();
/**
* Checks that the request's result matches the expected results.
+ * Assumes no rawcontinue and a complete batch.
* @param array $values Array is a two element array( request, expected_results )
* @param array $session
* @param bool $appendModule
if ( !array_key_exists( 'action', $req ) ) {
$req['action'] = 'query';
}
- if ( !array_key_exists( 'continue', $req ) ) {
- $req['rawcontinue'] = '1';
+ // Silence warning
+ if ( !isset( $params['continue'] ) ) {
+ $params['continue'] = '';
}
foreach ( $req as &$val ) {
if ( is_array( $val ) ) {
}
}
$result = $this->doApiRequest( $req, $session, $appendModule, $user );
- $this->assertResult( array( 'query' => $exp ), $result[0], $req );
+ $this->assertResult( array( 'batchcomplete' => true, 'query' => $exp ), $result[0], $req );
}
protected function assertResult( $exp, $result, $message = '' ) {