Author: mediazilla
Description:
I wrote this quick patch to 1.3.9 after some mods to our Intranet wiki. It
might be useful to others looking to turn it off as well. The patch modifies
DefaultSettings.php and SpecialUpload.php.
To use, define in LocalSettings.php:
$wgCheckCopyrightUpload = false;
diff -urN mediawiki-1.3.9/includes/DefaultSettings.php
wiki/includes/DefaultSettings.php
- mediawiki-1.3.9/includes/DefaultSettings.php Sun Dec 12 15:36:28 2004
+++ wiki/includes/DefaultSettings.php Thu Feb 3 22:43:39 2005
@@ -406,6 +406,9 @@
- copyright information values are not empty. $wgCheckCopyrightUpload = true;
+# Set this to false if you want to disable copyright checking on uploads
+$wgCopyrightUploadConfirm = true;
+
- Set this to false to avoid forcing the first letter of links
- to capitals. WARNING: may break links! This makes links
diff -urN mediawiki-1.3.9/includes/SpecialUpload.php wiki/includes/SpecialUpload.php
- mediawiki-1.3.9/includes/SpecialUpload.php Sun Dec 12 15:31:33 2004
+++ wiki/includes/SpecialUpload.php Thu Feb 3 22:41:19 2005
@@ -148,9 +148,11 @@
} /** User need to confirm his upload */
- if( !$this->mUploadAffirm ) {
- $this->mainUploadForm( wfMsg( 'noaffirmation' ) );
- return;
+ if ( $wgCopyrightUploadConfirm ) {
+ if( !$this->mUploadAffirm ) {
+ $this->mainUploadForm( wfMsg( 'noaffirmation' ) );
+ return;
+ }
} # Chop off any directories in the given filename
@@ -501,11 +503,15 @@
$titleObj = Title::makeTitle( NS_SPECIAL, 'Upload' ); $action = $titleObj->escapeLocalURL();
- $source = "
+ $source = "";
+ if ( $wgCopyrightUploadConfirm ) {
+ $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 = "
Version: 1.3.x
Severity: enhancement