From: Bartosz DziewoƄski Date: Tue, 13 Oct 2015 15:27:04 +0000 (+0200) Subject: mw.ForeignStructuredUpload: Use the right license template for Commons X-Git-Tag: 1.31.0-rc.0~9418^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=d9c2802ad016a1bda61bcb8775ae7bfd82ea75e7;p=lhc%2Fweb%2Fwiklou.git mw.ForeignStructuredUpload: Use the right license template for Commons When uploading locally or to different repo, keep the field empty, since we don't really know what licenses are appropriate (and we don't name a specific one in the UI). Change-Id: I5c8f55653dae42e47ac696d44a7b2082adf6d6f2 --- diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js index 4ec92e7821..dd28ddd4a5 100644 --- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js +++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js @@ -149,13 +149,15 @@ }; /** - * Gets the wikitext for the license of the upload. Abstract for now. + * Gets the wikitext for the license of the upload. * * @private * @return {string} */ ForeignStructuredUpload.prototype.getLicense = function () { - return ''; + // Make sure this matches the messages for different targets in + // mw.ForeignStructuredUpload.BookletLayout.prototype.renderUploadForm + return this.target === 'shared' ? '{{self|cc-by-sa-4.0}}' : ''; }; /**