Cleaned source code style. (only for test git)
This commit is contained in:
parent
43d06f96b7
commit
03adf3f9d6
|
@ -1625,16 +1625,17 @@ function groups_get_tree(&$groups, $parent = false) {
|
||||||
|
|
||||||
function groups_get_all_hierarchy_group ($id_group, $hierarchy = array()) {
|
function groups_get_all_hierarchy_group ($id_group, $hierarchy = array()) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if ($id_group == 0) {
|
if ($id_group == 0) {
|
||||||
$hierarchy = groups_get_childrens($id_group);
|
$hierarchy = groups_get_childrens($id_group);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$hierarchy[] = $id_group;
|
$hierarchy[] = $id_group;
|
||||||
$parent = db_get_value('parent','tgrupo','id_grupo',$id_group);
|
$parent = db_get_value('parent','tgrupo','id_grupo',$id_group);
|
||||||
|
|
||||||
if ($parent !== 0) {
|
if ($parent !== 0) {
|
||||||
$propagate = db_get_value('propagate','tgrupo','id_grupo',$parent);
|
$propagate = db_get_value('propagate','tgrupo','id_grupo',$parent);
|
||||||
|
|
||||||
if ($propagate == 1) {
|
if ($propagate == 1) {
|
||||||
//$childrens_ids_parent = array($parent);
|
//$childrens_ids_parent = array($parent);
|
||||||
$hierarchy[] = $parent;
|
$hierarchy[] = $parent;
|
||||||
|
@ -1645,7 +1646,7 @@ function groups_get_all_hierarchy_group ($id_group, $hierarchy = array()) {
|
||||||
$hierarchy[] = (int)$child['id_grupo'];
|
$hierarchy[] = (int)$child['id_grupo'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$hierarchy = groups_get_all_hierarchy_group ($parent, $hierarchy);
|
$hierarchy = groups_get_all_hierarchy_group ($parent, $hierarchy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue