Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2018-09-10 09:23:52 +0300
committerGitHub <noreply@github.com>2018-09-10 09:23:52 +0300
commitf72637f3c10ee8e2fc5535c28dbf755dcd2a0457 (patch)
tree152e5fd987dc3ef3550386e22badc5000443c302 /plugins/Live
parentfb0d1563813aa7358b2e35e1b482f92c47c9b80a (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/Live')
-rw-r--r--plugins/Live/Controller.php2
-rw-r--r--plugins/Live/ProfileSummary/Summary.php3
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php
index f57f2a2378..5fdc846fd2 100644
--- a/plugins/Live/Controller.php
+++ b/plugins/Live/Controller.php
@@ -121,7 +121,7 @@ class Controller extends \Piwik\Plugin\Controller
$view = new View('@Live/getVisitorProfilePopup.twig');
$view->idSite = $this->idSite;
- $view->goals = APIGoals::getInstance()->getGoals($this->idSite);
+ $view->goals = Request::processRequest('Goals.getGoals', ['idSite' => $this->idSite, 'filter_limit' => '-1'], $default = []);
$view->visitorData = $visitorData;
$view->exportLink = $this->getVisitorProfileExportLink();
diff --git a/plugins/Live/ProfileSummary/Summary.php b/plugins/Live/ProfileSummary/Summary.php
index db81a8e127..5f001ae819 100644
--- a/plugins/Live/ProfileSummary/Summary.php
+++ b/plugins/Live/ProfileSummary/Summary.php
@@ -8,6 +8,7 @@
*/
namespace Piwik\Plugins\Live\ProfileSummary;
+use Piwik\API\Request;
use Piwik\Common;
use Piwik\Piwik;
use Piwik\View;
@@ -37,7 +38,7 @@ class Summary extends ProfileSummaryAbstract
{
$idSite = Common::getRequestVar('idSite', null, 'int');
$view = new View('@Live/_profileSummary.twig');
- $view->goals = APIGoals::getInstance()->getGoals($idSite);
+ $view->goals = Request::processRequest('Goals.getGoals', ['idSite' => $idSite, 'filter_limit' => '-1'], $default = []);
$view->visitorData = $this->profile;
return $view->render();
}