mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Full AJAX only with pushState to work correctly with history
This commit is contained in:
@@ -361,10 +361,14 @@ function redirect($location, $message = null) {
|
||||
$_SESSION["messages"][] = $message;
|
||||
}
|
||||
if (isset($location)) {
|
||||
if ($location == "") {
|
||||
$location = ".";
|
||||
}
|
||||
if (!is_ajax()) {
|
||||
header("Location: " . ($location != "" ? $location : "."));
|
||||
header("Location: $location");
|
||||
exit;
|
||||
}
|
||||
header("X-AJAX-Redirect: $location");
|
||||
$_POST = array();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user