diff --git a/libraries/src/Installer/Adapter/ComponentAdapter.php b/libraries/src/Installer/Adapter/ComponentAdapter.php index 88341c9f9d237..cd6c016210a46 100644 --- a/libraries/src/Installer/Adapter/ComponentAdapter.php +++ b/libraries/src/Installer/Adapter/ComponentAdapter.php @@ -971,7 +971,6 @@ protected function _buildAdminMenus($component_id = null) $data['client_id'] = 1; $data['title'] = (string) trim($menuElement); $data['alias'] = (string) $menuElement; - $data['link'] = 'index.php?option=' . $option; $data['type'] = 'component'; $data['published'] = 1; $data['parent_id'] = 1; @@ -980,6 +979,22 @@ protected function _buildAdminMenus($component_id = null) $data['home'] = 0; $data['path'] = ''; $data['params'] = ''; + + // Set the menu link + $request = array(); + + if ((string) $menuElement->attributes()->task) + { + $request[] = 'task=' . $menuElement->attributes()->task; + } + + if ((string) $menuElement->attributes()->view) + { + $request[] = 'view=' . $menuElement->attributes()->view; + } + + $qstring = count($request) ? '&' . implode('&', $request) : ''; + $data['link'] = 'index.php?option=' . $option . $qstring; } else {