/**#@+
* @access private
*/
- var $mUploadAffirm, $mUploadFile, $mUploadDescription, $mIgnoreWarning;
+ var $mUploadFile, $mUploadDescription, $mIgnoreWarning;
var $mUploadSaveName, $mUploadTempName, $mUploadSize, $mUploadOldVersion;
var $mUploadCopyStatus, $mUploadSource, $mReUpload, $mAction, $mUpload;
var $mOname, $mSessionKey, $mStashed, $mDestFile;
return;
}
- $this->mUploadAffirm = $request->getCheck( 'wpUploadAffirm' );
$this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning');
$this->mReUpload = $request->getCheck( 'wpReUpload' );
$this->mUpload = $request->getCheck( 'wpUpload' );
*/
function processUpload() {
global $wgUser, $wgOut, $wgLang, $wgContLang;
- global $wgUploadDirectory, $wgCopyrightAffirmation;
+ global $wgUploadDirectory;
global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
/**
return $this->mainUploadForm('<li>'.wfMsg( 'emptyfile' ).'</li>');
}
- if ( !$wgCopyrightAffirmation )
- $this->mUploadAffirm = true;
- /**
- * When using detailed copyright, if user filled field, assume he
- * confirmed the upload
- */
- if ( $wgUseCopyrightUpload ) {
- $this->mUploadAffirm = true;
- if( $wgCheckCopyrightUpload &&
- ( trim( $this->mUploadCopyStatus ) == '' ||
- trim( $this->mUploadSource ) == '' ) ) {
- $this->mUploadAffirm = false;
- }
- }
-
- /** User need to confirm his upload */
- if( !$this->mUploadAffirm ) {
- $this->mainUploadForm( wfMsg( 'noaffirmation' ) );
- return;
- }
-
# Chop off any directories in the given filename
if ( $this->mDestFile ) {
$basename = basename( $this->mDestFile );
$wgOut->addHTML( "
<form id='uploadwarning' method='post' enctype='multipart/form-data' action='$action'>
- <input type='hidden' name='wpUploadAffirm' value='1' />
<input type='hidden' name='wpIgnoreWarning' value='1' />
<input type='hidden' name='wpSessionKey' value=\"" . htmlspecialchars( $this->mSessionKey ) . "\" />
<input type='hidden' name='wpUploadDescription' value=\"" . htmlspecialchars( $this->mUploadDescription ) . "\" />
*/
function mainUploadForm( $msg='' ) {
global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
- global $wgUseCopyrightUpload, $wgCopyrightAffirmation;
+ global $wgUseCopyrightUpload;
$cols = intval($wgUser->getOption( 'cols' ));
$ew = $wgUser->getOption( 'editwidth' );
$fd = wfMsg( 'filedesc' );
$ulb = wfMsg( 'uploadbtn' );
- $clink = $sk->makeKnownLink( wfMsgForContent( 'copyrightpage' ),
- wfMsg( 'copyrightpagename' ) );
- $ca = wfMsg( 'affirmation', $clink );
$iw = wfMsg( 'ignorewarning' );
$titleObj = Title::makeTitle( NS_SPECIAL, 'Upload' );
$encDestFile = htmlspecialchars( $this->mDestFile );
$source = null;
- if ( $wgCopyrightAffirmation ) {
- $source = "
- <td align='right'>
- <input tabindex='3' type='checkbox' name='wpUploadAffirm' value='1' id='wpUploadAffirm' />
- </td><td align='left'><label for='wpUploadAffirm'>{$ca}</label></td>
- " ;
- }
if ( $wgUseCopyrightUpload )
{
$source = "
'filedesc' => 'Summary',
'filestatus' => 'Copyright status',
'filesource' => 'Source',
-'affirmation' => "I affirm that the copyright holder of this file
-agrees to license it under the terms of the $1.",
'copyrightpage' => "Project:Copyrights",
'copyrightpagename' => "{{SITENAME}} copyright",
'uploadedfiles' => 'Uploaded files',
-'noaffirmation' => 'You must affirm that your upload does not violate any copyrights.',
'ignorewarning' => 'Ignore warning and save file anyway.',
'minlength' => 'File names must be at least three letters.',
'illegalfilename' => 'The filename "$1" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.',