Fixed problems with 'Discard unknown events' Ticket: #4242

(cherry picked from commit 07b92fd38a)
This commit is contained in:
m-lopez-f 2016-11-28 13:02:17 +01:00
parent 2391e7ae78
commit 0763f09cc3
5 changed files with 6 additions and 6 deletions

View File

@ -1022,7 +1022,7 @@ if ($update_module || $create_module) {
$throw_unknown_events = (bool)get_parameter('throw_unknown_events', false);
//Set the event type that can show.
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
$disabled_types_event = io_json_mb_encode($disabled_types_event);
$module_macro_names = (array) get_parameter('module_macro_names', array());

View File

@ -30,7 +30,7 @@ if (is_ajax ()) {
$component = db_get_row ('tnetwork_component', 'id_nc', $id_component);
$component['throw_unknown_events'] =
!network_components_is_disable_type_event($id_component, EVENTS_GOING_UNKNOWN);
network_components_is_disable_type_event($id_component, EVENTS_GOING_UNKNOWN);
// Decrypt passwords in the component.
$component['plugin_pass'] = io_output_password($component['plugin_pass']);

View File

@ -419,13 +419,13 @@ $table_advanced->colspan[4][1] = 2;
// Code comes from module_editor
if ($__code_from == 'modules') {
$throw_unknown_events_check =
!modules_is_disable_type_event($id_agent_module, EVENTS_GOING_UNKNOWN);
modules_is_disable_type_event($id_agent_module, EVENTS_GOING_UNKNOWN);
}
else {
global $__id_pol_mod;
$throw_unknown_events_check =
!policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
}
$table_advanced->data[4][3] = __('Throw unknown events');
$table_advanced->data[4][4] = html_print_checkbox('throw_unknown_events',

View File

@ -1110,7 +1110,7 @@ function process_manage_edit ($module_name, $agents_select = null) {
if ($throw_unknown_events !== '') {
//Set the event type that can show.
$disabled_types_event = array(
EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
$values['disabled_types_event'] = json_encode($disabled_types_event);
}

View File

@ -139,7 +139,7 @@ $snmp3_security_level = (string) get_parameter('snmp3_security_level');
$throw_unknown_events = get_parameter('throw_unknown_events', false);
//Set the event type that can show.
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
$disabled_types_event = json_encode($disabled_types_event);
$create_component = (bool) get_parameter ('create_component');