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/Goals/Visualizations/Goals.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/Goals/Visualizations/Goals.php')
-rw-r--r-- | plugins/Goals/Visualizations/Goals.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/Goals/Visualizations/Goals.php b/plugins/Goals/Visualizations/Goals.php index 2c1fe815d6..b03d4407d4 100644 --- a/plugins/Goals/Visualizations/Goals.php +++ b/plugins/Goals/Visualizations/Goals.php @@ -8,6 +8,7 @@ namespace Piwik\Plugins\Goals\Visualizations; +use Piwik\API\Request; use Piwik\Common; use Piwik\DataTable\Filter\AddColumnsProcessedMetricsGoal; use Piwik\Piwik; @@ -171,7 +172,7 @@ class Goals extends HtmlTable } // add the site's goals (and escape all goal names) - $siteGoals = APIGoals::getInstance()->getGoals($idSite); + $siteGoals = Request::processRequest('Goals.getGoals', ['idSite' => $idSite, 'filter_limit' => '-1'], $default = []); foreach ($siteGoals as &$goal) { $goal['name'] = Common::sanitizeInputValue($goal['name']); |