From da2275d5ab217e36634fd5be75f7325ffc31c20f Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 4 Sep 2009 14:40:13 -0600 Subject: [PATCH] Prevent multiple redirect requests --- imp/js/DimpCore.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index 757106f8b..5bd4e2870 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -10,7 +10,7 @@ /* DimpCore object. */ var DimpCore = { // Vars used and defaulting to null/false: - // DMenu, Growler, inAjaxCallback, is_init, is_logout, + // DMenu, Growler, inAjaxCallback, is_init, is_logout, is_redirect, // onDoActionComplete growler_log: true, is_ie6: false /*@cc_on || @_jscript_version < 5.7 @*/, @@ -273,10 +273,13 @@ var DimpCore = { redirect: function(url, force) { - var ptr = parent.frames.horde_main ? parent : window; - ptr.location = this.addURLParam(url); - if (force) { - setTimeout(function() { ptr.location.reload() }, 300); + if (!this.is_redirect) { + var ptr = parent.frames.horde_main ? parent : window; + this.is_redirect = true; + ptr.location = this.addURLParam(url); + if (force) { + setTimeout(function() { ptr.location.reload() }, 300); + } } }, -- 2.11.0