summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authorFelix Favre <felix.favre@protonet.info>2015-08-26 14:29:51 +0200
committerFelix Favre <felix.favre@protonet.info>2015-08-26 14:29:51 +0200
commit2df2398b876465acaedcac82640fa459a6071e18 (patch)
treeac6b26a1f3f308b9900a545e2f522171b8c1cb32 /includes/pages
parentab50115746af0bbd90df3993459c7b10e427c9ac (diff)
add more information to ical export
fixes #175
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/user_ical.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/pages/user_ical.php b/includes/pages/user_ical.php
index bd954a87..2f3d5cd5 100644
--- a/includes/pages/user_ical.php
+++ b/includes/pages/user_ical.php
@@ -23,12 +23,12 @@ function user_ical() {
view_user_shifts();
} else {
$ical_shifts = sql_select("
- SELECT `ShiftTypes`.`name`, `Shifts`.*, `Room`.`Name` as `room_name`
- FROM `ShiftEntry`
- INNER JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`)
+ 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']) . "'
+ INNER JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`)
+ WHERE `UID`='" . sql_escape($user['UID']) . "'
ORDER BY `start`");
}
@@ -37,7 +37,7 @@ function user_ical() {
foreach ($ical_shifts as $shift) {
$html .= "BEGIN:VEVENT\r\n";
$html .= "UID:" . md5($shift['start'] . $shift['end'] . $shift['name']) . "\r\n";
- $html .= "SUMMARY:" . str_replace("\n", "\\n", $shift['name']) . "\r\n";
+ $html .= "SUMMARY:" . str_replace("\n", "\\n", $shift['name']) . " (" . str_replace("\n", "\\n", $shift['title']) . ")\r\n";
if(isset($shift['Comment']))
$html .= "DESCRIPTION:" . str_replace("\n", "\\n", $shift['Comment']) . "\r\n";
$html .= "DTSTART;TZID=Europe/Berlin:" . date("Ymd\THis", $shift['start']) . "\r\n";