Aleksander Machniak
2015-02-03 04009e5ccbcfdee7d0f71f40eb402b94563983f9
Fix bug in vacation script detection with kolab_master feature enabled but no active script
2 files modified
9 ■■■■■ changed files
plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php 5 ●●●● patch | view | raw | blame | history
plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php 4 ●●●● patch | view | raw | blame | history
plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -2105,7 +2105,10 @@
                    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;
                            }
                        }
                    }
                }
plugins/managesieve/lib/Roundcube/rcube_sieve_vacation.php
@@ -124,7 +124,7 @@
    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 @@
    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';