return null;
}
if ($function == "orig") {
- return ($field["on_update"] == "CURRENT_TIMESTAMP" ? idf_escape($field["field"]) : false);
+ return (preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) ? idf_escape($field["field"]) : false);
}
if ($function == "NULL") {
return "NULL";
}
$function = ($_POST["save"]
? (string) $_POST["function"][$name]
- : ($update && $field["on_update"] == "CURRENT_TIMESTAMP"
+ : ($update && preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"])
? "now"
: ($value === false ? null : ($value !== null ? '' : 'NULL'))
)
);
- if (preg_match("~time~", $field["type"]) && $value == "CURRENT_TIMESTAMP") {
+ if (preg_match("~time~", $field["type"]) && preg_match('~^CURRENT_TIMESTAMP~i', $value)) {
$value = "";
$function = "now";
}
Increase username maxlength to 80 (bug #623)
Make maxlength in all fields a soft limit
MySQL: Support foreign keys created with ANSI quotes (bug #620)
-MySQL: Recognize ON UPDATE current_timestamp() (bug #632)
+MySQL: Recognize ON UPDATE current_timestamp() (bug #632, bug #638)
PostgreSQL: Quote array values in export (bug #621)
MSSQL: Pass database when connecting
ClickHouse: Connect, databases list, tables list, select, SQL command