From: Alexander Ebert Date: Sat, 13 Dec 2014 23:38:51 +0000 (+0100) Subject: Improved and fixed moderation dropdown X-Git-Tag: 2.1.0_Beta_1~26 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=170f6b3d1f55b06e27f6d9fd876d357e72ae6e03;p=GitHub%2FWoltLab%2FWCF.git Improved and fixed moderation dropdown --- 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) {