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-10-07 09:41:49 +0300
committerGitHub <noreply@github.com>2020-10-07 09:41:49 +0300
commit969668755f9799d3dfa2dbbf5db75c0e882195db (patch)
tree4891f53fe31ff220b3bb4324b4ce69a99c42aae3 /plugins/Contents
parente0019128ed33d321185a5ea283090f7541c2b83d (diff)
Fix selectable metrics in pie charts for Events and Contents reports (#16535)
Diffstat (limited to 'plugins/Contents')
-rw-r--r--plugins/Contents/Reports/Base.php4
-rw-r--r--plugins/Contents/Reports/GetContentNames.php2
-rw-r--r--plugins/Contents/Reports/GetContentPieces.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Contents/Reports/Base.php b/plugins/Contents/Reports/Base.php
index 3ce84b48b2..51ba3d91fc 100644
--- a/plugins/Contents/Reports/Base.php
+++ b/plugins/Contents/Reports/Base.php
@@ -54,6 +54,10 @@ abstract class Base extends Report
array_keys($this->getProcessedMetrics())
);
+ if (property_exists($view->config, 'selectable_columns')) {
+ $view->config->selectable_columns = $this->metrics;
+ }
+
$view->requestConfig->filter_sort_column = 'nb_impressions';
if ($this->hasSubtableId()) {
diff --git a/plugins/Contents/Reports/GetContentNames.php b/plugins/Contents/Reports/GetContentNames.php
index e01ccd6ab9..5042e5d014 100644
--- a/plugins/Contents/Reports/GetContentNames.php
+++ b/plugins/Contents/Reports/GetContentNames.php
@@ -9,10 +9,8 @@
namespace Piwik\Plugins\Contents\Reports;
use Piwik\Piwik;
-use Piwik\Plugin\Report;
use Piwik\Plugins\Contents\Columns\ContentName;
use Piwik\Plugins\Contents\Columns\Metrics\InteractionRate;
-use Piwik\View;
/**
* This class defines a new report.
diff --git a/plugins/Contents/Reports/GetContentPieces.php b/plugins/Contents/Reports/GetContentPieces.php
index 7898129979..ccf89c0196 100644
--- a/plugins/Contents/Reports/GetContentPieces.php
+++ b/plugins/Contents/Reports/GetContentPieces.php
@@ -9,10 +9,8 @@
namespace Piwik\Plugins\Contents\Reports;
use Piwik\Piwik;
-use Piwik\Plugin\Report;
use Piwik\Plugins\Contents\Columns\ContentPiece;
use Piwik\Plugins\Contents\Columns\Metrics\InteractionRate;
-use Piwik\View;
/**
* This class defines a new report.