mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
minor fix orphans while no pandora node
Former-commit-id: a9f053624ba5c38a08c3589689d4a56cfcfcff37
This commit is contained in:
parent
0d301cd8ed
commit
80ecb58f8f
@ -1976,7 +1976,11 @@ class NetworkMap
|
|||||||
$target = $this->calculateRelations($k);
|
$target = $this->calculateRelations($k);
|
||||||
|
|
||||||
// Adopt all orphan nodes but pandora one.
|
// Adopt all orphan nodes but pandora one.
|
||||||
if (empty($target) && $item['id_node'] != 0) {
|
if (empty($target)) {
|
||||||
|
if (isset($this->noPandoraNode) === false
|
||||||
|
|| $this->noPandoraNode == false
|
||||||
|
) {
|
||||||
|
if ($item['id_node'] != 0) {
|
||||||
$rel = [];
|
$rel = [];
|
||||||
$rel['id_parent'] = 0;
|
$rel['id_parent'] = 0;
|
||||||
$rel['id_child'] = $item['id_node'];
|
$rel['id_child'] = $item['id_node'];
|
||||||
@ -1985,6 +1989,8 @@ class NetworkMap
|
|||||||
$rel['id_child_source_data'] = $item['id_source_data'];
|
$rel['id_child_source_data'] = $item['id_source_data'];
|
||||||
|
|
||||||
$orphans[] = $rel;
|
$orphans[] = $rel;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Flattern edges.
|
// Flattern edges.
|
||||||
foreach ($target as $rel) {
|
foreach ($target as $rel) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user