summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-02-03 08:11:49 -0500
committerAleksander Machniak <alec@alec.pl>2015-02-03 08:11:49 -0500
commit04009e5ccbcfdee7d0f71f40eb402b94563983f9 (patch)
treea436227a84cbb7c6d4a8626f472ff9f23dc0078d /plugins
parente17decc4c2b175e1b2e3cd79f7c8b4c39c1f70f1 (diff)
Fix bug in vacation script detection with kolab_master feature enabled but no active script
Diffstat (limited to 'plugins')
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php5
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php4
2 files changed, 6 insertions, 3 deletions
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index 860b40e61..d412e17db 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -2105,7 +2105,10 @@ class rcube_sieve_engine
foreach ($rules['actions'] as $action) {
if ($action['type'] == 'include' && empty($action['global'])) {
$name = preg_replace($filename_regex, '', $action['target']);
- $this->active[] = $name;
+ // make sure the script exist
+ if (in_array($name, $this->list)) {
+ $this->active[] = $name;
+ }
}
}
}
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php
index 3d3db9a20..28fd80125 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php
@@ -124,7 +124,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine
private function vacation_rule()
{
- if ($this->script_name === null || !$this->sieve->load($this->script_name)) {
+ if ($this->script_name === false || $this->script_name === null || !$this->sieve->load($this->script_name)) {
return;
}
@@ -556,7 +556,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine
protected function save_vacation_script($rule)
{
// if script does not exist create a new one
- if ($this->script_name === null) {
+ if ($this->script_name === null || $this->script_name === false) {
$this->script_name = $this->rc->config->get('managesieve_script_name');
if (empty($this->script_name)) {
$this->script_name = 'roundcube';