Deletes comment response likes when deleting all comments of objects
authorMatthias Schmidt <gravatronics@live.com>
Sat, 15 Mar 2014 16:05:07 +0000 (17:05 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 15 Mar 2014 16:05:07 +0000 (17:05 +0100)
wcfsetup/install/files/lib/system/comment/CommentHandler.class.php

index aa5f49c7a635629efee6920ebc165c0b6aa11609..81d5f85b99c48f89c998c698015f15c87bd46df5 100644 (file)
@@ -148,6 +148,9 @@ class CommentHandler extends SingletonFactory {
                }
                
                if (!empty($responseIDs)) {
+                       // delete likes (for responses)
+                       LikeHandler::getInstance()->removeLikes('com.woltlab.wcf.comment.response', $responseIDs);
+                       
                        // delete activity events (for responses)
                        if (UserActivityEventHandler::getInstance()->getObjectTypeID($objectTypeObj->objectType.'.response.recentActivityEvent')) {
                                UserActivityEventHandler::getInstance()->removeEvents($objectTypeObj->objectType.'.response.recentActivityEvent', $responseIDs);