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

Commit

Permalink
Fix Jumploader not correctly sending node.change event (thus missing …
Browse files Browse the repository at this point in the history
…indexation)
  • Loading branch information
cdujeu committed May 5, 2015
1 parent 84b485f commit 4a49c55
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -391,7 +391,8 @@ public function postProcess($action, $httpVars, $postProcessData)
$newFile["destination"] = $partitions[0]["destination"];
$newPartitions[] = $newFile;
} else {
$newDest = fopen($destStreamURL.$httpVars["partitionRealName"], "w");
$current = $destStreamURL.$httpVars["partitionRealName"];
$newDest = fopen($current, "w");
$fileHash = md5($httpVars["partitionRealName"]);

for ($i = 0; $i < $httpVars["partitionCount"] ; $i++) {
Expand All @@ -410,14 +411,17 @@ public function postProcess($action, $httpVars, $postProcessData)
}

if (!self::$remote && (!self::$wrapperIsRemote || $relPath != $httpVars["partitionRealName"])) {
$err = copy($current, $target);
if($current != $target){
$err = copy($current, $target);
}
else $err = true;
} else {
for ($i=0, $count=count($newPartitions); $i<$count; $i++) {
$driver->storeFileToCopy($newPartitions[$i]);
}
}

if ($err !== false) {
if ($current != $target && $err !== false) {
if(!self::$remote) unlink($current);
AJXP_Controller::applyHook("node.change", array(null, new AJXP_Node($target), false));
} else if ($current == $target) {
Expand Down

0 comments on commit 4a49c55

Please sign in to comment.