On Mar 11, 2010, at 10:58 AM, Arne Berglund wrote:
I haven't found where to make LDAP autocomplete mimic what I've done for the SQL book.
Here is a simple patch to prevent LDAP auto-complete from doing leading wildcard searches. eg
a search for 'ran' only returns RANdy and RANdall, not bRANdi, bertRANd or bRANdenburg. This will
mimic the results of popular email clients like, mail.app, thunderbird, gmail, outlook, and others. I also recommend
the change offered by aberglund to patch your SQL addressbook:
http://www.roundcubeforum.net/5-release-support/16-requests/5693-address-aut...
in [RC root]/program/include/
--- rcube_ldap.php.orig 2010-03-17 15:48:38.000000000 -0500 +++ rcube_ldap.php 2010-03-17 15:50:26.000000000 -0500 @@ -325,13 +325,13 @@ if (is_array($this->prop['search_fields'])) { foreach ($this->prop['search_fields'] as $k => $field)
$filter .= "($field=$wc" . rcube_ldap::quote_string($value) . "$wc)";
$filter .= "($field=" . rcube_ldap::quote_string($value) . "$wc)";
}
else
{
foreach ((array)$fields as $field)
if ($f = $this->_map_field($field)) $filter .= "($f=$wc" . rcube_ldap::quote_string($value) . "$wc)";
$filter .= "($f=" . rcube_ldap::quote_string($value) . "$wc)";
}
$filter .= ')';--ryan
-- Ryan Horrisberger Software Developer
List info: http://lists.roundcube.net/users/