From 83800b155ec7e7116556c9165ecc76a53f1e0ea5 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 8 Sep 2017 23:39:02 +1000 Subject: [PATCH] correctly handle dob again --- booking.regn_node.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booking.regn_node.inc b/booking.regn_node.inc index 88cac81..98d2054 100644 --- a/booking.regn_node.inc +++ b/booking.regn_node.inc @@ -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)) {