Fixed sending empty comments

This commit is contained in:
Marcin Kurczewski
2013-11-17 14:16:52 +01:00
parent 7b473ba06f
commit 69a993c5af
2 changed files with 5 additions and 2 deletions

View File

@ -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)