From a8f0d35ebcfddd64e6045d815a40554599d9cb90 Mon Sep 17 00:00:00 2001 From: JohnDoh Date: Sat, 21 Oct 2017 07:48:34 +0100 Subject: [PATCH 1/2] Extend disabled_actions config so it accepts also button names (#5903) --- program/include/rcmail_output_html.php | 8 +++++--- 1 file 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 ''; } From 515d496808cfc4b188d4cc7116329f101fd042b8 Mon Sep 17 00:00:00 2001 From: JohnDoh Date: Sat, 21 Oct 2017 07:52:03 +0100 Subject: [PATCH 2/2] Replace display_version with display_product_info (#5904) --- config/defaults.inc.php | 5 +++-- program/lib/Roundcube/rcube_config.php | 6 ++++++ skins/classic/templates/login.html | 2 +- skins/larry/templates/login.html | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config/defaults.inc.php b/config/defaults.inc.php index f960945ce..cfd0d9e34 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -438,8 +438,9 @@ $config['login_rate_limit'] = 3; // Includes should be interpreted as PHP files $config['skin_include_php'] = false; -// display software version on login screen -$config['display_version'] = false; +// display product name and software version on login screen +// 0 - hide product name and version number, 1 - show product name only, 2 - show product name and version number +$config['display_product_info'] = 1; // Session lifetime in minutes $config['session_lifetime'] = 10; diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php index 4ac687529..1fe155dbc 100644 --- a/program/lib/Roundcube/rcube_config.php +++ b/program/lib/Roundcube/rcube_config.php @@ -659,6 +659,12 @@ class rcube_config unset($props['preview_pane']); } + // translate old `display_version` settings to `display_product_info` + if (isset($props['display_version']) && !isset($props['display_product_info'])) { + $props['display_product_info'] = $props['display_version'] ? 2 : 1; + unset($props['display_version']); + } + return $props; } diff --git a/skins/classic/templates/login.html b/skins/classic/templates/login.html index 0725373d3..938473956 100644 --- a/skins/classic/templates/login.html +++ b/skins/classic/templates/login.html @@ -26,7 +26,7 @@
- +  ●  diff --git a/skins/larry/templates/login.html b/skins/larry/templates/login.html index 2a45eda5c..a3300c211 100644 --- a/skins/larry/templates/login.html +++ b/skins/larry/templates/login.html @@ -26,7 +26,7 @@