Calendar needs to cleanup its feeds when it is deleted

This commit is contained in:
Colin Kuskie 2007-03-08 21:12:02 +00:00
parent cc569b1b4d
commit 62f3a9b045
3 changed files with 31 additions and 7 deletions

View file

@ -405,7 +405,7 @@ sub getEditForm {
my $form = $self->SUPER::getEditForm;
my $i18n = WebGUI::International->new($session,"Asset_Calendar");
my $tab = $form->addTab("feeds",$i18n->get("feeds"));
my $tab = $form->addTab("feeds",$i18n->get("feeds"), 6);
$tab->raw("<tr><td>");
@ -881,7 +881,21 @@ sub processPropertiesFromFormPost {
}
####################################################################
=head2 purge ( )
Handle Asset specific purge tasks.
Delete iCal feeds for this Calendar.
=cut
sub purge {
my $self = shift;
$self->session->db->write('delete from Calendar_feeds where assetId=?',[$self->get('assetId')]);
$self->SUPER::purge;
}
####################################################################