Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion calendar/drivers/caldav/caldav_driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,12 @@ public function dismiss_alarm($event_id, $snooze = 0)
*/
private function add_attachment($attachment, $event_id)
{
$data = $attachment['data'] ? $attachment['data'] : file_get_contents($attachment['path']);
if (isset($attachment['data']))
$data = $attachment['data'];
elseif (isset($attachment['path']) && $attachment['path'] != '')
$data = file_get_contents($attachment['path']);
else
return 0;

$query = $this->rc->db->query(
"INSERT INTO " . $this->db_attachments .
Expand Down
2 changes: 2 additions & 0 deletions libcalendaring/lib/OldSabre/VObject/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,13 @@ public function serialize() {
'\\',
"\n",
"\r",
',',
);
$out = array(
'\\\\',
'\n',
'',
'\,',
);

// avoid double-escaping of \, and \; from Compound properties
Expand Down
6 changes: 5 additions & 1 deletion libcalendaring/libvcalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,14 @@ private function _parse_freebusy($ve)

/**
*
fix
'\,' -> ','
'\;' -> ';'
*/
public static function convert_string($prop)
{
return str_replace('\,', ',', strval($prop->value));
return str_replace(array('\,','\;'),array(',',';'), strval($prop->value));

}

/**
Expand Down