delete bookmark stuff when deleting notice
This commit is contained in:
parent
563f067508
commit
6b7931bcc8
@ -76,6 +76,17 @@ class BookmarkPlugin extends Plugin
|
|||||||
return true;
|
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
|
* Load related modules when needed
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user