From: Evan Prodromou Date: Mon, 5 Mar 2012 15:09:14 +0000 (-0600) Subject: delete spam score on deleted notice X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1d46a1288f3b0fb25bd851272ed320d806330d49;p=quix0rs-gnu-social.git delete spam score on deleted notice --- diff --git a/ActivitySpamPlugin.php b/ActivitySpamPlugin.php index 63ac94ef5f..6c1f8df472 100644 --- a/ActivitySpamPlugin.php +++ b/ActivitySpamPlugin.php @@ -155,6 +155,14 @@ class ActivitySpamPlugin extends Plugin return true; } + function onNoticeDeleteRelated($notice) { + $score = Spam_score::staticGet('notice_id', $notice->id); + if (!empty($score)) { + $score->delete(); + } + return true; + } + function onPluginVersion(&$versions) { $versions[] = array('name' => 'ActivitySpam',