Permalink
Browse files

BUGFIX Fixed _setupPinging() javascript logic to comply to jQuery cal…

…lback arguments

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92675 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent c2d24f9 commit 21160c6ccb57ae5f7087b8dab8f974ec025a2e44 @chillu chillu committed Nov 21, 2009
Showing with 3 additions and 4 deletions.
  1. +3 −4 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);
},

0 comments on commit 21160c6

Please sign in to comment.