Revert "Add bulk processing parameter for UserActivityPointHandler::removeEvents()"
authorMatthias Schmidt <gravatronics@live.com>
Sun, 23 Jun 2019 12:30:04 +0000 (14:30 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 23 Jun 2019 12:30:04 +0000 (14:30 +0200)
This reverts commit 78f6d353e5186675f9854ca2412a7732ef975adf.

wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php

index f54850d372ce0f41a22bff32a7a1040ff58f63d5..474912e985477a64bd9c747eac874bd9173e38c1 100644 (file)
@@ -151,12 +151,11 @@ class UserActivityPointHandler extends SingletonFactory {
        /**
         * Removes activity point events.
         * 
-        * @param       string          $objectType
-        * @param       integer[]       $userToItems
-        * @param       boolean         $isBulkProcessing
+        * @param       string                  $objectType
+        * @param       integer[]               $userToItems
         * @throws      InvalidObjectTypeException
         */
-       public function removeEvents($objectType, array $userToItems, $isBulkProcessing = false) {
+       public function removeEvents($objectType, array $userToItems) {
                if (empty($userToItems)) return;
                
                // get and validate object type
@@ -181,13 +180,9 @@ class UserActivityPointHandler extends SingletonFactory {
                        ]);
                }
                
-               // during bulk processing, users do not have to be updated because
-               // they can be updated via `UserRebuildDataWorker` afterwards
-               // which calls `updateUsers()` 
-               if (!$isBulkProcessing) {
-                       // update total activity points per user
-                       $this->updateUsers(array_keys($userToItems));
-               }
+               // update total activity points per user
+               $userIDs = array_keys($userToItems);
+               $this->updateUsers($userIDs);
        }
        
        /**