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

Change subject: Replacing Function.prototype.bind with anonymous function
......................................................................


Replacing Function.prototype.bind with anonymous function

because Internet Explorer 8 does not know about .bind() and throws an
error. Consequently no "next" button is shown in the Upload Wizard User
Interface; thus IE 8 users were unable to upload files using Upload
Wizard before this patch was applied.

This regression was introduced in I5f35a701 (325b5ce2):
<https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FUploadWizard/325b5ce20e82d00594480f10f749379c3549a65e/resources%2Fmw.UploadWizard.js#L720>.

Bug: 54392
Change-Id: I9d4509d37a8be094db2786562bc7773ba8b84141
---
M resources/mw.UploadWizard.js
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 80c162e..cf68bb5 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -731,6 +731,7 @@
        makeTransitioner: function( beginState, progressStates, endStates, 
starter, endCallback ) {
                var nextAction,
                        uploadsToStart = this.maxSimultaneousConnections,
+                       wizard = this,
                        endStateCount = 0;
 
                $.each( this.uploads, function(i, upload) {
@@ -751,7 +752,10 @@
                if ( endStateCount === this.uploads.length - 
this.countEmpties() ) {
                        nextAction = endCallback;
                } else {
-                       nextAction = this.makeTransitioner.bind( this, 
beginState, progressStates, endStates, starter, endCallback );
+                       // Function.prototype.bind is not used because it is 
not supported by IE 8
+                       nextAction = function() {
+                               wizard.makeTransitioner( beginState, 
progressStates, endStates, starter, endCallback );
+                       };
                }
 
                setTimeout( nextAction, this.transitionerDelay );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d4509d37a8be094db2786562bc7773ba8b84141
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Rillke <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Rillke <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to