duplicateBranch copies source and then sets parent to the destination
This commit is contained in:
parent
3f55240237
commit
d669e20083
2 changed files with 5 additions and 1 deletions
|
|
@ -40,6 +40,9 @@
|
||||||
- [ 1433525 ] 6.9: Compilation errors
|
- [ 1433525 ] 6.9: Compilation errors
|
||||||
- base36 removed from Utility.t because it no longer exists in WebGUI::Utility.pm
|
- 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
|
6.8.7
|
||||||
- fix [ 1431098 ] op=becomeUser can become non-existent userIds
|
- fix [ 1431098 ] op=becomeUser can become non-existent userIds
|
||||||
- fix [ 1431944 ] 6.8.6 DataForm moving fields
|
- fix [ 1431944 ] 6.8.6 DataForm moving fields
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ The asset to duplicate. Defaults to self.
|
||||||
sub duplicateBranch {
|
sub duplicateBranch {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $assetToDuplicate = shift || $self;
|
my $assetToDuplicate = shift || $self;
|
||||||
my $newAsset = $self->duplicate($assetToDuplicate);
|
my $newAsset = $assetToDuplicate->duplicate();
|
||||||
|
$newAsset->setParent($self);
|
||||||
my $contentPositions;
|
my $contentPositions;
|
||||||
$contentPositions = $assetToDuplicate->get("contentPositions");
|
$contentPositions = $assetToDuplicate->get("contentPositions");
|
||||||
foreach my $child (@{$assetToDuplicate->getLineage(["children"],{returnObjects=>1})}) {
|
foreach my $child (@{$assetToDuplicate->getLineage(["children"],{returnObjects=>1})}) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue