* The copyright confirmation box at Special:Upload can now be turned off by setting
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Wed, 22 Jun 2005 03:21:58 +0000 (03:21 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Wed, 22 Jun 2005 03:21:58 +0000 (03:21 +0000)
  $wgCopyrightAffirmation to a false value in LocalSettings.php

RELEASE-NOTES
includes/DefaultSettings.php
includes/SpecialUpload.php

index a038c98..a5e6ef5 100644 (file)
@@ -317,6 +317,8 @@ Various bugfixes, small features, and a few experimental things:
   "Show preview" and "Show changes"
 * Special:Statistics now supports action=raw, useful for bots designed to
   harwest e.g. article counts from multiple wikis.
+* The copyright confirmation box at Special:Upload can now be turned off by setting
+  $wgCopyrightAffirmation to a false value in LocalSettings.php
 
 === Caveats ===
 
index 5d8b51c..d743bdb 100644 (file)
@@ -1098,6 +1098,10 @@ $wgRightsIcon = NULL;
 /** Set this to some HTML to override the rights icon with an arbitrary logo */
 $wgCopyrightIcon = NULL;
 
+/* Set this to false if you want to get rid of the copyright confirmation
+ *  checkbox at Special:Upload */
+$wgCopyrightAffirmation = true;
+
 /** Set this to true if you want detailed copyright information forms on Upload. */
 $wgUseCopyrightUpload = false;
 
index b732874..b88b098 100644 (file)
@@ -133,7 +133,7 @@ class UploadForm {
         */
        function processUpload() {
                global $wgUser, $wgOut, $wgLang, $wgContLang;
-               global $wgUploadDirectory;
+               global $wgUploadDirectory, $wgCopyrightAffirmation;
                global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
 
                /**
@@ -142,7 +142,9 @@ class UploadForm {
                if( trim( $this->mOname ) == '' || empty( $this->mUploadSize ) ) {
                        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
@@ -531,7 +533,7 @@ class UploadForm {
         */
        function mainUploadForm( $msg='' ) {
                global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
-               global $wgUseCopyrightUpload;
+               global $wgUseCopyrightUpload, $wgCopyrightAffirmation;
                
                $cols = intval($wgUser->getOption( 'cols' ));
                $ew = $wgUser->getOption( 'editwidth' );
@@ -562,12 +564,15 @@ class UploadForm {
                $action = $titleObj->escapeLocalURL();
 
                $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 = "