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

Commit

Permalink
Upload Configs : make sure options are reloaded on repository switch
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 29, 2016
1 parent 3e8328d commit fada3e7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions core/src/plugins/uploader.html/js/react/UploaderModel.js
Expand Up @@ -553,9 +553,17 @@

constructor(){
super();
this._global = global.pydio.getPluginConfigs("uploader");
this._mq = global.pydio.getPluginConfigs("mq");
this._user = global.pydio.user.preferences;
pydio.observe("registry_loaded", function(){
this._global = null;
this._mq = null;
}.bind(this));
}

_loadOptions(){
if(!this._global){
this._global = global.pydio.getPluginConfigs("uploader");
this._mq = global.pydio.getPluginConfigs("mq");
}
}

getOptionAsBool(name, userPref = '', defaultValue = undefined){
Expand All @@ -564,6 +572,7 @@
}

getOption(name, userPref = '', defaultValue = undefined){
this._loadOptions();
if(userPref){
let test = this.getUserPreference('originalUploadForm_XHRUploader', userPref);
if(test !== undefined && test !== null) return test;
Expand Down

0 comments on commit fada3e7

Please sign in to comment.