summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-03-13 08:46:25 +0100
committerAleksander Machniak <alec@alec.pl>2015-03-13 08:46:25 +0100
commite4338fdf384f040101be3fad507c16ecb229580a (patch)
treeaf15c006024b2441728d6f218e13c5c45c9c904f /plugins
parentef442ef615a6bf6ce68edddd969cc18ac2fe8105 (diff)
Fix missing host:port in connection error message
Diffstat (limited to 'plugins')
-rw-r--r--plugins/managesieve/Changelog1
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php16
2 files changed, 13 insertions, 4 deletions
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index 9291d550b..0aa48d2d2 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -2,6 +2,7 @@
-----------------------------------------------------------
- Fix PHP fatal error when visiting Vacation interface and there's no sieve script yet
- Fix handling of header test with one-element array as header name
+- Fix missing host:port in connection error message
* version 8.2 [2015-01-14]
-----------------------------------------------------------
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index 2f2791d30..282ffa943 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -122,9 +122,6 @@ class rcube_sieve_engine
case rcube_sieve::ERROR_CONNECTION:
case rcube_sieve::ERROR_LOGIN:
$this->rc->output->show_message('managesieve.filterconnerror', 'error');
- rcube::raise_error(array('code' => 403, 'type' => 'php',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Unable to connect to managesieve on $host:$port"), true, false);
break;
default:
@@ -210,7 +207,18 @@ class rcube_sieve_engine
$plugin['socket_options']
);
- return $this->sieve->error();
+ $error = $this->sieve->error();
+
+ if ($error) {
+ rcube::raise_error(array(
+ 'code' => 403,
+ 'file' => __FILE__,
+ 'line' => __LINE__,
+ 'message' => "Unable to connect to managesieve on $host:$port"
+ ), true, false);
+ }
+
+ return $error;
}
/**