r81715 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81714‎ | r81715 | r81716 >
Date:11:12, 8 February 2011
Author:brion
Status:ok
Tags:
Comment:
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:
  • /trunk/phase3/skins/common/upload.js (modified) (history)

Diff [purge]

Index: trunk/phase3/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

Follow-up revisions

RevisionCommit summaryAuthorDate
r81716MFT r81715...brion11:12, 8 February 2011
r81717MFT r81715...brion11:13, 8 February 2011

Status & tagging log