MDL-31901 fixed forgotten overwrite dialogue in filepicker
authorMarina Glancy <marina@moodle.com>
Wed, 16 May 2012 07:05:14 +0000 (15:05 +0800)
committerMarina Glancy <marina@moodle.com>
Mon, 21 May 2012 03:57:55 +0000 (11:57 +0800)
repository/filepicker.js

index 7417f7a..9c37b03 100644 (file)
@@ -1082,6 +1082,10 @@ M.core_filepicker.init = function(Y, options) {
                     },
                     callback: function(id, obj, args) {
                         selectnode.removeClass('loading');
+                        if (obj.event == 'fileexists') {
+                            scope.process_existing_file(obj);
+                            return;
+                        }
                         if (scope.options.editor_target && scope.options.env=='editor') {
                             scope.options.editor_target.value=obj.url;
                             scope.options.editor_target.onchange();