X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a323b0d49c3fde936df9a7393ee3953a44800c1d..refs/pull/446/head:/app/Repos/EntityRepo.php diff --git a/app/Repos/EntityRepo.php b/app/Repos/EntityRepo.php index 9a572be54..7bc5fc4fc 100644 --- a/app/Repos/EntityRepo.php +++ b/app/Repos/EntityRepo.php @@ -533,11 +533,11 @@ class EntityRepo /** * Alias method to update the book jointPermissions in the PermissionService. - * @param Collection $collection collection on entities + * @param Book $book */ - public function buildJointPermissions(Collection $collection) + public function buildJointPermissionsForBook(Book $book) { - $this->permissionService->buildJointPermissionsForEntities($collection); + $this->permissionService->buildJointPermissionsForEntity($book); } /** @@ -730,6 +730,7 @@ class EntityRepo if ($chapter) $page->chapter_id = $chapter->id; $book->pages()->save($page); + $page = $this->page->find($page->id); $this->permissionService->buildJointPermissionsForEntity($page); return $page; }