diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 48ca5df70f..485d078697 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-11-07 Miguel de Dios + + * include/functions_api.php: fixed the validate event with the + new validation form. + 2013-11-07 Ramon Novoa * godmode/agentes/modificar_agente.php: Fixed a duplicated id. diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 5a7297ad3e..30587c2998 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -5176,10 +5176,16 @@ function api_set_validate_events($id_event, $trash1, $other, $return_type, $user $event = events_get_event ($id_event); alerts_agent_module_standby ($event['id_alert_am'], 0); - $result = events_validate_event ($id_event, false, $text); + $result = events_validate_event ($id_event, false, 1); if ($result) { - returnData('string', array('type' => 'string', 'data' => 'Correct validation')); + if (!empty($text)) { + //Set the comment for the validation + events_comment($id_event, $text); + } + + returnData('string', + array('type' => 'string', 'data' => 'Correct validation')); } else { returnError('Error in validation operation.');