jenkins-bot has submitted this change and it was merged.

Change subject: API: Reduce volume of "continue format is changing" warning
......................................................................


API: Reduce volume of "continue format is changing" warning

It's excessively difficult to determine if the logs of people hitting
this warning are really going to be affected by the change or if they're
making queries where it won't actually matter.

Since 1.26 is coming soon, and with it the decision as to whether to
pull the switch on I984e6358, let's retarget the warnings to those cases
where it's possible it would actually break someone's code.

Change-Id: I91f170fd7d4c791ca8f5d3592c888700f4d5aa97
---
M includes/api/ApiQuery.php
1 file changed, 12 insertions(+), 10 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index f4b64a3..ac89419 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -249,16 +249,6 @@
        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' );
@@ -304,6 +294,18 @@
                $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.'
+                       );
+               }
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/201193
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I91f170fd7d4c791ca8f5d3592c888700f4d5aa97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Nemo bis <federicol...@tiscali.it>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to