Skip to content

Commit

Permalink
Merge pull request MyBBStuff#363 from lairdshaw/fix-362
Browse files Browse the repository at this point in the history
Fix MyBBStuff#362: Task to delete old alerts fails to do that
  • Loading branch information
lairdshaw committed May 19, 2024
2 parents edafad1 + e5c62ab commit 5311e48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/tasks/myalerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5311e48

Please sign in to comment.