bugfix
This commit is contained in:
@@ -861,16 +861,18 @@ function booking_variety_regn_edit_form_submit($form, &$form_state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//iterate over the old list comparing to the new list in case there are regn counts we need to decrease
|
//iterate over the old list comparing to the new list in case there are regn counts we need to decrease
|
||||||
foreach ($previous_variety_ids as $previous_tid => $previous_sid) {
|
if (isset($previous_variety_ids)) {
|
||||||
if (! isset($booking_variety_ids[$previous_tid])) {
|
foreach ($previous_variety_ids as $previous_tid => $previous_sid) {
|
||||||
watchdog('booking_debug', 'Person @nid in timeslot @tid is no longer registered for a variety session so reducing count for @vid by 1', array(
|
if (! isset($booking_variety_ids[$previous_tid])) {
|
||||||
'@nid' => $values['nid'], '@tid' => $previous_tid, '@vid' => $previous_sid,
|
watchdog('booking_debug', 'Person @nid in timeslot @tid is no longer registered for a variety session so reducing count for @vid by 1', array(
|
||||||
));
|
'@nid' => $values['nid'], '@tid' => $previous_tid, '@vid' => $previous_sid,
|
||||||
// reduce regn count for old session
|
));
|
||||||
db_update('booking_variety_sessions')
|
// reduce regn count for old session
|
||||||
->expression('booking_variety_regncount', 'booking_variety_regncount - :count', array(':count' => 1))
|
db_update('booking_variety_sessions')
|
||||||
->condition('vid', $previous_sid)
|
->expression('booking_variety_regncount', 'booking_variety_regncount - :count', array(':count' => 1))
|
||||||
->execute();
|
->condition('vid', $previous_sid)
|
||||||
|
->execute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user