diff options
| author | Murtaza Sultani <sultani@data-quest.de> | 2025-05-08 15:02:09 +0200 |
|---|---|---|
| committer | Murtaza Sultani <sultani@data-quest.de> | 2025-05-08 15:02:09 +0200 |
| commit | 0ec8850969175e6ed7fc8e5e3c451668620252b3 (patch) | |
| tree | ac621c904c71ba9988805e96a34b2bcecc43c0d9 | |
| parent | eb729ae22a46146b74c2b92920087bec765211ac (diff) | |
Set booking_type value if is missing
| -rw-r--r-- | app/controllers/resources/booking.php | 2 | ||||
| -rw-r--r-- | lib/models/resources/Resource.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/resources/booking.php b/app/controllers/resources/booking.php index b2ab0da..a9aeaf1 100644 --- a/app/controllers/resources/booking.php +++ b/app/controllers/resources/booking.php @@ -1533,7 +1533,7 @@ class Resources_BookingController extends AuthenticatedController } } - $this->booking_type = $booking_type; + $this->booking_type = $booking_type ?: Request::int('booking_type'); $this->addEditHandler('add'); } diff --git a/lib/models/resources/Resource.php b/lib/models/resources/Resource.php index 6c3d095..8c1158a 100644 --- a/lib/models/resources/Resource.php +++ b/lib/models/resources/Resource.php @@ -860,7 +860,7 @@ class Resource extends SimpleORMap implements StudipItem $booking->internal_comment = $internal_comment; $booking->booking_type = (int)$booking_type; - if ($booking_type === ResourceBooking::TYPE_LOCK && $GLOBALS['perm']->have_perm('admin')) { + if ($booking_type === ResourceBooking::TYPE_LOCK) { $force_booking = true; } |
