diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5518d09142..ffd3c8a89b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-03-01 Vanessa Gil + + * godmode/agentes/planned_downtime.php: Fixed bug #3474901: Planned + downtime behavior. + 2012-03-01 Juan Manuel Ramon * extensions/agents_modules.php: Changes in this view to do it diff --git a/pandora_console/godmode/agentes/planned_downtime.php b/pandora_console/godmode/agentes/planned_downtime.php index 8c2650f233..8e3cc86007 100644 --- a/pandora_console/godmode/agentes/planned_downtime.php +++ b/pandora_console/godmode/agentes/planned_downtime.php @@ -156,19 +156,14 @@ if ($create_downtime || $update_downtime) { } else if ($update_downtime) { if (trim(io_safe_output($name)) != '') { - if (!$check) { - $values = array( - 'name' => $name, - 'description' => $description, - 'date_from' => $datetime_from, - 'date_to' => $datetime_to, - 'id_group' => $id_group, - 'only_alerts' => (int)$only_alerts); - $result = db_process_sql_update('tplanned_downtime', $values, array('id' => $id_downtime)); - } - else { - echo "

".__('Each planned downtime must have a different name')."

"; - } + $values = array( + 'name' => $name, + 'description' => $description, + 'date_from' => $datetime_from, + 'date_to' => $datetime_to, + 'id_group' => $id_group, + 'only_alerts' => (int)$only_alerts); + $result = db_process_sql_update('tplanned_downtime', $values, array('id' => $id_downtime)); } else { echo '

'.__('Planned downtime must have a name').'

'; @@ -187,7 +182,7 @@ if ($create_downtime || $update_downtime) { if($create_downtime && $name && !$check) { echo '

'.__('Successfully created').'

'; } - else if ($update_downtime && $name && !$check) { + else if ($update_downtime && $name) { echo '

'.__('Successfully updated').'

'; } } @@ -442,9 +437,11 @@ else { $data[8] = html_print_image ("images/pixel_green.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Executed'))); else $data[8] = html_print_image ("images/pixel_red.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Not executed'))); - - $data[9] = '' . - html_print_image("images/cancel.png", true, array("border" => '0', "alt" => __('Stop downtime'))); + + if ($downtime["executed"] != 0) { + $data[9] = '' . + html_print_image("images/cancel.png", true, array("border" => '0', "alt" => __('Stop downtime'))); + } array_push ($table->data, $data); }