diff options
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"); |