From ebcc291e0662c37714fbdd22f9d1b19536cc48d1 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 15:24:32 +0200 Subject: [PATCH] cal: code cleanup --- cal.tgz | Bin 3439 -> 3472 bytes cal/cal.php | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cal.tgz b/cal.tgz index cb075e2218572475d22f126ad79dba4df15164c6..b01a169dbeba86ac9b7f4305b4584b35654eac82 100644 GIT binary patch literal 3472 zcmV;B4R7)viwFRKyuDEX1MM1XQ`<;#zoK8!r-PHdWhBfaxgwC1V=KXR#-?nO97|Ck zOJl5!tkLQLVYl+%uX|=B%QlxI=FVPo{|7jDYQ_k%Bz0ndA7aka&#n8?{GSwDv_JlDMziS2Xpn)Q z?eG7N{hRxHJNpa!?>$5N)9)W(=gBxK!T-7ak6xkWHS5Rk02=%VeP_-Nq3r}L^iZw# z$B4%%O>|h|#(tFgJUoQ)%um4aJRSlQD-uX&45Dlj_%5(J7UBq>!UNA@$PyOg>IB>z z>(mceLP+1?j6k?!HtD&Qr86EQem?PWL&s+yaK(&Ir*Je&(=S(u<8r`<6<|NFYJG)gn^PXo9pT*IW^s&88$3XgMKsGi zkkjb7F#{iWL(R|6MID^bgZAhhZnlPhu`v5CN4Xg?Y-2^v}V|Jtkj7#>ZX2V;mlDaCog!0TdG!KkJYF8#6=TvI zxw&}YiLplwymK(sMp{H3Ok?4I2oL*{$%W;i&N zo8O<2Q$Hpfq5n@AyB{MvjXj1gHhg3+xNj{P#54;UPhXfK@vhWuW z$~y)_&Kpo)qp?sK?jXGgVUZNSPw+RSoG7Cjg-r`hvCx?WOnGyJem?bYYeGJGNa?J~ zHAb!whf`idryb|CJi6;X+HOB4Sf;jz$%H z^Lyp<%dVOFbM`9_*+O3Q5kFjWfMVUM7oeEOWPjf?_0L&eS-rqhm_8pda<3Ia7wp{6 zciBX`5P$;4g-^edZXq;4Zj+~9xw;`;=iW!J;~~a5OtcA; zXC`MSG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06Tq1c>H;8Nvu@%BKpC`}#@ERt}!D1iN|I~M%wzxfLzC(*PG`cA1~S?r@Tn+MEv`RvgzF4U_zZSnod z@?D@$k$I$~S&fRYgkblPX1O zjh4DXd60&l{A2+xF|$h&NCDXhV^pKdOdj1@YI$tonyQxHzhXwO_obtOs%pgjF*CEI z=lK!dpLq08CbkkvD4~QBN+_X(5=tncgc3?9p@b4jD4~QBN+_X(5=tncgc3?9p@b4j RDB&**{{d$|?Ee5z001sozajtt 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;