diff --git a/checkin_notes b/checkin_notes
index c840aaad93..cc2676c705 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -2903,3 +2903,9 @@ David 28 Mar 2007
browser_firefox.C (removed)
browser_ie.C (removed)
prefs.c,h
+
+David 28 Mar 2007
+ - user web: support for work_buf_additional_days pref
+
+ html/inc/
+ prefs.inc
diff --git a/doc/client_msgs.php b/doc/client_msgs.php
index becdf2cbed..6818db6767 100644
--- a/doc/client_msgs.php
+++ b/doc/client_msgs.php
@@ -29,7 +29,6 @@ This file has the following format:
[ N ]
[ N ]
[ N ]
- [ X ]
[ 0|1 ]
[ 0|1 ]
[ 0|1 ]
@@ -179,14 +178,6 @@ list_item_func("",
list_item_func("",
"Maximum number of simultaneous file transfers per project (default 2)."
);
-list_item_func("",
- "The amount of work requested from projects will by multiplied
- by this number.
- Use a number larger than one if your computer often
- runs out of work.
- Implemented on version 5.10+.
- "
-);
list_item_func("suppress_net_info",
"If nonzero, don't send this host's IP address and domain name to servers.
Otherwise, this information is sent to, and stored on, servers.
diff --git a/html/inc/prefs.inc b/html/inc/prefs.inc
index eccfd0063f..0d61fa9a0a 100644
--- a/html/inc/prefs.inc
+++ b/html/inc/prefs.inc
@@ -68,9 +68,14 @@ define("HANGUP_IF_DIALED_DESC",
"Disconnect when done?
(matters only if you have a modem, ISDN or VPN connection)"
);
-define("WORK_BUF_DESC",
+define("WORK_BUF_MIN_DAYS_DESC",
"Connect to network about every
-
(determines size of work cache; maximum 10 days)
+
(maximum 10 days)
+ "
+);
+define("WORK_BUF_ADDITIONAL_DAYS_DESC",
+ "Cache enough work for an additional
+
(maximum 10 days; requires 5.10+ client)
"
);
define("MAX_CPUS_DESC", "On multiprocessors, use at most");
@@ -312,6 +317,9 @@ function element_end_global($parser, $name) {
case "work_buf_min_days":
$parse_result->work_buf_min_days = $text;
break;
+ case "work_buf_additional_days":
+ $parse_result->work_buf_additional_days = $text;
+ break;
case "max_cpus":
$parse_result->max_cpus = $text;
break;
@@ -385,6 +393,7 @@ function default_prefs_global() {
$p->confirm_before_connecting = false;
$p->hangup_if_dialed = true;
$p->work_buf_min_days = .1;
+ $p->work_buf_additional_days = 1;
$p->max_cpus = 16;
$p->cpu_usage_limit = 100;
$p->disk_interval = 60;
@@ -624,7 +633,8 @@ function prefs_show_columns_global($prefs) {
row_defs(USE_AT_MOST3, "ram_max_used_idle_pct", RAM_MAX_USED_IDLE_PCT_DESC2, "", $prefs);
row_top(NETWORK_LIMIT_DESC);
- row_defs(WORK_BUF_DESC, "work_buf_min_days", " days", "", $prefs);
+ row_defs(WORK_BUF_MIN_DAYS_DESC, "work_buf_min_days", " days", "", $prefs);
+ row_defs(WORK_BUF_ADDITIONAL_DAYS_DESC, "work_buf_additional_days", " days", "", $prefs);
row_defs(CONFIRM_BEFORE_CONNECTING_DESC, "confirm_before_connecting", "", "yesno", $prefs);
row_defs(HANGUP_IF_DIALED_DESC, "hangup_if_dialed", "", "yesno", $prefs);
row_defs(MAX_BYTES_SEC_DOWN_DESC, "max_bytes_sec_down", "", "limit", $prefs);
@@ -670,7 +680,8 @@ function prefs_show_global($prefs) {
row2(USE_AT_MOST3, "$prefs->ram_max_used_busy_pct".RAM_MAX_USED_BUSY_PCT_DESC2);
row2(USE_AT_MOST3, "$prefs->ram_max_used_idle_pct".RAM_MAX_USED_IDLE_PCT_DESC2);
row1(NETWORK_LIMIT_DESC);
- row2(WORK_BUF_DESC, "$prefs->work_buf_min_days days");
+ row2(WORK_BUF_MIN_DAYS_DESC, "$prefs->work_buf_min_days days");
+ row2(WORK_BUF_ADDITIONAL_DAYS_DESC, "$prefs->work_buf_additional_days days");
row2(CONFIRM_BEFORE_CONNECTING_DESC, $prefs->confirm_before_connecting?"yes":"no");
row2(HANGUP_IF_DIALED_DESC, $prefs->hangup_if_dialed?"yes":"no");
$x = max_bytes_display_mode($prefs->max_bytes_sec_down);
@@ -1020,12 +1031,18 @@ function prefs_form_global($user, $prefs, $error=false) {
);
row1(NETWORK_LIMIT_DESC);
- $x = WORK_BUF_DESC;
+ $x = WORK_BUF_MIN_DAYS_DESC;
$y = " days";
$show_error = false;
if (isset($error->work_buf_min_days)) $show_error= true;
row2($x, $y, $show_error);
+ $x = WORK_BUF_ADDITIONAL_DAYS_DESC;
+ $y = " days";
+ $show_error = false;
+ if (isset($error->work_buf_additional_days)) $show_error= true;
+ row2($x, $y, $show_error);
+
$x = CONFIRM_BEFORE_CONNECTING_DESC;
$y = "yes confirm_before_connecting?"checked":"")
@@ -1181,6 +1198,7 @@ function prefs_global_parse_form(&$prefs) {
$ram_max_used_busy_pct = $_GET["ram_max_used_busy_pct"];
$ram_max_used_idle_pct = $_GET["ram_max_used_idle_pct"];
$work_buf_min_days = $_GET["work_buf_min_days"];
+ $work_buf_additional_days = $_GET["work_buf_additional_days"];
$confirm_before_connecting = $_GET["confirm_before_connecting"];
$hangup_if_dialed = $_GET["hangup_if_dialed"];
$max_bytes_sec_down = $_GET["max_bytes_sec_down"];
@@ -1203,6 +1221,7 @@ function prefs_global_parse_form(&$prefs) {
if (!verify_numeric($ram_max_used_busy_pct, 0, 100)) $error->ram_max_used_busy_pct = true;
if (!verify_numeric($ram_max_used_idle_pct, 0, 100)) $error->ram_max_used_idle_pct = true;
if (!verify_numeric($work_buf_min_days, 0, 10)) $error->work_buf_min_days = true;
+ if (!verify_numeric($work_buf_additional_days, 0, 10)) $error->work_buf_additional_days = true;
if (!verify_numeric($max_bytes_sec_down, '')) $error->max_bytes_sec_down = true;
if (!verify_numeric($max_bytes_sec_up, '')) $error->max_bytes_sec_up = true;
if (!verify_numeric($net_start_hour, 0)) $error->net_start_hour = true;
@@ -1225,6 +1244,7 @@ function prefs_global_parse_form(&$prefs) {
$prefs->ram_max_used_busy_pct = $ram_max_used_busy_pct;
$prefs->ram_max_used_idle_pct = $ram_max_used_idle_pct;
$prefs->work_buf_min_days = $work_buf_min_days;
+ $prefs->work_buf_additional_days = $work_buf_additional_days;
$prefs->confirm_before_connecting = ($confirm_before_connecting == "yes");
$prefs->hangup_if_dialed = ($hangup_if_dialed == "yes");
$prefs->max_bytes_sec_down = max_bytes_db_mode($max_bytes_sec_down);
@@ -1311,6 +1331,7 @@ function global_prefs_make_xml($prefs, $primary=true) {
}
$xml = $xml
."$prefs->work_buf_min_days\n"
+ ."$prefs->work_buf_additional_days\n"
."$prefs->max_cpus\n"
."$prefs->cpu_usage_limit\n"
."$prefs->disk_interval\n";