diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-12-17 17:22:35 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-12-17 17:22:35 +0100 |
commit | a791a75b0a893308f35865542149c77f8761b3a0 (patch) | |
tree | 15635291aea7fe4d0b94a761bef885abcad708b0 /includes/pages/user_ical.php | |
parent | 634a3739b25bc5167c084b431c931d6d60944a1d (diff) |
integrate shift type into shifts
Diffstat (limited to 'includes/pages/user_ical.php')
-rw-r--r-- | includes/pages/user_ical.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/pages/user_ical.php b/includes/pages/user_ical.php index 911f48aa..ba832842 100644 --- a/includes/pages/user_ical.php +++ b/includes/pages/user_ical.php @@ -22,7 +22,14 @@ function user_ical() { require_once realpath(__DIR__ . '/user_shifts.php'); view_user_shifts(); } else { - $ical_shifts = sql_select("SELECT `Shifts`.*, `Room`.`Name` as `room_name` FROM `ShiftEntry` INNER JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) INNER JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `UID`=" . sql_escape($user['UID']) . " ORDER BY `start`"); + $ical_shifts = sql_select(" + SELECT `ShiftTypes`.`name`, `Shifts`.*, `Room`.`Name` as `room_name` + FROM `ShiftEntry` + INNER JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) + JOIN `ShiftTypes` ON (`ShiftTypes`.`id` = `Shifts`.`shifttype_id`) + INNER JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) + WHERE `UID`=" . sql_escape($user['UID']) . " + ORDER BY `start`"); } header("Content-Type: text/calendar; charset=utf-8"); |