From 11199550575a9904d97ba7e90f23688f724a0864 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Jun 2013 10:51:27 +0200 Subject: [PATCH 01/15] cal: basic addon layout --- cal/cal.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cal/cal.php diff --git a/cal/cal.php b/cal/cal.php new file mode 100644 index 00000000..302549bb --- /dev/null +++ b/cal/cal.php @@ -0,0 +1,40 @@ + + * License: MIT + * ******************************************************************/ + + +function cal_install() +{ +} +function cal_uninstall() +{ +} +function cal_module() +{ +} +/* pathes + * /cal/$user/export/$format + */ +function cal_content() +{ + $a = get_app(); + $o = ""; + if ($a->argc == 1) { + $o = "

".t('Some text to explain what this does.')."

"; + } elseif ($a->argc==4) { + $username = $a->argv[1]; + $do = $a->argv[2]; + $format = $a->argv[3]; + $o = "

".$do." calendar for ".$username." as ".$format." file.

"; + } else { + $o = "

".t('Wrong number of parameters')."

"; + } + return $o; +} + +?> From a79bd7c9f43652a565ca539a80cc41fa4d852637 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Jun 2013 10:54:42 +0200 Subject: [PATCH 02/15] added MIT License file --- cal/LICENSE | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cal/LICENSE diff --git a/cal/LICENSE b/cal/LICENSE new file mode 100644 index 00000000..b2551796 --- /dev/null +++ b/cal/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Tobias Diekershoff + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. From 6ddd3100a76aaa36c8dc6baea3d429205d6db9b2 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Jun 2013 11:03:30 +0200 Subject: [PATCH 03/15] cal: basic README added --- cal/LICENSE | 2 +- cal/README.md | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 cal/README.md diff --git a/cal/LICENSE b/cal/LICENSE index b2551796..2c696e9a 100644 --- a/cal/LICENSE +++ b/cal/LICENSE @@ -5,7 +5,7 @@ of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. diff --git a/cal/README.md b/cal/README.md new file mode 100644 index 00000000..ded1b330 --- /dev/null +++ b/cal/README.md @@ -0,0 +1,27 @@ +Calendar Export +=============== + +This addon makes it possible to export the events posted by your users being +exported to other formats, so they can be imported into other calendar +applications. + +Exporting a calendar is an _opt-in_ feature which has to be activated by each +of the users in the _addon settings_. As the admin you can only provide the +service but should not force it upon your users. + +The calendars are exported at + + http://example.com/cal/username/format + +currently the only supported format is __ical__. + +Author +------ + +This addon is developed by [Tobias Diekershoff](https://f.diekershoff.de/profile/tobias). + +License +------- + +This addon is licensed under the [MIT](http://opensource.org/licenses/MIT) +license, see also the LICENSE file in the addon directory. From c9880c23724fbf010446326647d255962cbe3b14 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Jun 2013 11:51:19 +0200 Subject: [PATCH 04/15] cal: added settings functions --- cal/cal.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cal/cal.php b/cal/cal.php index 302549bb..f3823968 100644 --- a/cal/cal.php +++ b/cal/cal.php @@ -10,9 +10,13 @@ function cal_install() { + register_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings'); + register_hook('plugin_settings_post', 'addon/cal/cal.php', 'cal_addon_settings_post'); } function cal_uninstall() { + unregister_hook('plugin_settings', 'addon/cal/cal.php', 'cal_addon_settings'); + unregister_hook('plugin_settings_post', 'addon/cal/cal.php', 'cal_addon_settings_post'); } function cal_module() { @@ -37,4 +41,15 @@ function cal_content() return $o; } +function cal_addon_settings_post ( &$a, &$b ) +{ + if (! local_user()) + return; +} +function cal_addon_settings ( &$a, &$s ) +{ + if (! local_user()) + return; +} + ?> From 70432578967279c40df82d459117205805dcfae9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Jun 2013 12:14:33 +0200 Subject: [PATCH 05/15] cal: added user config --- cal/cal.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cal/cal.php b/cal/cal.php index f3823968..adef464b 100644 --- a/cal/cal.php +++ b/cal/cal.php @@ -45,11 +45,30 @@ function cal_addon_settings_post ( &$a, &$b ) { if (! local_user()) return; + + if (!x($_POST,'cal-submit')) + return; + + set_pconfig(local_user(),'cal','enable',intval($_POST['cal-enable'])); } function cal_addon_settings ( &$a, &$s ) { if (! local_user()) return; + + $enabled = get_pconfig(local_user(), 'cal', 'enable'); + $checked = (($enabled) ? ' checked="checked" ' : ''); + $url = $a->get_baseurl().'/cal/'.$a->user['nickname'].'/export/ical'; + + $s .= '

'.t('Export Events').'

'; + $s .= '

'.t('If this is enabled, you public events will be available at').' '.$url.'

'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + $s .= '
'; + $s .= '
'; + } ?> From 2a368fa6ac2fa19e51e39c97a99378354f2c2627 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Jun 2013 21:34:56 +0200 Subject: [PATCH 06/15] cal: export to ical --- cal/cal.php | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 95 insertions(+), 4 deletions(-) diff --git a/cal/cal.php b/cal/cal.php index adef464b..6e8829de 100644 --- a/cal/cal.php +++ b/cal/cal.php @@ -22,25 +22,116 @@ function cal_module() { } /* pathes - * /cal/$user/export/$format + * /cal/$user/export/$ + * currently supported format is ical (iCalendar */ function cal_content() { $a = get_app(); $o = ""; if ($a->argc == 1) { - $o = "

".t('Some text to explain what this does.')."

"; + $o .= "

".t('Event Export')."

".t('You can download public events from: ').$a->get_baseurl()."/cal/username/export/ical

"; } elseif ($a->argc==4) { + // get the parameters from the request we just received $username = $a->argv[1]; $do = $a->argv[2]; $format = $a->argv[3]; - $o = "

".$do." calendar for ".$username." as ".$format." file.

"; + // check that there is a user matching the requested profile + $r = q("SELECT uid FROM user WHERE nickname='".$username."' LIMIT 1;"); + if (count($r)) + { + $uid = $r[0]['uid']; + } else { + killme(); + } + // if we shall do anything other then export, end here + if (! $do == 'export' ) + killme(); + // check if the user allows us to share the profile + $enable = get_pconfig( $uid, 'cal', 'enable'); + if (! $enable == 1) { + info(t('The user does not export the calendar.')); + return; + } + // we are allowed to show events + // get the timezone the user is in + $r = q("SELECT timezone FROM user WHERE uid=".$uid." LIMIT 1;"); + if (count($r)) + $timezone = $r[0]['timezone']; + // does the user who requests happen to be the owner of the events + // requested? then show all of your events, otherwise only those that + // don't have limitations set in allow_cid and allow_gid + if (local_user() == $uid) { + $r = q("SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `uid`=".$uid.";"); + } else { + $r = q("SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `allow_cid`='' and `allow_gid`='' and `uid`='".$uid."';"); + } + // we have the events that are available for the requestor + // now format the output according to the requested format + $res = cal_format_output($r, $format, $timezone); + if (! $res=='') + info($res); } else { - $o = "

".t('Wrong number of parameters')."

"; + // wrong number of parameters + killme(); } return $o; } +function cal_format_output ($r, $f, $tz) +{ + $res = t('This calendar format is not supported');; + switch ($f) + { + case "ical": + header("Content-type: text/icon"); + $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 +// . 'BEGIN:VTIMEZONE' . PHP_EOL +// . 'TZID:' . $tz . PHP_EOL +// . 'END:VTIMEZONE' . PHP_EOL; + foreach ($r as $rr) { + if ($rr['adjust'] == 1) { + $UTC = 'Z'; + } else { + $UTC = ''; + } + $o .= 'BEGIN:VEVENT' . PHP_EOL; + if ($rr[start]) { + $tmp = strtotime($rr['start']); + $dtformat = "%Y%m%dT%H%M%S".$UTC; + $o .= 'DTSTART:'.strftime($dtformat, $tmp).PHP_EOL; + } + if ($rr['finish']) { + $tmp = strtotime($rr['finish']); + $dtformat = "%Y%m%dT%H%M%S".$UTC; + $o .= 'DTEND:'.strftime($dtformat, $tmp).PHP_EOL; + } + if ($rr['summary']) + $tmp = $rr['summary']; + $tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp); + $o .= 'SUMMARY:' . $tmp . PHP_EOL; + if ($rr['desc']) + $tmp = $rr['desc']; + $tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp); + $o .= 'DESCRIPTION:' . $tmp . PHP_EOL; + if ($rr['location']) { + $tmp = $rr['location']; + $tmp = str_replace(PHP_EOL, PHP_EOL.' ',$tmp); + $o .= 'LOCATION:' . $tmp . PHP_EOL; + } + $o .= 'END:VEVENT' . PHP_EOL; + } + $o .= 'END:VCALENDAR' . PHP_EOL; + echo $o; + killme(); + } + return $res; +} + function cal_addon_settings_post ( &$a, &$b ) { if (! local_user()) From 35568f0cf76d098363920542980451607d27551a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 08:45:55 +0200 Subject: [PATCH 07/15] cal: added CSV export --- cal/cal.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/cal/cal.php b/cal/cal.php index 6e8829de..fb5ae482 100644 --- a/cal/cal.php +++ b/cal/cal.php @@ -83,8 +83,26 @@ function cal_format_output ($r, $f, $tz) $res = t('This calendar format is not supported');; switch ($f) { + // format the exported data as a CSV file + case "csv": + header("Content-type: text/csv"); + $o = '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL; + foreach ($r as $rr) { + $tmp1 = strtotime($rr['start']); + $tmp2 = strtotime($rr['finish']); + $time_format = "%H:%M:%S"; + $date_format = "%d.%m.%Y"; + $o .= '"'.$rr['summary'].'", "'.strftime($date_format, $tmp1) . + '", "'.strftime($time_format, $tmp1).'", "'.$rr['desc'] . + '", "'.strftime($date_format, $tmp2) . + '", "'.strftime($time_format, $tmp2) . + '", "'.$rr['location'].'"' . PHP_EOL; + } + echo $o; + killme(); + case "ical": - header("Content-type: text/icon"); + header("Content-type: text/ics"); $res = ''; $o = 'BEGIN:VCALENDAR'. PHP_EOL . 'PRODID:-//friendica calendar export//0.1//EN' . PHP_EOL From 9c541ae7697ffe1659d44179980f1dde0b91ede5 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 08:49:10 +0200 Subject: [PATCH 08/15] cal: user settings info about supported formats --- cal/cal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cal/cal.php b/cal/cal.php index fb5ae482..461cb020 100644 --- a/cal/cal.php +++ b/cal/cal.php @@ -167,10 +167,11 @@ function cal_addon_settings ( &$a, &$s ) $enabled = get_pconfig(local_user(), 'cal', 'enable'); $checked = (($enabled) ? ' checked="checked" ' : ''); - $url = $a->get_baseurl().'/cal/'.$a->user['nickname'].'/export/ical'; + $url = $a->get_baseurl().'/cal/'.$a->user['nickname'].'/export/format'; $s .= '

'.t('Export Events').'

'; $s .= '

'.t('If this is enabled, you public events will be available at').' '.$url.'

'; + $s .= '

'.t('Currently supported formats are ical and csv.').'

'; $s .= '
'; $s .= ''; $s .= ''; From f5e09c787d7bb02070ea9a7350502c259061ed8b Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 08:51:11 +0200 Subject: [PATCH 09/15] cal: added csv support to the README --- cal/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cal/README.md b/cal/README.md index ded1b330..c19f07ce 100644 --- a/cal/README.md +++ b/cal/README.md @@ -13,7 +13,10 @@ The calendars are exported at http://example.com/cal/username/format -currently the only supported format is __ical__. +currently the following formats are supported + +* ical +* csv. Author ------ From d5b79c8194273804466b5beaa80ac251cf1e2f56 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 08:54:04 +0200 Subject: [PATCH 10/15] cal: added tarball --- cal.tgz | Bin 0 -> 3395 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 cal.tgz diff --git a/cal.tgz b/cal.tgz new file mode 100644 index 0000000000000000000000000000000000000000..7a9bedd9dd4e17d4e92793c453d868a226233f60 GIT binary patch literal 3395 zcmV-J4ZQLniwFSAV7*ZQ1MM1XZ`(#PU(H`JN7$uQD5PX34dB=g6p4w2lO;ovlXDHj zrpT4WhT^h(*l~;e_nX;WQk3K*O)u`DcO0~_xH~)V*_mC^bpq?jBSRD6#q;OlFT(m? z@w>I#dj4Yfr{-R>^`zNq?zNgv;Q3<j^X;O`;O~pZovd6?$H?e*6xg!H+O-7Hl6nPQXGB z&1!#)c%0HimnClON2$-leVEMs1RT%fAuxfFKssj-Wz)cSf!(qYNB9ixc@{&Kuo$ru zaC53NKVS(FeTOrGVAE{Tb304tJVyF_>f?g0&psf=oX=)(Fi+Dc*|)5j=`Dv%k6BU7 ziJ+B=MMp%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j9{km^UR;W~`-|n3>pxZuazqQ4xAyOG>geIk# zM)=r3Ek~1L>HFT;Za{m~8a^826Ns{a2Ku>Pse;VMua zDZbTNI3KVCP}SmCH0Y3qC8+ccRvlRBdIJjwHVCEfccu(0lvcbO!G-eWv^sraRTI_h zUVN57^=F|l{jk8zkAxbYps?o3t6wZNQgqc|o-Fk?=dQFk!+-8syi zM7=I`utB(Wl)Q9rtMTPqZgHUX?~Mzx6$F39TWG zTPmyAD$uLeEbzpAG%AgQXvi$$VaZCSEZeyb@=RXX%t`L0#;%Ge|YHUfJf3~7n|MUW$h1s zYgI>1>QgJlYJ-<*tvtv=Pkzb(7g+Hn3*>-egbCWuWhRerEQOv}h*Q^!zARz%+FwQ( zsMC(nK?N05P(cM1R8T<$6;x0`1r=0KK?N05P(cM1R8T<$ Z6;x0`1r=0KK?Q#U_&1{$0$Tu3006Suoe2N{ literal 0 HcmV?d00001 From 18e8f8d8fbf40d3d55ecfcb2e8d0506488fe023a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 09:34:44 +0200 Subject: [PATCH 11/15] cal: missing export in README --- cal.tgz | Bin 3395 -> 3394 bytes cal/README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cal.tgz b/cal.tgz index 7a9bedd9dd4e17d4e92793c453d868a226233f60..c52061d58b1cb4415a9cbb6799694cd584aa4e6c 100644 GIT binary patch literal 3394 zcmV-I4ZZRoiwFRIYQ0ea1MM1XbJ|EUU#(x!r?OA5MI`VesUo&h1eBOM3@*UQd0j4B zNQ2QvXjnb$c(?N3uX|=B1USj&F5Y{oYd1zSJ^k+Ko{?N9u%10J)Dd1D9EiUN>wm@X z#%|-_@R@^+tVf_uv^EJhfm1X`DC_z_W<+^-;Zu0vX#{D^BE*it z&8SZOfW<`gJk^E80%(<5aOla~MQvzV&U|5Ps13`70V$qTzYi)~hH;p0;*Wdx-bV1|HgDH>Z zP68O?KCXg_pXCFtuvS^RJWOzTZo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X{Rfq-OrUY$Wua30;_FIVx{wkoYuixv~gR%W+ zJih$?uesZNrr!TGcb~u5dqMC2_V)Iw_kVu{ba-?h`!{oJNZdN?Hd}iSygk#jQx-4$ zgkH8$wW15;={?-U4xS>hXw72A=*GsKJMj%`&_$9H-UDuP2`=E%)WOz0ya7B9B0G(% zx|i@-dM9qK=#nr=xa&LO;)J`|0?U->8RgqPsL`2DAFCC5T`=*O6KHt2qq%$v>t#CU z8NE8da_EcBrJ+ubBtt&EytR~py=f>{CnoloGGXdtt3Z`moWIx9G?D+Y4ddaP$@})mhTa%XN5gl$uH6N_J;rCf z0q=X0ZGio+(~&(M!*HbaPEPwh8^?NsPXDai8@z?r zxNb0<$g6cEIvD~nRHSDdUoUmMwXk?f#1cr!vS_6eRGOyr7VAdV3*K5qB>#7b+Qq4Xn?4?4rs^HJ~Z@dS>C z{jQCJuWgj9{km^UR;W~`-|n3>pxZuazqQ4xAyOG>geIk# zM)=r3Ek~1L>HFT;Za{m~8a^826Ns{a2Ku>Pse;VMua zDZbTNI3KVCP}SmCH0Y3qC8+ccRvlRBdIJjwHVCEfccu(0lvcbO!G-eWv^sraRTI_h zUVN57^=F|l{jk8zkAxbYps?o3t6wZNQgqc|o-Fk?=dQFk!+-8syi zM7=I`utB(Wl)Q9rtMTPqZgHUX?~Mzx6$F39TWG zTPmyAD$uLeEbzpAG%AgQXvi$$VaZCSEZeyb@=RXX%t`L0#;%Ge|YHUfJf3~7n|MUW$h1s zYgI>1>QgJlYJ-<*tvtv=Pkzb(7g+Hn3*>-egbCWuWhRerEQOv}h*Q^!zARz%+FwQ( zsMC(nK?N05P(cM1R8T<$6;x0`1r=0KK?N05P(cM1R8T<$ Z6;x0`1r=0KK?Q#U_&1{$0$Tu3006Suoe2N{ diff --git a/cal/README.md b/cal/README.md index c19f07ce..f2185650 100644 --- a/cal/README.md +++ b/cal/README.md @@ -11,7 +11,7 @@ service but should not force it upon your users. The calendars are exported at - http://example.com/cal/username/format + http://example.com/cal/username/export/format currently the following formats are supported From 69065bfd109b427104fcdf18919635681b27241d Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 12:15:38 +0200 Subject: [PATCH 12/15] cal: added TODO note to CSV export --- cal/cal.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cal/cal.php b/cal/cal.php index 461cb020..597e5323 100644 --- a/cal/cal.php +++ b/cal/cal.php @@ -88,6 +88,8 @@ function cal_format_output ($r, $f, $tz) header("Content-type: text/csv"); $o = '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL; foreach ($r as $rr) { +// TODO the time / date entries don't include any information about the +// timezone the event is scheduled in :-/ $tmp1 = strtotime($rr['start']); $tmp2 = strtotime($rr['finish']); $time_format = "%H:%M:%S"; From d399dde3ba4cc27a68f90c896ccbcd4582a9301e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 13:20:39 +0200 Subject: [PATCH 13/15] cal: cleanup the README --- cal.tgz | Bin 3394 -> 3439 bytes cal/README.md | 5 ++--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cal.tgz b/cal.tgz index c52061d58b1cb4415a9cbb6799694cd584aa4e6c..cb075e2218572475d22f126ad79dba4df15164c6 100644 GIT binary patch delta 3437 zcmV-z4U+Q08t)o^ABzY8bf3LZ00ZqBYjfI2GGDD<(WkOcutg-}M_fg0rwAx9br@WL zlk>V?8y_jF6H6Ijol7`71(_V>kK zgw?;|cYUY6f3RCW*x!5cY`ea_yYu21>_0VQ1ZkW&5x}#5i1Xx2>%KPs7X=sXkN=zV z>HNuPkbz(9?S01n^}U_?Zf1X6SV#NU_g`#3gY75dr~rR+`yakS%WKw8KL9lN33|?q zHK64LEc8&V_QyGo5}IhU*p2*o;`6Wpqp2T*<9R#;CRW6dOc~76ap1ea?pTN;d;$+V zjUbI#gsWqJa5JnEKVUH-eTOpw;kH?)=VqErd4%}+*vAcRpMAg;Q$Cr%;WSC+al^7E z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7O8`|ZjzxnGX;^{^?_kw|m996i zaA1Q__m+oyfzI@9q?v?35UVA`( zgJVKVzKnIeIiftM&nd*K(nZAYd{10LYe?gc$||-B^r|%tJaHd?jY{Jn8Zuq*uwW%q zmhDUjc_zEsK3}=8J%tE}uX8L56yBr!7BES#1@HhyMI3K+}E_HvssD z&i|Swzo*ik3s?yS{NbUy1HO=!yWDIVuPT4=ldCFnQeRvtRvWxjhvh*Udh&|~xWvLQ zSs(`#BaG3EE;D%~bZaT}*g~ADmbYgyqqqMu&_Eq}M0=UJS@QGz2-_ Date: Sun, 16 Jun 2013 15:24:32 +0200 Subject: [PATCH 14/15] 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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z2>pT9IX&xkY#i(KTHW(@r}q|K z{GnNn@APMK-}nIc+%{4iImnnNA3s2AGG>s7lY2*lM$Ts zyKNf>U)#u8^L5vjq)@0fWqt)+? z2KZP*DF>r`>-)~ou0eCq8InS%-CWa1ow%bfkl?SulkGnUYY;@3|ReC=V%!y zkL2I#%$yIH0w`;7Od3=#VG1g|gH^R7bs8{n;00mv{Z0+ESfr~5@!bI>n3*aC{SdLp zH`RIhh1CisRoQ06Tq1c>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; From f9deb708c74461ae69b4eb1a833b3a21cebb6a68 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Jun 2013 22:03:41 +0200 Subject: [PATCH 15/15] cal: CSV date now is YYYY-MM-DD --- cal.tgz | Bin 3472 -> 3477 bytes cal/cal.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cal.tgz b/cal.tgz index b01a169dbeba86ac9b7f4305b4584b35654eac82..259d9563dd6dd560f3b684c12781d3c9925c9eb0 100644 GIT binary patch literal 3477 zcmV;G4QlcqiwFSz8NN{f1MM1XQ`<-~U(v7V)4|E!G7`oRt_YBFY$dqX*pzLO%Tg4` z(im$aYrJ|u*sc8c>z*0Ovd!kP7xrrJ)U_L|dGvd_r(1HJz$~;+gT4CR!Smf`JN2E$?%p%le`>}E(l~J-L6Y5p$?F4`aeH|Nv&lhGgp zKi}K?9sAe!8asQr{hv3`PwM!4{~7E&8Ak>9KezwUOSHUZ{qP+?gCC&h%-A8coPdQM zs@48D=TSlvZ5F$cKTmuf9>Qqq$KZG#4}pmlF(gw4^K=~eF0eZm;s~F>15YDJV;14+ z7~BlB|ZNZ;a&K)7Sp>A9IEQyw9HKK5}#+h-qe#gtDba5PPld3EfiN(_Di?2XFtQ&DJsxE)NsLl&f>ofn&I3$+a_|SCl?BIgaVN zeDEhw*>tu~oaokt<722-;kRs+iOY_rjT7BWDuzwRN}WifYU)Q8&K%9<7w3>)JfLq)t`b?1*w5^I6h&Douzf|<0-L+dINPQ1p z5Bg_v^Se`fU_ zbh&eNY2brFTuXg|TJymVf*B+4*!UzRLTsq8c!~!TO^V+3kO(O_$w#tefwu}6zG!`nu9i$f_ERy2)G5&^x6J=DRuxYL-7CPgADQ}*mpHKYTijYqp zQaY=0jgct?xyg1Z#}>T!;e=PvX-64tkFyv;o+zON;VfI2MwQUXkeH-VxX==+h}aaI zqfrIl{9gI|vTG*(jQz?(wvZQn#1GdTAYZrY1t{h*+28j}{d1OAR?qR|rq4!<%xi_v zIXm}Lp801CQw$bp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