[kronolith] FreeBusy feature request
Wolfgang Rosenauer
wolfgang.rosenauer at an-netz.de
Wed Dec 29 06:11:04 PST 2004
Hi,
Chuck Hagenbuch wrote:
> Quoting Wolfgang Rosenauer <wolfgang.rosenauer at an-netz.de>:
>
>> But I consider it a bug that my own FreeBusy information is not
>> available if I create an appointment. I think if no Freebusy URL is set
>> anywhere in TURBA it should default to the own standard Freebusy URL
>> automatically.
>
> How should Kronolith know that you only want your own calendar
> considered? But,
> submit a patch, or at least an enhancement ticket on bugs.horde.org.
Here is a new getFreeBusyUrl() function which do now what I want.
DISCLAIMER: I have absolutely no experience in programming PHP and I
have no clue about the Horde internals.
Therefore this code is most probably a real dirty
implementation. But I think you'll know what I mean.
function getFreeBusyUrl($email)
{
global $registry, $prefs;
$result = $registry->call('contacts/getField', array($email,
'freebusyUrl',
unserialize($prefs->getValue('search_abook'))));
if (!is_string($result)) {
$calendars = Kronolith::listCalendars();
$i = 0;
foreach ($calendars as $id => $cals) {
if (count($calendars) == 1) {
$result = Horde::applicationUrl('fb.php', true, -1) .
'?c=' . $id;
break;
} else {
if ($i == 0) {
$result = Horde::applicationUrl('fb.php', true, -1) .
'?c[]=' . $id;
} else {
$result .= '&c[]=' . $id;
}
$i++;
}
}
}
return $result;
}
CU,
Wolfgang
More information about the kronolith
mailing list