From 23d1643145b9bcd64ece524215790ebb62a9ff34 Mon Sep 17 00:00:00 2001 From: darode Date: Tue, 20 Nov 2012 08:29:27 +0000 Subject: [PATCH] 2012-11-20 Dario Rodriguez * operation/integria_incidents/incident.php: Fixed an error printing messages which appear before the header. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7161 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 ++ .../operation/integria_incidents/incident.php | 82 +++++++++---------- 2 files changed, 46 insertions(+), 41 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index be8578e7f3..f296fd567a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-11-20 Dario Rodriguez + + * operation/integria_incidents/incident.php: Fixed an error printing messages + which appear before the header. + 2012-11-19 Dario Rodriguez * operation/integria_incidents/incident.list.php, diff --git a/pandora_console/operation/integria_incidents/incident.php b/pandora_console/operation/integria_incidents/incident.php index 4c53abb852..b121ee1709 100755 --- a/pandora_console/operation/integria_incidents/incident.php +++ b/pandora_console/operation/integria_incidents/incident.php @@ -34,6 +34,46 @@ $update_incident = get_parameter('update_incident', 0); $integria_api = $config['integria_url']."/include/api.php?return_type=xml&user=".$config['id_user']."&pass=".$config['integria_api_password']; +// Header +if($tab == 'list' || $tab == 'editor') { + $buttons = array( + 'list' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .''), + 'editor' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/add.png", true, array ("title" => __('New Incident'))) .'')); +} +else { + $buttons = array( + 'list' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .''), + 'incident' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/eye.png", true, array ("title" => __('Incident details'))) .''), + 'workunits' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/computer.png", true, array ("title" => __('Workunits'))) .''), + 'files' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/file.png", true, array ("title" => __('Files'))) .''), + 'tracking' => array( + 'active' => false, + 'text' => '' . + html_print_image ("images/comments.png", true, array ("title" => __('Tracking'))) .'')); +} + +$buttons[$tab]['active'] = true; + +ui_print_page_header (__('Incident management'), "images/book_edit.png", false, "", false, $buttons); + if($update_incident == 1) { $values[0] = $id_incident; $values[1] = str_replace(" ", "%20", io_safe_output(get_parameter('title'))); @@ -88,46 +128,6 @@ if($create_incident == 1) { } } -// Header -if($tab == 'list' || $tab == 'editor') { - $buttons = array( - 'list' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .''), - 'editor' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/add.png", true, array ("title" => __('New Incident'))) .'')); -} -else { - $buttons = array( - 'list' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/page_white_text.png", true, array ("title" => __('Incidents'))) .''), - 'incident' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/eye.png", true, array ("title" => __('Incident details'))) .''), - 'workunits' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/computer.png", true, array ("title" => __('Workunits'))) .''), - 'files' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/file.png", true, array ("title" => __('Files'))) .''), - 'tracking' => array( - 'active' => false, - 'text' => '' . - html_print_image ("images/comments.png", true, array ("title" => __('Tracking'))) .'')); -} - -$buttons[$tab]['active'] = true; - -ui_print_page_header (__('Incident management'), "images/book_edit.png", false, "", false, $buttons); - $attach_file = get_parameter('attach_file', 0); if($attach_file == 1) { @@ -181,7 +181,7 @@ if($delete_file != 0 && !$attach_file) { // Call the integria API $result = incidents_call_api($url); - $result = incidents_call_api($url, array('params' => $params)); + $result = incidents_call_api($url); $result_array = incidents_xml_to_array($result);