fix variable naming problems

main
msquare 8 years ago
parent 51d270db28
commit 455e417200

@ -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);
}
}

@ -118,7 +118,7 @@ function admin_rooms() {
engelsystem_error("Unable to load angeltype.");
}
if ($angeltype != null) {
NeededAngelType_add(null, $angeltype_id, $room_id, $count);
NeededAngelType_add(null, $angeltype_id, $room_id, $angeltype_count);
$needed_angeltype_info[] = $angeltype['name'] . ": " . $angeltype_count;
}
}

@ -9,7 +9,7 @@ function shifts_title() {
* Start different controllers for deleting shifts and shift_entries, edit shifts and add shift entries.
*/
function user_shifts() {
global $user, $privileges;
global $user;
if (User_is_freeloader($user)) {
redirect(page_link_to('user_myshifts'));

Loading…
Cancel
Save