Merge pull request #161 from following5/368-archive-events

enabled auto-archiving of disabled event caches
This commit is contained in:
following5 2015-05-27 23:32:37 +02:00
commit 5cc74499c4

View File

@ -44,7 +44,7 @@ class autoarchive
// modification date.
$rs = sql("SELECT `caches`.`cache_id`
FROM `caches`
WHERE `caches`.`status`=2 AND `caches`.`type`<>6
WHERE `caches`.`status`=2
AND IFNULL((SELECT MAX(`date_modified`) FROM `cache_status_modified` `csm` WHERE `csm`.`cache_id`=`caches`.`cache_id`),`caches`.`listing_last_modified`) < NOW() - INTERVAL 366 DAY
GROUP BY `caches`.`cache_id`
ORDER BY `caches`.`listing_last_modified`