diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-02-16 11:28:33 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-02-16 11:49:24 +0100 |
| commit | 992f972f95c265da2b7f54aabc926d2df7023dda (patch) | |
| tree | d1a22ced5da2c14dc9da85d56f3993eeeb707c46 | |
| parent | 370a8ddc87e4603ee21b52fab5c1525e636d59e2 (diff) | |
check seats AFTER the data has been initialized, fixes #6136
Closes #6136
Merge request studip/studip!4737
| -rw-r--r-- | app/controllers/course/room_requests.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/app/controllers/course/room_requests.php b/app/controllers/course/room_requests.php index 97622b5..a269e57 100644 --- a/app/controllers/course/room_requests.php +++ b/app/controllers/course/room_requests.php @@ -505,12 +505,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; @@ -540,6 +534,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 = intval($this->request->preparation_time / 60); $this->reply_lecturers = $this->request->reply_recipients === ResourceRequest::REPLY_LECTURER; $this->comment = $this->request->comment; |
