more ical fields

This commit is contained in:
Christoph Haas 2012-12-09 18:50:41 +00:00
parent 302f50b16a
commit d7ea948372

View File

@ -120,14 +120,23 @@ class CalendarexporterModule extends Module {
$head = "BEGIN:VEVENT\n"; $head = "BEGIN:VEVENT\n";
$end = "END:VEVENT\n"; $end = "END:VEVENT\n";
$busystate = array("FREE", "TENTATIVE", "BUSY", "OOF");
$fields = array( $fields = array(
"UID" => $this->randomstring(10) . "-" . $this->randomstring(5) . "-ics@zarafa-export-plugin", // generate uid "UID" => $this->randomstring(10) . "-" . $this->randomstring(5) . "-ics@zarafa-export-plugin", // generate uid
"DTSTART" => $this->getIcalDate($event["commonstart"]) . "Z", // this times are utc! "DTSTART" => $this->getIcalDate($event["commonstart"]) . "Z", // this times are utc!
"DTEND" => $this->getIcalDate($event["commonend"]) . "Z", "DTEND" => $this->getIcalDate($event["commonend"]) . "Z",
"DTSTAMP" => $this->getIcalDate($event["creation_time"]) . "Z", "DTSTAMP" => $this->getIcalDate($event["creation_time"]) . "Z",
"CREATED" => $this->getIcalDate($event["creation_time"]) . "Z",
"X-MICROSOFT-CDO-BUSYSTATUS" => $busystate[$event["busystatus"]],
"LAST-MODIFIED" => $this->getIcalDate($event["last_modification_time"]),
"DESCRIPTION" => str_replace("\n", "\\n",$event["description"]), "DESCRIPTION" => str_replace("\n", "\\n",$event["description"]),
"LOCATION" => $event["location"], "LOCATION" => $event["location"],
"SUMMARY" => $event["subject"] "SUMMARY" => $event["subject"],
// some static content...
"TRANSP" => "OPAQUE",
"SEQUENCE" => "0"
); );
fwrite($fh, $head); fwrite($fh, $head);