Fixed moderation queue dropdown returning all items
authorAlexander Ebert <ebert@woltlab.com>
Fri, 12 Dec 2014 18:26:24 +0000 (19:26 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 12 Dec 2014 18:26:24 +0000 (19:26 +0100)
wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php

index d74005355ce013faa647eb9dde50a521e8766315..6f0d42c52e07a08a0eb9b574c460e5ebd1391df3 100644 (file)
@@ -128,7 +128,7 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction {
                $queues = array();
                if (!empty($queueIDs)) {
                        $queueList = new ViewableModerationQueueList();
-                       $queueList->setObjectIDs($queueIDs);
+                       $queueList->getConditionBuilder()->add("moderation_queue.queueID IN (?)", array($queueIDs));
                        $queueList->loadUserProfiles = true;
                        $queueList->readObjects();
                        $queues = $queueList->getObjects();
@@ -141,6 +141,7 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction {
                        // load more entries to fill up list
                        $queueList = new ViewableModerationQueueList();
                        $queueList->getConditionBuilder()->add("moderation_queue.status IN (?)", array(array(ModerationQueue::STATUS_OUTSTANDING, ModerationQueue::STATUS_PROCESSING)));
+                       $queueList->getConditionBuilder()->add("moderation_queue.queueID NOT IN (?)", array($queueIDs));
                        $queueList->sqlOrderBy = "moderation_queue.lastChangeTime DESC";
                        $queueList->sqlLimit = 5 - $count;
                        $queueList->loadUserProfiles = true;