diff options
-rw-r--r-- | core/ViewDataTable/Manager.php | 8 | ||||
-rw-r--r-- | plugins/DBStats/DBStats.php | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/core/ViewDataTable/Manager.php b/core/ViewDataTable/Manager.php index ea762c4ce1..16e8379d10 100644 --- a/core/ViewDataTable/Manager.php +++ b/core/ViewDataTable/Manager.php @@ -303,10 +303,14 @@ class Manager foreach ($parametersToOverride as $key => $value) { if ($key === 'viewDataTable' - && !empty($params['columns']) && !empty($params[$key]) && $params[$key] !== $value) { - unset($params['columns']); + if (!empty($params['columns'])) { + unset($params['columns']); + } + if (!empty($params['columns_to_display'])) { + unset($params['columns_to_display']); + } } $params[$key] = $value; diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 619ebc1ef7..ac6ee1e355 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -95,7 +95,7 @@ class DBStats extends \Piwik\Plugin public function configureViewDataTable(ViewDataTable $view) { switch ($view->requestConfig->apiMethodToRequestDataTable) { - case 'DBStats.getDatabaseUsageSummar': + case 'DBStats.getDatabaseUsageSummary': $this->configureViewForGetDatabaseUsageSummary($view); break; case 'DBStats.getTrackerDataSummary': @@ -266,6 +266,10 @@ class DBStats extends \Piwik\Plugin $view->config->highlight_summary_row = true; } + if ($view->isViewDataTableId(Graph::ID)) { + $view->config->show_series_picker = false; + } + $view->config->addTranslations(array( 'label' => Piwik::translate('DBStats_Table'), 'year' => Piwik::translate('CoreHome_PeriodYear'), @@ -334,6 +338,7 @@ class DBStats extends \Piwik\Plugin $view->requestConfig->filter_sort_column = 'row_count'; $view->requestConfig->filter_sort_order = 'desc'; } + $view->config->selectable_rows = array(); } $getPrettySize = array('\Piwik\MetricsFormatter', 'getPrettySizeFromBytes'); |