]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookSortController.php
Aligned constructors across controller classes
[bookstack] / app / Http / Controllers / BookSortController.php
index f5fb6f255537c2d16017f7365974863cc402260f..6d561cfce711c105edd64041869cd3b1aea9595a 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace BookStack\Http\Controllers;
 
+use BookStack\Actions\ActivityType;
 use BookStack\Entities\Book;
 use BookStack\Entities\Managers\BookContents;
 use BookStack\Entities\Repos\BookRepo;
@@ -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());