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

Commit

Permalink
server_message "require_registry_reload"
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Apr 29, 2015
1 parent 84cd574 commit aef8014
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 28 deletions.
9 changes: 8 additions & 1 deletion core/src/plugins/core.mq/class.MqManager.php
Expand Up @@ -189,7 +189,6 @@ public function clientChannelMethod($action, $httpVars, $fileVars)
if (AuthService::usersEnabled()) {
$user = AuthService::getLoggedUser();
if ($user == null) {
//throw new Exception("You must be logged in");
AJXP_XMLWriter::header();
AJXP_XMLWriter::requireAuth();
AJXP_XMLWriter::close();
Expand All @@ -202,6 +201,14 @@ public function clientChannelMethod($action, $httpVars, $fileVars)
$GROUP_PATH = '/';
$uId = 'shared';
}
$currentRepository = ConfService::getCurrentRepositoryId();
$channelRepository = str_replace("nodes:", "", $httpVars["channel"]);
if($channelRepository != $currentRepository){
AJXP_XMLWriter::header();
echo "<require_registry_reload/>";
AJXP_XMLWriter::close();
return;
}
//session_write_close();

$startTime = time();
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

17 changes: 6 additions & 11 deletions core/src/plugins/gui.ajax/res/js/core/Pydio.js
Expand Up @@ -148,17 +148,12 @@ var Pydio = (function (_Observable) {
} else {
this.loadXmlRegistry(false, null, starterFunc);
}
/*
this.UI.initTemplates();
if(this.UI.modal) this.UI.modal.initForms();
this.UI.initObjects();
this.tryLogUserFromCookie();
this.fire("registry_loaded", this.Registry.getXML());
window.setTimeout(function(){
this.fire('loaded');
}.bind(this), 200);
this.Router = new Router(this);
*/
this.observe('server_message', (function (xml) {
if (XMLUtils.XPathSelectSingleNode(xml, 'tree/require_registry_reload')) {
this.repositoryId = null;
this.loadXmlRegistry(false);
}
}).bind(this));
}
}, {
key: 'loadXmlRegistry',
Expand Down
21 changes: 6 additions & 15 deletions core/src/plugins/gui.ajax/res/js/es6/Pydio.es6
Expand Up @@ -132,21 +132,12 @@ class Pydio extends Observable{
}else{
this.loadXmlRegistry(false, null, starterFunc);
}
/*
this.UI.initTemplates();
if(this.UI.modal) this.UI.modal.initForms();
this.UI.initObjects();
this.tryLogUserFromCookie();
this.fire("registry_loaded", this.Registry.getXML());
window.setTimeout(function(){
this.fire('loaded');
}.bind(this), 200);
this.Router = new Router(this);
*/

this.observe("server_message", function(xml){
if(XMLUtils.XPathSelectSingleNode(xml, "tree/require_registry_reload")){
this.repositoryId = null;
this.loadXmlRegistry(false);
}
}.bind(this));
}

/**
Expand Down

0 comments on commit aef8014

Please sign in to comment.