diff options
author | Kate Butler <kate@innocraft.com> | 2019-04-16 04:04:28 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2019-04-16 04:04:28 +0300 |
commit | fc8b08c3f5152a2e0785a2ccbb1fffc5d209c0df (patch) | |
tree | 0e3515b1f9bec0ca8aa536808db63062b231207d /plugins/Installation | |
parent | 022ee7e35c21d9d0de537bc8e8f16eaee2019ce0 (diff) |
Remove diagnostics plugin from list of always-activated plugins (#14349)
Diffstat (limited to 'plugins/Installation')
-rw-r--r-- | plugins/Installation/Menu.php | 3 | ||||
-rw-r--r-- | plugins/Installation/Widgets/GetSystemCheck.php | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/Installation/Menu.php b/plugins/Installation/Menu.php index b68a9f54eb..0eb523180f 100644 --- a/plugins/Installation/Menu.php +++ b/plugins/Installation/Menu.php @@ -10,12 +10,13 @@ namespace Piwik\Plugins\Installation; use Piwik\Menu\MenuAdmin; use Piwik\Piwik; +use Piwik\Plugin\Manager; class Menu extends \Piwik\Plugin\Menu { public function configureAdminMenu(MenuAdmin $menu) { - if (Piwik::hasUserSuperUserAccess()) { + if (Piwik::hasUserSuperUserAccess() && Manager::getInstance()->isPluginActivated('Diagnostics')) { $menu->addDiagnosticItem('Installation_SystemCheck', $this->urlForAction('systemCheckPage'), $order = 1); diff --git a/plugins/Installation/Widgets/GetSystemCheck.php b/plugins/Installation/Widgets/GetSystemCheck.php index 8dd73aaae7..d449a96584 100644 --- a/plugins/Installation/Widgets/GetSystemCheck.php +++ b/plugins/Installation/Widgets/GetSystemCheck.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\Installation\Widgets; use Piwik\Piwik; +use Piwik\Plugin\Manager; use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult; use Piwik\Plugins\Diagnostics\DiagnosticReport; use Piwik\Plugins\Diagnostics\DiagnosticService; @@ -34,7 +35,9 @@ class GetSystemCheck extends Widget $config->setName('Installation_SystemCheck'); $config->setOrder(16); - $config->setIsEnabled(Piwik::hasUserSuperUserAccess()); + $config->setIsEnabled(Piwik::hasUserSuperUserAccess() + && Manager::getInstance()->isPluginActivated('Diagnostics') + ); } public function render() |