From e5c62abc75ede639af6261c9441f76be81e564fd Mon Sep 17 00:00:00 2001 From: Laird Date: Sun, 19 May 2024 17:22:53 +1000 Subject: [PATCH] Fix #362: Task to delete old alerts fails to do that Resolves #362 --- inc/tasks/myalerts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/tasks/myalerts.php b/inc/tasks/myalerts.php index bf5377b..ffc5ed8 100755 --- a/inc/tasks/myalerts.php +++ b/inc/tasks/myalerts.php @@ -24,7 +24,7 @@ function task_myalerts($task) $lang->load('myalerts'); } - if ($db->delete_query('alerts', '(dateline<='.(TIME_NOW-$unread_time).' AND unread = 1) OR (dateline<='.(TIME_NOW-$read_time).' AND unread = 0)')) { + if ($db->delete_query('alerts', '(dateline <= \''.date('Y-m-d H:i:s', TIME_NOW-$unread_time).'\' AND unread = 1) OR (dateline <= \''.date('Y-m-d H:i:s', TIME_NOW-$read_time).'\' AND unread = 0)')) { add_task_log($task, $lang->myalerts_task_cleanup_ran); } else { add_task_log($task, $lang->myalerts_task_cleanup_error);