From faca7f2a7515f90d29e330d0e7c10d98d4d17905 Mon Sep 17 00:00:00 2001 From: Johan Janssens Date: Wed, 8 Jul 2015 22:56:45 +0200 Subject: [PATCH] #215 - Do not create admin menu item if the component has no admin functionality --- lib/libraries/cms/installer/adapter/component.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libraries/cms/installer/adapter/component.php b/lib/libraries/cms/installer/adapter/component.php index d252bb4c88..b77820b4e5 100644 --- a/lib/libraries/cms/installer/adapter/component.php +++ b/lib/libraries/cms/installer/adapter/component.php @@ -1263,7 +1263,12 @@ protected function _buildAdminMenus() // Ok, now its time to handle the menus. Start with the component root menu, then handle submenus. $menuElement = $this->manifest->administration->menu; - if ($menuElement) + // @TODO: Just do not create the menu if $menuElement not exist + if (in_array((string) $menuElement['hidden'], array('true', 'hidden'))) + { + return true; + } + elseif ($menuElement) { $data = array(); $data['menutype'] = 'main';