$this->mDesiredDestName = $request->getText( 'wpDestFile' );
$this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' );
$this->mComment = $request->getText( 'wpUploadDescription' );
+ $this->mForReUpload = $request->getBool( 'wpForReUpload' );
$this->mReUpload = $request->getCheck( 'wpReUpload' );
if( !$request->wasPosted() ) {
# Placeholders for text injection by hooks (empty per default)
$this->uploadFormTextTop = "";
$this->uploadFormTextAfterSummary = "";
-
- $this->mReUpload = $request->getCheck( 'wpReUpload' );
$this->mUploadClicked = $request->getCheck( 'wpUpload' );
$this->mLicense = $request->getText( 'wpLicense' );
* Try actually saving the thing...
* It will show an error form on failure.
*/
- if( !$this->mReUpload ) {
+ if( !$this->mForReUpload ) {
$pageText = self::getInitialPageText( $this->mComment, $this->mLicense,
$this->mCopyrightStatus, $this->mCopyrightSource );
}
$title = $file->getTitle();
# Don't throw the warning when the titles are the same, it's a reupload
# and highly redundant.
- if ( !$title->equals( $destinationTitle ) || !$this->mReUpload ) {
+ if ( !$title->equals( $destinationTitle ) || !$this->mForReUpload ) {
$msg .= $title->getPrefixedText() .
"|" . $title->getText() . "\n";
}
$sourcefilename = wfMsgExt( 'sourcefilename', array( 'parseinline', 'escapenoentities' ) );
$destfilename = wfMsgExt( 'destfilename', array( 'parseinline', 'escapenoentities' ) );
- $msg = $this->mReUpload ? 'filereuploadsummary' : 'fileuploadsummary';
+ $msg = $this->mForReUpload ? 'filereuploadsummary' : 'fileuploadsummary';
$summary = wfMsgExt( $msg, 'parseinline' );
$licenses = new Licenses();
$watchChecked = $this->watchCheck() ? 'checked="checked"' : '';
# Re-uploads should not need "file exist already" warnings
- $warningChecked = ($this->mIgnoreWarning || $this->mReUpload) ? 'checked="checked"' : '';
+ $warningChecked = ($this->mIgnoreWarning || $this->mForReUpload) ? 'checked="checked"' : '';
// Prepare form for upload or upload/copy
if( $wgAllowCopyUploads && $wgUser->isAllowed( 'upload_by_url' ) ) {
$destOnkeyup = '';
}
# Uploading a new version? If so, the name is fixed.
- $on = $this->mReUpload ? "readonly='readonly'" : "";
+ $on = $this->mForReUpload ? "readonly='readonly'" : "";
$encComment = htmlspecialchars( $this->mComment );
<tr>"
);
# Re-uploads should not need license info
- if ( !$this->mReUpload && $licenseshtml != '' ) {
+ if ( !$this->mForReUpload && $licenseshtml != '' ) {
global $wgStylePath;
$wgOut->addHTML( "
<td class='mw-label'>
}
}
- if ( !$this->mReUpload && $wgUseCopyrightUpload ) {
+ if ( !$this->mForReUpload && $wgUseCopyrightUpload ) {
$filestatus = wfMsgExt( 'filestatus', 'escapenoentities' );
$copystatus = htmlspecialchars( $this->mCopyrightStatus );
$filesource = wfMsgExt( 'filesource', 'escapenoentities' );
</tr>" .
Xml::closeElement( 'table' ) .
Xml::hidden( 'wpDestFileWarningAck', '', array( 'id' => 'wpDestFileWarningAck' ) ) .
- xml::hidden( 'wpReUpload', $this->mReUpload ) .
+ Xml::hidden( 'wpForReUpload', $this->mForReUpload ) .
Xml::closeElement( 'fieldset' ) .
Xml::closeElement( 'form' )
);