Fixed logging of post previews

This commit is contained in:
Marcin Kurczewski 2013-11-17 14:24:04 +01:00
parent 210342a5bf
commit 4fd25b10c6

View file

@ -62,9 +62,11 @@ class CommentController
$comment->comment_date = time();
$comment->text = $text;
if (InputHelper::get('sender') != 'preview')
{
R::store($comment);
LogHelper::logEvent('comment-add', '+{user} commented on @{post}', ['post' => $post->id]);
}
$this->context->transport->textPreview = $comment->getText();
LogHelper::logEvent('comment-add', '+{user} commented on @{post}', ['post' => $post->id]);
StatusHelper::success();
}
}