summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrenda Wallace <shiny@cpan.org>2009-03-12 15:20:50 +1300
committerBrenda Wallace <shiny@cpan.org>2009-03-12 15:21:55 +1300
commitea5e7ed2ff0873655a8399c5001686bea8a4adf7 (patch)
tree8cfefa3f630e68d7900d1e4e5ec92ad9d6c8ff84
parent896dbfaf675c4a91f2bc5a22fe2eac6f6461ec0f (diff)
When deleting a notice, null the reply_to fields that point to notice
-rw-r--r--classes/Notice.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 3087e39a7..6573c337c 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -67,6 +67,8 @@ class Notice extends Memcached_DataObject
$this->blowSubsCache(true);
$this->query('BEGIN');
+ //Null any notices that are replies to this notice
+ $this->query(sprintf("UPDATE notice set reply_to = null WHERE reply_to = %d", $this->id));
$related = array('Reply',
'Fave',
'Notice_tag',