From 3608e0c6666ca2a168e9b3a2ad597dad16442e07 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 14 Dec 2016 15:39:35 +0100 Subject: [PATCH] Fix visual glitch when using disabled_actions for items in Settings menu --- program/steps/settings/func.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 087b70ba6b4..c5498df9333 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -1386,6 +1386,8 @@ function rcmail_settings_tabs($attrib) array('command' => 'responses', 'type' => 'link', 'label' => 'responses', 'title' => 'manageresponses'), ); + $disabled_actions = (array) $RCMAIL->config->get('disabled_actions'); + // get all identites from DB and define list of cols to be displayed $plugin = $RCMAIL->plugins->exec_hook('settings_actions', array( 'actions' => $default_actions, @@ -1397,6 +1399,11 @@ function rcmail_settings_tabs($attrib) $tabs = array(); foreach ($plugin['actions'] as $action) { + $task_action = $action['command'] ? $action['command'] : $action['action']; + if (in_array('settings.' . $task_action, $disabled_actions)) { + continue; + } + if (!$action['command'] && !$action['href'] && $action['action']) { $action['href'] = $RCMAIL->url(array('_action' => $action['action'])); }