X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ddb7f33868ea499ab8f48a7062f145e8c0fbe02f..refs/pull/2376/head:/app/Entities/Repos/ChapterRepo.php diff --git a/app/Entities/Repos/ChapterRepo.php b/app/Entities/Repos/ChapterRepo.php index c6f3a2d2f..60599eac8 100644 --- a/app/Entities/Repos/ChapterRepo.php +++ b/app/Entities/Repos/ChapterRepo.php @@ -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(); } /**