remove some unnecessary logging

This commit is contained in:
2016-06-04 10:43:42 +10:00
parent 450acf310b
commit 9f648c755d
2 changed files with 7 additions and 12 deletions

View File

@@ -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', "<pre>Travel form not-empty node:\n@info</pre>", array('@info' => print_r( $form_state, true)));
//watchdog('booking_debug', "<pre>Travel form not-empty node:\n@info</pre>", 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', "<pre>Travel form empty node:\n@info</pre>", array('@info' => print_r( $data, true)));
//watchdog('booking_debug', "<pre>Travel form empty node:\n@info</pre>", 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', "<pre>Person info from database:\n@info</pre>", array('@info' => print_r( $person, true)));
//watchdog('booking_debug', "<pre>Person info from database:\n@info</pre>", 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', "<pre>Travel form missing flight arrival time\n@info</pre>", array(