From: stekkel Date: Wed, 16 Oct 2002 17:10:14 +0000 (+0000) Subject: macosx search query fix. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f18ea37ea066fc3bdcfecb3b8add538db4034a37;p=squirrelmail.git macosx search query fix. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3883 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index 9b19ecaa..54a00f3d 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -237,8 +237,10 @@ function user_filters($imap_stream) { } } -function filter_search_and_delete($imap, $where, $what, $where_to, $user_scan, $del_id) { - global $languages, $squirrelmail_language, $allow_charset_search, $uid_support; +function filter_search_and_delete($imap, $where, $what, $where_to, $user_scan, + $del_id) { + global $languages, $squirrelmail_language, $allow_charset_search, + $uid_support, $imap_server_type; if ($user_scan == 'new') { $category = 'UNSEEN'; } else { @@ -259,8 +261,13 @@ function filter_search_and_delete($imap, $where, $what, $where_to, $user_scan, $ $where = trim($where . ' ' . $what[0]); $what = addslashes(trim($what[1])); } - $search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n" - . $what . "\r\n"; + + if ($imap_server_type == 'macosx') { + $search_str .= ' ' . $where . ' ' . $what; + } else { + $search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n" + . $what . "\r\n"; + } /* read data back from IMAP */ $read = sqimap_run_command($imap, $search_str, true, $response, $message, $uid_support);