diff options
Diffstat (limited to 'plugins/managesieve')
-rw-r--r-- | plugins/managesieve/lib/rcube_sieve_script.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/managesieve/lib/rcube_sieve_script.php b/plugins/managesieve/lib/rcube_sieve_script.php index 3e418edd3..debe9c124 100644 --- a/plugins/managesieve/lib/rcube_sieve_script.php +++ b/plugins/managesieve/lib/rcube_sieve_script.php @@ -411,9 +411,15 @@ class rcube_sieve_script $action_script .= " :$n_tag " . self::escape_string($action[$n_tag]); } } - $method = (!empty($action['address']) && !empty($action['body'])) ? - sprintf('mailto:%s?body=%s', $action['address'], rawurlencode($action['body'])) : - $action['method']; + if (!empty($action['address'])) { + $method = 'mailto:' . $action['address']; + if (!empty($action['body'])) { + $method .= '?body=' . rawurlencode($action['body']); + } + } + else { + $method = $action['method']; + } $action_script .= " " . self::escape_string($method); break; |