From: Alexander Ebert Date: Fri, 12 Jul 2013 18:50:25 +0000 (+0200) Subject: Fixed usage of user activity point API X-Git-Tag: 2.0.0_Beta_5~58^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=057a95663af719cdd4716c5db542dbdeb4cdd30f;p=GitHub%2FWoltLab%2FWCF.git Fixed usage of user activity point API --- diff --git a/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php b/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php index 0d8fee1d9c..8b2e10b656 100644 --- a/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php @@ -141,11 +141,6 @@ class UserActivityPointHandler extends SingletonFactory { * @param array $userToItems */ public function removeEvents($objectType, array $userToItems) { - // ignore values for guests - if (isset($userToItems[0])) { - unset($userToItems[0]); - } - if (empty($userToItems)) return; // get and validate object type diff --git a/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php index 39770af788..466b541c7f 100644 --- a/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php @@ -46,6 +46,10 @@ class LikeRebuildDataWorker extends AbstractRebuildDataWorker { $itemsToUser = array(); foreach ($this->objectList as $like) { + if (!$like->userID) { + continue; + } + if (!isset($itemsToUser[$like->objectUserID])) { $itemsToUser[$like->objectUserID] = 0; }