Skip to content

Commit 01a7705

Browse files
committed
fixed: use time_updated in cron, same as on group profile page
1 parent ad4c3dd commit 01a7705

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

classes/ColdTrick/GroupTools/Cron.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ protected static function findStaleGroups($ts) {
139139
"e.guid IN (
140140
SELECT container_guid
141141
FROM (
142-
SELECT container_guid, max(time_created) as time_created
142+
SELECT container_guid, max(time_updated) as time_updated
143143
FROM {$dbprefix}entities
144144
WHERE type = 'object'
145145
AND subtype IN (" . implode(',', $object_ids) . ")
146146
GROUP BY container_guid
147147
) as content
148-
WHERE content.time_created > {$compare_ts_lower}
149-
AND content.time_created < {$compare_ts_upper}
148+
WHERE content.time_updated > {$compare_ts_lower}
149+
AND content.time_updated < {$compare_ts_upper}
150150
)",
151151
],
152152
];
@@ -173,15 +173,15 @@ protected static function findStaleGroups($ts) {
173173
"e.guid IN (
174174
SELECT container_guid
175175
FROM (
176-
SELECT ce.container_guid, max(re.time_created) as time_created
176+
SELECT ce.container_guid, max(re.time_updated) as time_updated
177177
FROM {$dbprefix}entities re
178178
JOIN {$dbprefix}entities ce ON re.container_guid = ce.guid
179179
WHERE re.type = 'object'
180180
AND re.subtype IN (" . implode(',', $comment_ids) . ")
181181
GROUP BY ce.container_guid
182182
) as comments
183-
WHERE comments.time_created > {$compare_ts_lower}
184-
AND comments.time_created < {$compare_ts_upper}
183+
WHERE comments.time_updated > {$compare_ts_lower}
184+
AND comments.time_updated < {$compare_ts_upper}
185185
)",
186186
],
187187
];

0 commit comments

Comments
 (0)