]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
delete bookmark stuff when deleting notice
authorEvan Prodromou <evan@status.net>
Sat, 18 Dec 2010 07:39:44 +0000 (02:39 -0500)
committerEvan Prodromou <evan@status.net>
Sat, 18 Dec 2010 07:39:44 +0000 (02:39 -0500)
plugins/Bookmark/BookmarkPlugin.php

index a3067a9eb14affd94fb2132d59390eef1350d066..2137d0c22541fea405d1de95d4b83b11ba9dd53d 100644 (file)
@@ -76,6 +76,17 @@ class BookmarkPlugin extends Plugin
                return true;
        }
 
+       function onNoticeDeleteRelated($notice)
+       {
+               $nb = Notice_bookmark::staticGet('notice_id', $notice->id);
+
+               if (!empty($nb)) {
+                       $nb->delete();
+               }
+
+               return true;
+       }
+
        /**
         * Load related modules when needed
         *