Fix `like` return value of `LikeHandler::like()`
authorMatthias Schmidt <gravatronics@live.com>
Sun, 27 Jan 2019 14:50:45 +0000 (15:50 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 27 Jan 2019 14:50:45 +0000 (15:50 +0100)
See #2508
See 6077024256f9a325daa8b58173c764e62fad24d9

wcfsetup/install/files/lib/system/like/LikeHandler.class.php
wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php

index f4734007ec79c9e383585e2a9c1f9e6e1af70e42..1f027aaa549abf8aa7dacc56fbc420ef43f2e0d5 100644 (file)
@@ -131,7 +131,7 @@ class LikeHandler extends SingletonFactory {
                
                return [
                        'data' => $this->loadLikeStatus($reactData['likeObject'], $user),
-                       'like' => $reactData['likeObject'],
+                       'like' => $reactData['like'],
                        'newValue' => $newValue,
                        'oldValue' => 0, // this value is currently a dummy value, maybe determine a real value
                        'users' => []
index 4d29498f69de76db34f07ea1bd614d2b45a0aca2..fa45daa450d1a52857646cab268fc8278828eda1 100644 (file)
@@ -376,6 +376,7 @@ class ReactionHandler extends SingletonFactory {
                        return [
                                'cachedReactions' => $likeObjectData['cachedReactions'], 
                                'reactionTypeID' => $reactionTypeID, 
+                               'like' => $like,
                                'likeObject' => $likeObjectData['likeObject'],
                                'cumulativeLikes' => $likeObjectData['cumulativeLikes']
                        ];