Merge branch 'ent-4713-Revisar-funcion-groups-get-id-recursive' into 'develop'
fix minor bug in function groups_get_id_recursive See merge request artica/pandorafms!2842
This commit is contained in:
commit
e9de1df431
|
@ -1061,11 +1061,11 @@ function agents_get_group_agents(
|
|||
foreach ($id_group as $parent) {
|
||||
$id_group = array_merge(
|
||||
$id_group,
|
||||
groups_get_id_recursive($parent, true)
|
||||
groups_get_id_recursive($parent, false)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$id_group = groups_get_id_recursive($id_group, true);
|
||||
$id_group = groups_get_id_recursive($id_group, false);
|
||||
}
|
||||
|
||||
// Check available groups for target user only if asking for 'All' group.
|
||||
|
|
|
@ -550,7 +550,7 @@ function groups_get_id_recursive($id_parent, $all=false)
|
|||
// Check propagate
|
||||
$propagate = db_get_value_filter('propagate', 'tgrupo', ['id_grupo' => $id_parent]);
|
||||
|
||||
if (($propagate != 1) || $all) {
|
||||
if (($propagate == 1) || $all) {
|
||||
$children = db_get_all_rows_filter('tgrupo', ['parent' => $id_parent, 'disabled' => 0], ['id_grupo']);
|
||||
|
||||
if ($children === false) {
|
||||
|
|
Loading…
Reference in New Issue