2013-03-06 Sergio Martin <sergio.martin@artica.es>

* include/functions_alerts.php: Change the update counts 
	of fired alerts when validate to do it only when the validation
	is of a unvalidated alert. This change is to avoid broke 
	counts



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7791 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-03-06 11:49:18 +00:00
parent 0f6b1c76ba
commit 00038f7ebd
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2013-03-06 Sergio Martin <sergio.martin@artica.es>
* include/functions_alerts.php: Change the update counts
of fired alerts when validate to do it only when the validation
is of a unvalidated alert. This change is to avoid broke
counts
2013-03-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_modules.php: improved the style.

View File

@ -1177,10 +1177,11 @@ function alerts_validate_alert_agent_module ($id_alert_agent_module, $noACLs = f
'internal_counter' => 0),
array ('id' => $id));
if ($result > 0) {
// Update fired alert count on the agent
db_process_sql(sprintf('UPDATE tagente SET fired_count=fired_count-1 WHERE id_agente = %d', $agent_id));
if ($result > 0) {
events_create_event ("Manual validation of alert for ".
alerts_get_alert_template_description ($alert["id_alert_template"]),
$group_id, $agent_id, 1, $config["id_user"],