stuart: server/kolab-resource-handlers/kolab-resource-handlers/resmgr resmgr.php, 1.8, 1.9

cvs at intevation.de cvs at intevation.de
Tue Aug 10 17:30:55 CEST 2004


Author: stuart

Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/resmgr
In directory doto:/tmp/cvs-serv9935

Modified Files:
	resmgr.php 
Log Message:
- Some small syntax changes
- Added the organizer information to the generated XML events
- Applied the same fix that was neccessary in the free/busy generator to parse events properly (was calling the incorrect function to obtain the MIME part contents - the old way returned the part headers in addition to the part body)
- Another incorrect function call fix to generate the correct MIME messages (Fix for issue 276)


Index: resmgr.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/resmgr/resmgr.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- resmgr.php	16 Jul 2004 12:40:14 -0000	1.8
+++ resmgr.php	10 Aug 2004 15:30:52 -0000	1.9
@@ -282,7 +282,7 @@
             $part = $mime->getPart($mimeid);
 
             $iCalendar = &new Horde_iCalendar();
-            $iCalendar->parsevCalendar($part->toString());
+            $iCalendar->parsevCalendar($part->getContents());
 
             $event = &$iCalendar->findComponent('VEVENT');
             if ($event === false) {
@@ -349,9 +349,9 @@
     $vfb = &$iCalendar->findComponent('VFREEBUSY');
 
     if ($vfb === false) {
-        myLog("Invalid or no free/busy information available for $resource", RM_LOG_ERROR);	
+        myLog("Invalid or no free/busy information available for $resource", RM_LOG_ERROR);
         //shutdown();
-	return false;
+        return false;
     }
 
     $vfb->simplify();
@@ -565,10 +565,17 @@
 
     // We're not interested in too much information about the event; the only
     // critical things are the UID and the time spans. We include the
-    // summary and body for display purposes (e.g. in the free/busy viewer).
+    // summary, body and organizer for display purposes (e.g. in the free/busy viewer).
     $kolab_node = $kolab_event->append_child($kolab_xml->create_element('uid'));
     $kolab_node->append_child($kolab_xml->create_text_node($uid));
 
+    $kolab_node = $kolab_event->append_child($kolab_xml->create_element('organizer'));
+    $orgnzr_node = $kolab_node->append_child($kolab_xml->create_element('display-name'));
+    $orgnzr_node = $kolab_node->append_child($kolab_xml->create_element('smtp-address'));
+    $orgnzr_node->append_child($kolab_xml->create_text_node(
+        $itip->getAttributeDefault('ORGANIZER', '')
+    ));
+
     $kolab_node = $kolab_event->append_child($kolab_xml->create_element('summary'));
     $kolab_node->append_child($kolab_xml->create_text_node(
         $itip->getAttributeDefault('SUMMARY', '')
@@ -779,8 +786,7 @@
 
         $message = preg_replace("/\r\n|\n|\r/s", "\r\n",
             $headers->toString() .
-            $body->toString(false) .
-            $part->toString(false)
+            $message->toString(false)
         );
 
         myLog("Appending message to $fullmbox", RM_LOG_DEBUG);





More information about the commits mailing list