Travel form tweaks
This commit is contained in:
@@ -1368,6 +1368,32 @@ function _booking_update($node) {
|
||||
else
|
||||
watchdog('booking', 'Still no room on the booked in list though.');
|
||||
}
|
||||
//check if someone has moved to booked-in list from waiting-list
|
||||
elseif ($previous_status->booking_status == 2 && $node->booking_status == 1)
|
||||
{
|
||||
watchdog('booking', 'Detected person moving from Waiting list to Booked In');
|
||||
|
||||
//send them an email
|
||||
_booking_promoted_from_waitinglist_email($node->nid);
|
||||
|
||||
//see if there are others to process also
|
||||
$waitinglist_nid = _booking_get_waitinglist_top();
|
||||
|
||||
//check if there is room on the booked-in list
|
||||
while (_booking_check_bookings_full() == False && $waitinglist_nid > 0)
|
||||
{
|
||||
watchdog('booking', 'There is room on the booked in list, so process the next person on the waiting list, who has a node id of ' . $waitinglist_nid);
|
||||
|
||||
//update their registration status
|
||||
_booking_change_status($waitinglist_nid, 1);
|
||||
|
||||
//send them an email
|
||||
_booking_promoted_from_waitinglist_email($waitinglist_nid);
|
||||
|
||||
$waitinglist_nid = _booking_get_waitinglist_top();
|
||||
}
|
||||
|
||||
}
|
||||
//check if someone has been demoted to the "missed payment deadline" status from being booked-in
|
||||
elseif ($previous_status->booking_status == 1 && $node->booking_status == 4)
|
||||
{
|
||||
|
Reference in New Issue
Block a user