Changeset 3196

Show
Ignore:
Timestamp:
11/26/06 22:11:40 (6 years ago)
Author:
qldrob
Message:

This strips out any 'action=' line in the current location when the red bar is clicked, and changes it to var-disabled. This fixes such issues as IVR's getting created, administrators being added a couple of times, anything else that uses 'action' and relys on stuff not being called more than once. This could also fix a pile of potential issues, that along with the new Redirect(), might let us re-enabled the back button on the browser. Please test!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/common/script.js.php

    r3040 r3196  
    141141  if (confirm("About to reload backend configuration. This applies all outstanding changes to the live server.")) { 
    142142     
     143    var newlocation; 
    143144    if (document.all) { 
    144145      // need this for IE : http://support.microsoft.com/kb/q190244/ 
    145146      window.event.returnValue = false; 
    146147      // IE also uses window.location.href instead of location.href 
    147       location = window.location.href; 
     148      newlocation = window.location.href; 
    148149    } else { 
    149       location = location.href; 
     150      newlocation = location.href; 
    150151    } 
    151152 
    152153    if (location.href.indexOf('?') == -1) { 
    153       location = location + '?clk_reload=true'; 
     154      newlocation = location + '?clk_reload=true'; 
    154155    } else { 
    155       location = location + '&clk_reload=true'; 
    156     } 
     156      newlocation = location + '&clk_reload=true'; 
     157    } 
     158    location = newlocation.replace(/action/,"var-disabled"); 
    157159     
    158160  }