diff options
author | wiz <wiz> | 2010-02-05 17:40:51 +0000 |
---|---|---|
committer | wiz <wiz> | 2010-02-05 17:40:51 +0000 |
commit | d495a865f8b22c3edb240d5525e265e116e7cbaa (patch) | |
tree | cd5f1d3b5840f99525f1cca3f34d7737b9045940 /mail | |
parent | 5d214020e79de324c4c28fa58b0af99973de0858 (diff) | |
download | pkgsrc-d495a865f8b22c3edb240d5525e265e116e7cbaa.tar.gz |
Add a patch from Jonathan Angliss fixing IMAP search problems:
http://thread.gmane.org/gmane.mail.squirrelmail.user/36642
Bump PKGREVISION.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/squirrelmail/Makefile | 4 | ||||
-rw-r--r-- | mail/squirrelmail/distinfo | 3 | ||||
-rw-r--r-- | mail/squirrelmail/patches/patch-ac | 73 |
3 files changed, 77 insertions, 3 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index d86d5008c91..6a4fa70c9fe 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.110 2009/10/04 01:27:15 taca Exp $ +# $NetBSD: Makefile,v 1.111 2010/02/05 17:40:51 wiz Exp $ DISTNAME= squirrelmail-1.4.20-RC2 PKGNAME= ${DISTNAME:S/-RC2/rc2/} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= mail www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=squirrelmail/} EXTRACT_SUFX= .tar.bz2 diff --git a/mail/squirrelmail/distinfo b/mail/squirrelmail/distinfo index 7a47ceaae37..71013a9b55a 100644 --- a/mail/squirrelmail/distinfo +++ b/mail/squirrelmail/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.56 2009/10/04 01:27:15 taca Exp $ +$NetBSD: distinfo,v 1.57 2010/02/05 17:40:51 wiz Exp $ SHA1 (squirrelmail-1.4.20-RC2.tar.bz2) = f1cdccfdd17d8974adc0b79aba44b62f98f78f64 RMD160 (squirrelmail-1.4.20-RC2.tar.bz2) = f736e33af6f7b5a4c49f96968ed3fdeb2d42f06f Size (squirrelmail-1.4.20-RC2.tar.bz2) = 516825 bytes SHA1 (patch-aa) = 4c5556c804c1b728eec87322272abb06edcfcc2a SHA1 (patch-ab) = 503bef625388a3224ad6f54aa332190e7440dde3 +SHA1 (patch-ac) = 1145e03ab1b084e27c2b97958d7fc13720977357 SHA1 (patch-ai) = 701fdbc84afde5f8e255af13ba0e44469343e17c diff --git a/mail/squirrelmail/patches/patch-ac b/mail/squirrelmail/patches/patch-ac new file mode 100644 index 00000000000..14cb17d07d1 --- /dev/null +++ b/mail/squirrelmail/patches/patch-ac @@ -0,0 +1,73 @@ +$NetBSD: patch-ac,v 1.5 2010/02/05 17:40:51 wiz Exp $ + +Patch for fixing IMAP search problems: +http://thread.gmane.org/gmane.mail.squirrelmail.user/36642 + +--- functions/imap_search.php.orig 2010-02-05 18:35:41.000000000 +0100 ++++ functions/imap_search.php +@@ -46,22 +46,23 @@ function sqimap_search($imapConnection, + on the client side, but should be fixed on the server + as per the RFC */ + +- if ($imap_server_type == 'macosx' || $imap_server_type == 'hmailserver') { +- foreach ($multi_search as $multi_search_part) { +- if (strtoupper($languages[$squirrelmail_language]['CHARSET']) == 'ISO-2022-JP') { +- $multi_search_part = mb_convert_encoding($multi_search_part, 'JIS', 'auto'); +- } +- $search_string .= $search_where . ' ' .$multi_search_part . ' '; ++ if (strtoupper($languages[$squirrelmail_language]['CHARSET'] == 'ISO-2022-JP')) { ++ foreach($multi_search as $idx=>$search_part) { ++ $multi_search[$idx] = mb_convert_encoding($search_parth, 'JIS', 'auto'); + } + } ++ ++ $search_lit = array(); ++ ++ if ($imap_server_type == 'macosx' || $imap_server_type == 'hmailserver') { ++ $search_string .= $search_where . ' ' . implode(' ', $multi_search); ++ } + else { +- foreach ($multi_search as $multi_search_part) { +- if (strtoupper($languages[$squirrelmail_language]['CHARSET']) == 'ISO-2022-JP') { +- $multi_search_part = mb_convert_encoding($multi_search_part, 'JIS', 'auto'); +- } +- $search_string .= $search_where . ' {' . strlen($multi_search_part) +- . "}\r\n" . $multi_search_part . ' '; +- } ++ $search_string .= $search_where; ++ $search_lit = array( ++ 'command' => '', ++ 'literal_args' => $multi_search ++ ); + } + + $search_string = trim($search_string); +@@ -76,15 +77,24 @@ function sqimap_search($imapConnection, + $ss = "SEARCH ALL $search_string"; + } + +- /* read data back from IMAP */ +- $readin = sqimap_run_command($imapConnection, $ss, false, $result, $message, $uid_support); ++ if (empty($search_lit)) { ++ /* read data back from IMAP */ ++ $readin = sqimap_run_command($imapConnection, $ss, false, $result, $message, $uid_support); ++ } else { ++ $search_lit['command'] = $ss; ++ $readin = sqimap_run_literal_command($imapConnection, $search_lit, false, $result, $message, $uid_support); ++ } + + /* try US-ASCII charset if search fails */ + if (isset($languages[$squirrelmail_language]['CHARSET']) + && strtolower($result) == 'no') { + $ss = "SEARCH CHARSET \"US-ASCII\" ALL $search_string"; +- $readin = sqimap_run_command ($imapConnection, $ss, true, +- $result, $message, $uid_support); ++ if (empty($search_lit)) { ++ $readin = sqimap_run_command($imapConnection, $ss, false, $result, $message, $uid_support); ++ } else { ++ $search_lit['command'] = $ss; ++ $readin = sqimap_run_literal_command($imapConnection, $search_lit, false, $result, $message, $uid_support); ++ } + } + + unset($messagelist); |