summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-08-14 11:54:20 -0700
committerEvan Prodromou <evan@status.net>2010-08-14 11:54:20 -0700
commit6d89aa09317719dd4f682f75a10e8e9b50132b5c (patch)
treebe0521856536bf14205f4c53924a80e21e43fe2a /classes
parent9e4f40806a2fc4769a4dcc37d1ff337a1d02d8d4 (diff)
on deleting a notice
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 0eeebfadf..686dfc031 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -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();