From 01a7705e40352c5cec12f50d8416c28b55022d21 Mon Sep 17 00:00:00 2001 From: Jerome Bakker Date: Thu, 20 Apr 2017 10:14:11 +0200 Subject: [PATCH] fixed: use time_updated in cron, same as on group profile page --- classes/ColdTrick/GroupTools/Cron.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/classes/ColdTrick/GroupTools/Cron.php b/classes/ColdTrick/GroupTools/Cron.php index bc4f8d66..96b8b492 100644 --- a/classes/ColdTrick/GroupTools/Cron.php +++ b/classes/ColdTrick/GroupTools/Cron.php @@ -139,14 +139,14 @@ protected static function findStaleGroups($ts) { "e.guid IN ( SELECT container_guid FROM ( - SELECT container_guid, max(time_created) as time_created + SELECT container_guid, max(time_updated) as time_updated FROM {$dbprefix}entities WHERE type = 'object' AND subtype IN (" . implode(',', $object_ids) . ") GROUP BY container_guid ) as content - WHERE content.time_created > {$compare_ts_lower} - AND content.time_created < {$compare_ts_upper} + WHERE content.time_updated > {$compare_ts_lower} + AND content.time_updated < {$compare_ts_upper} )", ], ]; @@ -173,15 +173,15 @@ protected static function findStaleGroups($ts) { "e.guid IN ( SELECT container_guid FROM ( - SELECT ce.container_guid, max(re.time_created) as time_created + SELECT ce.container_guid, max(re.time_updated) as time_updated FROM {$dbprefix}entities re JOIN {$dbprefix}entities ce ON re.container_guid = ce.guid WHERE re.type = 'object' AND re.subtype IN (" . implode(',', $comment_ids) . ") GROUP BY ce.container_guid ) as comments - WHERE comments.time_created > {$compare_ts_lower} - AND comments.time_created < {$compare_ts_upper} + WHERE comments.time_updated > {$compare_ts_lower} + AND comments.time_updated < {$compare_ts_upper} )", ], ];