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

Commit 4a49c55

Browse files
committed
Fix Jumploader not correctly sending node.change event (thus missing indexation)
1 parent 84b485f commit 4a49c55

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core/src/plugins/uploader.jumploader/class.JumploaderProcessor.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ public function postProcess($action, $httpVars, $postProcessData)
391391
$newFile["destination"] = $partitions[0]["destination"];
392392
$newPartitions[] = $newFile;
393393
} else {
394-
$newDest = fopen($destStreamURL.$httpVars["partitionRealName"], "w");
394+
$current = $destStreamURL.$httpVars["partitionRealName"];
395+
$newDest = fopen($current, "w");
395396
$fileHash = md5($httpVars["partitionRealName"]);
396397

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

412413
if (!self::$remote && (!self::$wrapperIsRemote || $relPath != $httpVars["partitionRealName"])) {
413-
$err = copy($current, $target);
414+
if($current != $target){
415+
$err = copy($current, $target);
416+
}
417+
else $err = true;
414418
} else {
415419
for ($i=0, $count=count($newPartitions); $i<$count; $i++) {
416420
$driver->storeFileToCopy($newPartitions[$i]);
417421
}
418422
}
419423

420-
if ($err !== false) {
424+
if ($current != $target && $err !== false) {
421425
if(!self::$remote) unlink($current);
422426
AJXP_Controller::applyHook("node.change", array(null, new AJXP_Node($target), false));
423427
} else if ($current == $target) {

0 commit comments

Comments
 (0)