From d9c2802ad016a1bda61bcb8775ae7bfd82ea75e7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 13 Oct 2015 17:27:04 +0200 Subject: [PATCH] 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 --- .../src/mediawiki/mediawiki.ForeignStructuredUpload.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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}}' : ''; }; /** -- 2.20.1