Re: search problem using white spaces...
Paul Lesniewski <[email protected]>
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <[email protected]> |
Please do not top-post. I believe you should know better.
>> I'm using SM1.4.20rc2 and cyrus.
>>
>> Whenever I search for something let's say in the "From" header, using a
>> word I have no problem, cyrus finds it inmedeatily.
>> However, I a use two (or more) words, it takes a long time and I get:
>> Connection terminated by IMAP server, "Query: SEARCH CHARSET ISO-8859-1 ALL
>> FROM".
>>
>> I have disabled, charset search... same problem. If I do the search using
>> telnet I have no problem either.
>>
>> For instance, searching "javier wilson": A06 UID SEARCH CHARSET
>> "ISO-8859-1" ALL FROM "javier wilson"
>> works fine using telnet. It does not work using Squirrelmail.
>>
>> Any ideas, anyone with a similar problem?
>> Could it be because of " $multi_search = explode(' ', $search_what); " in
>> functions/imap_search.php ?
>
> I corrected the problem changing line 38 of functions/imap_search.php:
>
> < $multi_search = explode(' ', $search_what);
>> $multi_search = array( $search_what );
>
> Of course this doesn't search "javier" *and* "wilson", but "javier wilson",
> which is what I intended anyway.
>
> In summary, I would say multi_search is broken in SM1.4.20rc2
Confirmed. With search terms other than single words, I get:
ERROR: Could not complete request.
Query: FETCH (FLAGS UID RFC822.SIZE INTERNALDATE
BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Importance
Priority Content-Type)])
Reason Given: Error in IMAP command received by server.
You didn't look at your logs, since there are also some PHP warnings:
Notice: Undefined variable: messagelist in
/var/www/html/sm_stable_cvs/squirrelmail/functions/imap_search.php on
line 125
Notice: Undefined variable: id in
/var/www/html/sm_stable_cvs/squirrelmail/functions/imap_search.php on
line 131
I am hoping Jon will have the time to look at this, since he made some
changes to this code most recently.
--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel