From 21160c6ccb57ae5f7087b8dab8f974ec025a2e44 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 02:39:14 +0000 Subject: [PATCH] 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 --- javascript/LeftAndMain.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index 6a81fc5e..51eae703 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -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); },