Bug #24970 ยป 17498.diff
typo3/classes/class.ajaxlogin.php (working copy) | ||
---|---|---|
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'];
|
||
... | ... | |
// 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 {
|
typo3/js/loginrefresh.js (working copy) | ||
---|---|---|
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() {
|
||
... | ... | |
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();
|
||
}
|
||
});
|
||
... | ... | |
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");
|