Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnDoh <roundcube@tehinterweb.co.uk>2017-10-21 09:48:34 +0300
committerAleksander Machniak <alec@alec.pl>2017-10-21 09:48:34 +0300
commita8f0d35ebcfddd64e6045d815a40554599d9cb90 (patch)
tree6b783e17f4f2a38791066381670b2271f5534d27
parentf9644ea21754d8eb6876513b6b5c6609b517b785 (diff)
Extend disabled_actions config so it accepts also button names (#5903)
-rw-r--r--program/include/rcmail_output_html.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index eb3d5fa79..2c92bad9d 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -1361,12 +1361,14 @@ EOF;
}
$command = $attrib['command'];
+ $action = $command ?: $attrib['name'];
if ($attrib['task']) {
- $element = $command = $attrib['task'] . '.' . $command;
+ $command = $attrib['task'] . '.' . $command;
+ $element = $attrib['task'] . '.' . $action;
}
else {
- $element = ($this->env['task'] ? $this->env['task'] . '.' : '') . $command;
+ $element = ($this->env['task'] ? $this->env['task'] . '.' : '') . $action;
}
if ($disabled_actions === null) {
@@ -1374,7 +1376,7 @@ EOF;
}
// remove buttons for disabled actions
- if (in_array($element, $disabled_actions)) {
+ if (in_array($element, $disabled_actions) || in_array($action, $disabled_actions)) {
return '';
}