From ca29c0e9eccbfc2a0ed792eb7be4c9ec9947a0c2 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 3 Apr 2014 16:29:51 +0000 Subject: [PATCH] 2014-04-03 Miguel de Dios * include/functions_networkmap.php: fixed the PHP warning. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9717 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 4 ++++ .../include/functions_networkmap.php | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e0f49f0375..dc8b4cd0aa 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2014-04-03 Miguel de Dios + + * include/functions_networkmap.php: fixed the PHP warning. + 2014-04-03 Miguel de Dios * godmode/agentes/module_manager_editor.php, diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index 13e082f46a..de41faafc1 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -316,19 +316,19 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $modules = agents_get_modules ($agent['id_agente'], '*', $filter, true, false); if ($modules === false) $modules = array(); - + // Parse modules foreach ($modules as $key => $module) { - + if ($module['id_tipo_modulo'] != 18 && (!$l2_network || $module['id_tipo_modulo'] != 6)) { continue; } - + $node_count ++; $modules_node_ref[$module['id_agente_modulo']] = $node_count; $module['id_node'] = $node_count; $module['type'] = 'module'; - + // Try to get the interface name if (preg_match ("/_(.+)$/" , (string)$module['nombre'], $matches)) { if ($matches[1]) { @@ -354,19 +354,21 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $module_type = modules_get_agentmodule_type($id_module); if ($module_type != 18) { unset($nodes[$node_count]); - unset($orphans[$node_id]); + unset($orphans[$node_count]); unset($parents[$node_count]); } - } else { + } + else { unset($nodes[$node_count]); - unset($orphans[$node_id]); + unset($orphans[$node_count]); unset($parents[$node_count]); } - } else { + } + else { $module_type = modules_get_agentmodule_type($id_module); if ($module_type != 18) { unset($nodes[$node_count]); - unset($orphans[$node_id]); + unset($orphans[$node_count]); unset($parents[$node_count]); } }