X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/2902/head:/app/Entities/Tools/SiblingFetcher.php diff --git a/app/Entities/Tools/SiblingFetcher.php b/app/Entities/Tools/SiblingFetcher.php index 6964fa2e6..e9dad0e13 100644 --- a/app/Entities/Tools/SiblingFetcher.php +++ b/app/Entities/Tools/SiblingFetcher.php @@ -1,4 +1,6 @@ -get($entityType)->visible()->findOrFail($entityId); + $entity = (new EntityProvider())->get($entityType)->visible()->findOrFail($entityId); $entities = []; // Page in chapter @@ -29,7 +30,7 @@ class SiblingFetcher // Book // Gets just the books in a shelf if shelf is in context if ($entity->isA('book')) { - $contextShelf = (new ShelfContext)->getContextualShelfForBook($entity); + $contextShelf = (new ShelfContext())->getContextualShelfForBook($entity); if ($contextShelf) { $entities = $contextShelf->visibleBooks()->get(); } else {