Small fixes to iCal import/export
This commit is contained in:
parent
8d818e8cb1
commit
15a0997601
2 changed files with 7 additions and 2 deletions
|
@ -927,6 +927,8 @@ class calendar extends rcube_plugin
|
||||||
|
|
||||||
if ($calendars[$calid]) {
|
if ($calendars[$calid]) {
|
||||||
$calname = $calendars[$calid]['name'] ? $calendars[$calid]['name'] : $calid;
|
$calname = $calendars[$calid]['name'] ? $calendars[$calid]['name'] : $calid;
|
||||||
|
$calname = preg_replace('/[^a-z0-9_.-]/i', '', html_entity_decode($calname)); // to 7bit ascii
|
||||||
|
if (empty($calname)) $calname = $calid;
|
||||||
$events = $this->driver->load_events($start, $end, null, $calid, 0);
|
$events = $this->driver->load_events($start, $end, null, $calid, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -430,6 +430,9 @@ class calendar_ical
|
||||||
|
|
||||||
private function format_datetime($attr, $dt, $dateonly = false, $utc = false)
|
private function format_datetime($attr, $dt, $dateonly = false, $utc = false)
|
||||||
{
|
{
|
||||||
|
if (is_numeric($dt))
|
||||||
|
$dt = new DateTime('@'.$dt);
|
||||||
|
|
||||||
if ($utc)
|
if ($utc)
|
||||||
$dt->setTimezone(new DateTimeZone('UTC'));
|
$dt->setTimezone(new DateTimeZone('UTC'));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue