]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/ChapterRepo.php
LDAP: Added TLS support
[bookstack] / app / Entities / Repos / ChapterRepo.php
index c6f3a2d2f0fc093c37b6e541081c20c977468c75..60599eac8231017fb85fb49cd2c029a6abb1bd53 100644 (file)
@@ -6,10 +6,7 @@ use BookStack\Entities\Managers\BookContents;
 use BookStack\Entities\Managers\TrashCan;
 use BookStack\Exceptions\MoveOperationException;
 use BookStack\Exceptions\NotFoundException;
-use BookStack\Exceptions\NotifyException;
 use Exception;
-use Illuminate\Contracts\Container\BindingResolutionException;
-use Illuminate\Database\Eloquent\Builder;
 use Illuminate\Support\Collection;
 
 class ChapterRepo
@@ -19,7 +16,6 @@ class ChapterRepo
 
     /**
      * ChapterRepo constructor.
-     * @param $baseRepo
      */
     public function __construct(BaseRepo $baseRepo)
     {
@@ -77,7 +73,8 @@ class ChapterRepo
     public function destroy(Chapter $chapter)
     {
         $trashCan = new TrashCan();
-        $trashCan->destroyChapter($chapter);
+        $trashCan->softDestroyChapter($chapter);
+        $trashCan->autoClearOld();
     }
 
     /**