From 37f4ebb1b2a54b9a411fe456cf056028dfe94246 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Nov 2019 11:56:01 +0100 Subject: [PATCH] Update xcal.lib.php --- htdocs/core/lib/xcal.lib.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index d1679555c99..6d9fd4dab22 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -112,6 +112,41 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) $category = format_cal($format, $category); $location = format_cal($format, $location); + // Output the vCard/iCal VEVENT object + /* + Example from Google ical export for a 1 hour event: + BEGIN:VEVENT + DTSTART:20101103T120000Z + DTEND:20101103T130000Z + DTSTAMP:20101121T144902Z + UID:4eilllcsq8r1p87ncg7vc8dbpk@google.com + CREATED:20101121T144657Z + DESCRIPTION: + LAST-MODIFIED:20101121T144707Z + LOCATION: + SEQUENCE:0 + STATUS:CONFIRMED + SUMMARY:Tâche 1 heure + TRANSP:OPAQUE + END:VEVENT + + Example from Google ical export for a 1 day event: + BEGIN:VEVENT + DTSTART;VALUE=DATE:20101102 + DTEND;VALUE=DATE:20101103 + DTSTAMP:20101121T144902Z + UID:d09t43kcf1qgapu9efsmmo1m6k@google.com + CREATED:20101121T144607Z + DESCRIPTION: + LAST-MODIFIED:20101121T144607Z + LOCATION: + SEQUENCE:0 + STATUS:CONFIRMED + SUMMARY:Tâche 1 jour + TRANSP:TRANSPARENT + END:VEVENT + */ + if ($type === "event") { fwrite($calfileh, "BEGIN:VEVENT\n");