mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Merge pull request #38 from gordonbanderson/ISSUE37
FIX: Add onAfterPostComment hook
This commit is contained in:
commit
a0c487ae80
@ -369,6 +369,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…
Reference in New Issue
Block a user