X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ade66dcf2f0a5df51b09e310928607e11f2942d4..refs/pull/3918/head:/app/Entities/Tools/TrashCan.php diff --git a/app/Entities/Tools/TrashCan.php b/app/Entities/Tools/TrashCan.php index 1e130c9e1..7341a0328 100644 --- a/app/Entities/Tools/TrashCan.php +++ b/app/Entities/Tools/TrashCan.php @@ -344,7 +344,7 @@ class TrashCan * * @throws Exception */ - protected function destroyEntity(Entity $entity): int + public function destroyEntity(Entity $entity): int { if ($entity instanceof Page) { return $this->destroyPage($entity); @@ -376,6 +376,8 @@ class TrashCan $entity->searchTerms()->delete(); $entity->deletions()->delete(); $entity->favourites()->delete(); + $entity->referencesTo()->delete(); + $entity->referencesFrom()->delete(); if ($entity instanceof HasCoverImage && $entity->cover()->exists()) { $imageService = app()->make(ImageService::class);