From: jenkins-bot Date: Thu, 7 Jul 2016 02:27:44 +0000 (+0000) Subject: Merge "Introduce new hook UploadVerifyUpload to allow preventing file uploads" X-Git-Tag: 1.31.0-rc.0~6437 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=96d9fb97312cafc54af331afd1613cee8e4b4ba6;p=lhc%2Fweb%2Fwiklou.git Merge "Introduce new hook UploadVerifyUpload to allow preventing file uploads" --- 96d9fb97312cafc54af331afd1613cee8e4b4ba6 diff --cc includes/api/ApiUpload.php index 15c1e39505,3af0dff015..cb8d938471 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@@ -347,12 -347,13 +347,13 @@@ class ApiUpload extends ApiBase * Throw an error that the user can recover from by providing a better * value for $parameter * - * @param array $error Error array suitable for passing to dieUsageMsg() + * @param array|string|MessageSpecifier $error Error suitable for passing to dieUsageMsg() * @param string $parameter Parameter that needs revising * @param array $data Optional extra data to pass to the user + * @param string $code Error code to use if the error is unknown * @throws UsageException */ - private function dieRecoverableError( $error, $parameter, $data = [] ) { + private function dieRecoverableError( $error, $parameter, $data = [], $code = 'unknownerror' ) { try { $data['filekey'] = $this->performStash(); $data['sessionkey'] = $data['filekey'];