projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4963003
)
Fixed usage of user activity point API
author
Alexander Ebert
<ebert@woltlab.com>
Fri, 12 Jul 2013 18:50:25 +0000
(20:50 +0200)
committer
Alexander Ebert
<ebert@woltlab.com>
Fri, 12 Jul 2013 18:50:25 +0000
(20:50 +0200)
wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/worker/LikeRebuildDataWorker.class.php
patch
|
blob
|
blame
|
history
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 0d8fee1d9c27616ccfa995ebca8a735084e1c423..8b2e10b65655721e65bb3fecef4b77164228de75 100644
(file)
--- 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<integer> $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 39770af7885389c9c6b157b698bfa3003005c655..466b541c7f505a5200178ea3a188d4f19b946d3f 100644
(file)
--- 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;
}