[Tickets #8865] Re: not getting free/busy info from right source
bugs at horde.org
bugs at horde.org
Thu Feb 11 16:14:55 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8865
------------------------------------------------------------------------------
Ticket | 8865
Updated By | rsalmon at mbpgroup.com
Summary | not getting free/busy info from right source
Queue | Kronolith
Version | Git master
Type | Bug
State | Feedback
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
rsalmon at mbpgroup.com (2010-02-11 11:14) wrote:
I've added the following kronolith hook
function prefs_hook_search_sources($username = null) {
if (!$username) {
return;
}
if ($GLOBALS['registry']->hasMethod('contacts/sources')) {
$sources = $GLOBALS['registry']->call('contacts/sources');
return implode("\t", array_keys($sources));
}
}
and configured the following pref to get 'search_sources' set
automatically when a (new/old) user logs in :
$_prefs['search_sources'] = array(
'value' => "",
'locked' => false,
'hook' => true,
'shared' => false,
'type' => 'implicit',
);
If I set locked to true, kronolith doesn't not work anymore :
exception 'Kronolith_Exception' with message 'No calendar driver
specified' in /var/www/html/horde/kronolith/lib/Kronolith.php:2209
Stack trace: #0 /var/www/html/horde/kronolith/lib/Kronolith.php(432):
Kronolith::getDriver() #1
/var/www/html/horde/kronolith/lib/View/Week.php(73):
Kronolith::listEvents(Object(Horde_Date), Object(Horde_Date)) #2
/var/www/html/horde/kronolith/lib/Kronolith.php(2267):
Kronolith_View_Week->Kronolith_View_Week(Object(Horde_Date)) #3
/var/www/html/horde/kronolith/week.php(15): Kronolith::getView('Week')
#4 {main}
If I set locked to false, a pref is added in table [horde_prefs] :
rsalmon | kronolith | search_sources |
e35b32a27eb8a6ecba9d64c5ede2c288 localldap favourites
From there, kronolith is able to look up attendee's availability.
Though, the hook doesn't work as I would expect : the idea of
prefs_hook_search_sources is to create, on the fly, a list of all
possible available address books for the current session.
The first time a user logs in, the hook is kicked off and that's it.
The next time the user logs in, kronolith seems to be checking first
if user pref 'search_sources' exists, and if not, reads what's in
prefs.php
Is this a bug or is this the expected behaviour ?
More information about the bugs
mailing list