Page MenuHomePhabricator

removing of copyright upload affirmation
Closed, ResolvedPublic

Description

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 @@

  1. copyright information values are not empty. $wgCheckCopyrightUpload = true;

+# Set this to false if you want to disable copyright checking on uploads
+$wgCopyrightUploadConfirm = true;
+

  1. Set this to false to avoid forcing the first letter of links
  2. 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

Details

Reference
bz1462
TitleReferenceAuthorSource BranchDest Branch
Add job to publish content dumps as XMLrepos/data-engineering/airflow-dags!587xcollazopublish-dumps-to-xml-take-2main
envvars-api: bump to 0.0.34-20231113143549-be1944farepos/cloud/toolforge/toolforge-deploy!129raymond-ndibebump_envvars-apimain
[envvars-api]: Add prometheusrepos/cloud/toolforge/envvars-api!16raymond-ndibeadd_statisticsmain
builds-builder: bump to 0.0.80-20231023142438-55d11e16repos/cloud/toolforge/toolforge-deploy!120dcarobump_builds-buildermain
harbor: upgrade to 2.9.0repos/cloud/toolforge/builds-builder!19sstefanovaslavina/upgrade-harbormain
harbor: upgrade to 2.9.0repos/cloud/toolforge/lima-kilo!85sstefanovaslavina/upgrade-harbormain
Replace all remaining log writes to trace/req with real valuesrepos/abstract-wiki/wikifunctions/function-evaluator!61jforresterT346264main
Replace all remaining log writes to trace/req with real valuesrepos/abstract-wiki/wikifunctions/function-orchestrator!71jforresterT346264main
Remove files via hdfs dfs when done with mediawiki-content-dump.repos/data-engineering/airflow-dags!506xcollazofix-tmp-location-for-dumps-backfillmain
Add LOCATION to intermediate table creation.repos/data-engineering/dumps/mediawiki-content-dump!16xcollazofix-tmp-locationmain
Update function-schemata sub-module to HEAD (958de5c)repos/abstract-wiki/wikifunctions/function-orchestrator!64jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (958de5c)repos/abstract-wiki/wikifunctions/function-evaluator!56jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (958de5c)repos/abstract-wiki/wikifunctions/wikilambda-cli!15jforrestersync-function-schematamain
Bump mediawiki-content-dump artifact to pickup *second* deduplication fix.repos/data-engineering/airflow-dags!505xcollazofix-bug-on-predicatemain
Return valid predicate when duplicate list is empty.repos/data-engineering/dumps/mediawiki-content-dump!15xcollazofix-bug-on-predicatemain
Bump mediawiki-content-dump artifact to pickup deduplication fix.repos/data-engineering/airflow-dags!503xcollazobump-dumps-to-pickup-deduplicationmain
Deduplicate intermediate table (wiki_db, revision_id) tuples on read.repos/data-engineering/dumps/mediawiki-content-dump!14xcollazodeduplicate-backfill-source-datamain
Logging: Actually use the logger in the correct way, passing data objectsrepos/abstract-wiki/wikifunctions/function-orchestrator!60jforresterT346264main
LoggerWrapper: Pass data object to logger service toorepos/abstract-wiki/wikifunctions/function-schemata!39jforresterT346264main
[JS] Add MetricsClient#submitInteraction()repos/data-engineering/metrics-platform!5phuedxwork/phuedx/T346287main
Show related patches Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:10 PM
bzimport set Reference to bz1462.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

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.

Yyou have my SUPPORT !

Perhaps (JeLuF ? Brion ? Hashar ?) can someone put this into CVS HEAD 1.5 and
change the version flag on the bugzilla ?

Err? Don't we have this already?

Snip from DefaultSettings.php

/* Set this to true if you want the annoying copyright confirmation

  • checkbox at Special:Upload */

$wgCopyrightAffirmation = false;

zigger wrote:

(In reply to comment #2)

Err? Don't we have this already?

Yes. Fixed between 1.5alpha2 and 1.5beta1 by 'avar' 22-June-2005.