Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117827167
D5064.1775300098.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D5064.1775300098.diff
View Options
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -48,6 +48,7 @@
private $aliases;
private $useragent;
private $subscribed = null;
+ private $fetch_attachments = true;
/**
* Read available calendar folders from server
@@ -378,7 +379,7 @@
'uri' => VObjectUtils::uid2uri($event['uid'], '.ics'),
'lastmodified' => $event['changed'] ? $event['changed']->format('U') : null,
'calendarid' => $calendarId,
- 'calendardata' => $this->_to_ical($event, $base_uri, $storage),
+ 'calendardata' => $this->_to_ical($event, $base_uri, $storage, null, $this->fetch_attachments),
'etag' => self::_get_etag($event),
);
}
@@ -643,6 +644,10 @@
}
}
}
+
+ // Disable fetching of attachments in getCalendarObjects to not run out of memory,
+ // (we don't need the attachments anyways).
+ $this->fetch_attachments = false;
return $results;
}
@@ -1069,14 +1074,14 @@
* or VObject\VEvent object with a recurrence exception instance
* @see: \libvcalendar::export()
*/
- private function _to_ical($event, $base_uri, $storage, $recurrence_id = null)
+ private function _to_ical($event, $base_uri, $storage, $recurrence_id = null, $fetch_attachments = true)
{
$ical = libcalendaring::get_ical();
$ical->set_prodid('-//Kolab//iRony DAV Server ' . KOLAB_DAV_VERSION . '//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN');
$ical->set_agent($this->useragent == 'ical' ? 'Apple' : '');
// list attachments as absolute URIs for Thunderbird
- if ($this->useragent == 'lightning') {
+ if ($this->useragent == 'lightning' || !$fetch_attachments) {
$ical->set_attach_uri($base_uri . ':attachment:{{id}}:{{name}}');
$get_attachment = null;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 10:54 AM (23 h, 11 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18829103
Default Alt Text
D5064.1775300098.diff (2 KB)
Attached To
Mode
D5064: Disable fetching of attachments within calendar-query
Attached
Detach File
Event Timeline