r9559 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9558‎ | r9559 | r9560 >
Date:03:21, 22 June 2005
Author:avar
Status:old
Tags:
Comment:
* The copyright confirmation box at Special:Upload can now be turned off by setting
$wgCopyrightAffirmation to a false value in LocalSettings.php
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -133,7 +133,7 @@
134134 */
135135 function processUpload() {
136136 global $wgUser, $wgOut, $wgLang, $wgContLang;
137 - global $wgUploadDirectory;
 137+ global $wgUploadDirectory, $wgCopyrightAffirmation;
138138 global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
139139
140140 /**
@@ -142,7 +142,9 @@
143143 if( trim( $this->mOname ) == '' || empty( $this->mUploadSize ) ) {
144144 return $this->mainUploadForm('<li>'.wfMsg( 'emptyfile' ).'</li>');
145145 }
146 -
 146+
 147+ if ( !$wgCopyrightAffirmation )
 148+ $this->mUploadAffirm = true;
147149 /**
148150 * When using detailed copyright, if user filled field, assume he
149151 * confirmed the upload
@@ -531,7 +533,7 @@
532534 */
533535 function mainUploadForm( $msg='' ) {
534536 global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
535 - global $wgUseCopyrightUpload;
 537+ global $wgUseCopyrightUpload, $wgCopyrightAffirmation;
536538
537539 $cols = intval($wgUser->getOption( 'cols' ));
538540 $ew = $wgUser->getOption( 'editwidth' );
@@ -562,12 +564,15 @@
563565 $action = $titleObj->escapeLocalURL();
564566
565567 $encDestFile = htmlspecialchars( $this->mDestFile );
 568+ $source = null;
566569
 570+ if ( $wgCopyrightAffirmation ) {
567571 $source = "
568572 <td align='right'>
569573 <input tabindex='3' type='checkbox' name='wpUploadAffirm' value='1' id='wpUploadAffirm' />
570574 </td><td align='left'><label for='wpUploadAffirm'>{$ca}</label></td>
571575 " ;
 576+ }
572577 if ( $wgUseCopyrightUpload )
573578 {
574579 $source = "
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1098,6 +1098,10 @@
10991099 /** Set this to some HTML to override the rights icon with an arbitrary logo */
11001100 $wgCopyrightIcon = NULL;
11011101
 1102+/* Set this to false if you want to get rid of the copyright confirmation
 1103+ * checkbox at Special:Upload */
 1104+$wgCopyrightAffirmation = true;
 1105+
11021106 /** Set this to true if you want detailed copyright information forms on Upload. */
11031107 $wgUseCopyrightUpload = false;
11041108
Index: trunk/phase3/RELEASE-NOTES
@@ -317,6 +317,8 @@
318318 "Show preview" and "Show changes"
319319 * Special:Statistics now supports action=raw, useful for bots designed to
320320 harwest e.g. article counts from multiple wikis.
 321+* The copyright confirmation box at Special:Upload can now be turned off by setting
 322+ $wgCopyrightAffirmation to a false value in LocalSettings.php
321323
322324 === Caveats ===
323325

Status & tagging log