gunnar: server/horde/horde-framework HK-GW-freebusy_error_handling.patch, NONE, 1.1 ChangeLog, 1.12, 1.13 horde-framework-kolab.spec, 1.33, 1.34

cvs at kolab.org cvs at kolab.org
Fri Mar 7 09:46:21 CET 2008


Author: gunnar

Update of /kolabrepository/server/horde/horde-framework
In directory doto:/tmp/cvs-serv13337/horde/horde-framework

Modified Files:
	ChangeLog horde-framework-kolab.spec 
Added Files:
	HK-GW-freebusy_error_handling.patch 
Log Message:
kolab/issue2521 (an event breaking lib/Horde/Kolab/Freebusy.php)

--- NEW FILE: HK-GW-freebusy_error_handling.patch ---
diff -r eb2b13655acf framework/Kolab/Kolab/Freebusy.php
--- a/framework/Kolab/Kolab/Freebusy.php	Fri Mar 07 07:09:54 2008 +0100
+++ b/framework/Kolab/Kolab/Freebusy.php	Fri Mar 07 07:10:00 2008 +0100
@@ -135,6 +135,10 @@ class Horde_Kolab_Freebusy {
         $events = array();
         
         $objects = $this->_store->getObjects();
+        if (is_a($objects, 'PEAR_Error')) {
+            return $objects;
+        }
+
         foreach($objects as $object) {
             $events[] = &new Kolab_Event($object);
         }
@@ -169,13 +173,16 @@ class Horde_Kolab_Freebusy {
                     $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 && 
-                    (!(($endDate->compareDateTime($next) < 0) || 
-                       ($startDate->compareDateTime($next_end) > 0)))) {
-                    $result[] = $event;
+
+                if ($next !== false) {
+                    $duration = $next->timestamp() - $event->start->timestamp();
+                    $next_end = &new Horde_Date($event->end->timestamp() + $duration);
+
+                    if ((!(($endDate->compareDateTime($next) < 0) || 
+                           ($startDate->compareDateTime($next_end) > 0)))) {
+                        $result[] = $event;
+                    }
+                    
                 }
             }
         }
@@ -311,6 +318,10 @@ class Horde_Kolab_Freebusy {
         $startDate = new Horde_Date($startstamp);
         $endDate = new Horde_Date($endstamp);
         $events = $this->listEvents($startDate, $endDate);
+        if (is_a($events, 'PEAR_Error')) {
+            return $events;
+        }
+
         if (empty($events)) {
             return $events;
         }

Index: ChangeLog
===================================================================
RCS file: /kolabrepository/server/horde/horde-framework/ChangeLog,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ChangeLog	29 Nov 2007 08:25:52 -0000	1.12
+++ ChangeLog	7 Mar 2008 08:46:19 -0000	1.13
@@ -1,3 +1,10 @@
+2008-03-07  Gunnar Wrobel  <p at rdus.de>
+
+	* horde-framework-kolab.spec:
+
+	kolab/issue2521 (an event breaking lib/Horde/Kolab/Freebusy.php)
+	https://www.intevation.de/roundup/kolab/issue2521
+
 2007-11-29  Gunnar Wrobel  <p at rdus.de>
 
 	* horde-framework-kolab.spec: Update to RC1

Index: horde-framework-kolab.spec
===================================================================
RCS file: /kolabrepository/server/horde/horde-framework/horde-framework-kolab.spec,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- horde-framework-kolab.spec	30 Nov 2007 15:24:48 -0000	1.33
+++ horde-framework-kolab.spec	7 Mar 2008 08:46:19 -0000	1.34
@@ -28,6 +28,7 @@
 
 Patch0:         HK-GW-Fix_Prefs_for_Ingo.patch
 Patch1:         HK-GW-Fbview_xfb_concept.patch
+Patch2:         HK-GW-freebusy_error_handling.patch
 
 # Build Info
 Prefix:		%{l_prefix}
@@ -51,6 +52,7 @@
 	%setup -n framework
 	%patch -p2 -P 0
 	%patch -p2 -P 1
+	%patch -p2 -P 2
 
 %build
 





More information about the commits mailing list