Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit fada3e7

Browse files
committed
Upload Configs : make sure options are reloaded on repository switch
1 parent 3e8328d commit fada3e7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

core/src/plugins/uploader.html/js/react/UploaderModel.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,17 @@
553553

554554
constructor(){
555555
super();
556-
this._global = global.pydio.getPluginConfigs("uploader");
557-
this._mq = global.pydio.getPluginConfigs("mq");
558-
this._user = global.pydio.user.preferences;
556+
pydio.observe("registry_loaded", function(){
557+
this._global = null;
558+
this._mq = null;
559+
}.bind(this));
560+
}
561+
562+
_loadOptions(){
563+
if(!this._global){
564+
this._global = global.pydio.getPluginConfigs("uploader");
565+
this._mq = global.pydio.getPluginConfigs("mq");
566+
}
559567
}
560568

561569
getOptionAsBool(name, userPref = '', defaultValue = undefined){
@@ -564,6 +572,7 @@
564572
}
565573

566574
getOption(name, userPref = '', defaultValue = undefined){
575+
this._loadOptions();
567576
if(userPref){
568577
let test = this.getUserPreference('originalUploadForm_XHRUploader', userPref);
569578
if(test !== undefined && test !== null) return test;

0 commit comments

Comments
 (0)