diff --git a/src/Controllers/CommentController.php b/src/Controllers/CommentController.php index 43a1b54d..a6436118 100644 --- a/src/Controllers/CommentController.php +++ b/src/Controllers/CommentController.php @@ -50,10 +50,11 @@ class CommentController $post = Model_Post::locate($postId); - $text = InputHelper::get('text'); - if (!empty($text)) + if (InputHelper::get('submit')) { + $text = InputHelper::get('text'); $text = Model_Comment::validateText($text); + $comment = R::dispense('comment'); $comment->post = $post; if ($this->context->loggedIn) diff --git a/src/Views/post-view.phtml b/src/Views/post-view.phtml index b5f33d6f..29c03c49 100644 --- a/src/Views/post-view.phtml +++ b/src/Views/post-view.phtml @@ -307,6 +307,8 @@
+ +