mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Clear POST with AJAX redirect
This commit is contained in:
@@ -345,9 +345,12 @@ function redirect($location, $message = null) {
|
|||||||
restart_session();
|
restart_session();
|
||||||
$_SESSION["messages"][] = $message;
|
$_SESSION["messages"][] = $message;
|
||||||
}
|
}
|
||||||
if (isset($location) && $_SERVER["HTTP_X_REQUESTED_WITH"] != "XMLHttpRequest") {
|
if (isset($location)) {
|
||||||
header("Location: " . ($location != "" ? $location : "."));
|
if ($_SERVER["HTTP_X_REQUESTED_WITH"] != "XMLHttpRequest") {
|
||||||
exit;
|
header("Location: " . ($location != "" ? $location : "."));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$_POST = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -333,7 +333,7 @@ if (!$columns) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$id = h("val[$unique_idf][" . bracket_escape($key) . "]");
|
$id = h("val[$unique_idf][" . bracket_escape($key) . "]");
|
||||||
$value = ($error ? $_POST["val"][$unique_idf][bracket_escape($key)] : null);
|
$value = $_POST["val"][$unique_idf][bracket_escape($key)];
|
||||||
$h_value = h(isset($value) ? $value : $row[$key]);
|
$h_value = h(isset($value) ? $value : $row[$key]);
|
||||||
$long = strpos($val, "<i>...</i>");
|
$long = strpos($val, "<i>...</i>");
|
||||||
$editable = is_utf8($val) && !$long && $rows[$n][$key] == $row[$key] && !$functions[$key];
|
$editable = is_utf8($val) && !$long && $rows[$n][$key] == $row[$key] && !$functions[$key];
|
||||||
|
Reference in New Issue
Block a user