6.0.0-RC7
6/27/26

[#1505] freebusyUrl is not found with multiple sources
Summary freebusyUrl is not found with multiple sources
Queue Turba
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester gauret (at) free (dot) fr
Created 3/7/05 (7782 days ago)
Due
Updated 3/8/05 (7781 days ago)
Assigned
Resolved 3/8/05 (7781 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
3212 Jan Schneider Comment #5 Reply to this comment
This could cause huge delays or even timeouts if you have many or big 
address books, but feel free to discuss this on the turba mailing list.
211 gauret (at) free (dot) fr Comment #4 Reply to this comment
OK. Still, the default fallback could use all the defined sources 
instead of just the first one. This would be a little smarter IMHO.
239 Jan Schneider Comment #3
State ⇒ Not A Bug
Reply to this comment
No. array(key($cfgSources)) is only a fallback if no sources have been 
defined. You need to set the address books to search for free/busy 
urls in Kronolith.
599 gauret (at) free (dot) fr Comment #2 Reply to this comment
I forgot the name of the file to patch: it's turba/lib/api.php. Sorry...
279 gauret (at) free (dot) fr Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ freebusyUrl is not found with multiple sources
Queue ⇒ Turba
New Attachment: api.php-multiplesources.patch Download
Reply to this comment
I've setup a localsql address book and a sql-based shared address book 
in turba (using separate turba_objects tables).

When searching for freebusy URLs, turba only looks in the first source 
: the localsql address book. I found out why : on line 1070 of current 
CVS (03/07), the sources list is taken from the cfgSources with the 
key() function, which only returns one key. This function should be 
replaced by array_keys(), which correctly returns all keys in the 
cfgSources array.

With array_keys, the freebusy URLs in the second source are correctly 
returned.



The only tradeoff is that array_keys only exists in PHP > 4, but I 
think that Horde already depends on it anyway.



Please see the attached patch to apply the change. Thanks

Saved Queries