fixes in event comments

This commit is contained in:
alejandro.campos@artica.es 2023-03-09 17:17:54 +01:00
parent 857c84f034
commit 5148dcdaef
2 changed files with 4 additions and 5 deletions

View File

@ -91,9 +91,8 @@ $node_id = (int) get_parameter('node_id', 0);
if ($get_comments === true) {
$event = get_parameter('event', false);
$event_rep = (int) get_parameter('event_rep', 0);
$event_rep = get_parameter_post('event')['event_rep'];
$group_rep = get_parameter_post('event')['group_rep'];
$event_rep = (int) get_parameter_post('event')['event_rep'];
$group_rep = (int) get_parameter_post('event')['group_rep'];
if ($event === false) {
return __('Failed to retrieve comments');
@ -126,7 +125,7 @@ if ($get_comments === true) {
} else if ($group_rep === EVENT_GROUP_REP_EXTRAIDS) {
$whereGrouped = sprintf(
'`id_extra` = "%s"',
$event['id_extra']
io_safe_output($event['id_extra'])
);
} else {
$whereGrouped = sprintf('`id_evento` = %d', $event['id_evento']);

View File

@ -5172,7 +5172,7 @@ function events_page_comments($event, $ajax=false, $groupedComments=[])
__('Add comment'),
'comment_button',
false,
'event_comment(\''.base64_encode(json_encode($event)).'\');',
'event_comment("'.base64_encode(json_encode($event)).'");',
[
'icon' => 'next',
'mode' => 'mini secondary',