Browse Source

fix repeated reservation bookings

d9
ppound 3 years ago
parent
commit
f565f67189
  1. 2
      reservation.inc
  2. 2
      reserve.series.inc

2
reservation.inc

@ -271,7 +271,7 @@ function reserve_form_reserve_reservation_form_alter(array &$form, FormStateInte
*/
function reserve_form_reserve_reservation_delete_form_alter(array &$form, FormStateInterface $form_state) {
// Retrieve an array which contains the path pieces.
$refer_path = $_SERVER[HTTP_REFERER];
$refer_path = $_SERVER["HTTP_REFERER"];
$path_args = explode('/', $refer_path);
$month = $path_args[6];

2
reserve.series.inc

@ -37,7 +37,7 @@ function reserve_reserve_reservation_insert($entity) {
$rid = $entity->reservable_id->getString();
$rtype = $entity->reservable_content_type->getString();
$ebundle = $rtype . '.' . \Drupal::entityTypeManager()
->getStorage($rtype)->load($id)->bundle();
->getStorage($rtype)->load($rid)->bundle();
$day = date('l', strtotime($start));
$msg = '';

Loading…
Cancel
Save