From: Georg Ehrke Date: Fri, 13 Apr 2012 02:11:48 +0000 (-0400) Subject: fix bugs in share class X-Git-Tag: v4.0.0beta~244^2~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a7908ba76bd1b973a180eef4adbebbf2d9a1364f;p=nextcloud-server.git fix bugs in share class --- diff --git a/apps/calendar/lib/share.php b/apps/calendar/lib/share.php index 6a4e1a6f1cf..40f220fcaab 100644 --- a/apps/calendar/lib/share.php +++ b/apps/calendar/lib/share.php @@ -130,7 +130,7 @@ class OC_Calendar_Share{ }else{ $string = OC_Calendar_Object::find($id); } - $string = sha1($string); + $string = sha1($string['calendardata']); $id = sha1($id); $array = array($uniqid,$string,$id); shuffle($array); @@ -245,5 +245,6 @@ class OC_Calendar_Share{ $event = $result_event->fetchRow(); $return ['id'] = $event['eventid']; } + return $return; } } \ No newline at end of file diff --git a/apps/calendar/share.php b/apps/calendar/share.php index 3e45fdeee15..2ba50d9cf21 100644 --- a/apps/calendar/share.php +++ b/apps/calendar/share.php @@ -18,4 +18,6 @@ if($shared['type'] == OC_Calendar_Share::CALENDAR){ header('Content-Type: text/Calendar'); header('Content-Disposition: inline; filename=' . $data['summary'] . '.ics'); echo $data['calendardata']; +}else{ + header('Error 404: Not Found'); } \ No newline at end of file