From 3f546487d4b42871b9a2bfe7063301e5c2fd5d71 Mon Sep 17 00:00:00 2001 From: guruevi Date: Thu, 26 Feb 2009 17:17:00 +0000 Subject: [PATCH] 2009-02-26 Evi Vanoost * godmode/setup/setup.php: Unchecked checkboxes don't transfer any value so must default to 0 in order to work. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1491 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/setup/setup.php | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f24aec295c..5f5e8ff3ec 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-02-26 Evi Vanoost + + * godmode/setup/setup.php: Unchecked checkboxes don't transfer any value + so must default to 0 in order to work. + 2009-02-26 Esteban Sanchez * include/functions_events.php: Added get_events() function. Replaced diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 31770abfbd..9759be1020 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -49,14 +49,14 @@ if ($update_settings) { $config["sla_period"] = (int) get_parameter ('sla_period', $config["sla_period"]); $config["date_format"] = (string) get_parameter ('date_format', $config["date_format"]); $config["trap2agent"] = (string) get_parameter ('trap2agent', $config["trap2agent"]); - $config["autoupdate"] = (string) get_parameter ('autoupdate', $config["autoupdate"]); + $config["autoupdate"] = (bool) get_parameter ('autoupdate', 0); //If not passed, it's 0 $config["prominent_time"] = (string) get_parameter ('prominent_time', $config["prominent_time"]); $config["loginhash_pwd"] = (string) get_parameter ('loginhash_pwd', $config["loginhash_pwd"]); $config["timesource"] = (string) get_parameter ('timesource', $config["timesource"]); $config["event_view_hr"] = (int) get_parameter ('event_view_hr', $config["event_view_hr"]); $config["style"] = substr ($config["style"], 0, strlen ($config["style"]) - 4); - $config["https"] = (bool) get_parameter ('https', $config["https"]); - $config["compact_header"] = (bool) get_parameter ('compact_header', $config["compact_header"]); + $config["https"] = (bool) get_parameter ('https', 0); //If value not passed (unchecked), it's 0 + $config["compact_header"] = (bool) get_parameter ('compact_header', 0); process_sql ("UPDATE tconfig SET VALUE='".$config["remote_config"]."' WHERE token = 'remote_config'"); process_sql ("UPDATE tconfig SET VALUE='".$config["block_size"]."' WHERE token = 'block_size'");