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:
Diffstat (limited to 'plugins/API/ProcessedReport.php')
-rw-r--r--plugins/API/ProcessedReport.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index 360d6b7ddf..1cd327c8c7 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -14,6 +14,7 @@ use Piwik\Archive\DataTableFactory;
use Piwik\CacheId;
use Piwik\Cache as PiwikCache;
use Piwik\Common;
+use Piwik\Container\StaticContainer;
use Piwik\DataTable;
use Piwik\DataTable\Row;
use Piwik\DataTable\Simple;
@@ -48,6 +49,18 @@ class ProcessedReport
{
$reportsMetadata = $this->getReportMetadata($idSite, $period, $date, $hideMetricsDoc, $showSubtableReports);
+ $entityNames = StaticContainer::get('entities.idNames');
+ foreach ($entityNames as $entityName) {
+ if ($entityName === 'idGoal' || $entityName === 'idDimension') {
+ continue; // idGoal and idDimension is passed directly but for other entities we need to "workaround" and
+ // check for eg idFoo from GET/POST because we cannot add parameters to API dynamically
+ }
+ $idEntity = Common::getRequestVar($entityName, 0, 'int');
+ if ($idEntity > 0) {
+ $apiParameters[$entityName] = $idEntity;
+ }
+ }
+
foreach ($reportsMetadata as $report) {
// See ArchiveProcessor/Aggregator.php - unique visitors are not processed for period != day
// todo: should use SettingsPiwik::isUniqueVisitorsEnabled instead
@@ -73,6 +86,7 @@ class ProcessedReport
}
}
}
+
return false;
}