From 9d709b2a7349fc5b2ad9d84ddc36c505cccafed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Fri, 27 Dec 2013 18:56:20 +0100 Subject: [PATCH] freeloader fix, admins should edit user shifts --- includes/pages/user_myshifts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index c8b9ca0f..1395d3bf 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -122,8 +122,8 @@ function user_myshifts() { } $myshift['actions'] = ""; - if ($id == $user['UID']) - $myshift['actions'] .= img_button(page_link_to('user_myshifts') . '&edit=' . $shift['id'], 'pencil', _("edit")); + if ($id == $user['UID'] || in_array('user_shifts_admin', $privileges)) + $myshift['actions'] .= img_button(page_link_to('user_myshifts') . '&edit=' . $shift['id'] . '&id=' . $id, 'pencil', _("edit")); if (($shift['start'] > time() + $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges)) $myshift['actions'] .= img_button(page_link_to('user_myshifts') . (($id != $user['UID']) ? '&id=' . $id : '') . '&cancel=' . $shift['id'], 'cross', _("sign off"));