studygroup cleanup fixes
This commit is contained in:
@@ -470,33 +470,16 @@ function _booking_studygroups_cleanup($nid)
|
||||
//first of all make sure we need to do anything
|
||||
if (variable_get('booking_enable_studygroups', 0) == 1)
|
||||
{
|
||||
/*
|
||||
//look up the titles of the study groups
|
||||
$studygroups_query = db_query("SELECT * FROM {booking_studygroup_list} WHERE booking_eventid = :eid",
|
||||
array(':eid' => $event->eid));
|
||||
$studygroups = $studygroups_query->fetchAllAssoc('sid');
|
||||
*/
|
||||
|
||||
|
||||
//query for any groups this person is assigned to
|
||||
$to_remove_query = db_query("SELECT m.* FROM {booking_studygroup_mapping} m WHERE booking_node_id = :nid",
|
||||
array(':nid' => $nid));
|
||||
$to_remove = $to_remove_query->fetchAll();
|
||||
|
||||
foreach ($to_remove as $group)
|
||||
{
|
||||
/*
|
||||
$role = "None";
|
||||
if ($group->booking_is_leader == 'Y')
|
||||
$role = "Lead group #" . $group->booking_studygroup_id;
|
||||
elseif ($group->booking_is_helper == 'Y')
|
||||
$role = "Help group #" . $group->booking_studygroup_id;
|
||||
elseif ($group->booking_is_reserveleader == 'Y')
|
||||
$role = "Reserve group #" . $group->booking_studygroup_id;
|
||||
*/
|
||||
{
|
||||
$message = t("Removing id !nid from group id !group with role !role",
|
||||
array('!nid' => $nid, '!group' => $group->booking_studygroup_id, '
|
||||
!role' => _booking_studygroup_role_lookup($group->booking_studygroup_role)
|
||||
array('!nid' => $nid, '!group' => $group->booking_studygroup_id,
|
||||
'!role' => _booking_studygroup_role_lookup($group->booking_studygroup_role)
|
||||
)
|
||||
);
|
||||
watchdog('booking', $message);
|
||||
|
@@ -1094,7 +1094,7 @@ function booking_load_query($node_ids = NULL, $fetchAssoc = FALSE)
|
||||
->fields('t')
|
||||
->fields('pr', array('booking_price', 'booking_price_descrip','booking_late_price'))
|
||||
->fields('rm', array('booking_room_bedtype'))
|
||||
->fields('r', array('booking_room_location_id', 'booking_room_number'));
|
||||
->fields('r', array('rid', 'booking_room_location_id', 'booking_room_number'));
|
||||
|
||||
//now add the study group fields if applicable
|
||||
if (variable_get('booking_enable_studygroups', 0) == 1)
|
||||
|
Reference in New Issue
Block a user