2012-02-16 Sergio Martin <sergio.martin@artica.es>

* operation/events/events.php: Fixed disable alerts in 
	event validation when choose more than one event to validate




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5615 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-02-16 14:16:26 +00:00
parent 85ffa44693
commit 2ad4e2bd33
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-02-16 Sergio Martin <sergio.martin@artica.es>
* operation/events/events.php: Fixed disable alerts in
event validation when choose more than one event to validate
2012-02-16 Vanessa Gil <vanessa.gil@artica.es> 2012-02-16 Vanessa Gil <vanessa.gil@artica.es>
* operation/events/events_list: Changed user name to event list. * operation/events/events_list: Changed user name to event list.

View File

@ -280,7 +280,8 @@ if ($validate) {
$comment = get_parameter ("comment", ''); $comment = get_parameter ("comment", '');
$new_status = get_parameter ("select_validate", 1); $new_status = get_parameter ("select_validate", 1);
$ids = explode(',',$ids); $ids = explode(',',$ids);
$standby_alert = (bool) get_parameter("standby-alert");
// Avoid to re-set inprocess events // Avoid to re-set inprocess events
if($new_status == 2) { if($new_status == 2) {
foreach($ids as $key => $id) { foreach($ids as $key => $id) {
@ -290,6 +291,7 @@ if ($validate) {
} }
} }
} }
if(isset($ids[0]) && $ids[0] != -1){ if(isset($ids[0]) && $ids[0] != -1){
$return = events_validate_event ($ids, ($group_rep == 1), $comment, $new_status); $return = events_validate_event ($ids, ($group_rep == 1), $comment, $new_status);
if($new_status == 1) { if($new_status == 1) {
@ -303,6 +305,15 @@ if ($validate) {
__('Could not be set in process')); __('Could not be set in process'));
} }
} }
if ($standby_alert) {
foreach($ids as $id) {
$event = events_get_event ($id);
if ($event !== false) {
alerts_agent_module_standby ($event['id_alert_am'], 1);
}
}
}
} }
//Process deletion (pass array or single value) //Process deletion (pass array or single value)