From 4c4496bccc46e15f05d54235b420c0bff1306db2 Mon Sep 17 00:00:00 2001 From: Paweł Słowik Date: Fri, 14 Sep 2012 14:48:30 +0200 Subject: Sieve enotify/notify - allow empty body --- plugins/managesieve/lib/rcube_sieve_script.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'plugins/managesieve/lib/rcube_sieve_script.php') 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; -- cgit v1.2.3