From 32fa032faaa5931cf16ee548ba52e3af5c823678 Mon Sep 17 00:00:00 2001 From: danielmaya Date: Wed, 14 Feb 2018 12:41:32 +0100 Subject: [PATCH] Fixed unit in bulk operations --- .../godmode/massive/massive_edit_modules.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index db07eee465..9d7dee0ec8 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -568,7 +568,7 @@ foreach ($targets2 as $t) { $table->data['edit6'][1] = html_print_select ($targets, 'id_export', '','', __('No change'), '', true, false, false); $table->data['edit6'][2] = __('Unit'); -$table->data['edit6'][3] = html_print_extended_select_for_unit('unit','', '', '', '0', '15', true, false, false); +$table->data['edit6'][3] = html_print_extended_select_for_unit('unit','-1', '', '', '0', '15', true, false, false, false , 1); /* FF stands for Flip-flop */ @@ -1221,7 +1221,7 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu /* List of fields which can be updated */ $fields = array ('dynamic_interval', 'dynamic_max', 'dynamic_min', 'dynamic_two_tailed', 'min_warning', 'max_warning', 'str_warning', 'min_critical', 'max_critical', 'str_critical', 'min_ff_event', - 'module_interval', 'disabled', 'post_process', 'unit', + 'module_interval', 'disabled', 'post_process', 'unit_select', 'snmp_community','snmp_oid','tcp_send', 'custom_string_1', 'plugin_parameter', 'custom_string_2', 'custom_string_3', 'min', 'max', 'id_module_group', 'plugin_user', 'plugin_pass', @@ -1254,10 +1254,12 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu } break; case 'unit_select': - if($value == "none"){ - $values['unit'] = (string) get_parameter('unit_text'); - } else { - $values['unit'] = $value; + if($value != -1){ + if($value == "none"){ + $values['unit'] = (string) get_parameter('unit_text'); + } else { + $values['unit'] = $value; + } } break; default: