1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

Simplify AJAX redirect

This commit is contained in:
Jakub Vrana
2011-01-25 16:13:31 +01:00
parent 4a5eb8b408
commit fdea1970d0
3 changed files with 7 additions and 7 deletions

View File

@@ -194,8 +194,11 @@ function ajax(url, callback, data) {
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
var redirect = xmlhttp.getResponseHeader('X-AJAX-Redirect');
if (redirect && history.replaceState) {
history.replaceState(null, '', redirect);
if (redirect) {
if (history.replaceState) {
history.replaceState(null, '', redirect);
}
return ajaxSend(redirect);
}
var title = xmlhttp.getResponseHeader('X-AJAX-Title');
if (title) {