Skip to content

Commit

Permalink
fix: search for e-mails does not break with a leading at-sign (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabfischer authored Jul 19, 2024
1 parent 8e8d4fc commit 7999ef4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Controller/Admin/EmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down

0 comments on commit 7999ef4

Please sign in to comment.