From 5a86290c1b99b7d610de16f032f5e445659ab146 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Wed, 5 Dec 2018 11:55:37 +0100 Subject: [PATCH] Remove deprecated calls of the LikeHandler See #2508 --- .../files/lib/data/article/ArticleAction.class.php | 4 ++-- .../response/StructuredCommentResponseList.class.php | 8 ++++---- .../files/lib/system/comment/CommentHandler.class.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/data/article/ArticleAction.class.php b/wcfsetup/install/files/lib/data/article/ArticleAction.class.php index cb0bc1f350..32f2514c0e 100644 --- a/wcfsetup/install/files/lib/data/article/ArticleAction.class.php +++ b/wcfsetup/install/files/lib/data/article/ArticleAction.class.php @@ -11,8 +11,8 @@ use wcf\system\comment\CommentHandler; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\UserInputException; use wcf\system\language\LanguageFactory; -use wcf\system\like\LikeHandler; use wcf\system\message\embedded\object\MessageEmbeddedObjectManager; +use wcf\system\reaction\ReactionHandler; use wcf\system\request\LinkHandler; use wcf\system\search\SearchIndexManager; use wcf\system\tagging\TagEngine; @@ -351,7 +351,7 @@ class ArticleAction extends AbstractDatabaseObjectAction { if (!empty($articleIDs)) { // delete like data - LikeHandler::getInstance()->removeLikes('com.woltlab.wcf.likeableArticle', $articleIDs); + ReactionHandler::getInstance()->removeReactions('com.woltlab.wcf.likeableArticle', $articleIDs); // delete comments CommentHandler::getInstance()->deleteObjects('com.woltlab.wcf.articleComment', $articleContentIDs); // delete tag to object entries diff --git a/wcfsetup/install/files/lib/data/comment/response/StructuredCommentResponseList.class.php b/wcfsetup/install/files/lib/data/comment/response/StructuredCommentResponseList.class.php index 855f2ed602..4ee1647b7a 100644 --- a/wcfsetup/install/files/lib/data/comment/response/StructuredCommentResponseList.class.php +++ b/wcfsetup/install/files/lib/data/comment/response/StructuredCommentResponseList.class.php @@ -4,7 +4,7 @@ use wcf\data\comment\Comment; use wcf\data\like\object\LikeObject; use wcf\system\cache\runtime\UserProfileRuntimeCache; use wcf\system\comment\manager\ICommentManager; -use wcf\system\like\LikeHandler; +use wcf\system\reaction\ReactionHandler; /** * Provides a structured comment response list. @@ -94,9 +94,9 @@ class StructuredCommentResponseList extends CommentResponseList { public function getLikeData() { if (empty($this->objectIDs)) return []; - $objectType = LikeHandler::getInstance()->getObjectType('com.woltlab.wcf.comment.response'); - LikeHandler::getInstance()->loadLikeObjects($objectType, $this->objectIDs); - $likeData = ['response' => LikeHandler::getInstance()->getLikeObjects($objectType)]; + $objectType = ReactionHandler::getInstance()->getObjectType('com.woltlab.wcf.comment.response'); + ReactionHandler::getInstance()->loadLikeObjects($objectType, $this->objectIDs); + $likeData = ['response' => ReactionHandler::getInstance()->getLikeObjects($objectType)]; return $likeData; } diff --git a/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php b/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php index 402738fdf0..171d6ef2eb 100644 --- a/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php +++ b/wcfsetup/install/files/lib/system/comment/CommentHandler.class.php @@ -10,8 +10,8 @@ use wcf\system\comment\manager\ICommentManager; use wcf\system\exception\NamedUserException; use wcf\system\exception\SystemException; use wcf\system\exception\UserInputException; -use wcf\system\like\LikeHandler; use wcf\system\message\censorship\Censorship; +use wcf\system\reaction\ReactionHandler; use wcf\system\user\activity\event\UserActivityEventHandler; use wcf\system\user\notification\UserNotificationHandler; use wcf\system\SingletonFactory; @@ -144,7 +144,7 @@ class CommentHandler extends SingletonFactory { $notificationObjectTypes[] = $objectTypeObj->objectType.'.like.notification'; } - LikeHandler::getInstance()->removeLikes('com.woltlab.wcf.comment', $commentIDs, $notificationObjectTypes); + ReactionHandler::getInstance()->removeReactions('com.woltlab.wcf.comment', $commentIDs, $notificationObjectTypes); // delete activity events if (UserActivityEventHandler::getInstance()->getObjectTypeID($objectTypeObj->objectType.'.recentActivityEvent')) { @@ -162,7 +162,7 @@ class CommentHandler extends SingletonFactory { $notificationObjectTypes[] = $objectTypeObj->objectType.'.response.like.notification'; } - LikeHandler::getInstance()->removeLikes('com.woltlab.wcf.comment.response', $responseIDs, $notificationObjectTypes); + ReactionHandler::getInstance()->removeReactions('com.woltlab.wcf.comment.response', $responseIDs, $notificationObjectTypes); // delete activity events (for responses) if (UserActivityEventHandler::getInstance()->getObjectTypeID($objectTypeObj->objectType.'.response.recentActivityEvent')) { -- 2.20.1