[imp] Autocomplete not working for me

M. Rodrigo Monteiro falecom at rodrigomonteiro.net
Tue Sep 8 11:31:40 UTC 2009


On Mon, Sep 7, 2009 at 00:35, ANANT S ATHAVALE<asa at isac.gov.in> wrote:
> It seems to be a known bug.  This happens when use_shares is enabled.
>

Hi!

I don't know if this is because the search is a view of MySQL.
In the mysql log, the query is:

SELECT usuario, email FROM usuarios_domain WHERE ( = '' AND
((LOWER(usuario) LIKE LOWER('%%'))))

I think the problem is in the = '' AND. When I remove it from the
query, the results looks fine to me.
Where this query is mounted in the horde? Looking in the horde files, I found

lib/Horde/SQL.php:                $query = 'LOWER(%s) LIKE LOWER(%s)';

But don't know how to "correct" this query.

The view is this:

create view usuarios_domain AS select pw_gecos AS usuario,
CONCAT(pw_name,'@',SUBSTRING_INDEX(SUBSTRING_INDEX(pw_dir,'/',5),'/',-1))
AS email from domain_ce_gov_br;

Regards,
Rodrigo.

-- 
M. Rodrigo Monteiro
falecom at rodrigomonteiro.net
"Free as in Freedom, not free as in free beer"
"As we are liberated from our own fear, our presence automatically
liberates others"
Linux User # 403730


More information about the imp mailing list