From 714ba482290301c9e04ea528ea980d73346bd0d9 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Thu, 24 Oct 2024 06:14:15 +0200 Subject: [PATCH] hide disabled module --- .../Config/Form/Fieldset/Modules/DisableOutput.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php index da8829fd498..475f2cf4516 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php @@ -27,7 +27,16 @@ public function render(Varien_Data_Form_Element_Abstract $element) { $html = $this->_getHeaderHtml($element); - $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children()); + $modules = (array)Mage::getConfig()->getNode('modules')->children(); + /** @var Mage_Core_Model_Config_Element $module */ + foreach ($modules as $index => $module) { + $module = $module->asArray(); + if ($module['active'] === 'false') { + unset($modules[$index]); + } + } + + $modules = array_keys($modules); $dispatchResult = new Varien_Object($modules); Mage::dispatchEvent(