From 4c2e7736247e3a7c6db208f77fcaf1b18a63621c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 22 Jun 2005 03:21:58 +0000 Subject: [PATCH] * The copyright confirmation box at Special:Upload can now be turned off by setting $wgCopyrightAffirmation to a false value in LocalSettings.php --- RELEASE-NOTES | 2 ++ includes/DefaultSettings.php | 4 ++++ includes/SpecialUpload.php | 11 ++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a038c98b6f..a5e6ef516c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 5d8b51c60a..d743bdb473 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index b732874676..b88b098390 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -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('
  • '.wfMsg( 'emptyfile' ).'
  • '); } - + + 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 = " " ; + } if ( $wgUseCopyrightUpload ) { $source = " -- 2.20.1