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

@@ -437,15 +437,13 @@ function _booking_travelform_initial_request_email($nid)
//return without doing anything if we shouldn't send workflow emails //return without doing anything if we shouldn't send workflow emails
if (variable_get('booking_auto_workflow_email', 0) == 0) 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; return;
} }
//load the node matching this id from the database, ignoring the cache //load the node matching this id from the database, ignoring the cache
$node = node_load($nid, NULL, TRUE); $node = node_load($nid, NULL, TRUE);
$tokens = booking_define_personspecific_tokens($node); $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 //calculate the from email address
$from = t('!event Travel <!email>', array('!event' => $event->booking_eventname, $from = t('!event Travel <!email>', 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 //return without doing anything if we shouldn't send workflow emails
if (variable_get('booking_auto_workflow_email', 0) == 0) 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; return;
} }
//load the node matching this id from the database, ignoring the cache //load the node matching this id from the database, ignoring the cache
$node = node_load($nid, NULL, TRUE); $node = node_load($nid, NULL, TRUE);
$tokens = booking_define_personspecific_tokens($node); $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 //calculate the from email address
$from = t('!event Travel <!email>', array('!event' => $event->booking_eventname, $from = t('!event Travel <!email>', array('!event' => $event->booking_eventname,

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 //there's already info in $node so use that
if (!empty($node)) { if (!empty($node)) {
$data = $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 //otherwise rely on the form state from the previous submission
else { else {
$data = $form_state['node']; $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 //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(); array(':nid' => isset($node->nid) ? $node->nid : $data->booking_person_nid))->fetchObject();
if ($person) { 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_dietary = $person->booking_dietary;
$booking_medical_conditions = $person->booking_medical_conditions; $booking_medical_conditions = $person->booking_medical_conditions;
//an empty value is zero in this case //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) '@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'])) { 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.')); 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( watchdog('booking_debug', "<pre>Travel form missing flight arrival time\n@info</pre>", array(