summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/rcmail.php4
-rw-r--r--program/include/rcube_config.php2
-rw-r--r--program/js/app.js5
-rw-r--r--program/steps/settings/func.inc16
-rw-r--r--program/steps/settings/save_prefs.inc8
5 files changed, 18 insertions, 17 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 04b87e48c..99a68e81d 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -317,8 +317,8 @@ class rcmail extends rcube
if (!($this->output instanceof rcube_output_html))
$this->output = new rcube_output_html($this->task, $framed);
- // set keep-alive interval
- $this->output->set_env('keep_alive', $this->config->get('keep_alive', 0));
+ // set refresh interval
+ $this->output->set_env('refresh_interval', $this->config->get('refresh_interval', 0));
$this->output->set_env('session_lifetime', $this->config->get('session_lifetime', 0) * 60);
if ($framed) {
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php
index 1f165ba4a..bbc3e9c6e 100644
--- a/program/include/rcube_config.php
+++ b/program/include/rcube_config.php
@@ -43,6 +43,8 @@ class rcube_config
'mail_pagesize' => 'pagesize',
'addressbook_pagesize' => 'pagesize',
'reply_mode' => 'top_posting',
+ 'refresh_interval' => 'keep_alive',
+ 'min_refresh_interval' => 'min_keep_alive',
);
diff --git a/program/js/app.js b/program/js/app.js
index 25fddf10c..fb9c299ec 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -44,7 +44,6 @@ function rcube_webmail()
this.identifier_expr = new RegExp('[^0-9a-z\-_]', 'gi');
// default environment vars
- this.env.keep_alive = 60; // seconds
this.env.request_timeout = 180; // seconds
this.env.draft_autosave = 0; // seconds
this.env.comm_path = './';
@@ -6488,13 +6487,13 @@ function rcube_webmail()
// starts interval for refresh signal
this.start_refresh = function()
{
- if (!this.env.keep_alive || this.env.framed || this.env.extwin || this.task == 'login' || this.env.action == 'print')
+ if (!this.env.refresh_interval || this.env.framed || this.env.extwin || this.task == 'login' || this.env.action == 'print')
return;
if (this._refresh)
clearInterval(this._refresh);
- this._refresh = setInterval(function(){ ref.refresh(); }, this.env.keep_alive * 1000);
+ this._refresh = setInterval(function(){ ref.refresh(); }, this.env.refresh_interval * 1000);
};
// sends keep-alive signal
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 27e1e1346..876e02761 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -237,21 +237,21 @@ function rcmail_user_prefs($current=null)
);
}
- if (!isset($no_override['keep_alive'])) {
- $field_id = 'rcmfd_keep_alive';
- $select_keep_alive = new html_select(array('name' => '_keep_alive', 'id' => $field_id));
+ if (!isset($no_override['refresh_interval'])) {
+ $field_id = 'rcmfd_refresh_interval';
+ $select_refresh_interval = new html_select(array('name' => '_refresh_interval', 'id' => $field_id));
- $select_keep_alive->add(rcube_label('never'), 0);
+ $select_refresh_interval->add(rcube_label('never'), 0);
foreach (array(1, 3, 5, 10, 15, 30, 60) as $min) {
- if (!$config['min_keep_alive'] || $config['min_keep_alive'] <= $min * 60) {
+ if (!$config['min_refresh_interval'] || $config['min_refresh_interval'] <= $min * 60) {
$label = rcube_label(array('name' => 'everynminutes', 'vars' => array('n' => $min)));
- $select_keep_alive->add($label, $min);
+ $select_refresh_interval->add($label, $min);
}
}
- $blocks['main']['options']['keep_alive'] = array(
+ $blocks['main']['options']['refresh_interval'] = array(
'title' => html::label($field_id, Q(rcube_label('refreshinterval'))),
- 'content' => $select_keep_alive->show($config['keep_alive']/60),
+ 'content' => $select_refresh_interval->show($config['refresh_interval']/60),
);
}
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 2f22be7c4..5daab0d24 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -33,7 +33,7 @@ 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,
- 'keep_alive' => isset($_POST['_keep_alive']) ? intval($_POST['_keep_alive'])*60 : $CONFIG['keep_alive'],
+ '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'],
);
@@ -157,9 +157,9 @@ switch ($CURR_SECTION)
$a_user_prefs['timezone'] = (string) $a_user_prefs['timezone'];
- if (isset($a_user_prefs['keep_alive']) && !empty($CONFIG['min_keep_alive'])) {
- if ($a_user_prefs['keep_alive'] > $CONFIG['min_keep_alive']) {
- $a_user_prefs['keep_alive'] = $CONFIG['min_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'];
}
}