summaryrefslogtreecommitdiff
path: root/includes/controller/shift_entries_controller.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-10-03 17:55:49 +0200
committermsquare <msquare@notrademark.de>2016-10-03 17:55:49 +0200
commit09c931dcf585da440879c52bb32b5eb9ef0fb9b4 (patch)
treed3a9cb7f695abb2e68f19a52478175b4dfee6f01 /includes/controller/shift_entries_controller.php
parent6c8a11338391dda651b355ea3747ad82603901e4 (diff)
fix missing variables
Diffstat (limited to 'includes/controller/shift_entries_controller.php')
-rw-r--r--includes/controller/shift_entries_controller.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php
index a6121e75..d704c299 100644
--- a/includes/controller/shift_entries_controller.php
+++ b/includes/controller/shift_entries_controller.php
@@ -4,12 +4,21 @@
* Sign up for a shift.
*/
function shift_entry_add_controller() {
+ global $privileges, $user;
+
if (isset($_REQUEST['shift_id']) && preg_match("/^[0-9]*$/", $_REQUEST['shift_id'])) {
$shift_id = $_REQUEST['shift_id'];
} else {
redirect(page_link_to('user_shifts'));
}
+ // Locations laden
+ $rooms = sql_select("SELECT * FROM `Room` WHERE `show`='Y' ORDER BY `Name`");
+ $room_array = [];
+ foreach ($rooms as $room) {
+ $room_array[$room['RID']] = $room['Name'];
+ }
+
$shift = Shift($shift_id);
$shift['Name'] = $room_array[$shift['RID']];
if ($shift === false) {