fixed: storage locations for some assets in packages not imported correctly

This commit is contained in:
Graham Knop 2008-06-20 08:57:20 +00:00
parent 97b773e8c5
commit 8f9568c887
5 changed files with 7 additions and 8 deletions

View file

@ -64,7 +64,7 @@ Override the default method in order to deal with attachments.
sub addRevision {
my $self = shift;
my $newSelf = $self->SUPER::addRevision(@_);
if ($newSelf->getRevisionCount > 1 && $self->get("storageId")) {
if ($newSelf->get("storageId") && $newSelf->get("storageId") eq $self->get('storageId')) {
my $newStorage = WebGUI::Storage->get($self->session,$self->get("storageId"))->copy;
$newSelf->update({storageId=>$newStorage->getId});
}