From 7999ef435d84f133d469539b5664c6b1d65c176e Mon Sep 17 00:00:00 2001 From: fabfischer Date: Fri, 19 Jul 2024 11:53:40 +0200 Subject: [PATCH] fix: search for e-mails does not break with a leading at-sign (#618) --- src/Controller/Admin/EmailController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Controller/Admin/EmailController.php b/src/Controller/Admin/EmailController.php index 37257978a6..1d67bb606d 100644 --- a/src/Controller/Admin/EmailController.php +++ b/src/Controller/Admin/EmailController.php @@ -76,6 +76,10 @@ public function emailLogsAction(Request $request): JsonResponse $filterTerm = implode(' ', $parts); } + if (str_starts_with($filterTerm, '@')) { + $filterTerm = str_replace('@', '', $filterTerm); + } + $condition = '( MATCH (`from`,`to`,`cc`,`bcc`,`subject`,`params`) AGAINST (' . $list->quote($filterTerm) . ' IN BOOLEAN MODE) )'; if ($request->get('documentId')) {