diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-18 17:07:57 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-18 17:07:57 +0400 |
commit | 0f08861243e1b15971290c687791a5f7f80e8470 (patch) | |
tree | 6a602adef73b63d8c69219aad1ccb3dd795df133 /plugins/DBStats | |
parent | 0f6424a0a1aff64cdbbda376d13c3ba3cc3b6803 (diff) |
fixes #5952 make Pie chart work with DbStats plugin
Diffstat (limited to 'plugins/DBStats')
-rw-r--r-- | plugins/DBStats/Reports/Base.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/DBStats/Reports/Base.php b/plugins/DBStats/Reports/Base.php index d81a54ff15..a37452a6a3 100644 --- a/plugins/DBStats/Reports/Base.php +++ b/plugins/DBStats/Reports/Base.php @@ -109,8 +109,6 @@ abstract class Base extends \Piwik\Plugin\Report $view->config->y_axis_unit = ' K'; $view->requestConfig->filter_sort_column = 'total_size'; $view->requestConfig->filter_sort_order = 'desc'; - - $runPrettySizeFilterBeforeGeneric = true; } else { $view->config->columns_to_display = array('label', 'row_count'); $view->config->y_axis_unit = ' ' . Piwik::translate('General_Rows'); @@ -124,7 +122,9 @@ abstract class Base extends \Piwik\Plugin\Report $getPrettySize = array('\Piwik\MetricsFormatter', 'getPrettySizeFromBytes'); $params = !isset($fixedMemoryUnit) ? array() : array($fixedMemoryUnit); - $view->config->filters[] = array('ColumnCallbackReplace', array($sizeColumns, $getPrettySize, $params), $runPrettySizeFilterBeforeGeneric); + $view->config->filters[] = function ($dataTable) use ($sizeColumns, $getPrettySize, $params) { + $dataTable->filter('ColumnCallbackReplace', array($sizeColumns, $getPrettySize, $params)); + }; // jqPlot will display as, well, ' ', so don't replace the spaces when rendering as a graph if ($view->isViewDataTableId(HtmlTable::ID)) { |