From fcbefb7286f008409ab738c5afb8323caf647e64 Mon Sep 17 00:00:00 2001 From: Drake Date: Thu, 21 Sep 2006 01:12:56 +0000 Subject: [PATCH] Make clipboard copies not do the bizarre thing that duplicate usually does where the duplicate asset becomes a child of the original. This fixes the error with copying Collaboration System assets. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/AssetClipboard.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 18df30346..9460dfab1 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,7 @@ - fix: Spectre pings not using correct IP address - fix: search functionality throwing fatal errors - fix: DBI connect errors infinitely recurse + - fix: copying Collaboration System assets failing 7.0.7 - rfe: Image Management (funded by Formation Design Systems) diff --git a/lib/WebGUI/AssetClipboard.pm b/lib/WebGUI/AssetClipboard.pm index e6abccb35..9d2f58dc0 100644 --- a/lib/WebGUI/AssetClipboard.pm +++ b/lib/WebGUI/AssetClipboard.pm @@ -171,7 +171,7 @@ Duplicates self, cuts duplicate, returns self->getContainer->www_view if canEdit sub www_copy { my $self = shift; return $self->session->privilege->insufficient() unless $self->canEdit; - my $newAsset = $self->duplicate; + my $newAsset = $self->getParent->duplicate($self); $newAsset->update({ title=>$self->getTitle.' (copy)'}); $newAsset->cut; return $self->getContainer->www_view;