1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-20 21:31:44 +02:00

Respect field function

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@851 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-17 14:06:30 +00:00
parent 5a0d809cb9
commit ed2c27c249
4 changed files with 5 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ if ($fields) {
? (strlen($row[$name]) && ($field["type"] == "enum" || $field["type"] == "set") ? intval($row[$name]) : $row[$name])
: ($_POST["clone"] && $field["auto_increment"] ? "" : (isset($_GET["select"]) ? false : $field["default"]))
);
$function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($field[($where ? "on_update" : "default")] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : (isset($value) ? '' : 'NULL'))));
$function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($where && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : (isset($value) ? '' : 'NULL'))));
input($name, $field, $value, $function);
if (isset($_GET["default"]) && $field["type"] == "timestamp") {
if (!isset($create) && !$_POST) {