From b5c10843a68fe9ca22ec2e6488f6acb3ffb8c5f7 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Sun, 10 May 2020 15:18:47 +0200 Subject: [PATCH] Fix sorting of trophies with multiple pages --- .../install/files/lib/data/trophy/TrophyAction.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/data/trophy/TrophyAction.class.php b/wcfsetup/install/files/lib/data/trophy/TrophyAction.class.php index d321056937..5898034e1f 100644 --- a/wcfsetup/install/files/lib/data/trophy/TrophyAction.class.php +++ b/wcfsetup/install/files/lib/data/trophy/TrophyAction.class.php @@ -296,9 +296,10 @@ class TrophyAction extends AbstractDatabaseObjectAction implements IToggleAction throw new UserInputException('structure'); } - $adList = new TrophyList(); - $adList->setObjectIDs($this->parameters['data']['structure'][0]); - if ($adList->countObjects() != count($this->parameters['data']['structure'][0])) { + $trophyList = new TrophyList(); + $trophyList->setObjectIDs($this->parameters['data']['structure'][0]); + $trophyList->readObjects(); + if (count($trophyList) !== count($this->parameters['data']['structure'][0])) { throw new UserInputException('structure'); } -- 2.20.1