From 9da1852ead2ab5915d586f2c1a89df6ebe6a1fb6 Mon Sep 17 00:00:00 2001 From: guruevi Date: Mon, 6 Oct 2008 13:14:49 +0000 Subject: [PATCH] 2008-10-06 Evi Vanoost * godmode/agentes/configurar_agente.php: Double values in query removed * godmode/agentes/agent_manager.php: WMI Server now properly displays None if no WMI server is present * include/functions_html.php: If the query returns empty for print_select_from_sql, a box should still be printed. Fixed. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1132 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 ++++++++++ pandora_console/godmode/agentes/agent_manager.php | 2 +- pandora_console/godmode/agentes/configurar_agente.php | 10 +++++----- pandora_console/include/functions_html.php | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 553fda2262..da9e6f9ff2 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2008-10-06 Evi Vanoost + + * godmode/agentes/configurar_agente.php: Double values in query removed + + * godmode/agentes/agent_manager.php: WMI Server now properly displays + None if no WMI server is present + + * include/functions_html.php: If the query returns empty for + print_select_from_sql, a box should still be printed. Fixed. + 2008-10-05 Raul Mateos * install.php: Updated PHP version dependency. diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 5e56b4a023..41eea1c8a5 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -155,7 +155,7 @@ echo ' '.__('You must select a WMI Server for echo ''; $none = ''; $none_value = ''; -if ($id_plugin_server == 0) { +if ($id_wmi_server == 0) { $none = $none_str; $none_value = 0; } diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c072ed6080..d59dd204f1 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -397,7 +397,7 @@ if (isset($_POST["add_alert_combined"])){ // Update an existing alert // Update ALERT // ============= -if (isset($_POST["update_alert"])){ // Update an existing alert +if (isset($_POST["update_alert"])) { // Update an existing alert $id_agente_modulo = get_parameter ("agente_modulo",0); $id_aam = get_parameter ("id_aam",0); $maximo = get_parameter ("maximo",0); @@ -466,10 +466,10 @@ if (isset($_POST["update_alert"])){ // Update an existing alert recovery_notify = %d, priority = %d, al_f2_recovery = '%s', - al_f3_recovery = '%s', - id_alerta = %d WHERE id_aam = %d", $tipo_alerta, $max_alerts, $min_alerts, $time_threshold, $minimo, $maximo, $campo_3, $campo_2, $campo_1, $descripcion, $alert_text, - $time_to, $time_from, $disable_alert, $alert_d1, $alert_d2, $alert_d3, $alert_d4, $alert_d5, $alert_d5, $alert_d6, $alert_d7, $alert_recovery, $alert_priority, - $campo2_rec, $campo3_rec, $tipo_alerta, $id_aam); + al_f3_recovery = '%s' + WHERE id_aam = %d", $tipo_alerta, $max_alerts, $min_alerts, $time_threshold, $minimo, $maximo, $campo_3, $campo_2, $campo_1, $descripcion, $alert_text, + $time_to, $time_from, $disable_alert, $alert_d1, $alert_d2, $alert_d3, $alert_d4, $alert_d5, $alert_d6, $alert_d7, $alert_recovery, $alert_priority, + $campo2_rec, $campo3_rec, $id_aam); $result = process_sql ($sql); if ($result === false) { echo '

'.__('There was a problem updating alert').'

'; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 36436151e5..a4f0545fbb 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -104,7 +104,7 @@ function print_select_from_sql ($sql, $name, $selected = '', $script = '', $noth $fields = array (); $result = get_db_all_rows_sql ($sql); if ($result === false) - return ""; + $result = array (); foreach ($result as $row) { $fields[$row[0]] = $row[1];