$uploadFormTextAfterSummary to inject text (HTML) either before
or after the editform.
-'UploadForm:BeforeProcessing': DEPRECATED! at the beginning of processUpload()
+'UploadForm:BeforeProcessing': at the beginning of processUpload()
$form: UploadForm object
Lets you poke at member variables like $mUploadDescription before the
file is saved.
+Do not use this hook to break upload processing. This will return the user to
+a blank form with no error message; use UploadVerification and
+UploadVerifyFile instead
'UploadCreateFromRequest': when UploadBase::createFromRequest has been called
$type: (string) the requested upload type
return;
}
- // Deprecated backwards compatibility hook
if( !wfRunHooks( 'UploadForm:BeforeProcessing', array( &$this ) ) ) {
wfDebug( "Hook 'UploadForm:BeforeProcessing' broke processing the file.\n" );
- // Return without notifying the user of an error. This sucks, but
- // this was the previous behaviour as well, and as this hook is
- // deprecated we're not going to do anything about it.
+ // This code path is deprecated. If you want to break upload processing
+ // do so by hooking into the appropriate hooks in UploadBase::verifyUpload
+ // and UploadBase::verifyFile.
+ // If you use this hook to break uploading, the user will be returned
+ // an empty form with no error message whatsoever.
return;
}
$error = '';
if( !wfRunHooks( 'UploadVerification',
array( $this->mDestName, $this->mTempPath, &$error ) ) ) {
- // @fixme This status needs another name...
return array( 'status' => self::HOOK_ABORTED, 'error' => $error );
}