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

Commit

Permalink
Fix hook in plugin compression. Fix sharecenter disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jun 20, 2016
1 parent 644c542 commit 0b551c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Expand Up @@ -164,14 +164,15 @@ public function receiveAction(\Psr\Http\Message\ServerRequestInterface &$request
}
$finalArchive = $tmpArchiveName . "." . $archiveTypeCompress;
}
$destArchive = AJXP_MetaStreamWrapper::getRealFSReference($currentDirUrl . $archiveName);

$newNode = new AJXP_Node($currentDirUrl . $archiveName);
$destArchive = $newNode->getRealFile();
rename($finalArchive, $destArchive);
Controller::applyHook("node.before_create", array($destArchive, filesize($destArchive)));
Controller::applyHook("node.before_create", array($newNode, filesize($destArchive)));
if (file_exists($tmpArchiveName)) {
unlink($tmpArchiveName);
unlink(substr($tmpArchiveName, 0, -4));
}
$newNode = new AJXP_Node($currentDirUrl . $archiveName);
Controller::applyHook("node.change", array(null, $newNode, false), true);
$postMessageStatus("Finished", Task::STATUS_COMPLETE);

Expand Down
4 changes: 3 additions & 1 deletion core/src/plugins/action.share/src/ShareCenter.php
Expand Up @@ -117,8 +117,10 @@ public function init(ContextInterface $ctx, $options = [])
{
parent::init($ctx, $options);
if(!$ctx->hasRepository()){
$this->enabled = false;
//$this->enabled = false;
return;
}else{
//$this->enabled = true;
}
$this->repository = $ctx->getRepository();
if (!($this->repository->getDriverInstance() instanceof \Pydio\Access\Core\IAjxpWrapperProvider)) {
Expand Down

0 comments on commit 0b551c0

Please sign in to comment.