diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 52fbaf9bd5..b6a8142245 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2008-06-24 Sancho Lerena + + * include/functions_db.php: Fixed typo. + + * include/languages/language_es_es.php: Too long string fixed. + + * operation/agentes/tactical.php: Div0 fixed. + + * godmode/agentes/agent_disk_conf_editor.php: Check should be done + after reading (when updating file, because binary reads don't be afected + by magic_quotes. This SHOULD fix the problem. + 2008-06-23 Esteban Sanchez * include/functions_reporting.php: Do not show alert tables if there's diff --git a/pandora_console/godmode/agentes/agent_disk_conf_editor.php b/pandora_console/godmode/agentes/agent_disk_conf_editor.php index f1c5c0d90a..9737cee799 100644 --- a/pandora_console/godmode/agentes/agent_disk_conf_editor.php +++ b/pandora_console/godmode/agentes/agent_disk_conf_editor.php @@ -27,7 +27,7 @@ function display_config () { // Read configuration file $file_name = $config["remote_config"] . "/" . $agent_md5 . ".conf"; $file = fopen($file_name, "rb"); - $agent_config = unsafe_string (fread($file, filesize($file_name))); + $agent_config = fread($file, filesize($file_name)); fclose($file); // Display it @@ -48,7 +48,7 @@ function display_config () { echo ''; echo ''; echo ''; echo ''; echo ''; @@ -66,7 +66,8 @@ function display_config () { // Saves the configuration and the md5 hash function save_config ($agent_config) { global $agent_md5, $config; - + + $agent_config = unsafe_string ($agent_config); // Save configuration $file = fopen($config["remote_config"] . "/" . $agent_md5 . ".conf", "wb"); fwrite($file, $agent_config); diff --git a/pandora_console/include/config.php b/pandora_console/include/config.php index 1e5a90ef4c..140919c796 100644 --- a/pandora_console/include/config.php +++ b/pandora_console/include/config.php @@ -2,10 +2,10 @@ // Begin of automatic config file $config["dbname"]="pandora"; // MySQL DataBase name $config["dbuser"]="pandora"; // DB User -$config["dbpass"]="pandora"; // DB Password +$config["dbpass"]="wrvjsevp"; // DB Password $config["dbhost"]="localhost"; // DB Host $config["homedir"]="/var/www/pandora_console/"; // Config homedir -$config["homeurl"]="http://localhost/pandora_console"; // Base URL +$config["homeurl"]="http://192.168.13.211/pandora_console"; // Base URL // End of automatic config file ?>
"; $lang_label["user_last_activity"]="Última actividad en Pandora"; diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index d3e9f380ce..96dac94dd0 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -59,6 +59,8 @@ $data_health = format_numeric ( (($data_checks -($data_unknown + $data_alert)) / $data_checks ) * 100,1);; } else $data_health = 100; + if ($data_health < 0) + $data_health =0; if (($data_checks != 0) OR ($data_checks != 0)){ $global_health = format_numeric ((($data_health * $data_checks) + ($monitor_health * $monitor_checks)) / $total_checks); } else