Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js |
— | — | @@ -89,13 +89,18 @@ |
90 | 90 | }, |
91 | 91 | |
92 | 92 | getLicenseWikiText: function() { |
| 93 | + var wikiText; |
| 94 | + // TODO: not nice to have 2 cases here and then have to insert the attribution field... |
| 95 | + |
93 | 96 | if ( _this.showCustomDiv && this.licenseInput.getWikiText() !== '' ) { |
94 | | - return this.licenseInput.getWikiText(); |
| 97 | + wikiText = this.licenseInput.getWikiText(); |
95 | 98 | } |
96 | 99 | else { |
97 | | - return '{{' + mw.UploadWizard.config.licensesOwnWork.filterTemplate |
| 100 | + wikiText = '{{' + mw.UploadWizard.config.licensesOwnWork.filterTemplate |
98 | 101 | + '|' + mw.UploadWizard.config.licensesOwnWork.defaults[0] + '}}'; |
99 | 102 | } |
| 103 | + |
| 104 | + return wikiText.slice( 0, -2 ) + '|attribution=' + this.getAuthorWikiText() + wikiText.slice( -2 ); |
100 | 105 | }, |
101 | 106 | |
102 | 107 | getSourceWikiText: function() { |