#13322 fixed event comment filter
This commit is contained in:
parent
23f9866a1c
commit
43f8d5888c
|
@ -1228,14 +1228,15 @@ function events_get_all(
|
||||||
// User comment.
|
// User comment.
|
||||||
$event_comment_join = '';
|
$event_comment_join = '';
|
||||||
if (empty($filter['user_comment']) === false) {
|
if (empty($filter['user_comment']) === false) {
|
||||||
$event_comment_join = 'INNER JOIN tevent_comment ON te.id_evento = tevent_comment.id_event ';
|
$event_comment_join = 'INNER JOIN tevent_comment ON te.id_evento = tevent_comment.id_event';
|
||||||
$sql_filter_comment = sprintf(
|
$sql_filters[] = sprintf(
|
||||||
' AND (lower(tevent_comment.comment) like lower("%%%s%%")
|
' AND (lower(tevent_comment.comment) like lower("%%%s%%")
|
||||||
OR lower(tevent_comment.comment) like lower("%%%s%%"))',
|
OR lower(tevent_comment.comment) like lower("%%%s%%"))',
|
||||||
io_safe_input($filter['user_comment']),
|
io_safe_input($filter['user_comment']),
|
||||||
$filter['user_comment']
|
$filter['user_comment']
|
||||||
);
|
);
|
||||||
$event_comment_join .= $sql_filter_comment;
|
|
||||||
|
array_unshift($fields, 'DISTINCT te.id_evento AS distinct_event');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Source.
|
// Source.
|
||||||
|
|
Loading…
Reference in New Issue