Skip to content

Commit

Permalink
Refs matomo-org#4041, fix bug in defaulting selectable columns.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benaka Moorthi committed Aug 27, 2013
1 parent d30d252 commit c4b42a1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/Visualization/Graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down Expand Up @@ -164,6 +160,11 @@ private function transformSelectableColumns($view)
}
}

if ($view->show_goals) {
$goalMetrics = array('nb_conversions', 'revenue');
$selectableColumns = array_merge($selectableColumns, $goalMetrics);
}

$transformed = array();
foreach ($selectableColumns as $column) {
$transformed[] = array(
Expand Down

0 comments on commit c4b42a1

Please sign in to comment.