From 979aa8b2a8e49ce0d70fdcf681176a2500fa20ec Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 3 May 2010 07:39:11 +0000 Subject: [PATCH] 2010-05-03 Sergio Martin * operation/events/events.php: Fixed the successfully message over the header for bug: 2989965 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2651 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++ pandora_console/operation/events/events.php | 44 +++++++++++---------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 328b2143e4..b22228154f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-05-03 Sergio Martin + + * operation/events/events.php: Fixed the successfully + message over the header for bug: 2989965 + 2010-04-30 Sergio Martin * godmode/alerts/alert_list.builder.php: Removed an diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 18adddf554..694ffaf501 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -131,26 +131,6 @@ $groups[0] = __('System'); $delete = (bool) get_parameter ("delete"); $validate = (bool) get_parameter ("validate"); -//Process deletion (pass array or single value) -if ($delete) { - $ids = (array) get_parameter ("eventid", -1); - - $return = delete_event ($ids, ($group_rep == 1)); - print_result_message ($return, - __('Successfully deleted'), - __('Could not be deleted')); -} - -//Process validation (pass array or single value) -if ($validate) { - $ids = (array) get_parameter ("eventid", -1); - - $return = validate_event ($ids, ($group_rep == 1)); - print_result_message ($return, - __('Successfully validated'), - __('Could not be validated')); -} - //Group selection if ($ev_group > 1 && in_array ($ev_group, array_keys ($groups))) { //If a group is selected and it's in the groups allowed @@ -230,6 +210,30 @@ else { echo ""; } +//Process validation (pass array or single value) +if ($validate) { + $ids = (array) get_parameter ("eventid", -1); + + if($ids[0] != -1){ + $return = validate_event ($ids, ($group_rep == 1)); + print_result_message ($return, + __('Successfully validated'), + __('Could not be validated')); + } +} + +//Process deletion (pass array or single value) +if ($delete) { + $ids = (array) get_parameter ("eventid", -1); + + if($ids[0] != -1){ + $return = delete_event ($ids, ($group_rep == 1)); + print_result_message ($return, + __('Successfully deleted'), + __('Could not be deleted')); + } +} + //Link to toggle filter echo ''.__('Event control filter').' '.print_image ("images/down.png", true, array ("title" => __('Toggle filter(s)'))).'

';