From 484a2e6a98cc2ad139be5643efdbdfa736a2e9c3 Mon Sep 17 00:00:00 2001 From: graf25 Date: Fri, 5 Apr 2002 04:09:04 +0000 Subject: [PATCH] 8-bit searches are now possible -- using literals instead of quotes as per RFC 2060. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2680 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_search.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/functions/imap_search.php b/functions/imap_search.php index 70793f8c..2c4ebbaf 100644 --- a/functions/imap_search.php +++ b/functions/imap_search.php @@ -34,21 +34,10 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox, $multi_search = explode(' ', $search_what); $search_string = ''; foreach ($multi_search as $multi_search_part) { - $search_string .= $search_where . ' "' . $multi_search_part . '" '; + $search_string .= $search_where . ' {' . strlen($multi_search_part) + . "}\r\n" . $multi_search_part . ' '; } -/* - if (count($multi_search)==1) { - $search_string = $search_where . ' ' . '"' . $multi_search[0] . '"'; - } - else { - $search_string = ''; - $count = count($multi_search); - for ($x=0;$x<$count;$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 */ -- 2.25.1