Skip to content

Commit

Permalink
Fall back to regular ICS calendars if CalDAV fails (Bug #14662).
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jun 29, 2017
1 parent 967f6fb commit 9487266
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions kronolith/lib/Driver/Ical.php
Expand Up @@ -111,10 +111,17 @@ protected function _listEvents(Horde_Date $startDate = null,
array $options = array())
{
if ($this->isCalDAV()) {
return $this->_listCalDAVEvents(
$startDate, $endDate, $options['show_recurrence'],
$options['has_alarm'], $options['json'],
$options['cover_dates'], $options['hide_exceptions']);
try {
return $this->_listCalDAVEvents(
$startDate, $endDate, $options['show_recurrence'],
$options['has_alarm'], $options['json'],
$options['cover_dates'], $options['hide_exceptions']);
} catch (Kronolith_Exception $e) {
// Fall back to regular ICS downloads. At least Nextcloud
// advertises calendars as CalDAV capable, but then denying
// CalDAV requests.
$this->_davSupport = false;
}
}
return $this->_listWebDAVEvents(
$startDate, $endDate, $options['show_recurrence'],
Expand Down

0 comments on commit 9487266

Please sign in to comment.