From 8409f848da111b269c7ccc73ae3b0f759cd2a586 Mon Sep 17 00:00:00 2001 From: Murtaza Sultani Date: Thu, 8 May 2025 11:58:37 +0200 Subject: Remove existing booking when it overlaps with a locked booking type --- lib/models/resources/Resource.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/models/resources/Resource.php b/lib/models/resources/Resource.php index c264053..8c1158a 100644 --- a/lib/models/resources/Resource.php +++ b/lib/models/resources/Resource.php @@ -860,6 +860,10 @@ class Resource extends SimpleORMap implements StudipItem $booking->internal_comment = $internal_comment; $booking->booking_type = (int)$booking_type; + if ($booking_type === ResourceBooking::TYPE_LOCK) { + $force_booking = true; + } + //We can finally store the new booking. try { -- cgit v1.0