Commit c44c12ff authored by Michael Fürmann's avatar Michael Fürmann

Handle new filter source type "Detail"

parent 5f532fce
......@@ -148,17 +148,20 @@ class mail_user_filter_plugin {
}
$content .= 'if size :over '.intval($page_form->dataRecord["searchterm"]).$unit.' {'."\n";
} else {
if($page_form->dataRecord["source"] == 'Header') {
$parts = explode(':',trim($page_form->dataRecord["searchterm"]));
$page_form->dataRecord["source"] = trim($parts[0]);
unset($parts[0]);
$page_form->dataRecord["searchterm"] = trim(implode(':',$parts));
unset($parts);
if($page_form->dataRecord["source"] == 'Detail') {
$content .= 'if envelope :detail :regex "to" ["';
} else {
if($page_form->dataRecord["source"] == 'Header') {
$parts = explode(':',trim($page_form->dataRecord["searchterm"]));
$page_form->dataRecord["source"] = trim($parts[0]);
unset($parts[0]);
$page_form->dataRecord["searchterm"] = trim(implode(':',$parts));
unset($parts);
}
$content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["';
}
$content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["';
$searchterm = preg_quote($page_form->dataRecord["searchterm"]);
$searchterm = str_replace(
array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment