diff options
author | msquare <msquare@notrademark.de> | 2017-07-20 18:34:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 18:34:19 +0200 |
commit | 37d4edcd9ace5021b6eb02761a9c3865c5607f33 (patch) | |
tree | 16c0da4cd2d9c6c10f5d5e02c1b02bd0986636c2 /includes/controller/rooms_controller.php | |
parent | 9b3f6f557a127fef16be267c26f8239dc1c22126 (diff) | |
parent | b7ebb05b8e71b391b6b029fceb5a2d00ff27004c (diff) |
Merge pull request #328 from MyIgel/master
Changed $_GET, $_POST and $_REQUEST to use the Request object
Diffstat (limited to 'includes/controller/rooms_controller.php')
-rw-r--r-- | includes/controller/rooms_controller.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/includes/controller/rooms_controller.php b/includes/controller/rooms_controller.php index 3082a28d..2d6f1a77 100644 --- a/includes/controller/rooms_controller.php +++ b/includes/controller/rooms_controller.php @@ -19,6 +19,7 @@ function room_controller() redirect(page_link_to()); } + $request = request(); $room = load_room(false); if ($room['show'] != 'Y' && !in_array('admin_rooms', $privileges)) { redirect(page_link_to()); @@ -42,8 +43,8 @@ function room_controller() if (!empty($days)) { $selected_day = $days[0]; } - if (isset($_REQUEST['shifts_filter_day'])) { - $selected_day = $_REQUEST['shifts_filter_day']; + if ($request->has('shifts_filter_day')) { + $selected_day = $request->input('shifts_filter_day'); } $shiftsFilter->setStartTime(parse_date('Y-m-d H:i', $selected_day . ' 00:00')); $shiftsFilter->setEndTime(parse_date('Y-m-d H:i', $selected_day . ' 23:59')); @@ -66,11 +67,13 @@ function room_controller() */ function rooms_controller() { - if (!isset($_REQUEST['action'])) { - $_REQUEST['action'] = 'list'; + $request = request(); + $action = $request->input('action'); + if (!$request->has('action')) { + $action = 'list'; } - switch ($_REQUEST['action']) { + switch ($action) { case 'view': return room_controller(); case 'list': @@ -112,7 +115,7 @@ function load_room($onlyVisible = true) redirect(page_link_to()); } - $room = Room($_REQUEST['room_id'], $onlyVisible); + $room = Room(request()->input('room_id'), $onlyVisible); if ($room == null) { redirect(page_link_to()); } |