From: Bartosz DziewoƄski Date: Tue, 28 Jun 2016 19:32:43 +0000 (+0200) Subject: Deprecate the 'UploadVerification' hook X-Git-Tag: 1.31.0-rc.0~6499^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=7ba4e28655b40121d199a41134dc9f7bdc4b0933;p=lhc%2Fweb%2Fwiklou.git Deprecate the 'UploadVerification' hook It has been replaced by 'UploadVerifyFile' a long time ago, but never officially deprecated. Change-Id: I345dca48c28ee5e1e2ad35bb6f42bbc03a1f4dd1 --- diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28 index 4c075fc66c..d0bb57f609 100644 --- a/RELEASE-NOTES-1.28 +++ b/RELEASE-NOTES-1.28 @@ -54,6 +54,7 @@ changes to languages because of Phabricator reports. * [BREAKING CHANGE] $wgExtendedLoginCookies has been removed. You can use or update a custom session provider if needed. * Deprecated APIEditBeforeSave hook in favor of EditFilterMergedContent. +* The 'UploadVerification' hook is deprecated. Use 'UploadVerifyFile' instead. == Compatibility == diff --git a/docs/hooks.txt b/docs/hooks.txt index c0c01f47a0..8640228c03 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3285,8 +3285,8 @@ added to the descriptor &$radio: Boolean, if source type should be shown as radio button $selectedSourceType: The selected source type -'UploadVerification': Additional chances to reject an uploaded file. Consider -using UploadVerifyFile instead. +'UploadVerification': DEPRECATED! 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 diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 5ec49ba6a8..08fbeea1cc 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -353,7 +353,7 @@ abstract class UploadBase { $error = ''; if ( !Hooks::run( 'UploadVerification', - [ $this->mDestName, $this->mTempPath, &$error ] ) + [ $this->mDestName, $this->mTempPath, &$error ], '1.28' ) ) { return [ 'status' => self::HOOK_ABORTED, 'error' => $error ]; }