fixing article storage copying
This commit is contained in:
parent
cf30d8f4dc
commit
f095337301
1 changed files with 9 additions and 7 deletions
|
|
@ -70,13 +70,15 @@ Override the default method in order to deal with attachments.
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub addRevision {
|
sub addRevision {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $newSelf = $self->SUPER::addRevision(@_);
|
my $oldStorage = $self->get('storageId');
|
||||||
if ($newSelf->getRevisionCount > 1 && $self->get("storageId")) {
|
my $newSelf = $self->SUPER::addRevision(@_);
|
||||||
my $newStorage = WebGUI::Storage->get($self->session,$self->get("storageId"))->copy;
|
my $newStorageId = $newSelf->get('storageId');
|
||||||
$newSelf->update({storageId=>$newStorage->getId});
|
if ($newStorageId && $newStorageId eq $self->get('storageId')) {
|
||||||
}
|
my $newStorage = WebGUI::Storage->get($self->session, $newStorageId)->copy;
|
||||||
return $newSelf;
|
$newSelf->update({storageId=>$newStorage->getId});
|
||||||
|
}
|
||||||
|
return $newSelf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue