diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-04-06 06:29:18 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-04-06 06:29:18 +0300 |
commit | 3eb0cf055146c0b77b592cf9ef4bf2eb2e2f1ca3 (patch) | |
tree | 99817781db0a0626fa4d14f96697f6e04e66f983 /plugins/CoreVisualizations/Visualizations | |
parent | 1854f5c456a76af807431d52bcb19ad207ba658e (diff) | |
parent | 0f38083969261b95a00c59f1f5596d35365506cd (diff) |
Merge branch 'master' into 3.0-m03
Conflicts:
core/Version.php
core/WidgetsList.php
plugins/CustomDimensions
plugins/Goals/templates/getGoalReportView.twig
plugins/Goals/templates/getOverviewView.twig
tests/UI/expected-ui-screenshots
Diffstat (limited to 'plugins/CoreVisualizations/Visualizations')
3 files changed, 29 insertions, 36 deletions
diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable.php b/plugins/CoreVisualizations/Visualizations/HtmlTable.php index 66cb4c26e9..dff8aa3e7a 100644 --- a/plugins/CoreVisualizations/Visualizations/HtmlTable.php +++ b/plugins/CoreVisualizations/Visualizations/HtmlTable.php @@ -70,6 +70,25 @@ class HtmlTable extends Visualization $dataTable = $request->process(); $this->assignTemplateVar('siteSummary', $dataTable); } + + if ($this->isPivoted()) { + $this->config->columns_to_display = $this->dataTable->getColumns(); + } + } + + public function beforeGenericFiltersAreAppliedToLoadedDataTable() + { + if ($this->isPivoted()) { + $this->config->columns_to_display = $this->dataTable->getColumns(); + + $this->dataTable->applyQueuedFilters(); + } + + parent::beforeGenericFiltersAreAppliedToLoadedDataTable(); } + protected function isPivoted() + { + return $this->requestConfig->pivotBy || Common::getRequestVar('pivotBy', ''); + } } diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php index 5acf9b50be..959aa0d57b 100644 --- a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php +++ b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php @@ -64,4 +64,14 @@ class AllColumns extends HtmlTable $properties->columns_to_display = $columnsToDisplay; }); } + + public function beforeLoadDataTable() + { + $this->requestConfig->request_parameters_to_modify['pivotBy'] = null; // always unset pivotBy + } + + protected function isPivoted() + { + return false; // Pivot not supported + } } diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/PivotBy.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/PivotBy.php deleted file mode 100644 index 1703988599..0000000000 --- a/plugins/CoreVisualizations/Visualizations/HtmlTable/PivotBy.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * Piwik - free/libre analytics platform - * - * @link http://piwik.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * - */ - -namespace Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable; - -use Piwik\DataTable; -use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable; -use Piwik\View; - -/** - * DataTable Visualization that derives from HtmlTable and sets show_extra_columns to true. - */ -class PivotBy extends HtmlTable -{ - public function beforeGenericFiltersAreAppliedToLoadedDataTable() - { - $this->config->columns_to_display = $this->dataTable->getColumns(); - - $this->dataTable->applyQueuedFilters(); - - parent::beforeGenericFiltersAreAppliedToLoadedDataTable(); - } - - public function beforeRender() - { - parent::beforeRender(); - - $this->config->columns_to_display = $this->dataTable->getColumns(); - } -} |