fix bugs in share class

master
Georg Ehrke 2012-04-12 22:11:48 -04:00
parent 013ac46f22
commit 48d92c11f3
2 changed files with 4 additions and 1 deletions

View 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;
}
}

View 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');
}