steffen: server/kolab-resource-handlers/kolab-resource-handlers/freebusy freebusy.class.php, 1.13, 1.14
cvs at intevation.de
cvs at intevation.de
Thu Oct 28 02:53:04 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy
In directory doto:/tmp/cvs-serv6724/kolab-resource-handlers/freebusy
Modified Files:
freebusy.class.php
Log Message:
fix for issue407 (allday events)
Index: freebusy.class.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.class.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- freebusy.class.php 27 Oct 2004 14:51:18 -0000 1.13
+++ freebusy.class.php 28 Oct 2004 00:53:02 -0000 1.14
@@ -121,6 +121,10 @@
// Get the events initial start
$initial_start = $event['start-date'];
$initial_end = $event['end-date'];
+ if( $event['allday'] ) {
+ $initial_end = strtotime( '+1 day', $initial_start );
+ myLog("Detected all-day event $uid", RM_LOG_DEBUG);
+ }
$extra = array( 'X-UID' => base64_encode($uid) );
if (!empty($summary)) {
$extra['X-SUMMARY'] = base64_encode($summary);
@@ -427,6 +431,13 @@
}
// Convert our date-time values to timestamps
+ if( strpos( $event_hash['start-date'], 'T' ) === false &&
+ strpos( $event_hash['end-date'], 'T' ) &&
+ strpos( $event_hash['start-date'] ) == strpos( $event_hash['end-date'] ) ) {
+ $event_hash['allday'] = true;
+ } else {
+ $event_hash['allday'] = false;
+ }
$event_hash['start-date'] = FreeBusy::parseDateTime($event_hash['start-date']);
$event_hash['end-date'] = FreeBusy::parseDateTime($event_hash['end-date']);
More information about the commits
mailing list