Permalink
Browse files

Respect default values (thanks to Jiri Pospisil)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@833 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 572d86c commit 36f430e3df9d67f8af1551eebb247de016a572ec jakubvrana committed Jul 15, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 adminer/edit.inc.php
View
@@ -76,7 +76,7 @@
echo "<tr><th>" . adminer_field_name($fields, $name);
$value = (isset($row)
? (strlen($row[$name]) && ($field["type"] == "enum" || $field["type"] == "set") ? intval($row[$name]) : $row[$name])
- : ($_POST["clone"] && $field["auto_increment"] ? "" : ($where ? $field["default"] : false))
+ : ($_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'))));
input($name, $field, $value, $function);

0 comments on commit 36f430e

Please sign in to comment.