Commit 6d89aa09 authored by Evan Prodromou's avatar Evan Prodromou

on deleting a notice

parent 9e4f4080
......@@ -1064,3 +1064,5 @@ EndRssEntryArray: at the end of copying a notice to an array
- $notice: the notice being copied
- &$entry: the entry, with all the fields filled up
NoticeDeleteRelated: at the beginning of deleting related fields to a notice
- $notice: notice being deleted
......@@ -121,16 +121,19 @@ class Notice extends Memcached_DataObject
$deleted->insert();
}
// Clear related records
if (Event::handle('NoticeDeleteRelated', array($this))) {
$this->clearReplies();
$this->clearRepeats();
$this->clearFaves();
$this->clearTags();
$this->clearGroupInboxes();
// Clear related records
// NOTE: we don't clear inboxes
// NOTE: we don't clear queue items
$this->clearReplies();
$this->clearRepeats();
$this->clearFaves();
$this->clearTags();
$this->clearGroupInboxes();
// NOTE: we don't clear inboxes
// NOTE: we don't clear queue items
}
$result = parent::delete();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment