jenkins-bot has submitted this change and it was merged.

Change subject: Remove spurious uploads
......................................................................


Remove spurious uploads

Supersedes Ie2e10ab79d8e1c922c28aa2fc030439c7e45e788

Bug: T72429
Change-Id: I622eee485a64da298fcbae5cb1c84ac8602440dd
---
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardUpload.js
2 files changed, 4 insertions(+), 7 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index b6e0cda..bd9a1cd 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -435,6 +435,9 @@
                                                newUpload.fill( file );
                                        } );
 
+                                       // Add a new upload to cover the button
+                                       wizard.newUpload();
+
                                        wizard.updateFileCounts();
                                } )
 
@@ -490,9 +493,6 @@
                 */
                setUploadFilled: function ( upload ) {
                        var wizard = this;
-
-                       // Create new upload slot for additional upload(s)
-                       this.newUpload();
 
                        this.uploads.push( upload );
 
@@ -845,7 +845,6 @@
                                        this.allowCloseWindow();
                                }
 
-                               this.resetFileStepUploads();
                                this.moveToStep( 'file' );
 
                                this.progressBar = undefined;
diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index 6cbe2a9..75eef3b 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -552,9 +552,7 @@
 
                                        // Now that first file has been 
prepared, process remaining files
                                        // in case of a multi-file upload.
-                                       if ( files.length > 1 ) {
-                                               this.emit( 'extra-files', 
files.slice( 1 ), toobig );
-                                       }
+                                       this.emit( 'extra-files', files.slice( 
1 ), toobig );
                                } else {
                                        this.filename = filename;
                                        if ( hasError === false ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/183080
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I622eee485a64da298fcbae5cb1c84ac8602440dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to