From 8705b91e0a2ba3b33de1de4a3af7d2dff862175e Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 11 Dec 2013 02:54:34 +0100 Subject: [PATCH] Fixed like update worker --- .../lib/system/worker/LikeRebuildDataWorker.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php index d0a52e92e0..2dc041c56b 100644 --- a/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php @@ -32,7 +32,6 @@ class LikeRebuildDataWorker extends AbstractRebuildDataWorker { parent::initObjectList(); $this->objectList->sqlOrderBy = 'like_table.objectID, like_table.likeID'; - $this->objectList->getConditionBuilder()->add('like_table.objectUserID IS NOT NULL'); } /** @@ -57,12 +56,14 @@ class LikeRebuildDataWorker extends AbstractRebuildDataWorker { $itemsToUser = array(); $likeObjectData = array(); foreach ($this->objectList as $like) { - if (!isset($itemsToUser[$like->objectUserID])) { - $itemsToUser[$like->objectUserID] = 0; + if ($like->objectUserID) { + if (!isset($itemsToUser[$like->objectUserID])) { + $itemsToUser[$like->objectUserID] = 0; + } + + $itemsToUser[$like->objectUserID]++; } - $itemsToUser[$like->objectUserID]++; - if (!isset($likeObjectData[$like->objectTypeID])) { $likeObjectData[$like->objectTypeID] = array(); } -- 2.20.1