Skip to content

Commit

Permalink
fixed: use time_updated in cron, same as on group profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Apr 20, 2017
1 parent ad4c3dd commit 01a7705
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions classes/ColdTrick/GroupTools/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)",
],
];
Expand All @@ -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}
)",
],
];
Expand Down

0 comments on commit 01a7705

Please sign in to comment.