Merge branch 'ent-13013-17205-no-se-muestran-el-numero-de-elementos-duplicados-en-los-detalles-de-evento' into 'develop'

Ent 13013 17205 no se muestran el numero de elementos duplicados en los detalles de evento

See merge request artica/pandorafms!7361
This commit is contained in:
Matias Didier 2024-05-17 07:10:31 +00:00
commit 874aa23a49
2 changed files with 17 additions and 8 deletions

View File

@ -1962,7 +1962,7 @@ if ($get_extended_event) {
metaconsole_restore_db();
}
$general = events_page_general($event);
$general = events_page_general($event, $filter);
$comments = '<div id="extended_event_comments_page" class="extended_event_pages"></div>';

View File

@ -4978,7 +4978,7 @@ function events_display_instructions($event_type='', $inst=[], $italic=true, $ev
*
* @return string HTML.
*/
function events_page_general($event)
function events_page_general($event, $filter=[])
{
global $img_sev;
global $config;
@ -5081,14 +5081,23 @@ function events_page_general($event)
$data = [];
$data[0] = __('Repeated');
if ($group_rep != 0) {
if ($event['event_rep'] <= 1) {
$data[1] = '<i>'.__('No').'</i>';
} else {
$data[1] = sprintf('%d Times', $event['event_rep']);
// Ticket 13013 This was done on purpose.
if ((int) $event['group_rep'] === EVENT_GROUP_REP_EXTRAIDS) {
$counter_extra_id = event_get_counter_extraId($event, $filter);
if (empty($counter_extra_id) === false && $counter_extra_id > 1) {
$data[1] = sprintf('%d Times', $counter_extra_id);
}
} else {
$data[1] = '<i>'.__('No').'</i>';
if ($group_rep != 0) {
if ($event['event_rep'] <= 1) {
$data[1] = '<i>'.__('No').'</i>';
} else {
$data[1] = sprintf('%d Times', $event['event_rep']);
}
} else {
$data[1] = '<i>'.__('No').'</i>';
}
}
$table_general->data[] = $data;