diff options
Diffstat (limited to 'includes/controller')
-rw-r--r-- | includes/controller/shift_entries_controller.php | 6 | ||||
-rw-r--r-- | includes/controller/shifts_controller.php | 6 | ||||
-rw-r--r-- | includes/controller/shifttypes_controller.php | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php index c2851c7c..cb2d9bee 100644 --- a/includes/controller/shift_entries_controller.php +++ b/includes/controller/shift_entries_controller.php @@ -12,7 +12,7 @@ function shift_entry_add_controller() global $privileges, $user; $shift_id = 0; - if (isset($_REQUEST['shift_id']) && preg_match('/^[0-9]*$/', $_REQUEST['shift_id'])) { + if (isset($_REQUEST['shift_id']) && preg_match('/^\d*$/', $_REQUEST['shift_id'])) { $shift_id = $_REQUEST['shift_id']; } else { redirect(page_link_to('user_shifts')); @@ -32,7 +32,7 @@ function shift_entry_add_controller() } $type_id = 0; - if (isset($_REQUEST['type_id']) && preg_match('/^[0-9]*$/', $_REQUEST['type_id'])) { + if (isset($_REQUEST['type_id']) && preg_match('/^\d*$/', $_REQUEST['type_id'])) { $type_id = $_REQUEST['type_id']; } else { redirect(page_link_to('user_shifts')); @@ -64,7 +64,7 @@ function shift_entry_add_controller() if ( isset($_REQUEST['user_id']) - && preg_match('/^[0-9]*$/', $_REQUEST['user_id']) + && preg_match('/^\d*$/', $_REQUEST['user_id']) && ( in_array('user_shifts_admin', $privileges) || in_array('shiftentry_edit_angeltype_supporter', $privileges) diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php index 989f1a69..71459a10 100644 --- a/includes/controller/shifts_controller.php +++ b/includes/controller/shifts_controller.php @@ -78,7 +78,7 @@ function shift_edit_controller() $title = strip_request_item('title'); // Auswahl der sichtbaren Locations für die Schichten - if (isset($_REQUEST['rid']) && preg_match('/^[0-9]+$/', $_REQUEST['rid']) && isset($room[$_REQUEST['rid']])) { + if (isset($_REQUEST['rid']) && preg_match('/^\d+$/', $_REQUEST['rid']) && isset($room[$_REQUEST['rid']])) { $rid = $_REQUEST['rid']; } else { $valid = false; @@ -192,7 +192,7 @@ function shift_delete_controller() } // Schicht komplett löschen (nur für admins/user mit user_shifts_admin privileg) - if (!isset($_REQUEST['delete_shift']) || !preg_match('/^[0-9]*$/', $_REQUEST['delete_shift'])) { + if (!isset($_REQUEST['delete_shift']) || !preg_match('/^\d*$/', $_REQUEST['delete_shift'])) { redirect(page_link_to('user_shifts')); } $shift_id = $_REQUEST['delete_shift']; @@ -360,7 +360,7 @@ function shifts_json_export_controller() { global $user; - if (!isset($_REQUEST['key']) || !preg_match('/^[0-9a-f]{32}$/', $_REQUEST['key'])) { + if (!isset($_REQUEST['key']) || !preg_match('/^[\da-f]{32}$/', $_REQUEST['key'])) { engelsystem_error('Missing key.'); } diff --git a/includes/controller/shifttypes_controller.php b/includes/controller/shifttypes_controller.php index e6ba716f..9a470e29 100644 --- a/includes/controller/shifttypes_controller.php +++ b/includes/controller/shifttypes_controller.php @@ -79,7 +79,7 @@ function shifttype_edit_controller() error(_('Please enter a name.')); } - if (isset($_REQUEST['angeltype_id']) && preg_match('/^[0-9]+$/', $_REQUEST['angeltype_id'])) { + if (isset($_REQUEST['angeltype_id']) && preg_match('/^\d+$/', $_REQUEST['angeltype_id'])) { $angeltype_id = $_REQUEST['angeltype_id']; } else { $angeltype_id = null; |