mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Clear POST with AJAX redirect
This commit is contained in:
@@ -345,9 +345,12 @@ function redirect($location, $message = null) {
|
||||
restart_session();
|
||||
$_SESSION["messages"][] = $message;
|
||||
}
|
||||
if (isset($location) && $_SERVER["HTTP_X_REQUESTED_WITH"] != "XMLHttpRequest") {
|
||||
header("Location: " . ($location != "" ? $location : "."));
|
||||
exit;
|
||||
if (isset($location)) {
|
||||
if ($_SERVER["HTTP_X_REQUESTED_WITH"] != "XMLHttpRequest") {
|
||||
header("Location: " . ($location != "" ? $location : "."));
|
||||
exit;
|
||||
}
|
||||
$_POST = array();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user