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:
authorStefan Giehl <stefan@matomo.org>2020-02-21 11:22:28 +0300
committerGitHub <noreply@github.com>2020-02-21 11:22:28 +0300
commitb25fcee82367e2b6e0df148743591eba1fb8518b (patch)
treef355153d2576bbee9d59b0f56d0bcf93d2fce1b7 /plugins/VisitFrequency
parent2b64abf72c102cf33d478bbfff31c019adb8389a (diff)
Fix VisitorFrequency.get API for idsites=all (#15601)
Diffstat (limited to 'plugins/VisitFrequency')
-rw-r--r--plugins/VisitFrequency/API.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/VisitFrequency/API.php b/plugins/VisitFrequency/API.php
index 854b0de5f5..afc93fe636 100644
--- a/plugins/VisitFrequency/API.php
+++ b/plugins/VisitFrequency/API.php
@@ -49,7 +49,10 @@ class API extends \Piwik\Plugin\API
$columns = Piwik::getArrayFromApiParameter($columns);
/** @var \Piwik\DataTable\DataTableInterface $resultSet */
- if (Period::isMultiplePeriod($date, $period)) {
+ if ($idSite === 'all') {
+ $resultSet = new DataTable\Map();
+ $resultSet->setKeyName('idSite');
+ } else if (Period::isMultiplePeriod($date, $period)) {
$resultSet = new DataTable\Map();
$resultSet->setKeyName('period');
} else {