6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/5/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7357] getAddressBookOrder() returns empty array when "addressbooks" preference is empty
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ . ..__.. ,.__. [__)|_/ | | \./ | | | \| \|__\ | |__|
Comment
> The comment in turba/config/prefs.php for the "addressbooks" preference says: > > > > // Address books to be displayed in the address book selection widget > > // and in the Browse menu item. The address book name is stored using > > // the source key from sources.php (e.g. "localsql"). Separate > > // entries with "\n" , e. g. 'value' => "localsql\nlocalldap" (the > > // double quotes are REQUIRED). If 'value' is empty (''), all address > > // books that the user has permissions to will be listed. > > > > In particular, it says if the value is empty that all address books > will be listed. > > > > However, if the user does not have this preference set to something, > the Address Book > > widget from IMP behaves strangely. The IMP Address Book widget calls > the Turba API > > "search" function. The "search" function calls > Turba::getAddressBookOrder() to > > validate the list of sources provided. If the "addressbooks" > preference is empty, > > Turba::getAddressBookOrder() returns an empty array and all sources > are removed. > > Then, the "search" function adds back in the default source. > > > > In my installation, there are 3 Turba sources: localsql, localldap, > and favourites. > > The IMP Address Book widget lists all 3 in the search form, but no > matter which one I > > choose, it always searches the "localsql" source (my default). > > > > I fixed this problem by setting the "addressbooks" preference to > > "localsql\nlocalldap\nfavourites" and locking it. > > > > However, it would be nice if the search form behaved better. Maybe > > Turba::getAddressBookOrder() could return all address books that the user has > > permission to, in some random order, if the "addressbooks" preference > is empty? Or > > perhaps the IMP Address Book widget should only allow you to select > from addressbooks > > that will actually be used in the search. > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers