diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-26 17:06:23 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-26 17:06:23 +0000 |
| commit | 5038c057b65cf0c3e263bcf06e5999b6ab4589c8 (patch) | |
| tree | f86f8c9e5bc36ad015972d48ebcb4a962449b72c /roundcubemail/program/steps/settings/save_prefs.inc | |
| parent | 5a32b534095d4ac41fa4efd4b908c0f662203c89 (diff) | |
- Added 'keep_alive' and 'min_keep_alive' options (#1485360)
git-svn-id: https://svn.roundcube.net/trunk@2013 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/settings/save_prefs.inc')
| -rw-r--r-- | roundcubemail/program/steps/settings/save_prefs.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/settings/save_prefs.inc b/roundcubemail/program/steps/settings/save_prefs.inc index 3f6328d0d..debd345e3 100644 --- a/roundcubemail/program/steps/settings/save_prefs.inc +++ b/roundcubemail/program/steps/settings/save_prefs.inc @@ -37,6 +37,7 @@ $a_user_prefs = array( 'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE, 'logout_expunge' => isset($_POST['_logout_expunge']) ? TRUE : FALSE, 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, + 'keep_alive' => isset($_POST['_keep_alive']) ? intval($_POST['_keep_alive'])*60 : $CONFIG['keep_alive'], 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0, 'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0, 'skin' => isset($_POST['_skin']) ? get_input_value('_skin', RCUBE_INPUT_POST) : $CONFIG['skin'], @@ -78,6 +79,13 @@ if ($a_user_prefs['pagesize'] < 1) if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['pagesize'] > $CONFIG['max_pagesize'])) $a_user_prefs['pagesize'] = (int) $CONFIG['max_pagesize']; +// 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 ($USER->save_prefs($a_user_prefs)) $OUTPUT->show_message('successfullysaved', 'confirmation'); |
