merging a 6.8.8 change

This commit is contained in:
JT Smith 2006-03-01 16:36:54 +00:00
parent 659b164a42
commit 8b6198220d
2 changed files with 3 additions and 1 deletions

View file

@ -738,7 +738,8 @@ sub purge {
my $self = shift;
my $sth = $self->session->db->read("select storageId from Post where assetId=".$self->session->db->quote($self->getId));
while (my ($storageId) = $sth->array) {
WebGUI::Storage->get($self->session,$storageId)->delete;
my $storage = WebGUI::Storage->get($storageId);
$storage->delete if defined $storage;
}
$sth->finish;
$self->session->db->write("delete from Post_rating where assetId=".$self->session->db->quote($self->getId));