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,13 +27,15 @@ class CommentController
Core::getContext()->transport->textPreview = $comment->getTextMarkdown(); Core::getContext()->transport->textPreview = $comment->getTextMarkdown();
} }
else
Api::run( {
new AddCommentJob(), Api::run(
[ new AddCommentJob(),
JobArgs::ARG_POST_ID => InputHelper::get('post-id'), [
JobArgs::ARG_NEW_TEXT => InputHelper::get('text') JobArgs::ARG_POST_ID => InputHelper::get('post-id'),
]); JobArgs::ARG_NEW_TEXT => InputHelper::get('text')
]);
}
} }
public function editView($id) public function editView($id)
@ -54,13 +56,15 @@ class CommentController
Core::getContext()->transport->textPreview = $comment->getTextMarkdown(); Core::getContext()->transport->textPreview = $comment->getTextMarkdown();
} }
else
Api::run( {
new EditCommentJob(), Api::run(
[ new EditCommentJob(),
JobArgs::ARG_COMMENT_ID => $id, [
JobArgs::ARG_NEW_TEXT => InputHelper::get('text') JobArgs::ARG_COMMENT_ID => $id,
]); JobArgs::ARG_NEW_TEXT => InputHelper::get('text')
]);
}
} }
public function deleteAction($id) public function deleteAction($id)