aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2026-02-16 11:28:33 +0100
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2026-02-16 11:28:33 +0100
commit7295a1eb22d399d457245383b593835bdc98f0e3 (patch)
tree5a6843a1803301eaef3c9f629ff88322fc9b59ea /app
parent8809b5af183340dd07d8945a4191cee201126a8d (diff)
check seats AFTER the data has been initialized, fixes #6136
Closes #6136 Merge request studip/studip!4737
Diffstat (limited to 'app')
-rw-r--r--app/controllers/course/room_requests.php16
1 files 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;