Preserve original timestamp value in multiple update (bug #3312614)
This commit is contained in:
parent
2140f09b68
commit
c0c21d4d12
|
@ -78,7 +78,7 @@ if ($fields) {
|
||||||
if (!$_POST["save"] && is_string($value)) {
|
if (!$_POST["save"] && is_string($value)) {
|
||||||
$value = $adminer->editVal($value, $field);
|
$value = $adminer->editVal($value, $field);
|
||||||
}
|
}
|
||||||
$function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($where && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : (isset($value) ? '' : 'NULL'))));
|
$function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($update && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : (isset($value) ? '' : 'NULL'))));
|
||||||
if ($field["type"] == "timestamp" && $value == "CURRENT_TIMESTAMP") {
|
if ($field["type"] == "timestamp" && $value == "CURRENT_TIMESTAMP") {
|
||||||
$value = "";
|
$value = "";
|
||||||
$function = "now";
|
$function = "now";
|
||||||
|
|
|
@ -722,7 +722,7 @@ function process_input($field) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ($function == "orig") {
|
if ($function == "orig") {
|
||||||
return false;
|
return ($field["on_update"] == "CURRENT_TIMESTAMP" ? idf_escape($field["field"]) : false);
|
||||||
}
|
}
|
||||||
if ($function == "NULL") {
|
if ($function == "NULL") {
|
||||||
return "NULL";
|
return "NULL";
|
||||||
|
|
|
@ -2,6 +2,7 @@ Adminer 3.3.0-dev:
|
||||||
Use Esc to disable in-place edit
|
Use Esc to disable in-place edit
|
||||||
Shortcut for database privileges
|
Shortcut for database privileges
|
||||||
Append new index with auto index selection (bug #3282127)
|
Append new index with auto index selection (bug #3282127)
|
||||||
|
Preserve original timestamp value in multiple update (bug #3312614)
|
||||||
Bit type default value
|
Bit type default value
|
||||||
Display foreign key name in tooltip
|
Display foreign key name in tooltip
|
||||||
Display default column value in table overview
|
Display default column value in table overview
|
||||||
|
|
Loading…
Reference in a new issue