[ingo] [patch]: Sieve scripts produce only :is condition
Ahmed
ashihab at alcahest.com
Thu Jun 12 05:42:40 PDT 2003
A small problem with Ingo HEAD as of 13:00 BST.
When creating a rule which has for example, Subject Contains from the rule
list, the generated script has
if header :comparator "i;octet" :is "Subject" "SPAM" {
instead of
if header :comparator "i;octet" :contains "Subject" "SPAM" {
This patch corrects this problem and other conditions of similar
comparisons.
file affected: ingo/lib/Script/sieve.php
Ahmed...
-------------- next part --------------
*** sieve.php Thu Jun 12 13:36:02 2003
--- sieve.php.new Thu Jun 12 13:37:15 2003
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 372,375 ****
--- 372,376 ----
case 'contains':
$vals['match-type'] = ':contains';
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest($tmp);
break;
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 377,380 ****
--- 378,382 ----
case 'not contain':
$vals['match-type'] = ':contains';
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest(new Sieve_Test_Not($tmp));
break;
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 382,385 ****
--- 384,388 ----
case 'is':
$vals['match-type'] = ':is';
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest($tmp);
break;
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 387,390 ****
--- 390,394 ----
case 'not is':
$vals['match-type'] = ':is';
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest(new Sieve_Test_Not($tmp));
break;
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 393,396 ****
--- 397,401 ----
$vals['match-type'] = ':matches';
$vals['strings'] .= '*';
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest($tmp);
break;
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 399,402 ****
--- 404,408 ----
$vals['match-type'] = ':matches';
$vals['strings'] .= '*';
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest(new Sieve_Test_Not($tmp));
break;
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 405,408 ****
--- 411,415 ----
$vals['match-type'] = ':matches';
$vals['strings'] = '*' . $vals['strings'];
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest($tmp);
break;
*************** class Ingo_Script_sieve extends Ingo_Scr
*** 411,414 ****
--- 418,422 ----
$vals['match-type'] = ':matches';
$vals['strings'] = '*' . $vals['strings'];
+ $tmp = &new Sieve_Test_Header($vals);
$test->addTest(new Sieve_Test_Not($tmp));
break;
More information about the ingo
mailing list