6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/6/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#10681] Autocompleter in IMP with inconsistent results
*
Your Email Address
*
Spam protection
Enter the letters below:
. ..__.. .._..__ |\/|| ||__| | [__) | ||__|| |_|_| \
Comment
> I probed the autocomplete feature in IMP a longer time since now. > Before a few weeks something was corrected in the autocompleter code, > but this is not what my problem solved, too. > > The issue is, that the autocompleter will most of the time not show > up until I wrote 4 letters, though I set ac_threshold to 1, even the > maximum (200) can't be hit. Another time the autocompleter won't > filter again, when typing the 3rd letter, typing the 4th will filter > again. > > This behaviour I get, when I use the hook as given in the examples: > > public function prefs_init($pref, $value, $username, $scope_ob) > { > switch ($pref) { > case 'add_source': > // Dynamically set the add_source preference. > > // Example: Useful hook when using a Turba source with shares > // enabled (i.e. the example localsql configuration). > return is_null($username) > ? $value > : $GLOBALS['registry']->call('contacts/getDefaultShare'); > > > case 'search_fields': > case 'search_sources': > // Dynamically set the search_fields/search_sources preferences. > > // Example #1: Use the list of sources defined in the contacts > // application (e.g. Turba). > > #Horde::debug($pref); > if (!is_null($username) && > $GLOBALS['registry']->hasMethod('contacts/sources')) { > $sources = $GLOBALS['registry']->call('contacts/sources'); > if ($pref == 'search_fields') { > $out = array(); > foreach (array_keys($sources) as $source) { > $out[$source] = > array_keys($GLOBALS['registry']->call('contacts/fields', > array($source))); > } > } else { > $out = array_keys($sources); > } > # Horde::debug($out); > return json_encode($out); > } > > return $value; > } > } > > > When I set this on my own in the preferences so that it will be saved > in the pref-table, the autocompleter works correctly. > >
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