diff options
author | Aleksander Machniak <alec@alec.pl> | 2017-10-28 19:24:54 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2017-10-28 19:24:54 +0300 |
commit | ef0982f1b83d4e4a76483495b78fa7084c90424c (patch) | |
tree | 06138fdc0236047d65ec3576bf098644eb241d1f | |
parent | fd9517655fc8211bf049ddb6209c3fe9c09da9a0 (diff) | |
parent | 25a7df7f4b593a864f5a359e66d8dac363008300 (diff) |
Merge branch 'master' into dev-elastic
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | config/defaults.inc.php | 5 | ||||
-rw-r--r-- | plugins/managesieve/Changelog | 2 | ||||
-rw-r--r-- | plugins/managesieve/config.inc.php.dist | 3 | ||||
-rw-r--r-- | plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php | 27 | ||||
-rw-r--r-- | plugins/newmail_notifier/newmail_notifier.php | 2 | ||||
-rw-r--r-- | program/include/rcmail_output_html.php | 8 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_config.php | 6 | ||||
-rw-r--r-- | skins/classic/templates/login.html | 2 | ||||
-rw-r--r-- | skins/larry/templates/login.html | 2 |
10 files changed, 44 insertions, 15 deletions
@@ -1,6 +1,8 @@ CHANGELOG Roundcube Webmail =========================== +- Replace display_version with display_product_version (#5904) +- Extend disabled_actions config so it accepts also button names (#5903) - Handle remote stylesheets the same as remote images, ask the user to allow them (#5994) - Add Message-ID to the sendmail log (#5871) - Managesieve: Add ability to disable filter sets and other actions (#5496, #5898) 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/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index fdbe1ff4c..bca12302b 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,3 +1,5 @@ +- Added option managesieve_default_headers + * version 9.0 [2017-10-02] ----------------------------------------------------------- - Fix parsing dot-staffed lines in multiline text (#5838) diff --git a/plugins/managesieve/config.inc.php.dist b/plugins/managesieve/config.inc.php.dist index c89f98962..7375f15c6 100644 --- a/plugins/managesieve/config.inc.php.dist +++ b/plugins/managesieve/config.inc.php.dist @@ -81,6 +81,9 @@ $config['managesieve_filename_exceptions'] = array(); // If not empty, user will need to select domain from a list $config['managesieve_domains'] = array(); +// Default list of entries in header selector +$config['managesieve_default_headers'] = array('Subject', 'From', 'To'); + // Enables separate management interface for vacation responses (out-of-office) // 0 - no separate section (default), // 1 - add Vacation section, diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index 1cddec899..87a0a666d 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -33,11 +33,7 @@ class rcube_sieve_engine protected $script = array(); protected $exts = array(); protected $active = array(); - protected $headers = array( - 'subject' => 'Subject', - 'from' => 'From', - 'to' => 'To', - ); + protected $headers = array(); protected $addr_headers = array( // Required "from", "to", "cc", "bcc", "sender", "resent-from", "resent-to", @@ -74,8 +70,9 @@ class rcube_sieve_engine */ function __construct($plugin) { - $this->rc = rcube::get_instance(); - $this->plugin = $plugin; + $this->rc = rcube::get_instance(); + $this->plugin = $plugin; + $this->headers = $this->get_default_headers(); } /** @@ -2824,4 +2821,20 @@ class rcube_sieve_engine return $addresses; } + + /** + * Convert configured default headers into internal format + */ + protected function get_default_headers() + { + $default = array('Subject', 'From', 'To'); + $headers = (array) $this->rc->config->get('managesieve_default_headers', $default); + $keys = array_map('strtolower', $headers); + $headers = array_combine($keys, $headers); + + // make sure there's no Date header + unset($headers['date']); + + return $headers; + } } diff --git a/plugins/newmail_notifier/newmail_notifier.php b/plugins/newmail_notifier/newmail_notifier.php index 58b4a52b6..939d118d3 100644 --- a/plugins/newmail_notifier/newmail_notifier.php +++ b/plugins/newmail_notifier/newmail_notifier.php @@ -66,7 +66,7 @@ class newmail_notifier extends rcube_plugin if (!empty($this->opt)) { // Get folders to skip checking for - $exceptions = array('drafts_mbox', 'sent_mbox', 'trash_mbox'); + $exceptions = array('drafts_mbox', 'sent_mbox', 'trash_mbox', 'junk_mbox'); foreach ($exceptions as $folder) { $folder = $this->rc->config->get($folder); if (strlen($folder) && $folder != 'INBOX') { diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 91419a8a6..19bfe175c 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 ''; } 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 @@ </noscript> <div id="login-bottomline"> - <roundcube:var name="config:product_name"> <roundcube:object name="version" condition="config:display_version" /> + <roundcube:var name="config:product_name" condition="config:display_product_info > 0"> <roundcube:object name="version" condition="config:display_product_info == 2" /> <roundcube:if condition="config:support_url" /> ● <a href="<roundcube:var name='config:support_url' />" target="_blank" class="support-link"><roundcube:label name="support" /></a> <roundcube:endif /> 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 @@ </div> <div id="bottomline" role="contentinfo"> - <roundcube:object name="productname" /> <roundcube:object name="version" condition="config:display_version" /> + <roundcube:object name="productname" condition="config:display_product_info > 0" /> <roundcube:object name="version" condition="config:display_product_info == 2" /> <roundcube:if condition="config:support_url" /> ● <a href="<roundcube:var name='config:support_url' />" target="_blank" class="support-link"><roundcube:label name="support" /></a> <roundcube:endif /> |