Merge pull request #38 from gordonbanderson/ISSUE37

FIX: Add onAfterPostComment hook
This commit is contained in:
Will Rossiter 2012-11-28 16:29:38 -08:00
commit a0c487ae80
1 changed files with 3 additions and 0 deletions

View File

@ -369,6 +369,9 @@ class CommentingController extends Controller {
$comment->Moderated = ($moderated) ? false : true;
$comment->write();
// extend hook to allow extensions. Also see onBeforePostComment
$this->extend('onAfterPostComment', $comment);
// clear the users comment since it passed validation
Cookie::set('CommentsForm_Comment', false);