diff --git a/administrator/components/com_content/Helper/ContentHelper.php b/administrator/components/com_content/Helper/ContentHelper.php index 465756aac6..e2f4cd6c12 100644 --- a/administrator/components/com_content/Helper/ContentHelper.php +++ b/administrator/components/com_content/Helper/ContentHelper.php @@ -43,28 +43,32 @@ public static function addSubmenu($vName) 'index.php?option=com_categories&extension=com_content', $vName == 'categories' ); - \JHtmlSidebar::addEntry( - \JText::_('COM_CONTENT_SUBMENU_WORKFLOW'), - 'index.php?option=com_workflow&extension=com_content', - $vName == 'workflows' - ); - if ($vName == 'states' || $vName == 'transitions') + if (\JComponentHelper::isEnabled('com_workflow') && \JComponentHelper::getParams('com_content')->get('workflows_enable', 1)) { - $app = Factory::getApplication(); - $workflowID = $app->getUserStateFromRequest('filter.workflow_id', 'workflow_id', 1, 'int'); - \JHtmlSidebar::addEntry( - \JText::_('COM_WORKFLOW_STATE'), - 'index.php?option=com_workflow&view=states&workflow_id=' . $workflowID . "&extension=com_content", - $vName == 'states`' + \JText::_('COM_CONTENT_SUBMENU_WORKFLOW'), + 'index.php?option=com_workflow&extension=com_content', + $vName == 'workflows' ); - \JHtmlSidebar::addEntry( - \JText::_('COM_WORKFLOW_TRANSITION'), - 'index.php?option=com_workflow&view=transitions&workflow_id=' . $workflowID . "&extension=com_content", - $vName == 'transitions' - ); + if ($vName == 'states' || $vName == 'transitions') + { + $app = Factory::getApplication(); + $workflowID = $app->getUserStateFromRequest('filter.workflow_id', 'workflow_id', 1, 'int'); + + \JHtmlSidebar::addEntry( + \JText::_('COM_WORKFLOW_STATE'), + 'index.php?option=com_workflow&view=states&workflow_id=' . $workflowID . "&extension=com_content", + $vName == 'states`' + ); + + \JHtmlSidebar::addEntry( + \JText::_('COM_WORKFLOW_TRANSITION'), + 'index.php?option=com_workflow&view=transitions&workflow_id=' . $workflowID . "&extension=com_content", + $vName == 'transitions' + ); + } } \JHtmlSidebar::addEntry( diff --git a/administrator/components/com_content/config.xml b/administrator/components/com_content/config.xml index 80b408be6e..0d33c74e06 100644 --- a/administrator/components/com_content/config.xml +++ b/administrator/components/com_content/config.xml @@ -350,8 +350,8 @@ -