diff options
author | Simon Rettberg | 2021-02-25 10:04:04 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-02-25 10:04:04 +0100 |
commit | 85470f11ca579bda756859fa518b77b8b341eddf (patch) | |
tree | 0790f4b3aa178379252b7f5bd9efe5303fb900b1 /modules-available/eventlog/hooks/cron.inc.php | |
parent | [rebootcontrol] add Scheduler Cron Job (diff) | |
download | slx-admin-85470f11ca579bda756859fa518b77b8b341eddf.tar.gz slx-admin-85470f11ca579bda756859fa518b77b8b341eddf.tar.xz slx-admin-85470f11ca579bda756859fa518b77b8b341eddf.zip |
[eventlog/main] Fix possible overflow in query
This would break on clock skew where timestamps in
the DB lie in the future.
Diffstat (limited to 'modules-available/eventlog/hooks/cron.inc.php')
-rw-r--r-- | modules-available/eventlog/hooks/cron.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/eventlog/hooks/cron.inc.php b/modules-available/eventlog/hooks/cron.inc.php index 027acf87..180bafd3 100644 --- a/modules-available/eventlog/hooks/cron.inc.php +++ b/modules-available/eventlog/hooks/cron.inc.php @@ -1,5 +1,5 @@ <?php if (mt_rand(1, 10) === 1) { - Database::exec("DELETE FROM eventlog WHERE (UNIX_TIMESTAMP() - dateline) > 86400 * 190"); -}
\ No newline at end of file + Database::exec("DELETE FROM eventlog WHERE (UNIX_TIMESTAMP() - 86400 * 190) > dateline"); +} |