From 7295a1eb22d399d457245383b593835bdc98f0e3 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms Date: Mon, 16 Feb 2026 11:28:33 +0100 Subject: check seats AFTER the data has been initialized, fixes #6136 Closes #6136 Merge request studip/studip!4737 --- app/controllers/course/room_requests.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/controllers/course/room_requests.php b/app/controllers/course/room_requests.php index acad361..c3680bc 100644 --- a/app/controllers/course/room_requests.php +++ b/app/controllers/course/room_requests.php @@ -506,12 +506,6 @@ class Course_RoomRequestsController extends AuthenticatedController ); } - // no min number of seats - if (empty($_SESSION[$request_id]['selected_properties']['seats']) || $_SESSION[$request_id]['selected_properties']['seats'] < 1) { - PageLayout::postError(_('Die Mindestanzahl der Sitzplätze muss größer als 0 sein!')); - $this->redirect('course/room_requests/request_find_available_properties/' . $request_id . '/1/category'); - } - $this->request_id = $request_id; $this->step = 3; @@ -541,6 +535,16 @@ class Course_RoomRequestsController extends AuthenticatedController $this->toSession('selected_properties', $this->selected_properties); } + // no min number of seats + if ( + empty($this->selected_properties['seats']) + || $this->selected_properties['seats'] < 1 + ) { + PageLayout::postError(_('Die Mindestanzahl der Sitzplätze muss größer als 0 sein!')); + $this->redirect('course/room_requests/request_find_available_properties/' . $request_id . '/1/category'); + return; + } + $this->preparation_time = $this->request->preparation_time / 60; $this->subsequent_time = $this->request->subsequent_time / 60; $this->reply_lecturers = $this->request->reply_recipients === ResourceRequest::REPLY_LECTURER; -- cgit v1.0