Prevented drafts from showing up in a book sort

Added tests to cover regresssion.
In reference to #100.
This commit is contained in:
Dan Brown
2016-04-15 19:51:27 +01:00
parent 792e786880
commit 8933179017
4 changed files with 37 additions and 5 deletions

View File

@ -151,7 +151,7 @@ class BookController extends Controller
{
$book = $this->bookRepo->getBySlug($bookSlug);
$this->checkOwnablePermission('book-update', $book);
$bookChildren = $this->bookRepo->getChildren($book);
$bookChildren = $this->bookRepo->getChildren($book, true);
$books = $this->bookRepo->getAll(false);
$this->setPageTitle('Sort Book ' . $book->getShortName());
return view('books/sort', ['book' => $book, 'current' => $book, 'books' => $books, 'bookChildren' => $bookChildren]);