From e7680e04b5a74ffb93c437988bbb40a8f4ad11b4 Mon Sep 17 00:00:00 2001 From: Esteban Sanchez Date: Wed, 14 Jan 2009 09:22:07 +0000 Subject: [PATCH] 2009-01-12 Esteban Sanchez * godmode/alerts/configure_alert_template.php: Fixed a bug when going forward from step 2 when creating a template. * pandoradb_migrate_20_to_21.sql: Added a comment on a line which was missing it. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1339 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 +++++++++- .../godmode/alerts/configure_alert_template.php | 10 ++++++---- pandora_console/pandoradb_migrate_20_to_21.sql | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ef5877ad35..d341525d0d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,4 +1,12 @@ -2009-01-12 Sancho Lerena +2009-01-12 Esteban Sanchez + + * godmode/alerts/configure_alert_template.php: Fixed a bug when going + forward from step 2 when creating a template. + + * pandoradb_migrate_20_to_21.sql: Added a comment on a line which was + missing it. + +2009-01-12 Sancho Lerena * functions_db.php, * godmode/agentes/configurar_agente.php: Delete module deletes diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index d7d49e7da6..69becac3e4 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -35,7 +35,7 @@ function print_alert_template_steps ($step, $id) { /* Step 1 */ if ($step == 1) echo ''; - if ($id) { + if ($id && ! isset ($_POST['create_template'])) { echo ''; echo __('Step').' 1 : '.__('Conditions'); echo ''; @@ -50,7 +50,7 @@ function print_alert_template_steps ($step, $id) { if ($step == 2) echo ''; - if ($id) { + if ($id && ! isset ($_POST['create_template'])) { echo ''; echo __('Step').' 2 : '.__('Firing'); echo ''; @@ -65,7 +65,7 @@ function print_alert_template_steps ($step, $id) { if ($step == 3) echo ''; - if ($id) { + if ($id && ! isset ($_POST['create_template'])) { echo ''; echo __('Step').' 3 : '.__('Recovery'); echo ''; @@ -220,6 +220,8 @@ if ($create_template) { /* Go to previous step in case of error */ if ($result === false) $step = $step - 1; + else + $id = $result; } if ($update_template) { @@ -233,7 +235,7 @@ if ($update_template) { } } -if ($id) { +if ($id && ! $create_template) { $template = get_alert_template ($id); $name = $template['name']; $description = $template['description']; diff --git a/pandora_console/pandoradb_migrate_20_to_21.sql b/pandora_console/pandoradb_migrate_20_to_21.sql index eaeab0a06c..8f73795c43 100644 --- a/pandora_console/pandoradb_migrate_20_to_21.sql +++ b/pandora_console/pandoradb_migrate_20_to_21.sql @@ -111,7 +111,7 @@ talert_template_modules(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- If you have custom stuff here, please make sure you manually -migrate it. +-- migrate it. -- DROP TABLE `talerta`