X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiStashEdit.php;h=478b0bcfbaab21cfd34704698692822672b76f0b;hb=9c70ca60ff08060d5b32867f762d96dbc4314010;hp=d6d15c75d451661db7602f11e19d4bb10eae5fdf;hpb=86c13ba3ad15f7ab4c567b30c2810fe36db102df;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index d6d15c75d4..478b0bcfba 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -19,6 +19,7 @@ */ use MediaWiki\MediaWikiServices; +use MediaWiki\Storage\PageEditStash; /** * Prepare an edit in shared cache so that it can be reused on edit @@ -34,6 +35,12 @@ use MediaWiki\MediaWikiServices; * @since 1.25 */ class ApiStashEdit extends ApiBase { + const ERROR_NONE = PageEditStash::ERROR_NONE; // b/c + const ERROR_PARSE = PageEditStash::ERROR_PARSE; // b/c + const ERROR_CACHE = PageEditStash::ERROR_CACHE; // b/c + const ERROR_UNCACHEABLE = PageEditStash::ERROR_UNCACHEABLE; // b/c + const ERROR_BUSY = PageEditStash::ERROR_BUSY; // b/c + public function execute() { $user = $this->getUser(); $params = $this->extractRequestParams(); @@ -124,9 +131,6 @@ class ApiStashEdit extends ApiBase { return; } - // The user will abort the AJAX request by pressing "save", so ignore that - ignore_user_abort( true ); - if ( $user->pingLimiter( 'stashedit' ) ) { $status = 'ratelimited'; } else {