summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Słowik <pawel.slowik@iq.pl>2012-09-14 14:48:30 +0200
committerPaweł Słowik <pawel.slowik@iq.pl>2012-09-14 14:48:30 +0200
commit4c4496bccc46e15f05d54235b420c0bff1306db2 (patch)
treec99dd91ba98d4280920826a89f00f3b4773765fa
parent3c99599794948686960ee4e340374b0c3a1527b2 (diff)
Sieve enotify/notify - allow empty body
-rw-r--r--plugins/managesieve/lib/rcube_sieve_script.php12
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;