diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-27 10:38:35 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-27 10:38:35 +0400 |
commit | c4b42a103c1551d6d02bb5e0f1d8ad6f47de9ab4 (patch) | |
tree | 3ade9184380a9c1e6b61b923a3a69a6a464bc3f1 /core | |
parent | d30d252c71ad56f95979113e4b1a67846d715134 (diff) |
Refs #4041, fix bug in defaulting selectable columns.
Diffstat (limited to 'core')
-rw-r--r-- | core/Visualization/Graph.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Visualization/Graph.php b/core/Visualization/Graph.php index 38da416d97..794a0119f0 100644 --- a/core/Visualization/Graph.php +++ b/core/Visualization/Graph.php @@ -108,10 +108,6 @@ abstract class Graph extends DataTableVisualization public function __construct($view) { if ($view->show_goals) { - $goalMetrics = array('nb_conversions', 'revenue'); - $view->visualization_properties->selectable_columns = array_merge( - $view->visualization_properties->selectable_columns, $goalMetrics); - $view->translations['nb_conversions'] = Piwik_Translate('Goals_ColumnConversions'); $view->translations['revenue'] = Piwik_Translate('General_TotalRevenue'); } @@ -164,6 +160,11 @@ abstract class Graph extends DataTableVisualization } } + if ($view->show_goals) { + $goalMetrics = array('nb_conversions', 'revenue'); + $selectableColumns = array_merge($selectableColumns, $goalMetrics); + } + $transformed = array(); foreach ($selectableColumns as $column) { $transformed[] = array( |