mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 12:53:24 +00:00
Merge "Use short license name from template if we don't recognize it"
This commit is contained in:
commit
5d7e4f8198
|
@ -546,15 +546,10 @@
|
||||||
* @param {string} filePageUrl URL of the file description page
|
* @param {string} filePageUrl URL of the file description page
|
||||||
*/
|
*/
|
||||||
MPP.setLicense = function ( license, filePageUrl ) {
|
MPP.setLicense = function ( license, filePageUrl ) {
|
||||||
var message, shortName, url, isCc;
|
var shortName, url, isCc;
|
||||||
|
|
||||||
if ( license ) {
|
if ( license ) {
|
||||||
message = 'multimediaviewer-license-' + ( license.internalName || '' );
|
shortName = license.getShortName();
|
||||||
if ( mw.messages.exists( message ) ) {
|
|
||||||
shortName = mw.message( message ).text();
|
|
||||||
} else {
|
|
||||||
shortName = mw.message( 'multimediaviewer-license-default' ).text();
|
|
||||||
}
|
|
||||||
url = license.deedUrl || filePageUrl;
|
url = license.deedUrl || filePageUrl;
|
||||||
isCc = license.isCc();
|
isCc = license.isCc();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue