summaryrefslogtreecommitdiff
path: root/includes/pages/user_myshifts.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-25 22:32:18 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-25 22:32:18 +0100
commite89acc0c1d1188662da7490e3a75a4a5c3950a75 (patch)
treef646260cc23195008f6ca5152426b17641fc4f69 /includes/pages/user_myshifts.php
parentbcd33c02c814a8d82c08c078c8fae287d1cd95a5 (diff)
parent544a51612f14c4f3cf7d1c4a6de26a99ea94b788 (diff)
merge feature-shift-types
Diffstat (limited to 'includes/pages/user_myshifts.php')
-rw-r--r--includes/pages/user_myshifts.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index 6fe9afa2..e557054d 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -35,12 +35,14 @@ function user_myshifts() {
`ShiftEntry`.`freeload_comment`,
`ShiftEntry`.`Comment`,
`ShiftEntry`.`UID`,
+ `ShiftTypes`.`name`,
`Shifts`.*,
`Room`.`Name`,
`AngelTypes`.`name` as `angel_type`
FROM `ShiftEntry`
JOIN `AngelTypes` ON (`ShiftEntry`.`TID` = `AngelTypes`.`id`)
JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`)
+ JOIN `ShiftTypes` ON (`ShiftTypes`.`id` = `Shifts`.`shifttype_id`)
JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`)
WHERE `ShiftEntry`.`id`=" . sql_escape($id) . "
AND `UID`=" . sql_escape($shifts_user['UID']) . " LIMIT 1");
@@ -76,7 +78,11 @@ function user_myshifts() {
redirect(page_link_to('user_myshifts'));
} elseif (isset($_REQUEST['cancel']) && preg_match("/^[0-9]*$/", $_REQUEST['cancel'])) {
$id = $_REQUEST['cancel'];
- $shift = sql_select("SELECT `Shifts`.`start` FROM `Shifts` INNER JOIN `ShiftEntry` USING (`SID`) WHERE `ShiftEntry`.`id`=" . sql_escape($id) . " AND `UID`=" . sql_escape($shifts_user['UID']) . " LIMIT 1");
+ $shift = sql_select("
+ SELECT `Shifts`.`start`
+ FROM `Shifts`
+ INNER JOIN `ShiftEntry` USING (`SID`)
+ WHERE `ShiftEntry`.`id`=" . sql_escape($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)) {