getConfig('disable_ics') === 1) { if($conf['allowdebug']) dbglog('ICS synchronisation is disabled'); die("ICS synchronisation is disabled"); } // Retrieve calendar ID based on private URI $calid = $hlp->getCalendarForPrivateURL($icsFile); if($calid === false) { if($conf['allowdebug']) dbglog('No calendar with this name known: '.$icsFile); die("No calendar with this name known."); } // Retrieve calendar contents and serve $stream = $hlp->getCalendarAsICSFeed($calid); header("Content-Type: text/calendar"); header("Content-Transfer-Encoding: Binary"); header("Content-disposition: attachment; filename=\"calendar.ics\""); echo $stream;