]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookController.php
Remove unnecessary changes
[bookstack] / app / Http / Controllers / BookController.php
index 5a42daddbe8b8dd2e9a4452b9659058ea1c3c660..b63fe911fe083f378dc58495334eedad23e36d2b 100644 (file)
@@ -2,9 +2,9 @@
 
 use Activity;
 use BookStack\Actions\ActivityType;
-use BookStack\Entities\Managers\BookContents;
-use BookStack\Entities\Bookshelf;
-use BookStack\Entities\Managers\EntityContext;
+use BookStack\Entities\Tools\BookContents;
+use BookStack\Entities\Models\Bookshelf;
+use BookStack\Entities\Tools\ShelfContext;
 use BookStack\Entities\Repos\BookRepo;
 use BookStack\Exceptions\ImageUploadException;
 use Illuminate\Http\Request;
@@ -18,11 +18,10 @@ class BookController extends Controller
     protected $bookRepo;
     protected $entityContextManager;
 
-    public function __construct(EntityContext $entityContextManager, BookRepo $bookRepo)
+    public function __construct(ShelfContext $entityContextManager, BookRepo $bookRepo)
     {
         $this->bookRepo = $bookRepo;
         $this->entityContextManager = $entityContextManager;
-        parent::__construct();
     }
 
     /**
@@ -97,7 +96,7 @@ class BookController extends Controller
 
         if ($bookshelf) {
             $bookshelf->appendBook($book);
-            Activity::add($bookshelf, ActivityType::BOOKSHELF_UPDATE);
+            Activity::addForEntity($bookshelf, ActivityType::BOOKSHELF_UPDATE);
         }
 
         return redirect($book->getUrl());