Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-01-27 07:04:47 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-02-10 06:52:07 +0300
commit7c099358991996ecb98a2d4c1d5eb88af41d0f57 (patch)
tree70fd72bdb720a9c5f14e9e43aaf2ab305e2cf908 /plugins/VisitsSummary
parent2d98561f4bcf0a06d8b7c626f3eba8c6741e5864 (diff)
refs #6705 started to write some tests and fixed some bugs that I noticed when handling multiple period dates and period=range
Diffstat (limited to 'plugins/VisitsSummary')
-rw-r--r--plugins/VisitsSummary/Reports/Get.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/VisitsSummary/Reports/Get.php b/plugins/VisitsSummary/Reports/Get.php
index 7fcd9c54c6..7786c5a99e 100644
--- a/plugins/VisitsSummary/Reports/Get.php
+++ b/plugins/VisitsSummary/Reports/Get.php
@@ -46,16 +46,14 @@ class Get extends \Piwik\Plugin\Report
return;
}
- if (!empty($infos['idSites']) && !empty($infos['period']) && !empty($infos['date'])) {
+ $usersKey = array_search('nb_users', $this->metrics);
+ if ($usersKey !== false && !empty($infos['idSites']) && !empty($infos['period']) && !empty($infos['date'])) {
$userId = new UserId();
$isUserIdUsed = $userId->isUsedInAtLeastOneSite($infos['idSites'], $infos['period'], $infos['date']);
if (!$isUserIdUsed) {
- $key = array_search('nb_users', $this->metrics);
- if (false !== $key) {
- unset($this->metrics[$key]);
- $this->metrics = array_values($this->metrics);
- }
+ unset($this->metrics[$usersKey]);
+ $this->metrics = array_values($this->metrics);
}
}
@@ -66,7 +64,7 @@ class Get extends \Piwik\Plugin\Report
{
$metrics = parent::getMetrics();
- $metrics['max_actions'] = Piwik::translate('General_ColumnMaxActions');
+ $metrics['max_actions'] = Piwik::translate('General_ColumnMaxActions');
return $metrics;
}