aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQuery.php
diff options
context:
space:
mode:
authorBrad Jorsch <bjorsch@wikimedia.org>2014-09-13 14:03:35 -0400
committerBrad Jorsch <bjorsch@wikimedia.org>2015-06-19 15:13:21 -0400
commit9c7385b8ad6801db66bfddd57778688152c793c5 (patch)
tree8fe4e0e0e13f422baf57a53077a8e1993bf8110e /includes/api/ApiQuery.php
parent352656b319bc9522a42930a7a7ad93806779c83b (diff)
downloadmediawikicore-9c7385b8ad6801db66bfddd57778688152c793c5.tar.gz
mediawikicore-9c7385b8ad6801db66bfddd57778688152c793c5.zip
API: Change default continuation format for action=query
The new format is much easier to use correctly, and should therefore be the default. The old format is maintained for clients that need the additional flexibility. Bug: T96858 Change-Id: I984e63581f4ef23ccada916b6d45131d1fb5e001
Diffstat (limited to 'includes/api/ApiQuery.php')
-rw-r--r--includes/api/ApiQuery.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index 304d0f0a6627..5378e9259fb0 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -292,7 +292,7 @@ class ApiQuery extends ApiBase {
// 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,
@@ -302,15 +302,14 @@ class ApiQuery extends ApiBase {
$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.'
);
}
}
@@ -485,7 +484,7 @@ class ApiQuery extends ApiBase {
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' );
}
/**
@@ -549,7 +548,9 @@ class ApiQuery extends ApiBase {
'export' => false,
'exportnowrap' => false,
'iwurl' => false,
- 'continue' => null,
+ 'continue' => array(
+ ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
+ ),
'rawcontinue' => false,
);
if ( $flags ) {