diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index c5818425..476cf5cc 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -1461,6 +1461,9 @@ function edit_form($table, $fields, $row, $update) { : ($value === false ? null : ($value !== null ? '' : 'NULL')) ) ); + if (!$_POST && !$update && $value == $field["default"] && preg_match('~^[\w.]+\(~', $value)) { + $function = "SQL"; + } if (preg_match("~time~", $field["type"]) && preg_match('~^CURRENT_TIMESTAMP~i', $value)) { $value = ""; $function = "now"; diff --git a/changes.txt b/changes.txt index 1e092af0..2ccc9e6c 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,5 @@ Adminer 4.7.10-dev: +Support function default values in insert (bug #713) Allow SQL pseudo-function in insert Skip date columns for non-date values in search anywhere Add DB version to comment in export