mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 10:21:23 +01:00
* Mail: fix Sieve editor considers mail body rules wrongly as unconditional, if there are more than one rule
This commit is contained in:
parent
f58e2a0ace
commit
93c4f397b3
@ -173,8 +173,9 @@ class Script
|
|||||||
$rule['ctype'] = ($bits[14]??null);
|
$rule['ctype'] = ($bits[14]??null);
|
||||||
$rule['field_ctype_val'] = ($bits[15]??null);
|
$rule['field_ctype_val'] = ($bits[15]??null);
|
||||||
$rule['unconditional'] = 0;
|
$rule['unconditional'] = 0;
|
||||||
if (!$rule['from'] && !$rule['to'] && !$rule['subject'] &&
|
if ($rule['action'] && !$rule['from'] && !$rule['to'] && !$rule['subject'] &&
|
||||||
!$rule['field'] && !$rule['size'] && $rule['action']) {
|
!$rule['field'] && !$rule['size'] && !$rule['field_bodytransform'] && !$rule['ctype'])
|
||||||
|
{
|
||||||
$rule['unconditional'] = 1;
|
$rule['unconditional'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +302,7 @@ class Script
|
|||||||
}
|
}
|
||||||
$started = 0;
|
$started = 0;
|
||||||
|
|
||||||
if (!$rule['unconditional']) {
|
if (empty($rule['unconditional'])) {
|
||||||
if (!$continue) $newruletext .= "els";
|
if (!$continue) $newruletext .= "els";
|
||||||
$newruletext .= "if " . $anyall . " (";
|
$newruletext .= "if " . $anyall . " (";
|
||||||
if ($rule['from']) {
|
if ($rule['from']) {
|
||||||
@ -388,7 +389,7 @@ class Script
|
|||||||
|
|
||||||
// actions
|
// actions
|
||||||
|
|
||||||
if (!$rule['unconditional']) $newruletext .= ") {\n\t";
|
if (empty($rule['unconditional'])) $newruletext .= ") {\n\t";
|
||||||
|
|
||||||
if (preg_match("/folder/i",$rule['action'])) {
|
if (preg_match("/folder/i",$rule['action'])) {
|
||||||
$newruletext .= "fileinto \"" . ($utf7imap_fileinto ?
|
$newruletext .= "fileinto \"" . ($utf7imap_fileinto ?
|
||||||
@ -420,11 +421,11 @@ class Script
|
|||||||
{
|
{
|
||||||
$newruletext .= "\n\tset \"action\" \"$rule[action]\";";
|
$newruletext .= "\n\tset \"action\" \"$rule[action]\";";
|
||||||
}
|
}
|
||||||
if (!$rule['unconditional']) $newruletext .= "\n}";
|
if (empty($rule['unconditional'])) $newruletext .= "\n}";
|
||||||
|
|
||||||
$continue = 0;
|
$continue = 0;
|
||||||
if ($rule['continue']) $continue = 1;
|
if ($rule['continue']) $continue = 1;
|
||||||
if ($rule['unconditional']) $continue = 1;
|
if (!empty($rule['unconditional'])) $continue = 1;
|
||||||
|
|
||||||
$newscriptbody .= $newruletext . "\n\n";
|
$newscriptbody .= $newruletext . "\n\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user