Make the Preferences item as selected when visiting Settings without _action

pull/6040/head
Aleksander Machniak 7 years ago
parent 830a50f1ce
commit 75f623c62f

@ -1403,9 +1403,10 @@ function rcmail_settings_tabs($attrib)
'attrib' => $attrib, 'attrib' => $attrib,
)); ));
$attrib = $plugin['attrib']; $selected = $RCMAIL->action ?: 'preferences';
$tagname = $attrib['tagname']; $attrib = $plugin['attrib'];
$tabs = array(); $tagname = $attrib['tagname'];
$tabs = array();
foreach ($plugin['actions'] as $action) { foreach ($plugin['actions'] as $action) {
$task_action = $action['command'] ? $action['command'] : $action['action']; $task_action = $action['command'] ? $action['command'] : $action['action'];
@ -1434,7 +1435,7 @@ function rcmail_settings_tabs($attrib)
else if (!empty($cmd)) { else if (!empty($cmd)) {
$classnames[] = $cmd; $classnames[] = $cmd;
} }
if ($RCMAIL->action == $cmd) { if ($cmd == $selected) {
$classnames[] = $attrib['selclass']; $classnames[] = $attrib['selclass'];
} }

Loading…
Cancel
Save