diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-05 00:19:54 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-05 00:19:54 +0300 |
commit | 05950779b2f8bec48bd6db1a9385bf1753cfbd4a (patch) | |
tree | bbc92610d6cb230963f632bed3ea79dfa7d632ed /plugins | |
parent | a76ae7cbfe2257d697afa7dbd347ca4ba1b8a1ed (diff) |
Simplified report controllers
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/Controller.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php index f628a592f1..b245a5c674 100644 --- a/plugins/CoreHome/Controller.php +++ b/plugins/CoreHome/Controller.php @@ -69,22 +69,16 @@ class Controller extends \Piwik\Plugin\Controller } $menuTitle = $this->translator->translate($menuTitle); - $content = $this->renderReportWidget($reportModule, $reportAction); + $content = $this->renderReportWidget($report); return View::singleReport($menuTitle, $content); } - public function renderReportWidget($reportModule = null, $reportAction = null) + public function renderReportWidget(Report $report) { Piwik::checkUserHasSomeViewAccess(); $this->checkSitePermission(); - $report = Report::factory($reportModule, $reportAction); - - if (empty($report)) { - throw new Exception($this->translator->translate('General_ExceptionReportNotFound')); - } - $report->checkIsEnabled(); return $report->render(); |