Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clear POST with AJAX redirect

  • Loading branch information...
commit de24145d8100a3be4bd272007b5b8d51bff78008 1 parent a93e069
@vrana authored
Showing with 7 additions and 4 deletions.
  1. +6 −3 adminer/include/functions.inc.php
  2. +1 −1  adminer/select.inc.php
View
9 adminer/include/functions.inc.php
@@ -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();
}
}
View
2  adminer/select.inc.php
@@ -333,7 +333,7 @@
}
}
$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]);
$long = strpos($val, "<i>...</i>");
$editable = is_utf8($val) && !$long && $rows[$n][$key] == $row[$key] && !$functions[$key];
Please sign in to comment.
Something went wrong with that request. Please try again.