Remove the intransparent doubling of the visit tracker lifetime if existing data...
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 26 Apr 2022 12:23:17 +0000 (14:23 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 26 Apr 2022 12:23:17 +0000 (14:23 +0200)
In case of com.woltlab.wbb this only triggers if and only if a user *ever*
marked all boards as read. With the increase of the default lifetime in the
previous commit it becomes obsolete.

wcfsetup/install/files/lib/system/visitTracker/VisitTracker.class.php

index bc19615381874ecab206ce0d80b7f0f9f9336d20..2fbeee68bd2311b830194d64144ea2a1992d51cc 100644 (file)
@@ -112,10 +112,6 @@ class VisitTracker extends SingletonFactory
         }
 
         if (isset($this->userVisits[$objectTypeID])) {
-            // double times the lifetime period for existing visit data;
-            // equals 2 weeks for the default lifetime of 7 days
-            $minimum -= $lifetime;
-
             // using `max()` here will yield the most recent point in time
             return \max($this->userVisits[$objectTypeID], $minimum);
         }