Fix issue with metaconsole comments

This commit is contained in:
Jose Gonzalez 2021-11-26 11:51:27 +01:00
parent b151b3996d
commit 5eb4a869cc

View File

@ -128,11 +128,13 @@ if ($get_comments === true) {
} else { } else {
// Consider if the event is grouped. // Consider if the event is grouped.
if (isset($event['event_rep']) === true && $event['event_rep'] > 0) { if (isset($event['event_rep']) === true && $event['event_rep'] > 0) {
$eventTable = (is_metaconsole() === true) ? 'tmetaconsole_event' : 'tevento';
$eventsGrouped = db_get_all_rows_sql( $eventsGrouped = db_get_all_rows_sql(
sprintf( sprintf(
'SELECT `user_comment` 'SELECT `user_comment`
FROM `tevento` FROM `%s`
WHERE `evento` = "%s"', WHERE `evento` = "%s"',
$eventTable,
io_safe_output($event['evento']) io_safe_output($event['evento'])
) )
); );
@ -140,7 +142,7 @@ if ($get_comments === true) {
$events = events_get_event( $events = events_get_event(
$event['id_evento'], $event['id_evento'],
false, false,
$meta, is_metaconsole(),
$history $history
); );