Skip to content
Snippets Groups Projects
Commit 43f7b2fd authored by Georg Ehrke's avatar Georg Ehrke
Browse files

fix newline problem in calendar

parent fed7eef4
No related branches found
No related tags found
No related merge requests found
<?php
/**
* Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
* Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
......@@ -11,13 +11,15 @@ OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
$cal = isset($_GET['calid']) ? $_GET['calid'] : NULL;
$event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL;
$nl = '
';
if(isset($cal)){
$calendar = OC_Calendar_App::getCalendar($cal);
$calobjects = OC_Calendar_Object::all($cal);
header('Content-Type: text/Calendar');
header('Content-Disposition: inline; filename=' . $calendar['displayname'] . '.ics');
foreach($calobjects as $calobject){
echo $calobject['calendardata'] . '\n';
echo $calobject['calendardata'] . $nl;
}
}elseif(isset($event)){
$data = OC_Calendar_App::getEventObject($_GET['eventid']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment