lib/Kolab
Thomas Brüderli
bruederli at kolabsys.com
Wed Jan 21 19:02:40 CET 2015
lib/Kolab/FreeBusy/SourceIMAP.php | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
New commits:
commit 4aecc97621eb46d90c0ff63e531169b863905759
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Jan 21 19:02:10 2015 +0100
Set event UID to make computation of recurring events work (#4290); improved debug logging for better observation
diff --git a/lib/Kolab/FreeBusy/SourceIMAP.php b/lib/Kolab/FreeBusy/SourceIMAP.php
index 5a4bd43..bca241f 100644
--- a/lib/Kolab/FreeBusy/SourceIMAP.php
+++ b/lib/Kolab/FreeBusy/SourceIMAP.php
@@ -118,8 +118,11 @@ class SourceIMAP extends Source
$calendar = VObject\Component::create('VCALENDAR');
$seen = array();
+ $log->addInfo("Getting events from IMAP in range", array($dtstart->format('c'), $dtend->format('c')));
+
$query = array(array('dtstart','<=',$dtend), array('dtend','>=',$dtstart));
foreach ($folders as $folder) {
+ $count = 0;
$log->debug('Reading Kolab folder: ' . $folder->name, $folder->get_folder_info());
// skip other user's shared calendars
@@ -168,9 +171,6 @@ class SourceIMAP extends Source
}
}
- // copied from libvcalendar::_to_ical()
- $ve = VObject\Component::create('VEVENT');
-
// translate all-day dates into absolute UTC times
// FIXME: use server timezone?
if ($event['allday']) {
@@ -192,6 +192,10 @@ class SourceIMAP extends Source
continue;
}
+ // copied from libvcalendar::_to_ical()
+ $ve = VObject\Component::create('VEVENT');
+ $ve->UID = $event['uid'];
+
if (!empty($event['start']))
$ve->add(\libvcalendar::datetime_prop('DTSTART', $event['start'], false, false));
if (!empty($event['end']))
@@ -236,7 +240,12 @@ class SourceIMAP extends Source
// append to vcalendar container
$calendar->add($ve);
+ $count++;
+
+ $log->debug("Adding event for processing:\n" . $ve->serialize());
}
+
+ $log->addInfo("Added $count events from folder" . $folder->name);
}
$this->imap_disconnect($imap, $config, $folders);
More information about the commits
mailing list