Fix cleaning of tracked visits in DailyCleanUpCronjob
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 26 Apr 2022 12:44:27 +0000 (14:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 26 Apr 2022 12:44:27 +0000 (14:44 +0200)
commite139fd483709c1eb3fd5d23797e504b948c06c7d
treeac265a17c3ad73521b86fe4a93eacb261de4922e
parent7a33940836ba55333d220bafdb2aea735080ed5b
Fix cleaning of tracked visits in DailyCleanUpCronjob

This part of the cronjob never was functional, because stored visitTime was
compared to the lifetime which could only ever match near the start of the unix
epoch.

Fix this by correctly subtracting the lifetime from the current timestamp. I've
opted to use 120 days as the cleanup lifetime, as this allows one to adjust the
DEFAULT_LIFETIME gracefully.
wcfsetup/install/files/lib/system/cronjob/DailyCleanUpCronjob.class.php