Deprecate the 'UploadVerification' hook
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 28 Jun 2016 19:32:43 +0000 (21:32 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 28 Jun 2016 19:52:31 +0000 (21:52 +0200)
It has been replaced by 'UploadVerifyFile' a long time ago,
but never officially deprecated.

Change-Id: I345dca48c28ee5e1e2ad35bb6f42bbc03a1f4dd1

RELEASE-NOTES-1.28
docs/hooks.txt
includes/upload/UploadBase.php

index 4c075fc..d0bb57f 100644 (file)
@@ -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 ==
 
index c0c01f4..8640228 100644 (file)
@@ -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
index 5ec49ba..08fbeea 100644 (file)
@@ -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 ];
                }