From: jakubvrana Date: Mon, 11 Jan 2010 19:58:32 +0000 (+0000) Subject: Set now() for timestamp only in single edit (bug #2929925) X-Git-Tag: v3.0.0~257 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=dc86757fcf8548795ffb6e469164b2965e513d7b;p=adminer.git Set now() for timestamp only in single edit (bug #2929925) git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1291 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/adminer/edit.inc.php b/adminer/edit.inc.php index b3c22320..005ab64e 100644 --- a/adminer/edit.inc.php +++ b/adminer/edit.inc.php @@ -83,7 +83,7 @@ if ($fields) { if (!$_POST["save"] && is_string($value)) { $value = $adminer->editVal($value, $field); } - $function = ($_POST["save"] ? (string) $_POST["function"][$name] : ($update && $field["on_update"] == "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')))); if ($field["type"] == "timestamp" && $value == "CURRENT_TIMESTAMP") { $value = ""; $function = "now";