diff options
Diffstat (limited to 'core/Tracker/Visit.php')
-rw-r--r-- | core/Tracker/Visit.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 65dcd548ba..3ed13ce7ca 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -272,11 +272,13 @@ class Visit implements VisitInterface protected function getTimeSpentReferrerAction() { $timeSpent = $this->request->getCurrentTimestamp() - $this->visitorInfo['visit_last_action_time']; - if ($timeSpent < 0 - || $timeSpent > Config::getInstance()->Tracker['visit_standard_length'] - ) { + if ($timeSpent < 0) { $timeSpent = 0; } + $visitStandardLength = Config::getInstance()->Tracker['visit_standard_length']; + if($timeSpent > $visitStandardLength) { + $timeSpent = $visitStandardLength; + } return $timeSpent; } |