Merge branch 'ent-7368-filtro-de-comentarios-de-eventos' into 'develop'

fixed error with special charact filter in user commens

See merge request artica/pandorafms!4056
This commit is contained in:
Daniel Rodriguez 2021-04-27 11:46:16 +00:00
commit 00b1596c4f
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']
);
}