mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Fixed errors in networkmaps
This commit is contained in:
parent
5ffa30e033
commit
2d2ffeddc0
@ -409,7 +409,7 @@ function networkmap_clean_relations_for_js(&$relations) {
|
|||||||
|
|
||||||
foreach ($relations as $key => $relation) {
|
foreach ($relations as $key => $relation) {
|
||||||
if ($relation['id_parent_source_data'] == $relation['id_child_source_data']) {
|
if ($relation['id_parent_source_data'] == $relation['id_child_source_data']) {
|
||||||
if (($relation['id_parent_source_data'] != -2) && $relation['id_child_source_data'] != -2) {
|
if (($relation['child_type'] != 3) && $relation['parent_type'] != 3) {
|
||||||
$cleaned = false;
|
$cleaned = false;
|
||||||
|
|
||||||
if ($relation['parent_type'] == 1) {
|
if ($relation['parent_type'] == 1) {
|
||||||
@ -567,6 +567,12 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
|||||||
else {
|
else {
|
||||||
$agent = $relation['id_parent_source_data'];
|
$agent = $relation['id_parent_source_data'];
|
||||||
$agent2 = $relation['id_child_source_data'];
|
$agent2 = $relation['id_child_source_data'];
|
||||||
|
if ($agent == 0) {
|
||||||
|
$agent = -1;
|
||||||
|
}
|
||||||
|
if ($agent2 == 0) {
|
||||||
|
$agent = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($nodes_graph as $node) {
|
foreach ($nodes_graph as $node) {
|
||||||
@ -590,7 +596,6 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
|||||||
|
|
||||||
$return[] = $item;
|
$return[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user