X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/222c665018cd7fc231d2970307e3a7423e4a377f..refs/pull/5429/head:/app/Entities/Controllers/ChapterController.php diff --git a/app/Entities/Controllers/ChapterController.php b/app/Entities/Controllers/ChapterController.php index 2e36a84b9..4274589e2 100644 --- a/app/Entities/Controllers/ChapterController.php +++ b/app/Entities/Controllers/ChapterController.php @@ -79,7 +79,8 @@ class ChapterController extends Controller $this->checkOwnablePermission('chapter-view', $chapter); $sidebarTree = (new BookContents($chapter->book))->getTree(); - $pages = $chapter->getVisiblePages(); + $pages = $this->entityQueries->pages->visibleForChapterList($chapter->id)->get(); + $nextPreviousLocator = new NextPreviousContentLocator($chapter, $sidebarTree); View::incrementFor($chapter);