diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-03-07 14:22:11 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-03-07 14:22:11 +0000 |
| commit | 7ac550ea8914f1d1cb72d6269d92b1d8f2b7eeec (patch) | |
| tree | 9095378fc30173e8a0ea813274a6844a06f02469 /plugins/managesieve/lib/rcube_sieve.php | |
| parent | 4ae9a39aabee5816b6321d24e771ddb56d824ab7 (diff) | |
- Fix saving of a script using flags extension on servers with imap4flags support (#1487825)
git-svn-id: https://svn.roundcube.net/trunk@4596 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/managesieve/lib/rcube_sieve.php')
| -rw-r--r-- | plugins/managesieve/lib/rcube_sieve.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/managesieve/lib/rcube_sieve.php b/plugins/managesieve/lib/rcube_sieve.php index a51671e88..d701095f2 100644 --- a/plugins/managesieve/lib/rcube_sieve.php +++ b/plugins/managesieve/lib/rcube_sieve.php @@ -31,6 +31,7 @@ class rcube_sieve public $script; // rcube_sieve_script object public $current; // name of currently loaded script private $disabled; // array of disabled extensions + private $exts; // array of supported extensions /** @@ -73,6 +74,7 @@ class rcube_sieve return $this->_set_error(SIEVE_ERROR_LOGIN); } + $this->exts = $this->get_extensions(); $this->disabled = $disabled; } @@ -191,6 +193,9 @@ class rcube_sieve */ public function get_extensions() { + if ($this->exts) + return $this->exts; + if (!$this->sieve) return $this->_set_error(SIEVE_ERROR_INTERNAL); @@ -280,12 +285,12 @@ class rcube_sieve private function _parse($txt) { // try to parse from Roundcube format - $script = new rcube_sieve_script($txt, $this->disabled); + $script = new rcube_sieve_script($txt, $this->disabled, $this->exts); // ... else try to import from different formats if (empty($script->content)) { $script = $this->_import_rules($txt); - $script = new rcube_sieve_script($script, $this->disabled); + $script = new rcube_sieve_script($script, $this->disabled, $this->exts); } // replace all elsif with if+stop, we support only ifs |
