From f565f671898d28fef884beb7cef9fc648d0dc275 Mon Sep 17 00:00:00 2001 From: ppound Date: Tue, 14 Sep 2021 14:02:13 -0300 Subject: [PATCH] fix repeated reservation bookings --- reservation.inc | 2 +- reserve.series.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reservation.inc b/reservation.inc index 45736a0..fa48c12 100644 --- a/reservation.inc +++ b/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]; diff --git a/reserve.series.inc b/reserve.series.inc index eb2681d..4edb9d6 100644 --- a/reserve.series.inc +++ b/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 = '';