From e4e97fc8afc4648dc56190e0d05909e22393627f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 1 Aug 2018 14:52:56 +0200 Subject: [PATCH] Minor fix vconsole templates --- pandora_console/include/functions_visual_map.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index b62d3b4dba..d5aef69f7e 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -4168,7 +4168,11 @@ function visual_map_instanciate_template($id_layout_template, $name, $id_agent) return false; } - $template["name"] = $name; + if (!empty($name)) { + $template["name"] = $name; + } else { + $template["name"] .= io_safe_input(' ') . agents_get_alias($id_agent); + } unset($template["id"]); @@ -4178,8 +4182,8 @@ function visual_map_instanciate_template($id_layout_template, $name, $id_agent) foreach ($template_data as $item) { // update fields - $item["id_agente_modulo"] = modules_get_agentmodule_id($agent_id, $item["module_name"]); - $item["id_agent"] = $agent_id; + $item["id_agente_modulo"] = modules_get_agentmodule_id($item["module_name"], $id_agent); + $item["id_agent"] = $id_agent; $item["id_layout"] = $layout_id; // remove useless fields