Merge "Introduce new hook UploadVerifyUpload to allow preventing file uploads"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 7 Jul 2016 02:27:44 +0000 (02:27 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 7 Jul 2016 02:27:44 +0000 (02:27 +0000)
1  2 
docs/hooks.txt
includes/api/ApiUpload.php
includes/upload/UploadBase.php

diff --cc docs/hooks.txt
Simple merge
@@@ -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'];
Simple merge