Page MenuHomePhabricator

Special:Export should have an option to export with the sites license
Open, LowPublicFeature

Description

Author: bredtape

Description:
Seeing as several of the GNU licenses and CC licenses require attribution, it would stand to reason that Special:Export should have the option to produce the article with a small attribution.. In the form of a template or a system message...

Additional questions to consider:

  1. Whether this should happen to all revisions.. or latest revision?
  2. If this should be an admin setting (ie. localsettings) or a setting the requester can select on the special:export page?

Version: unspecified
Severity: enhancement

Details

Reference
bz14048

Event Timeline

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

bredtape wrote:

Patch

remember to add $wgExportWLicense = "TRUE"; to localsettings.php

attachment Export.php ignored as obsolete

bredtape wrote:

patch id=4888 enables does the following:

  1. Checks if $wgExportWLicense = TRUE
  2. adds template {{ExportLicense}} to top of latest rev article text

bredtape wrote:

patch

have just realized that adding the template is awfully stupid, since the site which imports it will obviously not have that template :)

therefore, i've changed the addition to: $wgExportLicense and I allow the user to specify what that is.. a system message, some text, html or a template...

attachment Export.php ignored as obsolete

ayg wrote:

Do not submit entire files. Submit patches using "svn diff" or "diff -u".

bredtape wrote:

Patch

Diff -u patch, as simetrical pointed out...

attachment Export.php.patch ignored as obsolete

  1. Applied patch
  2. Added "$wgExportWLicense = true;" to LocalSettings.php
  3. Added "$wgExportLicense = "ExportLicense";" to LocalSettings.php
  4. Exported [[Main Page]]

Observed result: Works as advertised. Content of $wgExportLicense was added to the export, prepended to the most recent version

Additional comments: I am not convinced this is an elegant solution. How about adding a <license> tag below <page> level? I think that the site license ($wgRightsPage/$wgRightsText) should be used by default, and could possibly differ by adding configuration options. This would also imply that the SpecialImport.php should be changed to 'do something' with the license (talk page? edit summary? sub page /license?)

So even though the patch works, I haven't committed it.

Agreed. A <license> tag makes much more sense that tacking the license on top of the text.

ayg wrote:

Are there any backward-compatibility issues with changing the export format, though?

I am *assuming* that the new tag is to be ignored in older versions. Just make an export of a page, add the license tag, import it in an older version and see if it break or works?

bredtape wrote:

At the time, i had raised the proposal to wikitech-l, and there was a long conversation about the matter... perhaps a look at the thoughts there is appropriate.. (the date should be around the time i posted the bug, may 09 2008.

I would support the <license> method.. and perhaps a small box with the license info could be used, like the small box that shows which categories a page belongs to...

Mass compoment change: <some> -> Export/Import

  • Bug 15633 has been marked as a duplicate of this bug. ***

What about the author list as a solution to the problem? That code is already in Export.php and SpecialExport, and even usable after https://svn.wikimedia.org/viewvc/mediawiki?revision=103314&view=revision. It allows the list of authors for a page to be exported even when only the current revision is exported. (If you export full history you already have the user names/IPs included in the revisions.)

sumanah wrote:

Comment on attachment 4890
Patch

Marking patch as obsolete because the code review in comments showed that it isn't quite the solution desired. But thank you for the patch.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.