]> git.joonet.de Git - adminer.git/commitdiff
Set now() for timestamp only in single edit (bug #2929925)
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 11 Jan 2010 19:58:32 +0000 (19:58 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 11 Jan 2010 19:58:32 +0000 (19:58 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1291 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/edit.inc.php

index b3c223208630edcc5355046a5c06bc6a0a6eb1d6..005ab64e18e8759ea4bfbaafad2f96bc93461d01 100644 (file)
@@ -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";