booking form post submit trigger update bf/gf for matching attendee
This commit is contained in:
@@ -1278,7 +1278,22 @@ function _booking_form_submit_post_triggers($node)
|
||||
}
|
||||
}
|
||||
|
||||
//@todo repeat the process above for bf/gf
|
||||
//repeat the process above for bf/gf
|
||||
if ($node->booking_bf_gf_nid != 0) {
|
||||
$partner = db_query("Select booking_bf_gf_nid from {booking_person} where nid = :nid", array(
|
||||
':nid' => $node->booking_bf_gf_nid
|
||||
))->fetchObject();
|
||||
if ($partner->booking_bf_gf_nid == 0) {
|
||||
watchdog('booking', 'Updating bf/gf node !partner to refer to this node !nid', array(
|
||||
'!partner' => $node->booking_bf_gf_nid,
|
||||
'!nid' => $node->nid
|
||||
));
|
||||
//update the partner id of the partner to refer to this node
|
||||
db_update('booking_person')->fields(array(
|
||||
'booking_bf_gf_nid' => $node->nid
|
||||
))->condition('nid', $node->booking_bf_gf_nid)->execute();
|
||||
}
|
||||
}
|
||||
|
||||
//check whether we should send an automatic email even though they haven't paid yet
|
||||
if (variable_get('booking_auto_confirm_email', 0) == 1) {
|
||||
|
Reference in New Issue
Block a user