From afabead24916774fee3aaf8620299f471405d1dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Sun, 8 Oct 2017 20:35:29 +0200 Subject: [PATCH] Remove unused bogus method --- .../TrophyConditionHandler.class.php | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php b/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php index 1de8af3b78..878178b36f 100644 --- a/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php +++ b/wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php @@ -106,32 +106,4 @@ class TrophyConditionHandler extends SingletonFactory { return $userList->getObjects(); } - - /** - * Returns the outstanding trophy assignment count. - * - * @return integer - */ - public function getOutstandingTrophyAssignmentCount() { - $trophyList = new TrophyList(); - $trophyList->getConditionBuilder()->add('awardAutomatically = ?', [1]); - $trophyList->getConditionBuilder()->add('isDisabled = ?', [0]); - $trophyList->readObjects(); - - $outstandingCount = 0; - foreach ($trophyList as $trophy) { - $userList = new UserList(); - - $conditions = $trophy->getConditions(); - foreach ($conditions as $condition) { - $condition->getObjectType()->getProcessor()->addUserCondition($condition, $userList); - } - - // prevent multiple awards from a trophy for a user - $userList->getConditionBuilder()->add('user_table.userID NOT IN (SELECT userID FROM wcf'.WCF_N.'_user_trophy WHERE trophyID IN (?))', [$trophy->trophyID]); - $outstandingCount += $userList->countObjects(); - } - - return $outstandingCount; - } } -- 2.20.1