summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-13 11:42:34 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-13 13:01:18 (GMT)
commit024cd2a02d26f0857d990b775a3e17671b4bf053 (patch)
treeb9901c563db10c794c7b76665f1ffd2767e88996
parent442e9b0c8b2f1545f610d5cdd4a997ffa080d64d (diff)
downloadiRony-024cd2a02d26f0857d990b775a3e17671b4bf053.tar.gz
Comply with Sabre\CalDAV\Plugin and return free-busy data as parsed vobject + log errors in free-busy data retrieval
-rw-r--r--lib/Kolab/CalDAV/Plugin.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Kolab/CalDAV/Plugin.php b/lib/Kolab/CalDAV/Plugin.php
index c3b064f..11c4958 100644
--- a/lib/Kolab/CalDAV/Plugin.php
+++ b/lib/Kolab/CalDAV/Plugin.php
@@ -171,6 +171,8 @@ class Plugin extends CalDAV\Plugin
*/
protected function getFreeBusyForEmail($email, \DateTime $start, \DateTime $end, VObject\Component $request)
{
+ console(__METHOD__, $email, $start, $end);
+
$email = preg_replace('/^mailto:/', '', $email);
// pass-through the pre-generatd free/busy feed from Kolab's free/busy service
@@ -197,15 +199,17 @@ class Plugin extends CalDAV\Plugin
// success!
if ($response->getStatus() == 200) {
+ $vcalendar = VObject\Reader::read($response->getBody(), VObject\Reader::OPTION_FORGIVING | VObject\Reader::OPTION_IGNORE_INVALID_LINES);
return array(
- 'calendar-data' => $response->getBody(),
+ 'calendar-data' => $vcalendar,
'request-status' => '2.0;Success',
'href' => 'mailto:' . $email,
);
}
}
catch (\Exception $e) {
- // ignore failures
+ // log failures
+ rcube::raise_error($e, true, false);
}
}
else {