cal: code cleanup

This commit is contained in:
Tobias Diekershoff 2013-06-16 15:24:32 +02:00
parent d399dde3ba
commit ebcc291e06
2 changed files with 4 additions and 4 deletions

BIN
cal.tgz

Binary file not shown.

View file

@ -22,8 +22,8 @@ function cal_module()
{ {
} }
/* pathes /* pathes
* /cal/$user/export/$ * /cal/$user/export/$format
* currently supported format is ical (iCalendar * currently supported formats are ical (iCalendar) and CSV
*/ */
function cal_content() function cal_content()
{ {
@ -80,7 +80,7 @@ function cal_content()
function cal_format_output ($r, $f, $tz) function cal_format_output ($r, $f, $tz)
{ {
$res = t('This calendar format is not supported');; $res = t('This calendar format is not supported');
switch ($f) switch ($f)
{ {
// format the exported data as a CSV file // format the exported data as a CSV file
@ -105,11 +105,11 @@ function cal_format_output ($r, $f, $tz)
case "ical": case "ical":
header("Content-type: text/ics"); header("Content-type: text/ics");
$res = '';
$o = 'BEGIN:VCALENDAR'. PHP_EOL $o = 'BEGIN:VCALENDAR'. PHP_EOL
. 'PRODID:-//friendica calendar export//0.1//EN' . PHP_EOL . 'PRODID:-//friendica calendar export//0.1//EN' . PHP_EOL
. 'VERSION:2.0' . PHP_EOL; . 'VERSION:2.0' . PHP_EOL;
// TODO include timezone informations in cases were the time is not in UTC // TODO include timezone informations in cases were the time is not in UTC
// see http://tools.ietf.org/html/rfc2445#section-4.8.3
// . 'BEGIN:VTIMEZONE' . PHP_EOL // . 'BEGIN:VTIMEZONE' . PHP_EOL
// . 'TZID:' . $tz . PHP_EOL // . 'TZID:' . $tz . PHP_EOL
// . 'END:VTIMEZONE' . PHP_EOL; // . 'END:VTIMEZONE' . PHP_EOL;