X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/fea5630ea4343b33c353afb41d502d535f674331..refs/pull/1695/head:/app/Http/Controllers/CommentController.php diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 384731f84..860b50762 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -1,7 +1,8 @@ checkPermission('comment-create-all'); - $comment = $this->commentRepo->create($page, $request->all()); - return view('comments/comment', ['comment' => $comment]); + $comment = $this->commentRepo->create($page, $request->only(['html', 'text', 'parent_id'])); + Activity::add($page, 'commented_on', $page->book->id); + return view('comments.comment', ['comment' => $comment]); } /** @@ -72,8 +74,8 @@ class CommentController extends Controller $this->checkOwnablePermission('page-view', $comment->entity); $this->checkOwnablePermission('comment-update', $comment); - $comment = $this->commentRepo->update($comment, $request->all()); - return view('comments/comment', ['comment' => $comment]); + $comment = $this->commentRepo->update($comment, $request->only(['html', 'text'])); + return view('comments.comment', ['comment' => $comment]); } /**