]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
When deleting a notice, null the reply_to fields that point to notice
authorBrenda Wallace <shiny@cpan.org>
Thu, 12 Mar 2009 02:20:50 +0000 (15:20 +1300)
committerBrenda Wallace <shiny@cpan.org>
Thu, 12 Mar 2009 02:21:55 +0000 (15:21 +1300)
classes/Notice.php

index 3087e39a78cf7be40bff84a453280799597625ad..6573c337c5e64bd2caf7fe46feac494099f716b0 100644 (file)
@@ -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',