]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
clear repeat_of flag when a notice is deleted
authorEvan Prodromou <evan@status.net>
Sat, 12 Dec 2009 21:02:44 +0000 (16:02 -0500)
committerEvan Prodromou <evan@status.net>
Sat, 12 Dec 2009 21:02:44 +0000 (16:02 -0500)
classes/Notice.php

index eb611f314f01d83d840c27b4b4824dd0895c3a66..a7b0f8cdbc65459a68c225e2b2c909c05f8361c2 100644 (file)
@@ -115,6 +115,12 @@ class Notice extends Memcached_DataObject
 
         //Null any notices that are replies to this notice
         $this->query(sprintf("UPDATE notice set reply_to = null WHERE reply_to = %d", $this->id));
+
+        //Null any notices that are repeats of this notice
+        //XXX: probably need to uncache these, too
+
+        $this->query(sprintf("UPDATE notice set repeat_of = null WHERE repeat_of = %d", $this->id));
+
         $related = array('Reply',
                          'Fave',
                          'Notice_tag',