diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-20 17:59:50 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-20 17:59:50 +0000 |
| commit | 9f64e4feacdc8cbbe2dd6711c946cb173c1f8a93 (patch) | |
| tree | 7b5b9992df7379b26e2a32b788e3dfb8213e9207 /plugins/managesieve/lib | |
| parent | e3f7337b42af5ccd2e326a9de9c6125e71be8f53 (diff) | |
- Apply forgotten changes for form errors handling
- Fix handling of scripts with CRLF line separator
git-svn-id: https://svn.roundcube.net/trunk@4241 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/managesieve/lib')
| -rw-r--r-- | plugins/managesieve/lib/rcube_sieve.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/managesieve/lib/rcube_sieve.php b/plugins/managesieve/lib/rcube_sieve.php index cec86a1db..ba43f1093 100644 --- a/plugins/managesieve/lib/rcube_sieve.php +++ b/plugins/managesieve/lib/rcube_sieve.php @@ -344,7 +344,7 @@ class rcube_sieve $name = array(); // Squirrelmail (Avelsieve) - if ($tokens = preg_split('/(#START_SIEVE_RULE.*END_SIEVE_RULE)\n/', $script, -1, PREG_SPLIT_DELIM_CAPTURE)) { + if ($tokens = preg_split('/(#START_SIEVE_RULE.*END_SIEVE_RULE)\r?\n/', $script, -1, PREG_SPLIT_DELIM_CAPTURE)) { foreach($tokens as $token) { if (preg_match('/^#START_SIEVE_RULE.*/', $token, $matches)) { $name[$i] = "unnamed rule ".($i+1); @@ -743,7 +743,7 @@ class rcube_sieve_script if (in_array('vacation', $this->supported)) $patterns[] = '^\s*vacation\s+(.*?[^\\\]);'; - $pattern = '/(' . implode('$)|(', $patterns) . '$)/ms'; + $pattern = '/(' . implode('\s*$)|(', $patterns) . '$\s*)/ms'; // parse actions body if (preg_match_all($pattern, $content, $mm, PREG_SET_ORDER)) { |
