Skip to content

Commit

Permalink
BUGFIX Fixed _setupPinging() javascript logic to comply to jQuery cal…
Browse files Browse the repository at this point in the history
…lback arguments

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92675 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent c2d24f9 commit 21160c6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions javascript/LeftAndMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -64,8 +64,7 @@
jQuery.ajax({
url: "Security/ping",
global: false,
error: onSessionLost,
success: onSessionLost
complete: onSessionLost
});
}, this.PingIntervalSeconds() * 1000);
},
Expand Down

0 comments on commit 21160c6

Please sign in to comment.