fixes for booking_late_price not existing when node is first created

This commit is contained in:
2016-04-28 22:39:06 +10:00
parent c1b2621d3b
commit cd10d60f1b
2 changed files with 22 additions and 7 deletions

View File

@@ -1069,15 +1069,16 @@ if (variable_get('booking_enable_passport', 0) == 1)
function booking_form_validate($form, &$form_state) {
return _booking_validate($form_state['values']['form_id'], $form_state['values']);
return _booking_validate($form_state['values']['form_id'], $form_state['input']);
}
function _booking_validate($node, &$form_state) {
global $event;
//watchdog('booking', '<pre>Booking registration form validation:\n@info</pre>', array('@info' => print_r( $form_state, true)));
//in case the date of birth field hasn't been filled out
//watchdog('booking', 'Blank date of birth checking: @info', array('@info' => var_export($form_state['booking_dob'], TRUE)));
$dob_check = $form_state['booking_dob']['day'] != '' && $form_state['booking_dob']['month'] != '' && $form_state['booking_dob']['year'] != '' ? _date_to_ts($form_state['booking_dob']) : 0;
watchdog('booking', 'Blank date of birth checking: @info', array('@info' => var_export($form_state['booking_dob'], TRUE)));
$dob_check = $form_state['booking_dob']['day'] != '' && $form_state['booking_dob']['month'] != '' && $form_state['booking_dob']['year'] != '' ? _datearray_to_ts($form_state['booking_dob']) : 0;
//Verify this is not a duplicate registration
//try and find the person in the database for this event