mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
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) {
|
foreach ($id_group as $parent) {
|
||||||
$id_group = array_merge(
|
$id_group = array_merge(
|
||||||
$id_group,
|
$id_group,
|
||||||
groups_get_id_recursive($parent, true)
|
groups_get_id_recursive($parent, false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} 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.
|
// 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
|
// Check propagate
|
||||||
$propagate = db_get_value_filter('propagate', 'tgrupo', ['id_grupo' => $id_parent]);
|
$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']);
|
$children = db_get_all_rows_filter('tgrupo', ['parent' => $id_parent, 'disabled' => 0], ['id_grupo']);
|
||||||
|
|
||||||
if ($children === false) {
|
if ($children === false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user