From 00d439535e08de0a3edae10e293772ba2254365a Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 15 Mar 2011 22:27:01 +0000 Subject: Keep session alive while showing login page (request token is stored in session data) git-svn-id: https://svn.roundcube.net/trunk@4609 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/index.php | 4 +++- roundcubemail/program/js/app.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/roundcubemail/index.php b/roundcubemail/index.php index 440a245c5..21d5d859a 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/index.php @@ -154,7 +154,9 @@ else if ($RCMAIL->task != 'login' && $_SESSION['user_id'] && $RCMAIL->action != // not logged in -> show login page if (empty($RCMAIL->user->ID)) { - if ($OUTPUT->ajax_call) + if ($RCMAIL->action == 'keep-alive') + $OUTPUT->send(); + else if ($OUTPUT->ajax_call) $OUTPUT->redirect(array(), 2000); if (!empty($_REQUEST['_framed'])) diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index f81f8d5ee..73058e967 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -5431,7 +5431,7 @@ function rcube_webmail() if (this.env.keep_alive && !this.env.framed && this.task == 'mail' && this.gui_objects.mailboxlist) this._int = setInterval(function(){ ref.check_for_recent(false); }, this.env.keep_alive * 1000); - else if (this.env.keep_alive && !this.env.framed && this.task != 'login' && this.env.action != 'print') + else if (this.env.keep_alive && !this.env.framed && this.env.action != 'print') this._int = setInterval(function(){ ref.send_keep_alive(); }, this.env.keep_alive * 1000); }; -- cgit v1.2.3