From: Ævar Arnfjörð Bjarmason Date: Wed, 22 Jun 2005 03:21:58 +0000 (+0000) Subject: * The copyright confirmation box at Special:Upload can now be turned off by setting X-Git-Tag: 1.5.0beta1~98 X-Git-Url: http://git.cyclocoop.org/%22.%20%20%20generer_url_action%28%22logout%22%2C%22logout=prive%22%29%20.%20%20%20%22?a=commitdiff_plain;h=4c2e7736247e3a7c6db208f77fcaf1b18a63621c;p=lhc%2Fweb%2Fwiklou.git * The copyright confirmation box at Special:Upload can now be turned off by setting $wgCopyrightAffirmation to a false value in LocalSettings.php --- 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 = "