diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 3b74ef3529..c6e35793c1 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -719,8 +719,7 @@ if ($update_agent) { // if modified some agent paramenter $direccion_agente = agents_delete_address($id_agente, $delete_ip); } - $result = db_process_sql_update ('tagente', - array ('disabled' => $disabled, + $values = array ('disabled' => $disabled, 'id_parent' => $id_parent, 'id_os' => $id_os, 'modo' => $modo, @@ -735,9 +734,14 @@ if ($update_agent) { // if modified some agent paramenter 'icon_path' => $icon_path, 'update_gis_data' => $update_gis_data, 'url_address' => $url_description, - 'quiet' => $quiet), - array ('id_agente' => $id_agente)); - + 'url_address' => $url_description, + 'quiet' => $quiet); + + if ($config['metaconsole_agent_cache'] == 1) { + $values['update_module_count'] = 1; // Force an update of the agent cache. + } + + $result = db_process_sql_update ('tagente', $values, array ('id_agente' => $id_agente)); if ($result === false) { ui_print_error_message( __('There was a problem updating the agent')); diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index c4dd23b7e5..241df62b88 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -133,6 +133,10 @@ if ($update_agents) { $result = false; foreach ($id_agents as $id_agent) { if (!empty($values)) { + if ($config['metaconsole_agent_cache'] == 1 && + isset($values['id_grupo'])) { + $values['update_module_count'] = 1; // Force an update of the agent cache. + } $result = db_process_sql_update ('tagente', $values, array ('id_agente' => $id_agent));