improved x-original-to suppression

This commit is contained in:
SJ 2015-04-15 13:33:27 +02:00
parent 6e8c3e5cda
commit 0e5121ee57

View File

@ -137,6 +137,10 @@ class ModelSearchMessage extends Model {
} }
if(Registry::get('auditor_user') == 0 && HEADER_LINE_TO_HIDE) {
$s = preg_replace("/" . HEADER_LINE_TO_HIDE . ".{1,}(\n(\ |\t){1,}.{1,}){0,}" . "\n/i", "", $s);
}
return $s; return $s;
} }
@ -190,7 +194,7 @@ class ModelSearchMessage extends Model {
$has_journal = $this->remove_journal($msg); $has_journal = $this->remove_journal($msg);
if(Registry::get('auditor_user') == 0 && HEADER_LINE_TO_HIDE) { if(Registry::get('auditor_user') == 0 && HEADER_LINE_TO_HIDE) {
$msg = preg_replace("/" . HEADER_LINE_TO_HIDE . ".{1,}\n/i", "", $msg); $msg = preg_replace("/" . HEADER_LINE_TO_HIDE . ".{1,}(\n(\ |\t){1,}.{1,}){0,}" . "\n/i", "", $msg);
} }
$pos = strpos($msg, "\n\r\n"); $pos = strpos($msg, "\n\r\n");