diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-06-26 04:25:20 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-06-26 04:25:20 +0400 |
commit | 6802709ea7b1941b2632a42f349ae4804c7ba503 (patch) | |
tree | 06983a74a40583a0a0c4a89d89db6ae0c6bd061f /core/Tracker/Visit.php | |
parent | b4eaf2bf482dd6c417729b8d8994555736c7c05a (diff) |
Make change suggested in forum: set long time on page when applicable.2.4.0-b8
http://forum.piwik.org/read.php?2,117102
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; } |