summaryrefslogtreecommitdiff
path: root/includes/pages/user_myshifts.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-03 03:22:48 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 03:22:48 +0100
commit356b2582f3e6a43ecf2607acad4a7fe0b37f659a (patch)
treee02c9214b23a0b9ec33aa725db962d565bd30a82 /includes/pages/user_myshifts.php
parentd71e7bbfad2f07f82df0c515608996d250fd4182 (diff)
PPHDoc, formatting, fixes, cleanup
Diffstat (limited to 'includes/pages/user_myshifts.php')
-rw-r--r--includes/pages/user_myshifts.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index 8c2d9442..f9050cdd 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -1,14 +1,21 @@
<?php
+/**
+ * @return string
+ */
function myshifts_title()
{
return _("My shifts");
}
-// Zeigt die Schichten an, die ein Benutzer belegt
+/**
+ * Zeigt die Schichten an, die ein Benutzer belegt
+ *
+ * @return string
+ */
function user_myshifts()
{
- global $LETZTES_AUSTRAGEN;
+ global $last_unsubscribe;
global $user, $privileges;
if (
@@ -120,7 +127,7 @@ function user_myshifts()
WHERE `ShiftEntry`.`id`='" . sql_escape($user_id) . "' AND `UID`='" . sql_escape($shifts_user['UID']) . "'");
if (count($shift) > 0) {
$shift = $shift[0];
- if (($shift['start'] > time() + $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges)) {
+ if (($shift['start'] > time() + $last_unsubscribe * 3600) || in_array('user_shifts_admin', $privileges)) {
$result = ShiftEntry_delete($user_id);
if ($result === false) {
engelsystem_error('Unable to delete shift entry.');
@@ -146,4 +153,5 @@ function user_myshifts()
}
redirect(page_link_to('users') . '&action=view&user_id=' . $shifts_user['UID']);
+ return '';
}