From 5038c057b65cf0c3e263bcf06e5999b6ab4589c8 Mon Sep 17 00:00:00 2001 From: alec Date: Sun, 26 Oct 2008 17:06:23 +0000 Subject: - Added 'keep_alive' and 'min_keep_alive' options (#1485360) git-svn-id: https://svn.roundcube.net/trunk@2013 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/settings/func.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'roundcubemail/program/steps/settings/func.inc') diff --git a/roundcubemail/program/steps/settings/func.inc b/roundcubemail/program/steps/settings/func.inc index 6f378fd0e..980108ad9 100644 --- a/roundcubemail/program/steps/settings/func.inc +++ b/roundcubemail/program/steps/settings/func.inc @@ -175,6 +175,20 @@ function rcmail_user_prefs_form($attrib) $table->add(null, $select_mdn_requests->show($config['mdn_requests'])); } + if (!isset($no_override['keep_alive'])) { + $field_id = 'rcmfd_keep_alive'; + $select_keep_alive = new html_select(array('name' => '_keep_alive', 'id' => $field_id)); + + foreach(array(1, 3, 5, 10, 15, 30, 60) as $min) + if((!$config['min_keep_alive'] || $config['min_keep_alive'] <= $min * 60) + && (!$config['session_lifetime'] || $config['session_lifetime'] > $min)) { + $select_keep_alive->add(rcube_label(array('name' => 'keepaliveevery', 'vars' => array('n' => $min))), $min); + } + + $table->add('title', html::label($field_id, Q(rcube_label('keepalive')))); + $table->add(null, $select_keep_alive->show($config['keep_alive']/60)); + } + $out .= html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('mailboxview'))) . $table->show($attrib)); $table = new html_table(array('cols' => 2)); -- cgit v1.2.3