From a791a75b0a893308f35865542149c77f8761b3a0 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Wed, 17 Dec 2014 17:22:35 +0100 Subject: integrate shift type into shifts --- includes/pages/user_ical.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'includes/pages/user_ical.php') 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"); -- cgit v1.2.3-70-g09d2