2 commits - plugins/libkolab
Thomas Brüderli
bruederli at kolabsys.com
Wed Nov 6 16:45:04 CET 2013
plugins/libkolab/lib/kolab_format_event.php | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 1298444c5d5464994b701081b8240298ab6eb7e4
Merge: e02e7cd 7d5842f
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Nov 6 16:44:49 2013 +0100
Merge branch 'master' of ssh://git.kolab.org/git/roundcubemail-plugins-kolab
commit e02e7cd3f3efe6d4f2a0a9a1880cf07f5d949dcb
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