Merge branch 'ent-13562-campo-id_grupo-duplicado-en-tactical-view-con-perfil-chief-operator' into 'develop'

Ent 13562 campo id grupo duplicado en tactical view con perfil chief operator

See merge request artica/pandorafms!7212
This commit is contained in:
Juan Antonio Loarte 2024-04-16 14:21:15 +00:00
commit 87a3e9bdff
1 changed files with 9 additions and 2 deletions

View File

@ -1675,8 +1675,15 @@ function events_get_all(
}
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
if (str_contains($fields[0], 'te.id_grupo') === false) {
$fields[0] .= ', te.id_grupo';
$exists_id_grupo = false;
foreach ($fields as $field) {
if (str_contains($field, 'te.id_grupo') === true || str_contains($field, 'te.*') === true) {
$exists_id_grupo = true;
}
}
if ($exists_id_grupo === false) {
$fields[] = 'te.id_grupo';
}
}