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:
authorAltamash Shaikh <altu9594@gmail.com>2022-03-07 07:35:12 +0300
committerAltamash Shaikh <altu9594@gmail.com>2022-03-07 07:35:12 +0300
commit8636e4379af3c6e8482cd8638889bc883bdccc46 (patch)
tree15dec4d4fadc4b2cb7c804f871ad35bf16a40a5d
parentce463dee016cafbb61f2bf0339d568515da17be1 (diff)
Added fix to check if columns key present for getReportMetadata, #DEV-2254DEV-2254-Fix-Multiple-Metrics-Plot
-rw-r--r--plugins/ImageGraph/ImageGraph.php3
-rw-r--r--plugins/ScheduledReports/API.php8
2 files changed, 3 insertions, 8 deletions
diff --git a/plugins/ImageGraph/ImageGraph.php b/plugins/ImageGraph/ImageGraph.php
index 8669f32ffc..99dba78c6f 100644
--- a/plugins/ImageGraph/ImageGraph.php
+++ b/plugins/ImageGraph/ImageGraph.php
@@ -136,6 +136,9 @@ class ImageGraph extends \Piwik\Plugin
if (!empty($report['parameters'])) {
$parameters = array_merge($parameters, $report['parameters']);
}
+ if (!empty($report['columns']) && !isset($parameters['columns'])) {
+ $parameters['columns'] = $report['columns'];
+ }
if (empty($report['dimension'])) {
$parameters['period'] = $periodForMultiplePeriodGraph;
$parameters['date'] = $dateForMultiplePeriodGraph;
diff --git a/plugins/ScheduledReports/API.php b/plugins/ScheduledReports/API.php
index 0340572f70..2259c0e56b 100644
--- a/plugins/ScheduledReports/API.php
+++ b/plugins/ScheduledReports/API.php
@@ -454,14 +454,6 @@ class API extends \Piwik\Plugin\API
$processedReport['segment'] = $segment;
- if (!empty($processedReport['metadata']['imageGraphUrl']) && !empty($processedReport['metadata']['metrics'])) {
- $columns = '&columns=' . implode(',', array_keys($processedReport['metadata']['metrics']));
- $processedReport['metadata']['imageGraphUrl'] .= $columns;
- if (!empty($processedReport['metadata']['imageGraphEvolutionUrl'])) {
- $processedReport['metadata']['imageGraphEvolutionUrl'] .= $columns;
- }
- }
-
// TODO add static method getPrettyDate($period, $date) in Period
$prettyDate = $processedReport['prettyDate'];