Merge "API: Don't apply size limit to action=compare"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 10 Jan 2018 13:20:22 +0000 (13:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 10 Jan 2018 13:20:22 +0000 (13:20 +0000)
includes/api/ApiComparePages.php

index 5486594..375fc18 100644 (file)
@@ -167,7 +167,10 @@ class ApiComparePages extends ApiBase {
                        ApiResult::setContentValue( $vals, 'body', $difftext );
                }
 
-               $this->getResult()->addValue( null, $this->getModuleName(), $vals );
+               // Diffs can be really big and there's little point in having
+               // ApiResult truncate it to an empty response since the diff is the
+               // whole reason this module exists. So pass NO_SIZE_CHECK here.
+               $this->getResult()->addValue( null, $this->getModuleName(), $vals, ApiResult::NO_SIZE_CHECK );
        }
 
        /**