summaryrefslogtreecommitdiff
path: root/program/steps/settings/save_prefs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings/save_prefs.inc')
-rw-r--r--program/steps/settings/save_prefs.inc28
1 files changed, 15 insertions, 13 deletions
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index db7b134c4..5daab0d24 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -33,7 +33,8 @@ switch ($CURR_SECTION)
'date_format' => isset($_POST['_date_format']) ? get_input_value('_date_format', RCUBE_INPUT_POST) : $CONFIG['date_format'],
'time_format' => isset($_POST['_time_format']) ? get_input_value('_time_format', RCUBE_INPUT_POST) : ($CONFIG['time_format'] ? $CONFIG['time_format'] : 'H:i'),
'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE,
- 'skin' => isset($_POST['_skin']) ? get_input_value('_skin', RCUBE_INPUT_POST) : $CONFIG['skin'],
+ 'refresh_interval' => isset($_POST['_refresh_interval']) ? intval($_POST['_refresh_interval'])*60 : $CONFIG['refresh_interval'],
+ 'skin' => isset($_POST['_skin']) ? get_input_value('_skin', RCUBE_INPUT_POST) : $CONFIG['skin'],
);
// compose derived date/time format strings
@@ -50,7 +51,6 @@ switch ($CURR_SECTION)
'preview_pane_mark_read' => isset($_POST['_preview_pane_mark_read']) ? intval($_POST['_preview_pane_mark_read']) : $CONFIG['preview_pane_mark_read'],
'autoexpand_threads' => isset($_POST['_autoexpand_threads']) ? intval($_POST['_autoexpand_threads']) : 0,
'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0,
- 'keep_alive' => isset($_POST['_keep_alive']) ? intval($_POST['_keep_alive'])*60 : $CONFIG['keep_alive'],
'check_all_folders' => isset($_POST['_check_all_folders']) ? TRUE : FALSE,
'mail_pagesize' => is_numeric($_POST['_mail_pagesize']) ? max(2, intval($_POST['_mail_pagesize'])) : $CONFIG['mail_pagesize'],
);
@@ -157,16 +157,16 @@ switch ($CURR_SECTION)
$a_user_prefs['timezone'] = (string) $a_user_prefs['timezone'];
- break;
- case 'mailbox':
-
- // force keep_alive
- if (isset($a_user_prefs['keep_alive'])) {
- $a_user_prefs['keep_alive'] = max(60, $CONFIG['min_keep_alive'], $a_user_prefs['keep_alive']);
- if (!empty($CONFIG['session_lifetime']))
- $a_user_prefs['keep_alive'] = min($CONFIG['session_lifetime']*60, $a_user_prefs['keep_alive']);
+ if (isset($a_user_prefs['refresh_interval']) && !empty($CONFIG['min_refresh_interval'])) {
+ if ($a_user_prefs['refresh_interval'] > $CONFIG['min_refresh_interval']) {
+ $a_user_prefs['refresh_interval'] = $CONFIG['min_refresh_interval'];
+ }
}
+ break;
+
+ case 'mailbox':
+
// force min size
if ($a_user_prefs['mail_pagesize'] < 1)
$a_user_prefs['mail_pagesize'] = 10;
@@ -174,7 +174,8 @@ switch ($CURR_SECTION)
if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['mail_pagesize'] > $CONFIG['max_pagesize']))
$a_user_prefs['mail_pagesize'] = (int) $CONFIG['max_pagesize'];
- break;
+ break;
+
case 'addressbook':
// force min size
@@ -184,7 +185,8 @@ switch ($CURR_SECTION)
if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['addressbook_pagesize'] > $CONFIG['max_pagesize']))
$a_user_prefs['addressbook_pagesize'] = (int) $CONFIG['max_pagesize'];
- break;
+ break;
+
case 'folders':
// special handling for 'default_folders'
@@ -199,7 +201,7 @@ switch ($CURR_SECTION)
}
}
- break;
+ break;
}
// Save preferences