From 7a2eae0a4b41232d7a9dd9dfec7bf8dfe5e919bf Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Thu, 27 Dec 2012 14:46:55 +0100 Subject: fix sign out button and remove edit button for "myshifts" when viewing other users --- includes/pages/user_myshifts.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index d8f94b81..f38a81d0 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -79,9 +79,10 @@ function user_myshifts() { $html .= '' . $shift['name'] . ''; $html .= '' . $shift['Comment'] . ''; $html .= ''; - $html .= '' . Get_Text('edit') . ''; - if ($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600) - $html .= ' | ' . Get_Text('sign_off') . ''; + if ($id == $user['UID']) + $html .= '' . Get_Text('edit') . ''; + if (($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges)) + $html .= ' | ' . Get_Text('sign_off') . ''; $html .= ''; $html .= ''; } -- cgit v1.2.3-70-g09d2