mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
13562-Fix duplicate column id_grupo in events_get_all()
This commit is contained in:
parent
aa00fe6a22
commit
4a20bdb2fd
@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user