X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/898cedf5362a43afcee85cf24c8352240cb54690..eb76e882c5544e319e5084fedcc7cdac0bdf6c2d:/app/Http/Controllers/BookSortController.php diff --git a/app/Http/Controllers/BookSortController.php b/app/Http/Controllers/BookSortController.php index f5fb6f255..6d3199cbe 100644 --- a/app/Http/Controllers/BookSortController.php +++ b/app/Http/Controllers/BookSortController.php @@ -2,8 +2,9 @@ namespace BookStack\Http\Controllers; -use BookStack\Entities\Book; -use BookStack\Entities\Managers\BookContents; +use BookStack\Actions\ActivityType; +use BookStack\Entities\Models\Book; +use BookStack\Entities\Tools\BookContents; use BookStack\Entities\Repos\BookRepo; use BookStack\Exceptions\SortOperationException; use BookStack\Facades\Activity; @@ -14,14 +15,9 @@ class BookSortController extends Controller protected $bookRepo; - /** - * BookSortController constructor. - * @param $bookRepo - */ public function __construct(BookRepo $bookRepo) { $this->bookRepo = $bookRepo; - parent::__construct(); } /** @@ -74,7 +70,7 @@ class BookSortController extends Controller // Rebuild permissions and add activity for involved books. $booksInvolved->each(function (Book $book) { - Activity::add($book, 'book_sort', $book->id); + Activity::addForEntity($book, ActivityType::BOOK_SORT); }); return redirect($book->getUrl());