From abb45aa73301a66946bcef4910d2ec226487c0a7 Mon Sep 17 00:00:00 2001 From: Cameron Grant Date: Wed, 14 Mar 2018 11:18:30 +1300 Subject: [PATCH] Setting the http error to come from the request handler, and the session coming form the Request objects. Just small bugs fix's so the comment form works with ss4. --- src/Forms/CommentForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Forms/CommentForm.php b/src/Forms/CommentForm.php index 882c831..977eb03 100644 --- a/src/Forms/CommentForm.php +++ b/src/Forms/CommentForm.php @@ -183,7 +183,7 @@ class CommentForm extends Form $this->controller->setOwnerRecord($class::get()->byID($data['ParentID'])); } if (!$this->controller->getOwnerRecord()) { - return $this->httpError(404); + return $this->getRequestHandler()->httpError(404); } // cache users data @@ -246,7 +246,7 @@ class CommentForm extends Form // we want to show a notification if comments are moderated if ($requireModeration && !$comment->IsSpam) { - Session::set('CommentsModerated', 1); + $this->getRequest()->getSession()->set('CommentsModerated', 1); } // clear the users comment since it passed validation