Permalink
Browse files

Fix hook in plugin compression. Fix sharecenter disabled.

  • Loading branch information...
1 parent 644c542 commit 0b551c064c516a6f16c9eca0a91c648d4df9f287 @cdujeu cdujeu committed Jun 20, 2016
@@ -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);
@@ -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)) {

0 comments on commit 0b551c0

Please sign in to comment.