diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-17 13:18:48 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-17 13:18:48 +0000 |
| commit | 445c436db6d8f52c771042e3e16f7a5ff101f882 (patch) | |
| tree | 884f44483e2eab7967eb3a1df8793a79ac28dd44 /plugins/managesieve/lib/rcube_sieve.php | |
| parent | e019ceea8f10f9be13be0da0cceb4df8f992d6b6 (diff) | |
- Added 'address' and 'envelope' tests support
- Added 'body' extension support (RFC5173)
- Added 'subaddress' extension support (RFC5233)
- Added comparators support
- Changed Sender/Recipient labels to From/To
- Fixed importing rule names from Ingo
- Fixed handling of extensions disabled in config
git-svn-id: https://svn.roundcube.net/trunk@5441 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/managesieve/lib/rcube_sieve.php')
| -rw-r--r-- | plugins/managesieve/lib/rcube_sieve.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/managesieve/lib/rcube_sieve.php b/plugins/managesieve/lib/rcube_sieve.php index 7b7ea6eb6..2ed2e54bf 100644 --- a/plugins/managesieve/lib/rcube_sieve.php +++ b/plugins/managesieve/lib/rcube_sieve.php @@ -44,7 +44,6 @@ 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 @@ -89,7 +88,17 @@ class rcube_sieve } $this->exts = $this->get_extensions(); - $this->disabled = $disabled; + + // disable features by config + if (!empty($disabled)) { + // we're working on lower-cased names + $disabled = array_map('strtolower', (array) $disabled); + foreach ($disabled as $ext) { + if (($idx = array_search($ext, $this->exts)) !== false) { + unset($this->exts[$idx]); + } + } + } } public function __destruct() { @@ -301,7 +310,7 @@ class rcube_sieve private function _parse($txt) { // parse - $script = new rcube_sieve_script($txt, $this->disabled, $this->exts); + $script = new rcube_sieve_script($txt, $this->exts); // fix/convert to Roundcube format if (!empty($script->content)) { |
