Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402834 )

Change subject: API: Don't apply size limit to action=compare
......................................................................

API: Don't apply size limit to action=compare

Some diffs can be really huge. Since ApiComparePages is intended to
return only the diff and some small metadata, bypass $wgAPIMaxResultSize
to allow the diff to be returned even if it's insanely huge.

Really insanely huge diffs might still make PHP run out of memory, even
before it gets the chance to return the diff to the API. That is outside
the scope of this change.

Bug: T184412
Change-Id: I755417f573c3caf85031d03b262aa55bd8cf36d7
---
M includes/api/ApiComparePages.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/402834/1

diff --git a/includes/api/ApiComparePages.php b/includes/api/ApiComparePages.php
index 5486594..2407cd0 100644
--- a/includes/api/ApiComparePages.php
+++ b/includes/api/ApiComparePages.php
@@ -167,7 +167,7 @@
                        ApiResult::setContentValue( $vals, 'body', $difftext );
                }
 
-               $this->getResult()->addValue( null, $this->getModuleName(), 
$vals );
+               $this->getResult()->addValue( null, $this->getModuleName(), 
$vals, ApiResult::NO_SIZE_CHECK );
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I755417f573c3caf85031d03b262aa55bd8cf36d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>

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

Reply via email to