delete spam score on deleted notice
This commit is contained in:
parent
ec7a3c80e5
commit
1d46a1288f
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue
Block a user