Merge "Use short license name from template if we don't recognize it"

This commit is contained in:
jenkins-bot 2014-04-21 18:53:10 +00:00 committed by Gerrit Code Review
commit 5d7e4f8198

View file

@ -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 {