template attachments are not cleaned up on purge.

This commit is contained in:
Colin Kuskie 2009-10-21 12:37:24 -07:00
parent 5201a1f61b
commit 365d4bfef2
2 changed files with 17 additions and 1 deletions

View file

@ -719,9 +719,24 @@ sub processRaw {
#-------------------------------------------------------------------
=head2 purge ( )
Extend the master to purge attachments in all revisions.
=cut
sub purgeRevision {
my $self = shift;
$self->removeAttachments;
$self->session->db->write('delete from template_attachments where templateId=?', [$self->getId]);
return $self->SUPER::purge(@_);
}
#-------------------------------------------------------------------
=head2 purgeRevision ( )
Override the master purgeRevision to purge attachments
Extend the master purgeRevision to purge attachments
=cut