fixed error with special charact filter in user commens

This commit is contained in:
Marcos Alconada 2021-04-27 11:46:16 +00:00 committed by Daniel Rodriguez
parent d9a63c4682
commit 177be1f1a4
1 changed files with 7 additions and 0 deletions

View File

@ -1092,8 +1092,15 @@ function events_get_all(
// User comment.
if (!empty($filter['user_comment'])) {
// For filter field.
$sql_filters[] = sprintf(
' AND lower(te.user_comment) like lower("%%%s%%") ',
io_safe_input($filter['user_comment'])
);
// For show comments on event details.
$sql_filters[] = sprintf(
' OR lower(te.user_comment) like lower("%%%s%%") ',
$filter['user_comment']
);
}