Fixed issue with poll_users cleaning at every cron job startup (#1390)

* Fixed issue with poll_users cleaning at every cron job startup

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-02-08 17:46:14 +07:00 committed by GitHub
commit e6e802a6a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -30,7 +30,7 @@ if ($poll_max_days = (int)$bb_cfg['poll_max_days']) {
DB()->query("
DELETE FROM " . BB_POLL_USERS . "
WHERE topic_id BETWEEN $start_id AND $end_id
AND vote_dt < DATE_SUB(NOW(), INTERVAL $poll_max_days DAY)
AND vote_dt < " . (TIMENOW - 86400 * $poll_max_days) . "
");
if ($end_id > $finish_id) {