diff --git a/booking.emails.inc b/booking.emails.inc index 7aef23a..fa1ed25 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -437,15 +437,13 @@ function _booking_travelform_initial_request_email($nid) //return without doing anything if we shouldn't send workflow emails if (variable_get('booking_auto_workflow_email', 0) == 0) { - watchdog('booking', 'Not sending travelform confirmation email since that feature is currently disabled.'); + watchdog('booking', 'Not sending travelform initial request email since that feature is currently disabled.'); return; } //load the node matching this id from the database, ignoring the cache $node = node_load($nid, NULL, TRUE); - $tokens = booking_define_personspecific_tokens($node); - - watchdog('booking', 'Sending travelform confirmation email to !first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname)); + $tokens = booking_define_personspecific_tokens($node); //calculate the from email address $from = t('!event Travel ', array('!event' => $event->booking_eventname, @@ -486,15 +484,13 @@ function _booking_travelform_reminder_request_email($nid) //return without doing anything if we shouldn't send workflow emails if (variable_get('booking_auto_workflow_email', 0) == 0) { - watchdog('booking', 'Not sending travelform confirmation email since that feature is currently disabled.'); + watchdog('booking', 'Not sending travelform reminder request email since that feature is currently disabled.'); return; } //load the node matching this id from the database, ignoring the cache $node = node_load($nid, NULL, TRUE); $tokens = booking_define_personspecific_tokens($node); - - watchdog('booking', 'Sending travelform confirmation email to !first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname)); //calculate the from email address $from = t('!event Travel ', array('!event' => $event->booking_eventname, diff --git a/booking.travel.inc b/booking.travel.inc index 5148934..7315b1c 100644 --- a/booking.travel.inc +++ b/booking.travel.inc @@ -110,12 +110,12 @@ function travel_form($node, &$form_state, $inserting = FALSE, $node = NULL, $tok //there's already info in $node so use that if (!empty($node)) { $data = $node; - watchdog('booking_debug', "
Travel form not-empty node:\n@info
", array('@info' => print_r( $form_state, true))); + //watchdog('booking_debug', "
Travel form not-empty node:\n@info
", array('@info' => print_r( $form_state, true))); } //otherwise rely on the form state from the previous submission else { $data = $form_state['node']; - watchdog('booking_debug', "
Travel form empty node:\n@info
", array('@info' => print_r( $data, true))); + //watchdog('booking_debug', "
Travel form empty node:\n@info
", array('@info' => print_r( $data, true))); } //get info about this person from the relevant node id @@ -124,7 +124,7 @@ function travel_form($node, &$form_state, $inserting = FALSE, $node = NULL, $tok array(':nid' => isset($node->nid) ? $node->nid : $data->booking_person_nid))->fetchObject(); if ($person) { - watchdog('booking_debug', "
Person info from database:\n@info
", array('@info' => print_r( $person, true))); + //watchdog('booking_debug', "
Person info from database:\n@info
", array('@info' => print_r( $person, true))); $booking_dietary = $person->booking_dietary; $booking_medical_conditions = $person->booking_medical_conditions; //an empty value is zero in this case @@ -404,8 +404,7 @@ function travel_form_validate($form, &$form_state) { '@info' => print_r($form_state['values'], true) )); } - - //if ($form_state['values']['booking_flight_datetime_inbound']['day'] == '' || $form_state['values']['booking_flight_datetime_inbound']['month'] == '' || $form_state['values']['booking_flight_datetime_inbound']['year'] == '' || $form_state['values']['booking_flight_datetime_inbound']['hour'] == //'' || $form_state['values']['booking_flight_datetime_inbound']['minute'] == '') { + if (!isset($form_state['values']['booking_flight_datetime_inbound'])) { form_set_error('booking_flight_datetime_inbound', t('Please enter the arrival time associated with your flight.')); watchdog('booking_debug', "
Travel form missing flight arrival time\n@info
", array(