Merge branch 'master' into dev-elastic

pull/6040/head
Aleksander Machniak 7 years ago
commit ef0982f1b8

@ -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)

@ -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;

@ -1,3 +1,5 @@
- Added option managesieve_default_headers
* version 9.0 [2017-10-02]
-----------------------------------------------------------
- Fix parsing dot-staffed lines in multiline text (#5838)

@ -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,

@ -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;
}
}

@ -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') {

@ -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 '';
}

@ -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;
}

@ -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 &gt; 0"> <roundcube:object name="version" condition="config:display_product_info == 2" />
<roundcube:if condition="config:support_url" />
&nbsp;&#9679;&nbsp; <a href="<roundcube:var name='config:support_url' />" target="_blank" class="support-link"><roundcube:label name="support" /></a>
<roundcube:endif />

@ -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 &gt; 0" /> <roundcube:object name="version" condition="config:display_product_info == 2" />
<roundcube:if condition="config:support_url" />
&nbsp;&#9679;&nbsp; <a href="<roundcube:var name='config:support_url' />" target="_blank" class="support-link"><roundcube:label name="support" /></a>
<roundcube:endif />

Loading…
Cancel
Save