Branch 'roundcubemail-plugins-kolab-3.1' - 2 commits - plugins/libkolab
Thomas Brüderli
bruederli at kolabsys.com
Wed Nov 6 16:44:28 CET 2013
plugins/libkolab/lib/kolab_format_event.php | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 963f304365c9b22418e044d46188d3cfc7c1771a
Merge: 5f43d74 1a0d261
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Nov 6 16:43:13 2013 +0100
Merge branch 'roundcubemail-plugins-kolab-3.1' of ssh://git.kolab.org/git/roundcubemail-plugins-kolab into roundcubemail-plugins-kolab-3.1
commit 5f43d74609c88ac3e383d8b490ad9fd90ef20d49
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Nov 6 16:41:01 2013 +0100
Avoid recurrence exceptions being copied to exception items recursively. This caused memory leaks when serializing events for caching
diff --git a/plugins/libkolab/lib/kolab_format_event.php b/plugins/libkolab/lib/kolab_format_event.php
index 9be9bdf..6a8c3ae 100644
--- a/plugins/libkolab/lib/kolab_format_event.php
+++ b/plugins/libkolab/lib/kolab_format_event.php
@@ -163,20 +163,22 @@ class kolab_format_event extends kolab_format_xcal
else if ($status == kolabformat::StatusCancelled)
$object['cancelled'] = true;
+ // this is an exception object
+ if ($this->obj->recurrenceID()->isValid()) {
+ $object['thisandfuture'] = $this->obj->thisAndFuture();
+ }
// read exception event objects
- if (($exceptions = $this->obj->exceptions()) && is_object($exceptions) && $exceptions->size()) {
+ else if (($exceptions = $this->obj->exceptions()) && is_object($exceptions) && $exceptions->size()) {
+ $recurrence_exceptions = array();
for ($i=0; $i < $exceptions->size(); $i++) {
if (($exobj = $exceptions->get($i))) {
$exception = new kolab_format_event($exobj);
if ($exception->is_valid()) {
- $object['recurrence']['EXCEPTIONS'][] = $this->expand_exception($exception->to_array(), $object);
+ $recurrence_exceptions[] = $this->expand_exception($exception->to_array(), $object);
}
}
}
- }
- // this is an exception object
- else if ($this->obj->recurrenceID()->isValid()) {
- $object['thisandfuture'] = $this->obj->thisAndFuture();
+ $object['recurrence']['EXCEPTIONS'] = $recurrence_exceptions;
}
return $this->data = $object;
More information about the commits
mailing list