From f43866349c11e153f3939b44b79305990f384c41 Mon Sep 17 00:00:00 2001 From: Jeroen Dalsem Date: Thu, 23 Feb 2017 10:53:23 +0100 Subject: [PATCH] chore: use order by to get top most recent updated entity --- classes/ColdTrick/GroupTools/StaleInfo.php | 2 ++ languages/en.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/ColdTrick/GroupTools/StaleInfo.php b/classes/ColdTrick/GroupTools/StaleInfo.php index 20e4633b..3471dbd3 100644 --- a/classes/ColdTrick/GroupTools/StaleInfo.php +++ b/classes/ColdTrick/GroupTools/StaleInfo.php @@ -100,6 +100,7 @@ protected function getContentTimestamp() { 'subtypes' => $object_subtypes, 'limit' => 1, 'container_guid' => $this->group->getGUID(), + 'order_by' => 'e.time_updated DESC', ]); if (empty($entities)) { return 0; @@ -132,6 +133,7 @@ protected function getCommentTimestamp() { 'wheres' => [ "(ce.container_guid = {$this->group->getGUID()})", ], + 'order_by' => 'e.time_updated DESC', ]); if (empty($entities)) { return 0; diff --git a/languages/en.php b/languages/en.php index 5fce2306..a31c7b09 100644 --- a/languages/en.php +++ b/languages/en.php @@ -573,7 +573,7 @@ // stale groups 'group_tools:stale_info:description' => "This group has been inactive for a while. The content may no longer be relevant.", - 'group_tools:stale_info:link' => "This group is still relevent", + 'group_tools:stale_info:link' => "This group is still relevant", 'group_tools:csv_exporter:stale_info:is_stale' => "Stale group", 'group_tools:csv_exporter:stale_info:timestamp' => "Stale timestamp",