[Kolab-devel] Kolab-resource-handlers dependency on Horde libraries
Gunnar Wrobel
wrobel at gentoo.org
Thu Jun 15 17:35:05 CEST 2006
Gunnar Wrobel <wrobel at gentoo.org> writes:
> The vfreebusy.php patch is simple since this file has not been changed
> within the horde code since the time of the import. And I belive the
> changes are rather non-invasive. I attached the isolated patch and
> will also submit it UPSTREAM.
Hi!
Actually the vfreebusy part is not as easy as I thought initially. I
do have a few questions concerning the original intention of the code
changes.
The iCalendar package of the Horde framework (and specifically the
vfreebusy.php handler within that package) has been modified for the
Kolab project to support setting additional parameters on free/busy
periods. Usually a freebusy object only allows setting some basic
parameters like the e-mail address of the corresponding organizer and
a set of free/busy periods that are only characterised by their start
and end times.
For kolab the free/busy periods have been extended to allow setting
parameters beyond the start and end dates. This is being used within
the free/busy class to store "X-UID" (==uid), "X-SUMMARY" (==summary
if event is public), and "X-SID" (==scheduling-id if present) on each
period.
Within kolab only X-UID and X-SID seem to be used in order to filter
updates to events. Is this correct? Is that the main intention of
allowing additional attributes to the free/busy periods?
X-SUMMARY does not seem to be used anywhere, but groupware clients
could access this information if they fetch the *.xfb file. Which
clients use this information?
There are two problems that I do see with these extended attributes:
1) They are erased before ever being accessible
There is a section in the freebusy.class.php script that tries to
export the vCalendar object.
freebusy.class.php:
$xvCal = $vCal;
$xvCal->addComponent($vFb);
$vCal->addComponent($this->clearExtra($vFb));
// Generate the vCal file.
$result = array( $vCal->exportvCalendar(), $xvCal->exportvCalendar() );
return $result;
The problem with this code section is that the addComponent call does
a pass by reference
iCalendar.php:
function addComponent($component)
{
if (is_a($component, 'Horde_iCalendar')) {
$this->_components[] = &$component;
}
}
So the $this->clearExtra($vFb) within the freebusy.class.php script
effectively kills all additional attributes on both $xvCal and
$vCal. Exporting results in equeal strings and the attributes are not
retained.
2) Merging free/busy attributes results in loss of X-* attributes
The function simplify within the vfreebusy.php script looks like it
throws away the extra parameters of an event if it finds a new event
that overlapy the first one. There seems to be no guaranteed order of
preference. I believe this might interfere with the intetion of
ignoring event updates as they are handled by the freebusy.php script.
So I would like to know what the intention of the X-* attributes are
and how handling of event updates is supposed to work.
Thanks for any hints!
Cheers
Gunnar
--
Gunnar Wrobel Gentoo Developer
__________________C_o_n_t_a_c_t__________________
Mail: wrobel at gentoo.org
WWW: http://www.gunnarwrobel.de
IRC: #gentoo-web at freenode.org
_________________________________________________
More information about the devel
mailing list