Prevent multiple redirect requests
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 4 Sep 2009 20:40:13 +0000 (14:40 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 7 Sep 2009 09:46:46 +0000 (03:46 -0600)
imp/js/DimpCore.js

index 757106f..5bd4e28 100644 (file)
@@ -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);
+            }
         }
     },