Use post-type for the item container

This commit is contained in:
Michael 2021-04-01 04:58:53 +00:00
parent 38a5358bfa
commit 9072107b83
4 changed files with 6 additions and 6 deletions

View file

@ -224,10 +224,10 @@ class ExpirePosts
AND NOT `uri-id` IN (SELECT `parent-uri-id` FROM `post-user` INNER JOIN `contact` ON `contact`.`id` = `contact-id` AND `notify_new_posts`
WHERE `parent-uri-id` = `post-thread`.`uri-id`)
AND NOT `uri-id` IN (SELECT `parent-uri-id` FROM `post-user`
WHERE (`origin` OR `event-id` != 0 OR `post-type` = ?) AND `parent-uri-id` = `post-thread`.`uri-id`)
WHERE (`origin` OR `event-id` != 0 OR `post-type` IN (?, ?)) AND `parent-uri-id` = `post-thread`.`uri-id`)
AND NOT `uri-id` IN (SELECT `uri-id` FROM `post-content`
WHERE `resource-id` != 0 AND `uri-id` = `post-thread`.`uri-id`))",
$expire_days, Item::PT_PERSONAL_NOTE]);
$expire_days, Item::PT_PERSONAL_NOTE, Item::PT_IMAGE]);
Logger::notice('Start deleting expired threads');
$affected_count = 0;