X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/fea5630ea4343b33c353afb41d502d535f674331..refs/pull/524/head:/app/Http/Controllers/CommentController.php diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 384731f84..7bf0a2aac 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -1,5 +1,6 @@ checkPermission('comment-create-all'); - $comment = $this->commentRepo->create($page, $request->all()); + $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,7 +74,7 @@ class CommentController extends Controller $this->checkOwnablePermission('page-view', $comment->entity); $this->checkOwnablePermission('comment-update', $comment); - $comment = $this->commentRepo->update($comment, $request->all()); + $comment = $this->commentRepo->update($comment, $request->only(['html', 'text'])); return view('comments/comment', ['comment' => $comment]); }