From d515e510f3a6bc0d7c1e588e486cd7d3931c5931 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 21 Aug 2019 13:38:53 +0200 Subject: [PATCH 1/3] Fixed bug in custom unit #4166 --- pandora_console/godmode/agentes/configurar_agente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 842f6c3d46..82898832fe 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1382,7 +1382,7 @@ if ($update_module || $create_module) { $each_ff = (int) get_parameter('each_ff'); $ff_timeout = (int) get_parameter('ff_timeout'); $unit = (string) get_parameter('unit_select'); - if ($unit == 'none') { + if ($unit == 'none' || $unit == '') { $unit = (string) get_parameter('unit_text'); } From b444be87b4014a9b0b781768babe880f661c05f4 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 21 Aug 2019 14:46:58 +0200 Subject: [PATCH 2/3] Fixed bug in custom unit #4166 --- pandora_console/godmode/agentes/configurar_agente.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 82898832fe..99b5a68446 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1381,11 +1381,7 @@ if ($update_module || $create_module) { $ff_type = (int) get_parameter('ff_type'); $each_ff = (int) get_parameter('each_ff'); $ff_timeout = (int) get_parameter('ff_timeout'); - $unit = (string) get_parameter('unit_select'); - if ($unit == 'none' || $unit == '') { - $unit = (string) get_parameter('unit_text'); - } - + $unit = (string) get_parameter('unit'); $id_tag = (array) get_parameter('id_tag_selected'); $serialize_ops = (string) get_parameter('serialize_ops'); $critical_instructions = (string) get_parameter('critical_instructions'); From d38f1f8aec1fb5b7a3902fd68e95be47416f5a8e Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Tue, 27 Aug 2019 12:21:00 +0200 Subject: [PATCH 3/3] Fixed bug in unit in massive operations - #4166 --- pandora_console/godmode/massive/massive_edit_modules.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index f52707cb2a..013aa83498 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -1930,11 +1930,7 @@ function process_manage_edit($module_name, $agents_select=null, $module_status=' case 'unit_select': if ($value != -1) { - if ($value == 'none') { - $values['unit'] = (string) get_parameter('unit_text'); - } else { - $values['unit'] = $value; - } + $values['unit'] = (string) get_parameter('unit'); } break;