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

Commit

Permalink
[meta.syncable] Fix a wrong flatten case when deleting/restoring to/f…
Browse files Browse the repository at this point in the history
…rom the recycle bin.
  • Loading branch information
cdujeu committed Nov 25, 2015
1 parent e7bb995 commit 32ecc19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/plugins/meta.syncable/class.ChangesTracker.php
Expand Up @@ -294,7 +294,11 @@ public function switchActions($actionName, $httpVars, $fileVars)
if ($row->node_id == $previousNodeId) {
$previousRow->target = $row->target;
$previousRow->seq = $row->seq;
if ($order[$row->type] > $order[$previousRow->type]) {
// Specific case, maybe linked to recycle bin management
// A create should make a new node ID.
if ($row->type === "create" && $previousRow->type === "delete"){
$previousRow->type = "create";
}else if ($order[$row->type] > $order[$previousRow->type]) {
$previousRow->type = $row->type;
}
} else {
Expand Down

0 comments on commit 32ecc19

Please sign in to comment.