Fixed comment previews

This commit is contained in:
Marcin Kurczewski 2014-05-16 18:47:11 +02:00
parent 538c5054d6
commit f20ed1d3d6

View file

@ -27,7 +27,8 @@ class CommentController
Core::getContext()->transport->textPreview = $comment->getTextMarkdown(); Core::getContext()->transport->textPreview = $comment->getTextMarkdown();
} }
else
{
Api::run( Api::run(
new AddCommentJob(), new AddCommentJob(),
[ [
@ -35,6 +36,7 @@ class CommentController
JobArgs::ARG_NEW_TEXT => InputHelper::get('text') JobArgs::ARG_NEW_TEXT => InputHelper::get('text')
]); ]);
} }
}
public function editView($id) public function editView($id)
{ {
@ -54,7 +56,8 @@ class CommentController
Core::getContext()->transport->textPreview = $comment->getTextMarkdown(); Core::getContext()->transport->textPreview = $comment->getTextMarkdown();
} }
else
{
Api::run( Api::run(
new EditCommentJob(), new EditCommentJob(),
[ [
@ -62,6 +65,7 @@ class CommentController
JobArgs::ARG_NEW_TEXT => InputHelper::get('text') JobArgs::ARG_NEW_TEXT => InputHelper::get('text')
]); ]);
} }
}
public function deleteAction($id) public function deleteAction($id)
{ {