* Installer support for experimental MySQL 4.1/5.0 binary-safe schema
* Use INSERT IGNORE for db-based BagOStuff add/insert, for more memcache-like
behavior when keys already exist on add (instead of dying with an error...)
-
+* Add a hook 'UploadForm:initial' before the upload form is generated, and two
+ member variable for text injection into the form, which can be filled by the hooks.
== Languages updated ==
var $mUploadCopyStatus, $mUploadSource, $mReUpload, $mAction, $mUpload;
var $mOname, $mSessionKey, $mStashed, $mDestFile, $mRemoveTempFile, $mSourceType;
var $mUploadTempFileSize = 0;
+
+ # Placeholders for text injection by hooks (must be HTML)
+ # extensions should take care to _append_ to the present value
+ var $uploadFormTextTop;
+ var $uploadFormTextAfterSummary;
+
/**#@-*/
/**
return;
}
+ # Placeholders for text injection by hooks (empty per default)
+ $this->uploadFormTextTop = "";
+ $this->uploadFormTextAfterSummary = "";
+
$this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' );
$this->mReUpload = $request->getCheck( 'wpReUpload' );
$this->mUpload = $request->getCheck( 'wpUpload' );
global $wgUseCopyrightUpload;
global $wgRequest, $wgAllowCopyUploads;
+ 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' );
if ( $ew ) $ew = " style=\"width:100%\"";
<form id='upload' method='post' enctype='multipart/form-data' action=\"$action\">
<table border='0'>
<tr>
+ {$this->uploadFormTextTop}
<td align='right' valign='top'><label for='wpUploadFile'>{$sourcefilename}:</label></td>
<td align='left'>
{$filename_form}
<td align='right'><label for='wpUploadDescription'>{$summary}</label></td>
<td align='left'>
<textarea tabindex='3' name='wpUploadDescription' id='wpUploadDescription' rows='6' cols='{$cols}'{$ew}>" . htmlspecialchars( $this->mUploadDescription ) . "</textarea>
+ {$this->uploadFormTextAfterSummary}
</td>
</tr>
<tr>" );