From cf108c0a17d067b95f32b898eeee75445ec87eee Mon Sep 17 00:00:00 2001 From: marcos Date: Thu, 29 Oct 2020 12:30:54 +0100 Subject: [PATCH] se cambia el valor del modulo y marca en el filtro usado --- pandora_console/include/ajax/events.php | 6 +++--- pandora_console/operation/events/events.php | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 98a965b5f3..dc3759d9c1 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -356,7 +356,7 @@ if ($get_filter_values) { 'filter_id' => 0, ]; } else { - $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => 9])); + $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => $event_filter['id_agent_module']])); $a = array_keys(users_get_groups(false)); $event_filter['group_name'] = ''; foreach ($a as $key => $value) { @@ -365,7 +365,7 @@ if ($get_filter_values) { } } - $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => 9])); + $event_filter['module_search'] = io_safe_output(db_get_value_filter('nombre', 'tagente_modulo', ['id_agente_modulo' => $event_filter['id_agent_module']])); } $event_filter['search'] = io_safe_output($event_filter['search']); @@ -385,7 +385,7 @@ if ($get_filter_values) { } if ($load_filter_modal) { - $current = get_parameter('current_filter', ''); + $current = db_get_value_filter('default_event_filter', 'tusuario', ['id_user' => $config['id_user']]); $filters = events_get_event_filter_select(); $user_groups_array = users_get_groups_for_select( $config['id_user'], diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index ca323cc263..fcf8a5bb36 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -2328,9 +2328,8 @@ $(document).ready( function() { url: '', data: { page: 'include/ajax/events', - load_filter_modal: 1, - current_filter: $('#latest_filter_id').val() - }, + load_filter_modal: 1 + }, success: function (data){ $('#load-modal-filter') .empty()