stuart: server/kolab-resource-handlers/kolab-resource-handlers/freebusy freebusy.php, 1.11, 1.12

cvs at intevation.de cvs at intevation.de
Fri Jul 16 00:18:57 CEST 2004


Author: stuart

Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy
In directory doto:/tmp/cvs-serv12516

Modified Files:
	freebusy.php 
Log Message:
Don't include the summary for events marked as non-public


Index: freebusy.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- freebusy.php	15 Jul 2004 21:09:52 -0000	1.11
+++ freebusy.php	15 Jul 2004 22:18:55 -0000	1.12
@@ -193,14 +193,9 @@
     }
 
 
-    /*
-    This does not apply here - non-public events should still show up in the vfb
-
-    // Make sure we're allowed to view this event
-    if (!empty($event_hash['sensitivity']) && $event_hash['sensitivity'] != 'public') {
-        return false;
+    if (empty($event_hash['sensitivity'])) {
+        $event_hash['sensitivity'] = 'public';
     }
-    */
 
     // Set the summary if it's not present, so we don't get PHP warnings
     // about accessing non-present keys
@@ -290,7 +285,7 @@
         }
 
         $uid = $event['uid'];
-        $summary = $event['summary'];
+        $summary = ($event_hash['sensitivity'] == 'public' ? $event['summary'] : '');
 
         trigger_error("Looking at message with uid=$uid and summary=$summary", E_USER_NOTICE);
 
@@ -304,11 +299,14 @@
         }
 
         if ($extended) {
-            //error_log("adding event uid $uid");
-            $vFb->addBusyPeriod('BUSY', $initial_start, $initial_end, null, array(
-                'X-UID'         => base64_encode($uid),
-                'X-SUMMARY'     => base64_encode($summary),
-            ));
+            $extra = array(
+                'X-UID'     => base64_encode($uid),
+            );
+            if (!empty($summary)) {
+                $extra['X-SUMMARY'] = base64_encode($summary);
+            }
+
+            $vFb->addBusyPeriod('BUSY', $initial_start, $initial_end, null, $extra);
         } else {
             $vFb->addBusyPeriod('BUSY', $initial_start, $initial_end);
         }





More information about the commits mailing list