on deleting a notice

This commit is contained in:
Evan Prodromou 2010-08-14 11:54:20 -07:00
parent 9e4f40806a
commit 6d89aa0931
2 changed files with 13 additions and 8 deletions

View File

@ -1064,3 +1064,5 @@ EndRssEntryArray: at the end of copying a notice to an array
- $notice: the notice being copied - $notice: the notice being copied
- &$entry: the entry, with all the fields filled up - &$entry: the entry, with all the fields filled up
NoticeDeleteRelated: at the beginning of deleting related fields to a notice
- $notice: notice being deleted

View File

@ -121,6 +121,8 @@ class Notice extends Memcached_DataObject
$deleted->insert(); $deleted->insert();
} }
if (Event::handle('NoticeDeleteRelated', array($this))) {
// Clear related records // Clear related records
$this->clearReplies(); $this->clearReplies();
@ -131,6 +133,7 @@ class Notice extends Memcached_DataObject
// NOTE: we don't clear inboxes // NOTE: we don't clear inboxes
// NOTE: we don't clear queue items // NOTE: we don't clear queue items
}
$result = parent::delete(); $result = parent::delete();