From cfc7050bab4d01124bb7f04f631bc10613b72329 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 30 Jun 2017 14:18:23 +0200 Subject: [PATCH] Fixed post process in Edit modules in bulk --- pandora_console/godmode/massive/massive_edit_modules.php | 7 ++++++- pandora_console/include/functions_html.php | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index d18c6bafa0..f26c1a0c0a 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -496,7 +496,7 @@ $table->data['edit3'][0] = __('Post process') . ui_print_help_icon ('postprocess', true); $table->data['edit3'][1] = html_print_extended_select_for_post_process('post_process', - 0, '', 0, '', false, true, 'width:150px;', true); + -1, '','', 0, false, true, 'width:150px;', true, false, 1); $table->data['edit3'][2] = __('SMNP community'); $table->data['edit3'][3] = html_print_input_text ('snmp_community', '', @@ -1153,6 +1153,11 @@ function process_manage_edit ($module_name, $agents_select = null) { $values['plugin_pass'] = io_input_password($value); } break; + case 'post_process': + if($value !== '-1'){ + $values['post_process'] = $value; + } + break; default: if ($value != '') { $values[$field] = $value; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index d868f68f48..e7836a358c 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -609,7 +609,7 @@ function html_print_select_from_sql ($sql, $name, $selected = '', function html_print_extended_select_for_post_process($name, $selected = '', $script = '', $nothing = '', $nothing_value = '0', $size = false, $return = false, $select_style = false, $unique_name = true, - $disabled = false) { + $disabled = false, $no_change = 0) { global $config; @@ -617,6 +617,10 @@ function html_print_extended_select_for_post_process($name, $selected = '', $fields = post_process_get_custom_values(); + if($no_change != 0){ + $fields[-1] = __('No change'); + } + $selected_float = (float)$selected; $found = false;