From a60a98d9003934ea0e288752e292ecc8f70fbb7d Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Thu, 20 Oct 2016 00:17:30 +0800 Subject: [PATCH] MDL-55324 filepicker: Explicitly set callback from showFilePicker Prior to this patch the callback passed to showFilePicker was saved and reused for subsequent calls. This doesn't allow the use of a function for generating the callback. This patch explicitly sets the callback each time. --- repository/filepicker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/repository/filepicker.js b/repository/filepicker.js index 43d1a22e412..386a6abcd17 100644 --- a/repository/filepicker.js +++ b/repository/filepicker.js @@ -498,6 +498,7 @@ M.core_filepicker.show = function(Y, options) { if (!M.core_filepicker.instances[options.client_id]) { M.core_filepicker.init(Y, options); } + M.core_filepicker.instances[options.client_id].options.formcallback = options.formcallback; M.core_filepicker.instances[options.client_id].show(); };