remove debug messages for html email

This commit is contained in:
2017-09-02 00:13:11 +10:00
parent 5c2715f28a
commit c522f94dfa
2 changed files with 14 additions and 15 deletions

View File

@@ -56,7 +56,7 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -133,7 +133,7 @@ function _booking_regn_notifyonly_email($node, $balance_payment) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -255,7 +255,7 @@ function _booking_balance_payment_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -323,7 +323,7 @@ function _booking_partialbalance_payment_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -402,7 +402,7 @@ function _booking_custom_email($nid, $email_type, $sender = 'contact') {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -473,7 +473,7 @@ function _booking_promoted_from_waitinglist_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -547,7 +547,7 @@ function _booking_demoted_to_notcoming_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -617,7 +617,7 @@ function _booking_missedpayment_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -688,7 +688,7 @@ function _booking_travelform_initial_request_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -760,7 +760,7 @@ function _booking_travelform_reminder_request_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {
@@ -835,7 +835,7 @@ function _booking_travelform_confirmation_email($nid) {
'subject' => $subject, 'subject' => $subject,
'footer' => $message_footer, 'footer' => $message_footer,
)); ));
watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true))); //watchdog('booking_debug', "<pre>HTML body themed\n@info</pre>", array('@info' => print_r($html_body, true)));
$params['body'] = $html_body; $params['body'] = $html_body;
} }
else { else {

View File

@@ -917,7 +917,7 @@ function booking_mail($key, &$message, $params) {
$message['headers'] += $params['headers']; $message['headers'] += $params['headers'];
} }
watchdog('booking_debug', "<pre>Mail hook:\n@info</pre>", array('@info' => print_r( $message, true))); //watchdog('booking_debug', "<pre>Mail hook:\n@info</pre>", array('@info' => print_r( $message, true)));
} }
/** /**
@@ -928,8 +928,7 @@ function booking_mail_alter(&$message) {
$implemented_message_ids = array('booking_registration_mail', 'booking_registration_mail_notify', 'booking_booking_email_custom', 'booking_registration_mail_bal_outstanding'); $implemented_message_ids = array('booking_registration_mail', 'booking_registration_mail_notify', 'booking_booking_email_custom', 'booking_registration_mail_bal_outstanding');
if (in_array($message['id'], $implemented_message_ids)) { if (in_array($message['id'], $implemented_message_ids)) {
//if($message['id'] == 'booking_registration_mail') { //watchdog('booking_debug', "Message key matched in booking_mail_alter, setting to html email.");
watchdog('booking_debug', "Message key matched in booking_mail_alter, setting to html email.");
$headers = array( $headers = array(
'MIME-Version' => '1.0', 'MIME-Version' => '1.0',
'Content-Type' => 'text/html; charset=UTF-8; format=flowed', 'Content-Type' => 'text/html; charset=UTF-8; format=flowed',
@@ -949,7 +948,7 @@ function booking_mail_alter(&$message) {
foreach($headers as $key => $value) { foreach($headers as $key => $value) {
$message['headers'][$key] = $value; $message['headers'][$key] = $value;
} }
watchdog('booking_debug', "<pre>Mail alter hook:\n@info</pre>", array('@info' => print_r( $message, true))); //watchdog('booking_debug', "<pre>Mail alter hook:\n@info</pre>", array('@info' => print_r( $message, true)));
} }
/** /**