summaryrefslogtreecommitdiff
path: root/includes/pages/user_myshifts.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-01-21 23:07:20 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-21 23:07:20 +0100
commit8506d6d27e3b926521007064abcdcc2f69c6aa06 (patch)
tree4c0207871b3e9a831f8a619ff095ad71adb66f05 /includes/pages/user_myshifts.php
parent740026a9de6cba73c4e77aba78950d0a791b6b62 (diff)
Refactoring: Config cleanup / moved to class
Diffstat (limited to 'includes/pages/user_myshifts.php')
-rw-r--r--includes/pages/user_myshifts.php6
1 files changed, 4 insertions, 2 deletions
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.');