summaryrefslogtreecommitdiff
path: root/plugins/managesieve/lib
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-02-10 08:10:03 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-02-10 08:10:03 +0000
commitb40c338186679c086d25ed5d43553d3216d7190a (patch)
treee0133cc6293aa814810008f9230db8ccfad5b2ac /plugins/managesieve/lib
parent468ae4f98dee203feac6a6f39fdada5dd14fac9b (diff)
- Added :regex and :matches support (#1487746)
git-svn-id: https://svn.roundcube.net/trunk@4521 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/managesieve/lib')
-rw-r--r--plugins/managesieve/lib/rcube_sieve.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/managesieve/lib/rcube_sieve.php b/plugins/managesieve/lib/rcube_sieve.php
index 1f0b21bb6..1ed0da9ab 100644
--- a/plugins/managesieve/lib/rcube_sieve.php
+++ b/plugins/managesieve/lib/rcube_sieve.php
@@ -405,7 +405,8 @@ class rcube_sieve_script
'copy', // RFC3894
'vacation', // RFC5230
'relational', // RFC3431
- // TODO: (most wanted first) body, imapflags, notify, regex
+ 'regex', // draft-ietf-sieve-regex-01
+ // TODO: (most wanted first) body, imapflags, notify
);
/**
@@ -533,8 +534,9 @@ class rcube_sieve_script
array_push($exts, 'comparator-i;ascii-numeric');
$tests[$i] .= 'header :' . $m[1] . ' "' . $m[2] . '" :comparator "i;ascii-numeric"';
}
- else
+ else {
$tests[$i] .= 'header :' . $test['type'];
+ }
$tests[$i] .= ' ' . self::escape_string($test['arg1']);
$tests[$i] .= ' ' . self::escape_string($test['arg2']);
@@ -749,7 +751,7 @@ class rcube_sieve_script
else if (!is_array($tokens[$i]) && preg_match('/^:(count|value)$/i', $tokens[$i])) {
$header['type'] = strtolower(substr($tokens[$i], 1)) . '-' . $tokens[++$i];
}
- else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches)$/i', $tokens[$i])) {
+ else if (!is_array($tokens[$i]) && preg_match('/^:(is|contains|matches|regex)$/i', $tokens[$i])) {
$header['type'] = strtolower(substr($tokens[$i], 1));
}
else {