diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-20 07:39:39 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-20 07:39:39 +0400 |
commit | c7edd733b426d102177b1b03c5f1d059e0bcf624 (patch) | |
tree | 4a675da718680acf11712aa281f090464cf3d522 /core | |
parent | 6682c8f47aed5331b6c9fb60b64f306b27cd0905 (diff) |
add report to widgetslist or menu only if enabled, should fix some tests
Diffstat (limited to 'core')
-rw-r--r-- | core/Menu/MenuReporting.php | 4 | ||||
-rw-r--r-- | core/WidgetsList.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/core/Menu/MenuReporting.php b/core/Menu/MenuReporting.php index d704134510..c085e7b41d 100644 --- a/core/Menu/MenuReporting.php +++ b/core/Menu/MenuReporting.php @@ -69,7 +69,9 @@ class MenuReporting extends MenuAbstract Piwik::postEvent('Menu.Reporting.addItems', array()); foreach (Report::getAllReports() as $report) { - $report->configureReportingMenu($this); + if ($report->isEnabled()) { + $report->configureReportingMenu($this); + } } foreach ($this->getAvailableMenus() as $menu) { diff --git a/core/WidgetsList.php b/core/WidgetsList.php index 9d1f13abfa..420f5f76b6 100644 --- a/core/WidgetsList.php +++ b/core/WidgetsList.php @@ -85,7 +85,9 @@ class WidgetsList extends Singleton $widgetsList = self::getInstance(); foreach (Report::getAllReports() as $report) { - $report->configureWidget($widgetsList); + if ($report->isEnabled()) { + $report->configureWidget($widgetsList); + } } foreach ($widgets as $widget) { |