From 0da63bcaac1a4531af92c0bff4e2c2cb26e24e03 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 19 Jun 2008 16:01:54 +0000 Subject: [PATCH] 2008-06-19 Sancho Lerena * Fixed some typos. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@890 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 2 ++ pandora_console/general/logon_ok.php | 3 +++ pandora_console/godmode/agentes/agent_disk_conf_editor.php | 2 +- pandora_console/include/functions_db.php | 2 +- pandora_console/operation/agentes/estado_agente.php | 3 +++ pandora_console/operation/agentes/tactical.php | 5 ++++- 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 6e661bee24..c4b98e28d4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,5 +1,7 @@ 2008-06-19 Sancho Lerena + * Fixed some typos. + * Fixed bad conflict resolution commit in functions_db.php * include/functions_reporting.php diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 5525842f94..a1b1e887fd 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -100,6 +100,9 @@ } else $global_health = 100; + if ($global_health < 0) + $global_health; + echo ""; //echo "

".$lang_label["tactical_indicator"]."

"; //echo ""; diff --git a/pandora_console/godmode/agentes/agent_disk_conf_editor.php b/pandora_console/godmode/agentes/agent_disk_conf_editor.php index 5c4b2d8241..2c0f5781c4 100644 --- a/pandora_console/godmode/agentes/agent_disk_conf_editor.php +++ b/pandora_console/godmode/agentes/agent_disk_conf_editor.php @@ -93,7 +93,7 @@ if (give_acl($id_user, 0, "AW")!=1) { // Update configuration if (isset($_POST["disk_conf"])) { - save_config(str_replace("\r\n", "\n", stripslashes($_POST["disk_conf"]))); + save_config(str_replace("\r\n", "\n", $_POST["disk_conf"])); echo "

" . $lang_label["update_agent_ok"] . "

"; } diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 5693394d9d..9b19ce214e 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -1110,7 +1110,7 @@ function give_agent_address_from_list ($id_agent){ * @return The agent if of the given module. */ function give_agent_id_from_module_id ($id_agent_module) { - return (int) get_db_value ('id_agente', 'tagent_modulo', 'id_agente_modulo', $id_agent_module); + return (int) get_db_value ('id_agente', 'tagente_modulo', 'id_agente_modulo', $id_agent_module); } /** diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 96e4e6e65a..f2fba3fc81 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -328,6 +328,9 @@ if (comprueba_login() == 0) { $ultima = strtotime($ultimo_contacto); $ahora = strtotime("now"); $diferencia = $ahora - $ultima; + if ( $diferencia > ($biginterval*2)) + echo ""; + echo human_time_comparation($ultimo_contacto); /* if ($biginterval > 0){ diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index db7e746684..b16ed421be 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -63,7 +63,10 @@ $global_health = format_numeric ((($data_health * $data_checks) + ($monitor_health * $monitor_checks)) / $total_checks); } else $global_health = 100; - + + if ($global_health < 0) + $global_health; + // Monitor checks // ~~~~~~~~~~~~~~~ echo "
";