Attendee deletion cleanup
This commit is contained in:
@@ -1324,7 +1324,7 @@ function booking_load($nodes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watchdog('booking', 'Final loaded node: @info', array('@info' => var_export($nodes, TRUE)));
|
//watchdog('booking', 'Final loaded node: @info', array('@info' => var_export($nodes, TRUE)));
|
||||||
// no return necessary since $nodes array members reference objects global to this function
|
// no return necessary since $nodes array members reference objects global to this function
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1755,6 +1755,11 @@ function _booking_delete($node) {
|
|||||||
$last = $node->booking_lastname;
|
$last = $node->booking_lastname;
|
||||||
$first = $node->booking_firstname;
|
$first = $node->booking_firstname;
|
||||||
|
|
||||||
|
//clean up other tables first
|
||||||
|
_booking_person_rooms_cleanup($node->nid);
|
||||||
|
_booking_person_studygroups_cleanup($node->nid);
|
||||||
|
|
||||||
|
//then clean up primary table
|
||||||
$num_deleted = db_delete('booking_person')
|
$num_deleted = db_delete('booking_person')
|
||||||
->condition('nid', $node->nid)
|
->condition('nid', $node->nid)
|
||||||
->execute();
|
->execute();
|
||||||
|
Reference in New Issue
Block a user