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

Commit

Permalink
Pass "minisite" attribute to the request - Disable Task enqueing if i…
Browse files Browse the repository at this point in the history
…t's set, as there is no TaskService and NotificationsLoaded in minisite
  • Loading branch information
cdujeu committed Sep 8, 2016
1 parent 84d3cf4 commit 6df6966
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/access.fs/FsAccessDriver.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
} }
$size = 0; $size = 0;
$nodes = $selection->buildNodes(); $nodes = $selection->buildNodes();
$bgSizeThreshold = 1*1024*1024; $bgSizeThreshold = 10*1024*1024;
$bgWorkerThreshold = 80*1024*1024; $bgWorkerThreshold = 80*1024*1024;
if(!MetaStreamWrapper::wrapperIsRemote($selection->currentBaseUrl())){ if(!MetaStreamWrapper::wrapperIsRemote($selection->currentBaseUrl())){
foreach($nodes as $node){ foreach($nodes as $node){
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/action.share/src/Http/MinisiteServer.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($base, $linkHash, $rest = false)
{ {
$this->crtLinkHash = $linkHash; $this->crtLinkHash = $linkHash;
$this->rest = $rest; $this->rest = $rest;
parent::__construct($base); parent::__construct($base, []);
if($rest){ if($rest){
ConfService::currentContextIsRestAPI($base); ConfService::currentContextIsRestAPI($base);
} }
Expand Down
3 changes: 1 addition & 2 deletions core/src/plugins/action.share/src/ShareCenter.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ public static function publicRoute($serverBase, $route, $params){
$base = new Base(); $base = new Base();
$h = $_GET['minisite_session']; $h = $_GET['minisite_session'];
SessionService::setSessionName("AjaXplorer_Shared".str_replace(".","_",$h)); SessionService::setSessionName("AjaXplorer_Shared".str_replace(".","_",$h));

$base->handleRoute($serverBase, "/", ["minisite" => true]);
$base->handleRoute($serverBase, "/");


}else{ }else{


Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.access/src/Model/AJXP_Node.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function copyOrMoveMetadataFromNode($originalNode, $nameSpace, $operation
*/ */
public function getParent(){ public function getParent(){


if(empty($this->urlParts["path"]) || $this->urlParts["path"] == "/"){ if(empty($this->urlParts["path"]) || $this->urlParts["path"] === "/"){
return null; return null;
} }
$parent = new AJXP_Node(dirname($this->_url)); $parent = new AJXP_Node(dirname($this->_url));
Expand Down
4 changes: 3 additions & 1 deletion core/src/plugins/core.tasks/src/TaskService.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ public function enqueueTask(Task $task, ServerRequestInterface $request = null,
return $response; return $response;
} }


if(ConfService::backgroundActionsSupported() && !ConfService::currentContextIsCommandLine()) { $minisite = $request !== null && $request->getAttribute("minisite");

if(ConfService::backgroundActionsSupported() && !ConfService::currentContextIsCommandLine() && !$minisite) {


CliRunner::applyTaskInBackground($task); CliRunner::applyTaskInBackground($task);
return $response; return $response;
Expand Down

0 comments on commit 6df6966

Please sign in to comment.