From 96f1d9fd541d0c5ef78151f8c69a89c41684b67a Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 30 Aug 2017 14:59:27 +0200 Subject: Bugfixes --- includes/controller/shift_entries_controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'includes/controller/shift_entries_controller.php') diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php index 148b19fb..150db2e9 100644 --- a/includes/controller/shift_entries_controller.php +++ b/includes/controller/shift_entries_controller.php @@ -13,7 +13,7 @@ function shift_entry_add_controller() $request = request(); $shift_id = 0; - if ($request->has('shift_id') && preg_match('/^\d*$/', $request->input('shift_id'))) { + if ($request->has('shift_id') && preg_match('/^\d+$/', $request->input('shift_id'))) { $shift_id = $request->input('shift_id'); } else { redirect(page_link_to('user_shifts')); @@ -33,7 +33,7 @@ function shift_entry_add_controller() $shift['Name'] = $room_array[$shift['RID']]; $type_id = 0; - if ($request->has('type_id') && preg_match('/^\d*$/', $request->input('type_id'))) { + if ($request->has('type_id') && preg_match('/^\d+$/', $request->input('type_id'))) { $type_id = $request->input('type_id'); } else { redirect(page_link_to('user_shifts')); @@ -64,7 +64,7 @@ function shift_entry_add_controller() if ( $request->has('user_id') - && preg_match('/^\d*$/', $request->input('user_id')) + && preg_match('/^\d+$/', $request->input('user_id')) && ( in_array('user_shifts_admin', $privileges) || in_array('shiftentry_edit_angeltype_supporter', $privileges) -- cgit v1.2.3-54-g00ecf