package importing fixes

This commit is contained in:
Graham Knop 2008-02-08 00:00:13 +00:00
parent 93b5ca16e4
commit f22646625b
9 changed files with 36 additions and 46 deletions

View file

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