From 7c6afc2bfe3263b91ecabf5530da57fe1162ea0b Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 10 Oct 2018 03:10:28 +0200 Subject: Removed `User($id)` function :tada: --- includes/view/ShiftEntry_view.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'includes/view/ShiftEntry_view.php') diff --git a/includes/view/ShiftEntry_view.php b/includes/view/ShiftEntry_view.php index 1d6ba3a3..51f02cce 100644 --- a/includes/view/ShiftEntry_view.php +++ b/includes/view/ShiftEntry_view.php @@ -1,12 +1,14 @@ id), glyph('remove') . __('cancel')), button(shift_entry_delete_link($shiftEntry, [ 'continue' => 1 ]), glyph('ok') . __('delete'), 'btn-danger') @@ -36,11 +38,11 @@ function ShiftEntry_delete_view_admin($shiftEntry, $shift, $angeltype, $signoff_ * @param array $shiftEntry * @param array $shift * @param array $angeltype - * @param array $signoff_user + * @param int $signoff_user_id * * @return string HTML */ -function ShiftEntry_delete_view($shiftEntry, $shift, $angeltype, $signoff_user) +function ShiftEntry_delete_view($shiftEntry, $shift, $angeltype, $signoff_user_id) { return page_with_title(ShiftEntry_delete_title(), [ info(sprintf( @@ -51,7 +53,7 @@ function ShiftEntry_delete_view($shiftEntry, $shift, $angeltype, $signoff_user) $angeltype['name'] ), true), buttons([ - button(user_link($signoff_user['UID']), glyph('remove') . __('cancel')), + button(user_link($signoff_user_id), glyph('remove') . __('cancel')), button(shift_entry_delete_link($shiftEntry, [ 'continue' => 1 ]), glyph('ok') . __('delete'), 'btn-danger') @@ -100,7 +102,7 @@ function ShiftEntry_create_view_admin($shift, $room, $angeltype, $angeltypes_sel * @param array $shift * @param array $room * @param array $angeltype - * @param array $signup_user + * @param User $signup_user * @param array $users_select * @return string */ @@ -113,7 +115,7 @@ function ShiftEntry_create_view_supporter($shift, $room, $angeltype, $signup_use info(sprintf(__('Do you want to sign up the following user for this shift as %s?'), AngelType_name_render($angeltype)), true), form([ - form_select('user_id', __('User'), $users_select, $signup_user['UID']), + form_select('user_id', __('User'), $users_select, $signup_user->id), form_submit('submit', glyph('ok') . __('Save')) ]) ]); -- cgit v1.2.3-54-g00ecf