X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/257a5a23ecaf7ce779969d575ff8a0b976181d13..refs/pull/1133/head:/app/Http/Controllers/BookController.php diff --git a/app/Http/Controllers/BookController.php b/app/Http/Controllers/BookController.php index 5a9eadaf8..44368a9c4 100644 --- a/app/Http/Controllers/BookController.php +++ b/app/Http/Controllers/BookController.php @@ -3,7 +3,7 @@ use Activity; use BookStack\Auth\UserRepo; use BookStack\Entities\Book; -use BookStack\Entities\EntityRepo; +use BookStack\Entities\Repos\EntityRepo; use BookStack\Entities\ExportService; use Illuminate\Http\Request; use Illuminate\Http\Response; @@ -204,7 +204,7 @@ class BookController extends Controller // Get the books involved in the sort $bookIdsInvolved = $bookIdsInvolved->unique()->toArray(); - $booksInvolved = $this->entityRepo->book->newQuery()->whereIn('id', $bookIdsInvolved)->get(); + $booksInvolved = $this->entityRepo->getManyById('book', $bookIdsInvolved, false, true); // Throw permission error if invalid ids or inaccessible books given. if (count($bookIdsInvolved) !== count($booksInvolved)) { $this->showPermissionError();