Fix visual glitch when using disabled_actions for items in Settings menu

pull/6833/head
Aleksander Machniak 8 years ago
parent f8e0e1d4ed
commit fca2bb7869

@ -1370,6 +1370,8 @@ function rcmail_settings_tabs($attrib)
array('command' => 'responses', 'type' => 'link', 'label' => 'responses', 'title' => 'manageresponses'), 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 // get all identites from DB and define list of cols to be displayed
$plugin = $RCMAIL->plugins->exec_hook('settings_actions', array( $plugin = $RCMAIL->plugins->exec_hook('settings_actions', array(
'actions' => $default_actions, 'actions' => $default_actions,
@ -1381,6 +1383,11 @@ function rcmail_settings_tabs($attrib)
$tabs = array(); $tabs = array();
foreach ($plugin['actions'] as $action) { 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']) { if (!$action['command'] && !$action['href'] && $action['action']) {
$action['href'] = $RCMAIL->url(array('_action' => $action['action'])); $action['href'] = $RCMAIL->url(array('_action' => $action['action']));
} }

Loading…
Cancel
Save