From 886d2f5b42d4087164b4ee1be3ad7ab55c95c942 Mon Sep 17 00:00:00 2001 From: Damien Pobel Date: Thu, 11 Apr 2013 16:42:27 +0200 Subject: [PATCH] Fix EZP-20412: Can not restore from trash an item to 2 locations --- kernel/content/restore.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/content/restore.php b/kernel/content/restore.php index 4c15dbab486..7aca2754901 100644 --- a/kernel/content/restore.php +++ b/kernel/content/restore.php @@ -86,7 +86,6 @@ $db = eZDB::instance(); $db->begin(); $locationAdded = false; - $mainNodeID = false; $newLocationList = array(); $failedLocationList = array(); @@ -99,13 +98,10 @@ if ( $canCreate ) { - if ( $mainNodeID === false ) - { - $isMain = true; - } - $newLocationList[] = array( 'parent_node_id' => $selectedNodeID, - 'is_main' => $isMain ); - + $newLocationList[] = array( + 'parent_node_id' => $selectedNodeID, + 'is_main' => !$locationAdded + ); $locationAdded = true; } else