diff options
author | msquare <msquare@notrademark.de> | 2016-10-04 16:16:00 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-10-04 16:16:00 +0200 |
commit | 455e41720068740c523bfc4b15cf30e3811e4281 (patch) | |
tree | 6885da74178d0e995b9bff2610ffe45d1956acdc /includes/controller/shifts_controller.php | |
parent | 51d270db282be5cac9af2993a5c5b2c567d95506 (diff) |
fix variable naming problems
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r-- | includes/controller/shifts_controller.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php index aa1ac5d9..3300c0d2 100644 --- a/includes/controller/shifts_controller.php +++ b/includes/controller/shifts_controller.php @@ -88,12 +88,12 @@ function shift_edit_controller() { $msg .= error(_("The ending time has to be after the starting time."), true); } - foreach ($needed_angel_types_source as $type) { - if (isset($_REQUEST['type_' . $type['id']]) && preg_match("/^[0-9]+$/", trim($_REQUEST['type_' . $type['id']]))) { - $needed_angel_types[$type['id']] = trim($_REQUEST['type_' . $type['id']]); + foreach ($needed_angel_types as $needed_angeltype_id => $needed_angeltype_name) { + if (isset($_REQUEST['type_' . $needed_angeltype_id]) && test_request_int('type_' . $needed_angeltype_id)) { + $needed_angel_types[$needed_angeltype_id] = trim($_REQUEST['type_' . $needed_angeltype_id]); } else { $valid = false; - $msg .= error(sprintf(_("Please check your input for needed angels of type %s."), $type['name']), true); + $msg .= error(sprintf(_("Please check your input for needed angels of type %s."), $needed_angeltype_name), true); } } |