r104103 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104102‎ | r104103 | r104104 >
Date:23:37, 23 November 2011
Author:jeroendedauw
Status:ok
Tags:neilk 
Comment:
fixing bug 31341 - maybe not the most elegant solution, but it works
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -419,7 +419,7 @@
420420 newUpload: function( file ) {
421421 var _this = this;
422422
423 - if ( _this.uploads.length == _this.maxUploads ) {
 423+ if ( _this.uploads.length >= _this.maxUploads ) {
424424 return false;
425425 }
426426
@@ -450,6 +450,11 @@
451451 */
452452 setUploadFilled: function( upload ) {
453453 var _this = this;
 454+
 455+ if ( _this.uploads.length >= _this.maxUploads ) {
 456+ _this.removeUpload( upload );
 457+ return false;
 458+ }
454459
455460 _this.uploads.push( upload );
456461

Follow-up revisions

RevisionCommit summaryAuthorDate
r104117Follow up to r104103;jeroendedauw00:33, 24 November 2011
r104167bug 31341, follow up to r104117jeroendedauw14:44, 24 November 2011
r105441fix off by one error from bug 31341 and error message tweaksjeroendedauw17:03, 7 December 2011

Status & tagging log