fix missing tokens

This commit is contained in:
2017-07-01 23:32:32 +10:00
parent 71c0cbb26b
commit dc2f10fee3
2 changed files with 6 additions and 12 deletions

View File

@@ -17,6 +17,7 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
//load the node matching this id
$node = node_load($nid);
$tokens = booking_define_personspecific_tokens($node);
watchdog('booking', 'Sending registration email to !first !last',
array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname));
@@ -51,7 +52,7 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
array(
'module' => 'booking',
'key' => 'registration_mail',
'body' => _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual),
'body' => _booking_registration_email_generate($node, $tokens, $waiting_list, $balance_payment, $manual),
'subject' => $subject,
'footer' => $message_footer,
));
@@ -59,7 +60,7 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
$params['body'] = $html_body;
}
else {
$body = _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual);
$body = _booking_registration_email_generate($node, $tokens, $waiting_list, $balance_payment, $manual);
$params['body'] = $body;
}
@@ -159,9 +160,9 @@ function _booking_regn_notifyonly_email($node, $balance_payment) {
* @param $waiting_list - whether this registration is on on the waiting list
* @return array containing email text
*/
function _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual) {
function _booking_registration_email_generate($node, $tokens, $waiting_list, $balance_payment, $manual) {
global $event;
$tokens = booking_define_personspecific_tokens($node);
//$tokens = booking_define_personspecific_tokens($node);
$body = "";
if ($balance_payment == True) {