From 0e5121ee57f7581640e3899c2249e1d6ac4a59d7 Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 15 Apr 2015 13:33:27 +0200 Subject: [PATCH] improved x-original-to suppression --- webui/model/search/message.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webui/model/search/message.php b/webui/model/search/message.php index f825a751..13712ec6 100644 --- a/webui/model/search/message.php +++ b/webui/model/search/message.php @@ -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; } @@ -190,7 +194,7 @@ class ModelSearchMessage extends Model { $has_journal = $this->remove_journal($msg); 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");