diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-19 05:37:17 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-19 05:37:17 +0400 |
commit | 253b165e621953efcb692f985036e217920ba696 (patch) | |
tree | de76a07700ed5b41f3f6a2cc4a880351e1b8b20b /plugins/CoreHome/Controller.php | |
parent | 95aed5eba938839e2ffe74beca4fbf3399c77a54 (diff) |
added possibility to pass a report instance to renderReport() in controller, fixed a bug in menu where the sorting was wrong in case the first added menu item of a category was a submenu entry, made sure it is possible for plugin Menu classes to rename/modify report menu entries, created some reports for live plugin, centralized no permission to view report check and made it possible to overwrite this message for each report
Diffstat (limited to 'plugins/CoreHome/Controller.php')
-rw-r--r-- | plugins/CoreHome/Controller.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php index 36885fbdc1..d310d7ed88 100644 --- a/plugins/CoreHome/Controller.php +++ b/plugins/CoreHome/Controller.php @@ -45,9 +45,7 @@ class Controller extends \Piwik\Plugin\Controller throw new Exception('This report does not exist'); } - if (!$report->isEnabled()) { - throw new Exception('This report is not enabled. Maybe you do not have enough permission'); - } + $report->checkIsEnabled(); $menuTitle = $report->getMenuTitle(); @@ -71,9 +69,7 @@ class Controller extends \Piwik\Plugin\Controller throw new Exception('This report does not exist'); } - if (!$report->isEnabled()) { - throw new Exception('This report is not enabled. Maybe you do not have enough permission'); - } + $report->checkIsEnabled(); return $report->render(); } |