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 <benakamoorthi@fastmail.fm>2014-06-24 22:52:15 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-06-24 22:53:41 +0400
commit06271773a9817c6ca68c70c6b2bf5bb9f3f67e54 (patch)
tree4b9fff0f0f8a0e8f07338104fd8a71bc852adf59 /plugins/Dashboard/Controller.php
parentaa23055426db1452461ca557343b32235855e297 (diff)
Use FrontController::dispatch to get dashboard layout in Dashboard controller so controller events are posted whenever a dashboard layout is requested.
Diffstat (limited to 'plugins/Dashboard/Controller.php')
-rw-r--r--plugins/Dashboard/Controller.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/Dashboard/Controller.php b/plugins/Dashboard/Controller.php
index a0530b6782..f1f6e3a3bd 100644
--- a/plugins/Dashboard/Controller.php
+++ b/plugins/Dashboard/Controller.php
@@ -14,6 +14,7 @@ use Piwik\Piwik;
use Piwik\Session\SessionNamespace;
use Piwik\View;
use Piwik\WidgetsList;
+use Piwik\FrontController;
/**
* Dashboard Controller
@@ -42,7 +43,10 @@ class Controller extends \Piwik\Plugin\Controller
$view->availableLayouts = $this->getAvailableLayouts();
$view->dashboardId = Common::getRequestVar('idDashboard', 1, 'int');
- $view->dashboardLayout = $this->getLayout($view->dashboardId);
+
+ // get the layout via FrontController so controller events are posted
+ $view->dashboardLayout = FrontController::getInstance()->dispatch('Dashboard', 'getDashboardLayout',
+ array($checkToken = false));
return $view;
}
@@ -74,9 +78,11 @@ class Controller extends \Piwik\Plugin\Controller
return Common::json_encode(WidgetsList::get());
}
- public function getDashboardLayout()
+ public function getDashboardLayout($checkToken = true)
{
- $this->checkTokenInUrl();
+ if ($checkToken) {
+ $this->checkTokenInUrl();
+ }
$idDashboard = Common::getRequestVar('idDashboard', 1, 'int');