diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php index 818557a4..ea5e319e 100644 --- a/includes/controller/shift_entries_controller.php +++ b/includes/controller/shift_entries_controller.php @@ -10,8 +10,8 @@ use Engelsystem\ShiftSignupState; function shift_entries_controller() { global $user; - - if(!isset($user)) { + + if (!isset($user)) { redirect(page_link_to('login')); } diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 198897f3..16267635 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -351,8 +351,11 @@ function User_view_myshift($shift, $user_source, $its_me) } $myshift = [ - 'date' => glyph('calendar') . date('Y-m-d', $shift['start']) . '
' - . glyph('time') . date('H:i', $shift['start']) . ' - ' . date('H:i', $shift['end']), + 'date' => glyph('calendar') + . date('Y-m-d', $shift['start']) . '
' + . glyph('time') . date('H:i', $shift['start']) + . ' - ' + . date('H:i', $shift['end']), 'duration' => round(($shift['end'] - $shift['start']) / 3600, 2) . ' h', 'room' => Room_name_render($shift), 'shift_info' => $shift_info, @@ -364,7 +367,9 @@ function User_view_myshift($shift, $user_source, $its_me) } if ($shift['freeloaded']) { - $myshift['duration'] = '

' . round(-($shift['end'] - $shift['start']) / 3600 * 2, 2) . ' h' . '

'; + $myshift['duration'] = '

' + . round(-($shift['end'] - $shift['start']) / 3600 * 2, 2) . ' h' + . '

'; if (in_array('user_shifts_admin', $privileges)) { $myshift['comment'] .= '
' . '

' . _('Freeloaded') . ': ' . $shift['freeload_comment'] . '

'; @@ -424,7 +429,7 @@ function User_view_myshifts($shifts, $user_source, $its_me, $tshirt_score, $tshi 'comment' => '', 'actions' => '' ]; - if($its_me || $tshirt_admin) { + if ($its_me || $tshirt_admin) { $myshifts_table[] = [ 'date' => '' . _('Your t-shirt score') . '™:', 'duration' => '' . round($tshirt_score, 2) . ' h', @@ -452,8 +457,17 @@ function User_view_myshifts($shifts, $user_source, $its_me, $tshirt_score, $tshi * @param bool $tshirt_admin * @return string */ -function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me, $tshirt_score, $tshirt_admin) -{ +function User_view( + $user_source, + $admin_user_privilege, + $freeloader, + $user_angeltypes, + $user_groups, + $shifts, + $its_me, + $tshirt_score, + $tshirt_admin +) { $user_name = htmlspecialchars($user_source['Vorname']) . ' ' . htmlspecialchars($user_source['Name']); $myshifts_table = User_view_myshifts($shifts, $user_source, $its_me, $tshirt_score, $tshirt_admin);