r81716 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81715‎ | r81716 | r81717 >
Date:11:12, 8 February 2011
Author:brion
Status:ok
Tags:
Comment:
MFT r81715

Don't throw JS error when AJAX license selection is on but there's no license selector because this is a re-upload.
Modified paths:
  • /branches/wmf/1.17wmf1/skins/common/upload.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/skins/common/upload.js
@@ -59,12 +59,12 @@
6060 row.appendChild( td );
6161 }
6262
63 - if ( wgAjaxLicensePreview ) {
 63+ var wpLicense = document.getElementById( 'wpLicense' );
 64+ if ( wgAjaxLicensePreview && wpLicense ) {
6465 // License selector check
65 - document.getElementById( 'wpLicense' ).onchange = licenseSelectorCheck;
 66+ wpLicense.onchange = licenseSelectorCheck;
6667
6768 // License selector table row
68 - var wpLicense = document.getElementById( 'wpLicense' );
6969 var wpLicenseRow = wpLicense.parentNode.parentNode;
7070 var wpLicenseTbody = wpLicenseRow.parentNode;
7171

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81715Don't throw JS error when AJAX license selection is on but there's no license...brion11:12, 8 February 2011

Status & tagging log