another fix

This commit is contained in:
2017-06-29 16:14:34 +10:00
parent 49ee2846a2
commit 13f5125ccc

View File

@@ -1303,14 +1303,13 @@ function _booking_form_submit_post_triggers($node)
global $event;
//mark early access code as being used
if (variable_get('booking_enable_earlyaccess_codes', 0) == 1 && $node->booking_earlyaccess_code != '') {
if (variable_get('booking_enable_earlyaccess_codes', 0) == 1 && $node->booking_earlyaccess_code_id != '') {
watchdog('booking_debug', "<pre>Early access code used, node info below\n@info</pre>", array('@info' => print_r($node, true)));
//update the database to mark the code as being unavailable
db_update('booking_earlyaccess_codes')->fields(array(
'booking_earlyaccess_code_avail' => 'N'
))->condition('booking_earlyaccess_code', $node->booking_earlyaccess_code)->execute();
))->condition('cid', $node->booking_earlyaccess_code_id)->execute();
}
//do these triggers really do anything? The partner id and bf/gf id won't be set in initial submit