diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2019-06-04 20:51:26 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2019-06-04 21:23:34 +0200 |
commit | ead56a89fef63745d0e9d3a0b44ef198792c2784 (patch) | |
tree | f7831e1de0281a553c5f5df8fa0a4e1d156a8f27 /includes/pages | |
parent | b6eda8dbfc9880239bdc622a0b6988ad0a8ab722 (diff) |
Only show the shift "Comment" field for own entries
Diffstat (limited to 'includes/pages')
-rw-r--r-- | includes/pages/user_myshifts.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index 9ab86f2a..f962225e 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -87,8 +87,11 @@ function user_myshifts() } } - $comment = strip_request_item_nl('comment'); + $comment = $shift['Comment']; $user_source = User::find($shift['UID']); + if (auth()->user()->id == $user_source->id) { + $comment = strip_request_item_nl('comment'); + } if ($valid) { ShiftEntry_update([ @@ -111,7 +114,7 @@ function user_myshifts() } return ShiftEntry_edit_view( - User_Nick_render($shifts_user), + $shifts_user, date('Y-m-d H:i', $shift['start']) . ', ' . shift_length($shift), $shift['Name'], $shift['name'], |