diff options
author | benakamoorthi <benaka.moorthi@gmail.com> | 2012-08-03 06:24:30 +0400 |
---|---|---|
committer | benakamoorthi <benaka.moorthi@gmail.com> | 2012-08-03 06:24:30 +0400 |
commit | b60aad14f591f4929fbbedd490b8e92c7d5d148e (patch) | |
tree | 1b2f4bd87eab292e071e91f4e760ade91b286ed7 /plugins/VisitorInterest | |
parent | ac3b87b65f21b30c9548ac6c497bcafbd42962e2 (diff) |
Fixes #3282, change duration ranges for number of visits per visit duration report and fixed bug in BeautifyTimeRangeLabels where upper bound was incorrect.
git-svn-id: http://dev.piwik.org/svn/trunk@6660 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/VisitorInterest')
-rw-r--r-- | plugins/VisitorInterest/VisitorInterest.php | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php index ab79039071..f7d6cf1b98 100644 --- a/plugins/VisitorInterest/VisitorInterest.php +++ b/plugins/VisitorInterest/VisitorInterest.php @@ -124,16 +124,18 @@ class Piwik_VisitorInterest extends Piwik_Plugin Piwik_AddAction('template_footerVisitsFrequency', array('Piwik_VisitorInterest','footerVisitsFrequency')); } + // third element is unit (s for seconds, default is munutes) protected static $timeGap = array( - array(0, 0.5), - array(0.5, 1), + array(0, 10, 's'), + array(11, 30, 's'), + array(31, 60, 's'), array(1, 2), array(2, 4), - array(4, 6), - array(6, 8), - array(8, 11), - array(11, 15), - array(15) + array(4, 7), + array(7, 10), + array(10, 15), + array(15, 30), + array(30) ); protected static $pageGap = array( @@ -277,7 +279,11 @@ class Piwik_VisitorInterest extends Piwik_Plugin $secondsGap = array(); foreach(self::$timeGap as $gap) { - if (count($gap) == 2) + if (count($gap) == 3 && $gap[2] == 's') // if the units are already in seconds, just assign them + { + $secondsGap[] = array($gap[0], $gap[1]); + } + else if (count($gap) == 2) { $secondsGap[] = array($gap[0] * 60, $gap[1] * 60); } |