]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/TrashCan.php
Slugs: Rolled out history lookup to other types
[bookstack] / app / Entities / Tools / TrashCan.php
index c298169c383edb48fcbcebef5cbc56ea209abb96..96645aebfa6c2670bfee0a337ec5090a3922a094 100644 (file)
@@ -388,7 +388,7 @@ class TrashCan
     /**
      * Update entity relations to remove or update outstanding connections.
      */
-    protected function destroyCommonRelations(Entity $entity)
+    protected function destroyCommonRelations(Entity $entity): void
     {
         Activity::removeEntity($entity);
         $entity->views()->delete();
@@ -402,6 +402,7 @@ class TrashCan
         $entity->watches()->delete();
         $entity->referencesTo()->delete();
         $entity->referencesFrom()->delete();
+        $entity->slugHistory()->delete();
 
         if ($entity instanceof HasCoverInterface && $entity->coverInfo()->exists()) {
             $imageService = app()->make(ImageService::class);