From: jmunro Date: Tue, 12 Feb 2002 14:58:09 +0000 (+0000) Subject: fixed bug with multiple terms and UW X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=856b2ee25a1cd7e05dd5ccdbe9d0e4744673351a fixed bug with multiple terms and UW git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2424 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_search.php b/functions/imap_search.php index b9264008..da7e7838 100644 --- a/functions/imap_search.php +++ b/functions/imap_search.php @@ -42,12 +42,13 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo $search_string = ''; $count = count($multi_search); for ($x=0;$x<$count;$x++) { - $search_string = $search_string . ' ' . $search_where . ' "' . $multi_search[$x] . '" '; + trim($multi_search[$x]); + $search_string = $search_string . ' ' . $search_where . ' "' . $multi_search[$x] . '"'; } } $search_string = trim($search_string); - /* now use $search_string in the imap search */ +/* now use $search_string in the imap search */ if (isset($languages[$squirrelmail_language]['CHARSET']) && $languages[$squirrelmail_language]['CHARSET']) { @@ -55,7 +56,6 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo } else { $ss .= "SEARCH ALL $search_string\""; } - /* Read Data Back From IMAP */ $readin = sqimap_run_command ($imapConnection, $ss, true, $result, $message); if (isset($languages[$squirrelmail_language]['CHARSET']) && strtolower($result) == 'no') {