From 6cdad7c5c1121e7b970eae3fb6366724f6ab56c5 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 24 Nov 2017 13:40:03 +0100 Subject: [PATCH] Hide inactive modules' config tabs refs #2977 --- library/Icinga/Application/Modules/Module.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index f07f34908..7f188f7b6 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -874,9 +874,13 @@ class Module 'urlParams' => array('name' => $this->getName()), 'label' => 'Module: ' . $this->getName() )); - foreach ($this->configTabs as $name => $config) { - $tabs->add($name, $config); + + if ($this->app->getModuleManager()->hasEnabled($this->name)) { + foreach ($this->configTabs as $name => $config) { + $tabs->add($name, $config); + } } + return $tabs; }