mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Fixed issue with the book sort not showing all books in sidebar
This commit is contained in:
parent
c86a122d80
commit
3ab09ef708
@ -157,7 +157,7 @@ class BookController extends Controller
|
|||||||
$this->checkPermission('book-update');
|
$this->checkPermission('book-update');
|
||||||
$book = $this->bookRepo->getBySlug($bookSlug);
|
$book = $this->bookRepo->getBySlug($bookSlug);
|
||||||
$bookChildren = $this->bookRepo->getChildren($book);
|
$bookChildren = $this->bookRepo->getChildren($book);
|
||||||
$books = $this->bookRepo->getAll();
|
$books = $this->bookRepo->getAll(false);
|
||||||
$this->setPageTitle('Sort Book ' . $book->getShortName());
|
$this->setPageTitle('Sort Book ' . $book->getShortName());
|
||||||
return view('books/sort', ['book' => $book, 'current' => $book, 'books' => $books, 'bookChildren' => $bookChildren]);
|
return view('books/sort', ['book' => $book, 'current' => $book, 'books' => $books, 'bookChildren' => $bookChildren]);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,9 @@ class BookRepo
|
|||||||
*/
|
*/
|
||||||
public function getAll($count = 10)
|
public function getAll($count = 10)
|
||||||
{
|
{
|
||||||
return $this->book->orderBy('name', 'asc')->take($count)->get();
|
$bookQuery = $this->book->orderBy('name', 'asc');
|
||||||
|
if (!$count) return $bookQuery->get();
|
||||||
|
return $bookQuery->take($count)->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user