duplicateBranch copies source and then sets parent to the destination

This commit is contained in:
Colin Kuskie 2006-02-24 00:35:19 +00:00
parent 3f55240237
commit d669e20083
2 changed files with 5 additions and 1 deletions

View file

@ -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})}) {