From 170f6b3d1f55b06e27f6d9fd876d357e72ae6e03 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 14 Dec 2014 00:38:51 +0100 Subject: [PATCH] Improved and fixed moderation dropdown --- com.woltlab.wcf/templates/moderationQueueList.tpl | 2 +- .../moderation/queue/ModerationQueueAction.class.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/com.woltlab.wcf/templates/moderationQueueList.tpl b/com.woltlab.wcf/templates/moderationQueueList.tpl index 6c0a981871..4169c18b92 100644 --- a/com.woltlab.wcf/templates/moderationQueueList.tpl +++ b/com.woltlab.wcf/templates/moderationQueueList.tpl @@ -6,7 +6,7 @@

{$queue->getAffectedObject()->getTitle()}

- {if $queue->getUserProfile()->userID}{$queue->getAffectedObject()->getUsername()}{else}{$queue->getAffectedObject()->getUsername()}{/if} - {@$queue->getAffectedObject()->getTime()|time} + {if $queue->getUserProfile()->userID}{$queue->getAffectedObject()->getUsername()}{else}{$queue->getAffectedObject()->getUsername()}{/if} - {@$queue->lastChangeTime|time}
diff --git a/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php b/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php index cd361d61e9..551f8ed466 100644 --- a/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php +++ b/wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php @@ -129,9 +129,12 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction { if (!empty($queueIDs)) { $queueList = new ViewableModerationQueueList(); $queueList->getConditionBuilder()->add("moderation_queue.queueID IN (?)", array($queueIDs)); + $queueList->sqlOrderBy = "moderation_queue.lastChangeTime DESC"; $queueList->loadUserProfiles = true; $queueList->readObjects(); - $queues = $queueList->getObjects(); + foreach ($queueList as $queue) { + $queues[] = $queue; + } } // check if user storage is outdated @@ -146,7 +149,9 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction { $queueList->sqlLimit = 5 - $count; $queueList->loadUserProfiles = true; $queueList->readObjects(); - $queues = array_merge($queues, $queueList->getObjects()); + foreach ($queueList as $queue) { + $queues[] = $queue; + } // check if stored count is out of sync if ($count < $totalCount) { -- 2.20.1