]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix bugs in share class
authorGeorg Ehrke <dev@georgswebsite.de>
Fri, 13 Apr 2012 02:11:48 +0000 (22:11 -0400)
committerGeorg Ehrke <dev@georgswebsite.de>
Fri, 13 Apr 2012 02:11:48 +0000 (22:11 -0400)
apps/calendar/lib/share.php
apps/calendar/share.php

index 6a4e1a6f1cfb9c600f8cc64337ca880a169877f8..40f220fcaab20fb92748ec65deceff577c0ebfa9 100644 (file)
@@ -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
index 3e45fdeee152c833e6ffb23df818aa87e06968c4..2ba50d9cf2105ec28a5aaf455e8b59839932293e 100644 (file)
@@ -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