diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2018-09-10 09:23:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 09:23:52 +0300 |
commit | f72637f3c10ee8e2fc5535c28dbf755dcd2a0457 (patch) | |
tree | 152e5fd987dc3ef3550386e22badc5000443c302 /plugins/Ecommerce/Controller.php | |
parent | fb0d1563813aa7358b2e35e1b482f92c47c9b80a (diff) |
Get goals through Request::processRequest instead of directly from AP… (#13293)
* Get goals through Request::processRequest instead of directly from API so events can fire.
* Do not use Request in tracker requests since renderers are not loaded.
* Add default = [] & filter_limit = -1 to changed Goals.getGoals calls.
* Add empty default request to one Goals.get call.
* fix another test
* Use 3.x-dev file.
Diffstat (limited to 'plugins/Ecommerce/Controller.php')
-rw-r--r-- | plugins/Ecommerce/Controller.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Ecommerce/Controller.php b/plugins/Ecommerce/Controller.php index c0215a1bb4..072336d0c7 100644 --- a/plugins/Ecommerce/Controller.php +++ b/plugins/Ecommerce/Controller.php @@ -44,7 +44,7 @@ class Controller extends \Piwik\Plugins\Goals\Controller $goalDefinition['name'] = $this->translator->translate('Goals_Ecommerce'); $goalDefinition['allow_multiple'] = true; } else { - $goals = GoalsApi::getInstance()->getGoals($this->idSite); + $goals = Request::processRequest('Goals.getGoals', ['idSite' => $this->idSite, 'filter_limit' => '-1'], $default = []); if (!isset($goals[$idGoal])) { Piwik::redirectToModule('Goals', 'index', array('idGoal' => null)); } @@ -77,7 +77,7 @@ class Controller extends \Piwik\Plugins\Goals\Controller $view = new View('@Ecommerce/conversionOverview'); $idGoal = Common::getRequestVar('idGoal', null, 'string'); - $goalMetrics = Request::processRequest('Goals.get', array('idGoal' => $idGoal)); + $goalMetrics = Request::processRequest('Goals.get', array('idGoal' => $idGoal, 'filter_limit' => '-1'), $default = []); $dataRow = $goalMetrics->getFirstRow(); $view->idSite = Common::getRequestVar('idSite', null, 'int'); |