#8766 Fixed event comments
This commit is contained in:
parent
ad957c5a72
commit
4a6ab6ce95
|
@ -136,7 +136,7 @@ if ($get_comments === true) {
|
||||||
// Default grouped message filtering (evento and estado).
|
// Default grouped message filtering (evento and estado).
|
||||||
$whereGrouped = sprintf(
|
$whereGrouped = sprintf(
|
||||||
'`evento` = "%s" AND `estado` = "%s"',
|
'`evento` = "%s" AND `estado` = "%s"',
|
||||||
io_safe_output($event['evento']),
|
$event['evento'],
|
||||||
$event['estado']
|
$event['estado']
|
||||||
);
|
);
|
||||||
// If id_agente is reported, filter the messages by them as well.
|
// If id_agente is reported, filter the messages by them as well.
|
||||||
|
|
|
@ -2299,6 +2299,7 @@ function events_comment(
|
||||||
$comments_format = 'new';
|
$comments_format = 'new';
|
||||||
} else {
|
} else {
|
||||||
// If comments are not stored in json, the format is old.
|
// If comments are not stored in json, the format is old.
|
||||||
|
$event_comments[0]['user_comment'] = str_replace(["\n", '
'], '<br>', $event_comments[0]['user_comment']);
|
||||||
$event_comments_array = json_decode($event_comments[0]['user_comment']);
|
$event_comments_array = json_decode($event_comments[0]['user_comment']);
|
||||||
|
|
||||||
if (empty($event_comments_array) === true) {
|
if (empty($event_comments_array) === true) {
|
||||||
|
@ -5229,6 +5230,8 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
|
||||||
$comm = $comm['user_comment'];
|
$comm = $comm['user_comment'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$comm = str_replace(["\n", '
'], '<br>', $comm);
|
||||||
|
|
||||||
$comments_array[] = io_safe_output(json_decode($comm, true));
|
$comments_array[] = io_safe_output(json_decode($comm, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue