From 90ffded9b90c9666538d6825d8a69ee8f06b2e0d Mon Sep 17 00:00:00 2001 From: alec Date: Thu, 12 Aug 2010 12:28:01 +0000 Subject: - Fixed import from Avelsieve git-svn-id: https://svn.roundcube.net/trunk@3894 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/managesieve/Changelog | 2 ++ plugins/managesieve/lib/rcube_sieve.php | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'plugins') diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index 8c5a90456..feb84748c 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,3 +1,5 @@ +- Fixed import from Avelsieve + * version 2.9 [2010-08-02] ----------------------------------------------------------- - Fixed vacation parameters parsing (#1486883) diff --git a/plugins/managesieve/lib/rcube_sieve.php b/plugins/managesieve/lib/rcube_sieve.php index 7c397254a..926e8a7e0 100644 --- a/plugins/managesieve/lib/rcube_sieve.php +++ b/plugins/managesieve/lib/rcube_sieve.php @@ -339,6 +339,10 @@ class rcube_sieve $content .= "# rule:[".$name[$i]."]\n"; } elseif (isset($name[$i])) { + // This preg_replace is added because I've found some Avelsieve scripts + // with rules containing "if" here. I'm not sure it was working + // before without this or not. + $token = preg_replace('/^if\s+/', '', trim($token)); $content .= "if $token\n"; $i++; } -- cgit v1.2.3