Refactor booking hooks
This commit is contained in:
@@ -31,7 +31,7 @@ module_load_include('inc', 'booking', 'booking.tokens');
|
||||
// Load the include that contains the user registration form
|
||||
module_load_include('inc', 'booking', 'booking.regn_form');
|
||||
// Load the include that processes booking nodes
|
||||
module_load_include('inc', 'booking', 'booking.node');
|
||||
module_load_include('inc', 'booking', 'booking.regn_node');
|
||||
// Load the include that contains the registration confirmation page
|
||||
module_load_include('inc', 'booking', 'booking.confirm');
|
||||
// Load the include that contains the registration balance payment page
|
||||
@@ -791,37 +791,6 @@ function booking_mail($key, &$message, $params) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Registration node modification hooks for booking nodes.
|
||||
*/
|
||||
function booking_insert($node) {
|
||||
//moved to booking.register.inc
|
||||
watchdog('booking', 'Inserting person: @info', array('@info' => var_export($node, TRUE)));
|
||||
_booking_insert($node);
|
||||
}
|
||||
|
||||
function booking_update($node) {
|
||||
//moved to booking.register.inc
|
||||
_booking_update($node);
|
||||
}
|
||||
|
||||
function booking_delete($node) {
|
||||
//moved to booking.register.inc
|
||||
_booking_delete($node);
|
||||
}
|
||||
|
||||
//Update node table specific attributes before hook_update is called
|
||||
function booking_node_presave($node) {
|
||||
global $event;
|
||||
|
||||
if($node->type == 'booking')
|
||||
{
|
||||
$node->title = t('!event registration: !name',
|
||||
array('!event' => $event->booking_eventname, '!name' => $node->booking_firstname . ' ' . $node->booking_lastname));
|
||||
//watchdog('booking', 'Presave of person: @info', array('@info' => var_export($node, TRUE)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function for generating the "lucky number" to be used on the lanyard
|
||||
|
Reference in New Issue
Block a user