diff options
author | diosmosis <benaka@piwik.pro> | 2014-11-17 02:50:08 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-11-17 02:50:08 +0300 |
commit | 4883a33512dbb20b2b5aee4d13f92cf038a0cd3a (patch) | |
tree | 13277842b3e95bde7d7732fc94b9349991a564e9 | |
parent | 5f8eaf3389e004c711f13a9d529555d0522c663b (diff) |
Make sure manual calls to MetricsFormatter::getPrettyTimeAsSeconds will use sentence if sentence was used before.
-rw-r--r-- | plugins/CoreHome/Visitor.php | 2 | ||||
-rw-r--r-- | plugins/Live/Visitor.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/CoreHome/Visitor.php b/plugins/CoreHome/Visitor.php index b98ee8ead0..35b5ee5d22 100644 --- a/plugins/CoreHome/Visitor.php +++ b/plugins/CoreHome/Visitor.php @@ -99,7 +99,7 @@ class Visitor function getVisitLengthPretty() { - return $this->metricsFormatter->getPrettyTimeFromSeconds($this->details['visit_total_time']); + return $this->metricsFormatter->getPrettyTimeFromSeconds($this->details['visit_total_time'], true); } function getUserId() diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php index c7c8a13e6d..35368516db 100644 --- a/plugins/Live/Visitor.php +++ b/plugins/Live/Visitor.php @@ -346,7 +346,7 @@ class Visitor implements VisitorInterface // Set the time spent for this action (which is the timeSpentRef of the next action) if (isset($actionDetails[$actionIdx + 1])) { $actionDetail['timeSpent'] = $actionDetails[$actionIdx + 1]['timeSpentRef']; - $actionDetail['timeSpentPretty'] = $formatter->getPrettyTimeFromSeconds($actionDetail['timeSpent']); + $actionDetail['timeSpentPretty'] = $formatter->getPrettyTimeFromSeconds($actionDetail['timeSpent'], true); } unset($actionDetails[$actionIdx]['timeSpentRef']); // not needed after timeSpent is added |