Last modified: 2014-01-14 01:27:32 UTC
There's been much ado lately at <https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(proposals)/Simplify_the_edit_window> regarding the visual edit form (index.php?action=edit) including particular legal language (specifically licensing information and site terms of use). However, it occurs to me that the main entry point of the Wikimedia/MediaWiki API (<https://en.wikipedia.org/w/api.php>) does not include most of this legal text. I'm not sure this is a problem (i.e., a legitimate bug), but it seems like a discrepancy that should be examined. It's possible to retrieve a wiki's "rights info" by calling <https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=rightsinfo>. This seems orthogonal to the main issue at-hand, though: nowhere on the API entry point page does it state explicitly that edits (or other write [or even read, I suppose] actions) are subject to the relevant and associated terms of use and licensing.
Agreed. The language should mirror the standard language, so something like: [under "Bugs & Requests: ... "] Terms: By using the API, you agree to the Terms of Use, and you irrevocably agree to release modifications made through the API under the CC-BY-SA 3.0 License and the GFDL. Not sure how best to handle the links within the house style of that document, but we should link to TOU/CC/GFDL. Thanks for pointing this out, MZ.
(In reply to comment #1) > Agreed. The language should mirror the standard language, so something like: > > [under "Bugs & Requests: ... "] > > Terms: By using the API, you agree to the Terms of Use, and you irrevocably > agree to release modifications made through the API under the CC-BY-SA 3.0 > License and the GFDL. Well, no, not exactly. Not all wikis are dual licensed. Needs to vary on $wmgUseDualLicense
Oh, and Wikidata is different too if ( in_array( $wgDBname, array( 'wikidatawiki', 'testwikidatawiki' ) ) ) { $wgHooks['SkinCopyrightFooter'][] = function( $title, $type, &$msg, &$link, &$forContent ) { if ( $title->getNamespace() === NS_MAIN ) { $msg = 'Creative Commons Public Domain 1.0'; $link = '//creativecommons.org/publicdomain/zero/1.0/'; } return true; }; }
Yes, forgot to mention this would have to be tweaked for some outlier wikis. But the same basic text still applies, as far as I know. Though looking at it again, and being reminded by wikidata, it should probably say "modifications or additions": "Terms: By using the API, you agree to the Terms of Use, and you irrevocably agree to release modifications or additions made through the API under the CC-BY-SA 3.0 License and the GFDL."
So I don't have to dig it out again. Basic pattern for adding this information is $wgHooks['APIGetDescription'][] = function ( &$module, &$desc ) { if ( !$module instanceof ApiMain ) { return true; } $desc[] = 'Terms: By using the API, you agree to the Terms of Use, and you irrevocably agree to release modifications made through the API under the CC-BY-SA 3.0 License and the GFDL.'; // Append some more whitespace for ApiMain for ( $i = 0; $i < 3; $i++ ) { $desc[] = ''; } return true; }