From 93ca2e4458565542b3c5e05af58d1cf49f666c2d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 10 Mar 2003 23:17:16 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=1043 --- html/user/prefs.inc | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/html/user/prefs.inc b/html/user/prefs.inc index 4a28ddd4f0..6812fe2f68 100644 --- a/html/user/prefs.inc +++ b/html/user/prefs.inc @@ -146,6 +146,9 @@ function element_end_global($parser, $name) { case "confirm_before_connecting": $parse_result->confirm_before_connecting = true; break; + case "hangup_if_dialed": + $parse_result->hangup_if_dialed = true; + break; case "work_buf_min_days": $parse_result->work_buf_min_days = $text; break; @@ -189,6 +192,7 @@ function default_prefs_global() { $p->run_on_batteries = false; $p->run_if_user_active = true; $p->confirm_before_connecting = false; + $p->hangup_if_dialed = true; $p->work_buf_min_days = 1; $p->work_buf_max_days = 3; $p->disk_max_used_gb = 100; @@ -215,6 +219,7 @@ function initialize_prefs_before_parsing_global() { $p->run_on_batteries = false; $p->run_if_user_active = false; $p->confirm_before_connecting = false; + $p->hangup_if_dialed = false; return $p; } @@ -257,6 +262,7 @@ function prefs_show_global($prefs) { row2("Work if computer on batteries?", $prefs->run_on_batteries?"Yes":"No"); row2("Work if computer in use?", $prefs->run_if_user_active?"Yes":"No"); row2("Confirm before connecting to network?", $prefs->confirm_before_connecting?"Yes":"No"); + row2("Disconnect when connection complete?", $prefs->hangup_if_dialed?"Yes":"No"); row2("Amount of work to buffer:", "$prefs->work_buf_min_days to $prefs->work_buf_max_days days"); row2("Maximum disk space to use:", "$prefs->disk_max_used_gb GB"); row2("Minimum disk space to leave free:", "$prefs->disk_min_free_gb GB"); @@ -372,7 +378,7 @@ function prefs_form_global($user, $prefs) { "; row2($x, $y); - $x = "Ask you before connecting to Internet? + $x = "Should ".PROJECT." ask you before connecting to Internet?
(This matters only if you use a modem) "; $y = "Yes (This matters only if you use a modem) + "; + $y = "Yes hangup_if_dialed?"checked":"") + ."> No hangup_if_dialed?"":"checked") + ."> + "; + row2($x, $y); + $x = "Keep enough to work on disk to last between"; $y = " and @@ -489,6 +506,7 @@ function prefs_global_parse_form(&$prefs) { $run_on_batteries = $_GET["run_on_batteries"]; $run_if_user_active = $_GET["run_if_user_active"]; $confirm_before_connecting = $_GET["confirm_before_connecting"]; + $hangup_if_dialed = $_GET["hangup_if_dialed"]; $work_buf_min_days = $_GET["work_buf_min_days"]; $work_buf_max_days = $_GET["work_buf_max_days"]; $disk_max_used_gb = $_GET["disk_max_used_gb"]; @@ -500,6 +518,7 @@ function prefs_global_parse_form(&$prefs) { $prefs->run_on_batteries = ($run_on_batteries == "yes"); $prefs->run_if_user_active = ($run_if_user_active == "yes"); $prefs->confirm_before_connecting = ($confirm_before_connecting == "yes"); + $prefs->hangup_if_dialed = ($hangup_if_dialed == "yes"); if ($work_buf_min_days<0) $work_buf_min_days = 0; if ($work_buf_max_days<0) $work_buf_max_days = 0; @@ -551,6 +570,9 @@ function global_prefs_make_xml($prefs, $primary=true) { if ($prefs->confirm_before_connecting) { $xml = $xml."\n"; } + if ($prefs->hangup_if_dialed) { + $xml = $xml."\n"; + } $xml = $xml ."$prefs->work_buf_min_days\n" ."$prefs->work_buf_max_days\n";