mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 09:05:49 +00:00
Merge pull request #38 from gordonbanderson/ISSUE37
FIX: Add onAfterPostComment hook
This commit is contained in:
commit
a0c487ae80
@ -370,6 +370,9 @@ class CommentingController extends Controller {
|
|||||||
$comment->Moderated = ($moderated) ? false : true;
|
$comment->Moderated = ($moderated) ? false : true;
|
||||||
$comment->write();
|
$comment->write();
|
||||||
|
|
||||||
|
// extend hook to allow extensions. Also see onBeforePostComment
|
||||||
|
$this->extend('onAfterPostComment', $comment);
|
||||||
|
|
||||||
// clear the users comment since it passed validation
|
// clear the users comment since it passed validation
|
||||||
Cookie::set('CommentsForm_Comment', false);
|
Cookie::set('CommentsForm_Comment', false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user