diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-05-14 15:52:24 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-05-14 15:52:24 +0200 |
commit | 84827ff992eb164d201e3d7081f9d8561711723a (patch) | |
tree | af3054b0d0c5b7fbf1e45ed5ac04e00486913b1a | |
parent | 3f86fd5193b15e8fcdf0ba3bde56db1d64e91c39 (diff) | |
download | nextcloud-server-84827ff992eb164d201e3d7081f9d8561711723a.tar.gz nextcloud-server-84827ff992eb164d201e3d7081f9d8561711723a.zip |
some fixes for calendar's export.php
-rwxr-xr-x | apps/calendar/export.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/calendar/export.php b/apps/calendar/export.php index 0756e1df20e..5780d191a57 100755 --- a/apps/calendar/export.php +++ b/apps/calendar/export.php @@ -14,6 +14,10 @@ $event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL; $nl = "\r\n"; if(isset($cal)){ $calendar = OC_Calendar_App::getCalendar($cal, true); + if(!$calendar){ + header('HTTP/1.0 404 Not Found'); + exit; + } $calobjects = OC_Calendar_Object::all($cal); header('Content-Type: text/Calendar'); header('Content-Disposition: inline; filename=' . $calendar['displayname'] . '.ics'); @@ -22,6 +26,10 @@ if(isset($cal)){ } }elseif(isset($event)){ $data = OC_Calendar_App::getEventObject($_GET['eventid'], true); + if(!$data){ + header('HTTP/1.0 404 Not Found'); + exit; + } $calendarid = $data['calendarid']; $calendar = OC_Calendar_App::getCalendar($calendarid); header('Content-Type: text/Calendar'); |