correctly handle dob again

This commit is contained in:
2017-09-08 23:39:02 +10:00
parent c27f2c1005
commit 83800b155e

View File

@@ -412,7 +412,10 @@ function booking_update($node) {
//check if the key is a field that belongs in the database
if ((strpos($key, "booking_") === 0) || $key === "nid") {
//do we need to treat this field carefully?
if (in_array($key, $boolean_keys, FALSE)) {
if (strpos($key, "booking_dob") === 0) {
$data[$key] = _date_to_ts($value);
}
elseif (in_array($key, $boolean_keys, FALSE)) {
$data[$key] = $value == 1 ? 'Y' : 'N';
}
elseif (in_array($key, $default_zero_keys, FALSE)) {