* Fix display of link in "already rolled back" message for image/category pages
* (bug 6016) Left-aligned images should stack vertically, like right-aligned
images, not horizontally.
+* Patch from LeonWP: added UploadForm:BeforeProcessing hook in SpecialUpload.php
== Languages updated ==
$uploadFormTextAfterSummary to inject text (HTML) either before
or after the editform.
+'UploadForm:BeforeProcessing': at the beginning of processUpload()
+$form: UploadForm object
+Lets you poke at member variables like $mUploadDescription before the
+file is saved.
+
'UploadVerification': additional chances to reject an uploaded file
string $saveName: destination file name
string $tempName: filesystem path to the temporary file for checks
return;
}
- # Placeholders for text injection by hooks (empty per default)
- $this->uploadFormTextTop = "";
- $this->uploadFormTextAfterSummary = "";
+ # Placeholders for text injection by hooks (empty per default)
+ $this->uploadFormTextTop = "";
+ $this->uploadFormTextAfterSummary = "";
$this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' );
$this->mReUpload = $request->getCheck( 'wpReUpload' );
function processUpload() {
global $wgUser, $wgOut;
+ if( !wfRunHooks( 'UploadForm:BeforeProcessing', array( &$this ) ) )
+ {
+ wfDebug( "Hook 'UploadForm:BeforeProcessing' broke processing the file." );
+ return false;
+ }
+
/* Check for PHP error if any, requires php 4.2 or newer */
if( $this->mUploadError == 1/*UPLOAD_ERR_INI_SIZE*/ ) {
$this->mainUploadForm( wfMsgHtml( 'largefileserver' ) );
global $wgUseCopyrightUpload;
global $wgRequest, $wgAllowCopyUploads;
- if( !wfRunHooks( 'UploadForm:initial', array( &$this ) ) )
- {
- wfDebug( "Hook 'UploadForm:initial' broke output of the upload form" );
- return false;
- }
+ if( !wfRunHooks( 'UploadForm:initial', array( &$this ) ) )
+ {
+ wfDebug( "Hook 'UploadForm:initial' broke output of the upload form" );
+ return false;
+ }
$cols = intval($wgUser->getOption( 'cols' ));
$ew = $wgUser->getOption( 'editwidth' );