From 28b585196b08339137f7a29d58aaf1fc353ec90a Mon Sep 17 00:00:00 2001
From: Tatiana Llorente <tatiana.llorente@artica.es>
Date: Wed, 15 Jan 2020 14:11:36 +0100
Subject: [PATCH] Ent 5099 dobles interfaces en mapas de red no se visualizan

---
 pandora_console/include/class/NetworkMap.class.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php
index b28b43f502..43fb9138c7 100644
--- a/pandora_console/include/class/NetworkMap.class.php
+++ b/pandora_console/include/class/NetworkMap.class.php
@@ -1340,6 +1340,10 @@ class NetworkMap
                 if ($rel['parent_type'] == NODE_MODULE
                     && $rel['child_type'] == NODE_MODULE
                 ) {
+                    // Keep std references.
+                    $ref_id_parent = $id_parent;
+                    $ref_id_child = $id_child;
+
                     // Module information available.
                     $id_parent = $rel['id_parent_source_data'];
                     $id_child = $rel['id_child_source_data'];
@@ -1374,6 +1378,12 @@ class NetworkMap
                             'index'    => $index,
                             'priority' => $priority,
                         ];
+
+                        // Keep node reference mapping - low precedence relationship.
+                        $rel_map[$ref_id_parent.'_'.$ref_id_child] = [
+                            'index'    => $index,
+                            'priority' => $priority,
+                        ];
                     }
                 } else if ($rel['parent_type'] == NODE_AGENT
                     && $rel['child_type'] == NODE_AGENT