r10168 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10167‎ | r10168 | r10169 >
Date:22:14, 16 July 2005
Author:avar
Status:old
Tags:
Comment:
* Removed $wgCopyrightAffirmation support
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -28,7 +28,7 @@
2929 /**#@+
3030 * @access private
3131 */
32 - var $mUploadAffirm, $mUploadFile, $mUploadDescription, $mIgnoreWarning;
 32+ var $mUploadFile, $mUploadDescription, $mIgnoreWarning;
3333 var $mUploadSaveName, $mUploadTempName, $mUploadSize, $mUploadOldVersion;
3434 var $mUploadCopyStatus, $mUploadSource, $mReUpload, $mAction, $mUpload;
3535 var $mOname, $mSessionKey, $mStashed, $mDestFile;
@@ -47,7 +47,6 @@
4848 return;
4949 }
5050
51 - $this->mUploadAffirm = $request->getCheck( 'wpUploadAffirm' );
5251 $this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning');
5352 $this->mReUpload = $request->getCheck( 'wpReUpload' );
5453 $this->mUpload = $request->getCheck( 'wpUpload' );
@@ -133,7 +132,7 @@
134133 */
135134 function processUpload() {
136135 global $wgUser, $wgOut, $wgLang, $wgContLang;
137 - global $wgUploadDirectory, $wgCopyrightAffirmation;
 136+ global $wgUploadDirectory;
138137 global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
139138
140139 /**
@@ -143,27 +142,6 @@
144143 return $this->mainUploadForm('<li>'.wfMsg( 'emptyfile' ).'</li>');
145144 }
146145
147 - if ( !$wgCopyrightAffirmation )
148 - $this->mUploadAffirm = true;
149 - /**
150 - * When using detailed copyright, if user filled field, assume he
151 - * confirmed the upload
152 - */
153 - if ( $wgUseCopyrightUpload ) {
154 - $this->mUploadAffirm = true;
155 - if( $wgCheckCopyrightUpload &&
156 - ( trim( $this->mUploadCopyStatus ) == '' ||
157 - trim( $this->mUploadSource ) == '' ) ) {
158 - $this->mUploadAffirm = false;
159 - }
160 - }
161 -
162 - /** User need to confirm his upload */
163 - if( !$this->mUploadAffirm ) {
164 - $this->mainUploadForm( wfMsg( 'noaffirmation' ) );
165 - return;
166 - }
167 -
168146 # Chop off any directories in the given filename
169147 if ( $this->mDestFile ) {
170148 $basename = basename( $this->mDestFile );
@@ -500,7 +478,6 @@
501479
502480 $wgOut->addHTML( "
503481 <form id='uploadwarning' method='post' enctype='multipart/form-data' action='$action'>
504 - <input type='hidden' name='wpUploadAffirm' value='1' />
505482 <input type='hidden' name='wpIgnoreWarning' value='1' />
506483 <input type='hidden' name='wpSessionKey' value=\"" . htmlspecialchars( $this->mSessionKey ) . "\" />
507484 <input type='hidden' name='wpUploadDescription' value=\"" . htmlspecialchars( $this->mUploadDescription ) . "\" />
@@ -533,7 +510,7 @@
534511 */
535512 function mainUploadForm( $msg='' ) {
536513 global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
537 - global $wgUseCopyrightUpload, $wgCopyrightAffirmation;
 514+ global $wgUseCopyrightUpload;
538515
539516 $cols = intval($wgUser->getOption( 'cols' ));
540517 $ew = $wgUser->getOption( 'editwidth' );
@@ -555,9 +532,6 @@
556533 $fd = wfMsg( 'filedesc' );
557534 $ulb = wfMsg( 'uploadbtn' );
558535
559 - $clink = $sk->makeKnownLink( wfMsgForContent( 'copyrightpage' ),
560 - wfMsg( 'copyrightpagename' ) );
561 - $ca = wfMsg( 'affirmation', $clink );
562536 $iw = wfMsg( 'ignorewarning' );
563537
564538 $titleObj = Title::makeTitle( NS_SPECIAL, 'Upload' );
@@ -566,13 +540,6 @@
567541 $encDestFile = htmlspecialchars( $this->mDestFile );
568542 $source = null;
569543
570 - if ( $wgCopyrightAffirmation ) {
571 - $source = "
572 - <td align='right'>
573 - <input tabindex='3' type='checkbox' name='wpUploadAffirm' value='1' id='wpUploadAffirm' />
574 - </td><td align='left'><label for='wpUploadAffirm'>{$ca}</label></td>
575 - " ;
576 - }
577544 if ( $wgUseCopyrightUpload )
578545 {
579546 $source = "
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1117,10 +1117,6 @@
11181118 /** Set this to some HTML to override the rights icon with an arbitrary logo */
11191119 $wgCopyrightIcon = NULL;
11201120
1121 -/* Set this to true if you want the annoying copyright confirmation
1122 - * checkbox at Special:Upload */
1123 -$wgCopyrightAffirmation = false;
1124 -
11251121 /** Set this to true if you want detailed copyright information forms on Upload. */
11261122 $wgUseCopyrightUpload = false;
11271123
Index: trunk/phase3/languages/Language.php
@@ -1012,12 +1012,9 @@
10131013 'filedesc' => 'Summary',
10141014 'filestatus' => 'Copyright status',
10151015 'filesource' => 'Source',
1016 -'affirmation' => "I affirm that the copyright holder of this file
1017 -agrees to license it under the terms of the $1.",
10181016 'copyrightpage' => "Project:Copyrights",
10191017 'copyrightpagename' => "{{SITENAME}} copyright",
10201018 'uploadedfiles' => 'Uploaded files',
1021 -'noaffirmation' => 'You must affirm that your upload does not violate any copyrights.',
10221019 'ignorewarning' => 'Ignore warning and save file anyway.',
10231020 'minlength' => 'File names must be at least three letters.',
10241021 'illegalfilename' => 'The filename "$1" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r89894Remove $wgCheckCopyrightUpload from DefaultSettings.php since the feature was...bawolff21:10, 11 June 2011

Status & tagging log