Remove comments when removing queue objects
authorCyperghost <olaf_schmitz_1@t-online.de>
Fri, 1 Mar 2024 13:01:04 +0000 (14:01 +0100)
committerOlaf Braun <info@braun-development.de>
Thu, 7 Mar 2024 15:37:08 +0000 (16:37 +0100)
wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php

index b58483f0267b3f6c761bd9339aaa6056430c6189..c9b494eb3a3d85689da18d73dc3b0ee553e6dc30 100644 (file)
@@ -8,6 +8,7 @@ use wcf\data\moderation\queue\ViewableModerationQueue;
 use wcf\data\object\type\ObjectType;
 use wcf\data\object\type\ObjectTypeCache;
 use wcf\data\user\User;
+use wcf\system\comment\CommentHandler;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\SystemException;
 use wcf\system\SingletonFactory;
@@ -435,6 +436,8 @@ class ModerationQueueManager extends SingletonFactory
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute($conditions->getParameters());
 
+            CommentHandler::getInstance()->deleteObjects('com.woltlab.wcf.moderation.queue', $queueIDs);
+
             $this->resetModerationCount();
         }
     }