From: Tobias Diekershoff Date: Sun, 16 Jun 2013 13:24:32 +0000 (+0200) Subject: cal: code cleanup X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ebcc291e0662c37714fbdd22f9d1b19536cc48d1;p=friendica-addons.git cal: code cleanup --- diff --git a/cal.tgz b/cal.tgz index cb075e22..b01a169d 100644 Binary files a/cal.tgz and b/cal.tgz differ diff --git a/cal/cal.php b/cal/cal.php index 597e5323..5ec8d73e 100644 --- a/cal/cal.php +++ b/cal/cal.php @@ -22,8 +22,8 @@ function cal_module() { } /* pathes - * /cal/$user/export/$ - * currently supported format is ical (iCalendar + * /cal/$user/export/$format + * currently supported formats are ical (iCalendar) and CSV */ function cal_content() { @@ -80,7 +80,7 @@ function cal_content() 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) { // format the exported data as a CSV file @@ -105,11 +105,11 @@ function cal_format_output ($r, $f, $tz) case "ical": header("Content-type: text/ics"); - $res = ''; $o = 'BEGIN:VCALENDAR'. PHP_EOL . 'PRODID:-//friendica calendar export//0.1//EN' . PHP_EOL . 'VERSION:2.0' . PHP_EOL; // 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 // . 'TZID:' . $tz . PHP_EOL // . 'END:VTIMEZONE' . PHP_EOL;