Index: typo3/classes/class.ajaxlogin.php =================================================================== --- typo3/classes/class.ajaxlogin.php (revision 10400) +++ typo3/classes/class.ajaxlogin.php (working copy) @@ -101,8 +101,10 @@ if(is_object($GLOBALS['BE_USER'])) { $ajaxObj->setContentFormat('json'); if (@is_file(PATH_typo3conf.'LOCK_BACKEND')) { - $ajaxObj->addContent('login', array('timed_out' => FALSE, 'locked' => TRUE)); + $ajaxObj->addContent('login', array('will_time_out' => FALSE, 'locked' => TRUE)); $ajaxObj->setContentFormat('json'); + } else if (!isset($GLOBALS['BE_USER']->user['uid'])) { + $ajaxObj->addContent('login', array('timed_out' => TRUE)); } else { $GLOBALS['BE_USER']->fetchUserSession(TRUE); $ses_tstamp = $GLOBALS['BE_USER']->user['ses_tstamp']; @@ -111,9 +113,9 @@ // if 120 seconds from now is later than the session timeout, we need to show the refresh dialog. // 120 is somewhat arbitrary to allow for a little room during the countdown and load times, etc. if ($GLOBALS['EXEC_TIME'] >= $ses_tstamp + $timeout - 120) { - $ajaxObj->addContent('login', array('timed_out' => TRUE)); + $ajaxObj->addContent('login', array('will_time_out' => TRUE)); } else { - $ajaxObj->addContent('login', array('timed_out' => FALSE)); + $ajaxObj->addContent('login', array('will_time_out' => FALSE)); } } } else { Index: typo3/js/loginrefresh.js =================================================================== --- typo3/js/loginrefresh.js (revision 10400) +++ typo3/js/loginrefresh.js (working copy) @@ -64,10 +64,14 @@ Ext.MessageBox.hide(); } } - if (result.login.timed_out && Ext.getCmp("loginformWindow")) { + if ((result.login.timed_out || result.login.will_time_out) && Ext.getCmp("loginformWindow")) { Ext.getCmp("login_username").value = TYPO3.configuration.username; this.stopTimer(); - this.progressWindow.show(); + if (result.login.timed_out) { + this.showLoginForm(); + } else { + this.progressWindow.show(); + } } }, failure: function() { @@ -208,27 +212,8 @@ duration: 30000, increment: 32, text: String.format(TYPO3.LLL.core.refresh_login_countdown, '30'), - fn: function(win){ - if (TYPO3.configuration.showRefreshLoginPopup) { - //log off for sure - Ext.Ajax.request({ - url: "ajax.php", - params: { - "ajaxID": "BackendLogin::logout" - }, - method: "GET", - scope: this, - success: function(response, opts) { - TYPO3.loginRefresh.showLoginPopup(); - }, - failure: function(response, opts) { - alert("something went wrong"); - } - }); - } else { - Ext.getCmp("loginRefreshWindow").hide(); - Ext.getCmp("loginformWindow").show(); - } + fn: function() { + TYPO3.loginRefresh.showLoginForm(); } }); @@ -241,12 +226,35 @@ control.updateText(String.format(TYPO3.LLL.core.refresh_login_countdown, rest)); } }); - + this.loginRefreshWindow.on('close', function(){ TYPO3.loginRefresh.startTimer(); }); }, + showLoginForm: function() { + if (TYPO3.configuration.showRefreshLoginPopup) { + //log off for sure + Ext.Ajax.request({ + url: "ajax.php", + params: { + "ajaxID": "BackendLogin::logout" + }, + method: "GET", + scope: this, + success: function(response, opts) { + TYPO3.loginRefresh.showLoginPopup(); + }, + failure: function(response, opts) { + alert("something went wrong"); + } + }); + } else { + Ext.getCmp("loginRefreshWindow").hide(); + Ext.getCmp("loginformWindow").show(); + } + }, + showLoginPopup: function() { Ext.getCmp("loginRefreshWindow").hide(); var vHWin = window.open("login_frameset.php","relogin_" + TS.uniqueID,"height=450,width=700,status=0,menubar=0,location=1");