From 8506d6d27e3b926521007064abcdcc2f69c6aa06 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sat, 21 Jan 2017 23:07:20 +0100 Subject: Refactoring: Config cleanup / moved to class --- includes/pages/user_myshifts.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'includes/pages/user_myshifts.php') diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index acb78875..62d87d27 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -17,7 +17,6 @@ function myshifts_title() */ function user_myshifts() { - global $last_unsubscribe; global $user, $privileges; if ( @@ -144,7 +143,10 @@ function user_myshifts() ); if (count($shift) > 0) { $shift = array_shift($shift); - if (($shift['start'] > time() + $last_unsubscribe * 3600) || in_array('user_shifts_admin', $privileges)) { + if ( + ($shift['start'] > time() + config('last_unsubscribe') * 3600) + || in_array('user_shifts_admin', $privileges) + ) { $result = ShiftEntry_delete($user_id); if ($result === false) { engelsystem_error('Unable to delete shift entry.'); -- cgit v1.2.3-70-g09d2