#10899 remove entities from inventory custom fields
This commit is contained in:
parent
f6be23c353
commit
726ab896f1
|
@ -46,7 +46,7 @@ $custom_fields = array_map(
|
||||||
function ($field) {
|
function ($field) {
|
||||||
$field['secure'] = (bool) $field['secure'];
|
$field['secure'] = (bool) $field['secure'];
|
||||||
if ($field['secure']) {
|
if ($field['secure']) {
|
||||||
$field['value'] = io_input_password($field['value']);
|
$field['value'] = io_input_password(io_safe_output($field['value']));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $field;
|
return $field;
|
||||||
|
@ -119,7 +119,7 @@ if ($add_inventory_module) {
|
||||||
'interval' => $interval,
|
'interval' => $interval,
|
||||||
'username' => $username,
|
'username' => $username,
|
||||||
'password' => $password,
|
'password' => $password,
|
||||||
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields), JSON_UNESCAPED_UNICODE)) : '',
|
'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields, true), JSON_UNESCAPED_UNICODE)) : '',
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = db_process_sql_update('tagent_module_inventory', $values, ['id_agent_module_inventory' => $id_agent_module_inventory, 'id_agente' => $id_agente]);
|
$result = db_process_sql_update('tagent_module_inventory', $values, ['id_agent_module_inventory' => $id_agent_module_inventory, 'id_agente' => $id_agente]);
|
||||||
|
|
|
@ -7577,7 +7577,7 @@ function ui_get_inventory_module_add_form(
|
||||||
if ($field['secure']) {
|
if ($field['secure']) {
|
||||||
$secure = html_print_input_password(
|
$secure = html_print_input_password(
|
||||||
'custom_fields['.$i.'][value]',
|
'custom_fields['.$i.'][value]',
|
||||||
$field['value'],
|
io_safe_input($field['value']),
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
40,
|
40,
|
||||||
|
@ -7592,7 +7592,7 @@ function ui_get_inventory_module_add_form(
|
||||||
} else {
|
} else {
|
||||||
$secure = html_print_input_text(
|
$secure = html_print_input_text(
|
||||||
'custom_fields['.$i.'][value]',
|
'custom_fields['.$i.'][value]',
|
||||||
$field['value'],
|
io_safe_input($field['value']),
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
40,
|
40,
|
||||||
|
|
Loading…
Reference in New Issue