From: Marcel Werk Date: Wed, 11 Dec 2013 01:54:34 +0000 (+0100) Subject: Fixed like update worker X-Git-Tag: 2.0.0~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8705b91e0a2ba3b33de1de4a3af7d2dff862175e;p=GitHub%2FWoltLab%2FWCF.git Fixed like update worker --- 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(); }