From: James D. Forrester Date: Tue, 2 Jul 2019 21:49:49 +0000 (-0700) Subject: Drop the UploadVerification hook, deprecated in 1.28 X-Git-Tag: 1.34.0-rc.0~942 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=714797861b69b58ead75ee1847afefe20c8651d5;p=lhc%2Fweb%2Fwiklou.git Drop the UploadVerification hook, deprecated in 1.28 Change-Id: Ic1917fc95223cbf97845c2702ddf98accf8ba9c2 --- diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 4b28012e70..c470fff22d 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -305,6 +305,8 @@ because of Phabricator reports. deprecated since 1.33. * The static properties mw.Api.errors and mw.Api.warnings, deprecated in 1.29, have been removed. +* The UploadVerification hook, deprecated in 1.28, has been removed. Instead, + use the UploadVerifyFile hook. * … === Deprecations in 1.34 === diff --git a/docs/hooks.txt b/docs/hooks.txt index 756ba4e8d0..8e274ed06e 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3569,14 +3569,6 @@ $props: (array|null) File properties, as returned by MessageSpecifier instance (you might want to use ApiMessage to provide machine -readable details for the API). -'UploadVerification': DEPRECATED since 1.28! Use UploadVerifyFile instead. -Additional chances to reject an uploaded file. -$saveName: (string) destination file name -$tempName: (string) filesystem path to the temporary file for checks -&$error: (string) output: message key for message to show if upload canceled by - returning false. May also be an array, where the first element is the message - key and the remaining elements are used as parameters to the message. - 'UploadVerifyFile': extra file verification, based on MIME type, etc. Preferred in most cases over UploadVerification. $upload: (object) an instance of UploadBase, with all info about the upload diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 41c42ce625..3d84ba484c 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -379,13 +379,6 @@ abstract class UploadBase { return $result; } - $error = ''; - if ( !Hooks::run( 'UploadVerification', - [ $this->mDestName, $this->mTempPath, &$error ], '1.28' ) - ) { - return [ 'status' => self::HOOK_ABORTED, 'error' => $error ]; - } - return [ 'status' => self::OK ]; }