r97593 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97592‎ | r97593 | r97594 >
Date:02:15, 20 September 2011
Author:neilk
Status:ok
Tags:
Comment:
fix bug #30237 by ensuring we get a copy of the configured templates via slice(), so we do not modify the config by accident later
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js
@@ -58,7 +58,7 @@
5959 if ( mw.isDefined( mw.UploadWizard.config.licenses[name] ) ) {
6060 var license = { name: name, props: mw.UploadWizard.config.licenses[name] };
6161 _this.licenses.push( license );
62 - var templates = mw.isDefined( license.props['templates'] ) ? license.props.templates : [ license.name ];
 62+ var templates = mw.isDefined( license.props['templates'] ) ? license.props.templates.slice(0) : [ license.name ];
6363 var origTemplateString = templates.join( '|' );
6464 if ( mw.isDefined( config['prependTemplates'] ) ) {
6565 $j.each( config['prependTemplates'], function( i, template ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r98150MFT -r97517:98079, some refactorings, few visible changes except r97593, fix ...neilk18:01, 26 September 2011

Status & tagging log