[imp] Hooks for search_sources/search_fields

Marco falon at csi.it
Wed Jun 8 08:21:33 UTC 2011


Hi,
 I have the IMP 5.0.5 hooks for search_sources/search_fields.
I don't want to search all field mapped in turba, so I tried to restrict
search to 'search' fields.

So I replaced 

  $out[$source] = array_keys($GLOBALS['registry']
  ->call('contacts/fields', array($source)));

(line 80 of hooks.php.dist) with

  $out[$source] = $GLOBALS['cfgSources'][$source]['search'];

I also tried

 foreach ($GLOBALS['registry']->call('contacts/fields', array($source))
    as $field)
 if ($field['search']) $out[$source][] = $field['name'];

Both replacement work in php admin shell on horde, they give the right result.
But only the original line works. No search for autocomplete address has done
with one of these two replacements.

Could you help me?

Thanks a lot.
Marco



More information about the imp mailing list