From d669e20083b358319f233a62de02207fc91f255f Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 24 Feb 2006 00:35:19 +0000 Subject: [PATCH] duplicateBranch copies source and then sets parent to the destination --- docs/changelog/6.x.x.txt | 3 +++ lib/WebGUI/AssetBranch.pm | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index e34a683d7..cb5edf69f 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -40,6 +40,9 @@ - [ 1433525 ] 6.9: Compilation errors - base36 removed from Utility.t because it no longer exists in WebGUI::Utility.pm +6.8.7 + - fix [ 1437186 ] 6.8.7 deploy DataForm package does not copy fields + 6.8.7 - fix [ 1431098 ] op=becomeUser can become non-existent userIds - fix [ 1431944 ] 6.8.6 DataForm moving fields diff --git a/lib/WebGUI/AssetBranch.pm b/lib/WebGUI/AssetBranch.pm index 6b37f9bae..dfce716b5 100644 --- a/lib/WebGUI/AssetBranch.pm +++ b/lib/WebGUI/AssetBranch.pm @@ -51,7 +51,8 @@ The asset to duplicate. Defaults to self. sub duplicateBranch { my $self = shift; my $assetToDuplicate = shift || $self; - my $newAsset = $self->duplicate($assetToDuplicate); + my $newAsset = $assetToDuplicate->duplicate(); + $newAsset->setParent($self); my $contentPositions; $contentPositions = $assetToDuplicate->get("contentPositions"); foreach my $child (@{$assetToDuplicate->getLineage(["children"],{returnObjects=>1})}) {