BUGFIX Fixed _setupPinging() javascript logic to comply to jQuery callback arguments

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92675 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 02:39:14 +00:00
parent c2d24f9022
commit 21160c6ccb

View File

@ -48,8 +48,8 @@
* It redirects back to the login form if the URL is either unreachable, or returns '0'.
*/
_setupPinging: function() {
var onSessionLost = function(response, type, XMLHttpRequest) {
if(XMLHttpRequest.status > 400 || response == 0) {
var onSessionLost = function(xmlhttp, status) {
if(xmlhttp.status > 400 || xmlhttp.responseText == 0) {
// TODO will pile up additional alerts when left unattended
if(window.open('Security/login')) {
alert("Please log in and then try again");
@ -64,8 +64,7 @@
jQuery.ajax({
url: "Security/ping",
global: false,
error: onSessionLost,
success: onSessionLost
complete: onSessionLost
});
}, this.PingIntervalSeconds() * 1000);
},