diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-04-12 06:00:58 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-04-12 06:00:58 +0400 |
commit | 238f49720c5787890c952cf14ac86c6ad4aae4bf (patch) | |
tree | 0ad11b8fa63c05fab55f65d5289c4a2462f17a7b /plugins/Events/Events.php | |
parent | 353bb6b1929876075a7e38690465da0c752928df (diff) |
Fix notice
Diffstat (limited to 'plugins/Events/Events.php')
-rw-r--r-- | plugins/Events/Events.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Events/Events.php b/plugins/Events/Events.php index f24d348a8d..683425ea91 100644 --- a/plugins/Events/Events.php +++ b/plugins/Events/Events.php @@ -150,10 +150,9 @@ class Events extends \Piwik\Plugin $documentation = $this->getMetricDocumentation(); $labelTranslations = $this->getLabelTranslations(); - $secondaryDimension = $this->getSecondaryDimensionFromRequest(); - $order = 0; foreach($labelTranslations as $action => $translations) { + $secondaryDimension = $this->getSecondaryDimensionFromRequest($action); $actionToLoadSubtables = API::getInstance()->getActionToLoadSubtables($action, $secondaryDimension); $reports[] = array( 'category' => Piwik::translate('Events_Events'), @@ -216,7 +215,7 @@ class Events extends \Piwik\Plugin // eg. 'Events.getCategory' $apiMethod = $view->requestConfig->getApiMethodToRequest(); - $secondaryDimension = $this->getSecondaryDimensionFromRequest(); + $secondaryDimension = $this->getSecondaryDimensionFromRequest($apiMethod); $view->config->subtable_controller_action = API::getInstance()->getActionToLoadSubtables($apiMethod, $secondaryDimension); $view->config->columns_to_display = array('label', 'nb_events', 'sum_event_value'); @@ -297,8 +296,9 @@ class Events extends \Piwik\Plugin /** * @return mixed */ - protected function getSecondaryDimensionFromRequest() + protected function getSecondaryDimensionFromRequest($apiMethod) { + $defaultSecondaryDimension = API::getInstance()->getDefaultSecondaryDimension($apiMethod); return Common::getRequestVar('secondaryDimension', false, 'string'); } } |