From 23f9866a1c942f53dc8afad786f7a3aa0bc5b6c7 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Thu, 4 Apr 2024 20:27:43 +0200 Subject: [PATCH] #13322 fixed filter comment --- pandora_console/include/functions_events.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 2353279c65..eccf056ec1 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1228,13 +1228,14 @@ function events_get_all( // User comment. $event_comment_join = ''; if (empty($filter['user_comment']) === false) { - $event_comment_join = 'INNER JOIN tevent_comment ON te.id_evento = tevent_comment.id_event'; - $sql_filters[] = sprintf( + $event_comment_join = 'INNER JOIN tevent_comment ON te.id_evento = tevent_comment.id_event '; + $sql_filter_comment = sprintf( ' AND (lower(tevent_comment.comment) like lower("%%%s%%") OR lower(tevent_comment.comment) like lower("%%%s%%"))', io_safe_input($filter['user_comment']), $filter['user_comment'] ); + $event_comment_join .= $sql_filter_comment; } // Source.