gunnar: server/patches/horde HK-GW-framework_3.2_ALPHA-Kolab_extensions.patch, 1.2, 1.3
cvs at kolab.org
cvs at kolab.org
Fri Nov 23 16:03:56 CET 2007
Author: gunnar
Update of /kolabrepository/server/patches/horde
In directory doto:/tmp/cvs-serv17398/patches/horde
Modified Files:
HK-GW-framework_3.2_ALPHA-Kolab_extensions.patch
Log Message:
Some fixes to the way we expand recurrences in free/busy.
Index: HK-GW-framework_3.2_ALPHA-Kolab_extensions.patch
===================================================================
RCS file: /kolabrepository/server/patches/horde/HK-GW-framework_3.2_ALPHA-Kolab_extensions.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- HK-GW-framework_3.2_ALPHA-Kolab_extensions.patch 22 Nov 2007 16:31:00 -0000 1.2
+++ HK-GW-framework_3.2_ALPHA-Kolab_extensions.patch 23 Nov 2007 15:03:54 -0000 1.3
@@ -394,10 +394,10 @@
$this->_storage = &new Kolab_IMAP();
}
-diff -r 2be0e69810d0 framework/Kolab/Kolab/Freebusy.php
+diff -r f536c90a6397 framework/Kolab/Kolab/Freebusy.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/framework/Kolab/Kolab/Freebusy.php Thu Nov 22 17:29:28 2007 +0100
-@@ -0,0 +1,490 @@
++++ b/framework/Kolab/Kolab/Freebusy.php Fri Nov 23 15:51:14 2007 +0100
+@@ -0,0 +1,495 @@
+<?php
+/**
+ * @package Horde_Kolab
@@ -560,10 +560,17 @@
+ /* do recurrence expansion if not keeping anyway */
+ if ($event->recurs()) {
+ $next = $event->recurrence->nextRecurrence($startDate);
++ while ($next !== false &&
++ $event->recurrence->hasException($next->year, $next->month, $next->mday)) {
++ $next->mday++;
++ $next = $event->recurrence->nextRecurrence($next);
++ }
++ $duration = $next->timestamp() - $event->start->timestamp();
++ $next_end = &new Horde_Date($event->end->timestamp() + $duration);
++
+ if ($next !== false &&
-+ !$event->recurrence->hasException($next->year, $next->month, $next->mday) &&
-+ (!(($endDate->compareDateTime($event->start) < 0) ||
-+ ($startDate->compareDateTime($event->end) > 0)))) {
++ (!(($endDate->compareDateTime($next) < 0) ||
++ ($startDate->compareDateTime($next_end) > 0)))) {
+ $result[] = $event;
+ }
+ }
@@ -744,18 +751,16 @@
+ if (!$event->recurs()) {
+ $vFb->addBusyPeriod('BUSY', $startThisDay, null, $duration, $extra);
+ } else {
-+ while (true) {
-+ $next = $event->recurrence->nextRecurrence($startDate);
-+ if ($next === false) {
++ $next = $event->recurrence->nextRecurrence($startDate);
++ while ($next) {
++ if ($endDate->compareDateTime($next) < 0) {
+ break;
+ }
-+ if ($event->recurrence->hasException($next->year, $next->month, $next->mday)) {
-+ continue;
-+ }
-+ if ($endDate->compareDateTime($next->start) < 0) {
-+ break;
++ if (!$event->recurrence->hasException($next->year, $next->month, $next->mday)) {
++ $vFb->addBusyPeriod('BUSY', $next->timestamp(), null, $duration, $extra);
+ }
-+ $vFb->addBusyPeriod('BUSY', $next->timestamp(), null, $duration, $extra);
++ $next->mday++;
++ $next = $event->recurrence->nextRecurrence($next);
+ }
+ }
+ }
More information about the commits
mailing list