Sun Oct 4 01:27:15 2009 UTC ()
Add two small fix:
* Use case ignore match for detecting encoded header. This is
language independent problem.
* Improve handling of file name of attachment in Japanese environment.
These fixes make squirrelmail usable after remove of japaneses patch.
Bump PKGREVISION.
(taca)
diff -r1.109 -r1.110 pkgsrc/mail/squirrelmail/Makefile
diff -r1.55 -r1.56 pkgsrc/mail/squirrelmail/distinfo
diff -r0 -r1.14 pkgsrc/mail/squirrelmail/patches/patch-ab
diff -r0 -r1.1 pkgsrc/mail/squirrelmail/patches/patch-ai
--- pkgsrc/mail/squirrelmail/Makefile 2009/09/29 13:30:54 1.109
+++ pkgsrc/mail/squirrelmail/Makefile 2009/10/04 01:27:15 1.110
| @@ -1,18 +1,18 @@ | | | @@ -1,18 +1,18 @@ |
1 | # $NetBSD: Makefile,v 1.109 2009/09/29 13:30:54 taca Exp $ | | 1 | # $NetBSD: Makefile,v 1.110 2009/10/04 01:27:15 taca Exp $ |
2 | | | 2 | |
3 | DISTNAME= squirrelmail-1.4.20-RC2 | | 3 | DISTNAME= squirrelmail-1.4.20-RC2 |
4 | PKGNAME= ${DISTNAME:S/-RC2/rc2/} | | 4 | PKGNAME= ${DISTNAME:S/-RC2/rc2/} |
5 | PKGREVISION= 1 | | 5 | PKGREVISION= 2 |
6 | CATEGORIES= mail www | | 6 | CATEGORIES= mail www |
7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=squirrelmail/} | | 7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=squirrelmail/} |
8 | EXTRACT_SUFX= .tar.bz2 | | 8 | EXTRACT_SUFX= .tar.bz2 |
9 | | | 9 | |
10 | MAINTAINER= martti@NetBSD.org | | 10 | MAINTAINER= martti@NetBSD.org |
11 | HOMEPAGE= http://www.squirrelmail.org/ | | 11 | HOMEPAGE= http://www.squirrelmail.org/ |
12 | COMMENT= PHP webmail package | | 12 | COMMENT= PHP webmail package |
13 | LICENSE= gnu-gpl-v2 | | 13 | LICENSE= gnu-gpl-v2 |
14 | | | 14 | |
15 | CONFLICTS= sq-attachment-handlers-[0-9]* | | 15 | CONFLICTS= sq-attachment-handlers-[0-9]* |
16 | CONFLICTS+= sq-squirrelspell-[0-9]* | | 16 | CONFLICTS+= sq-squirrelspell-[0-9]* |
17 | CONFLICTS+= ja-squirrelspell-[0-9]* | | 17 | CONFLICTS+= ja-squirrelspell-[0-9]* |
18 | CONFLICTS+= ja-squirrelmail-[0-9]* | | 18 | CONFLICTS+= ja-squirrelmail-[0-9]* |
--- pkgsrc/mail/squirrelmail/distinfo 2009/08/26 12:47:17 1.55
+++ pkgsrc/mail/squirrelmail/distinfo 2009/10/04 01:27:15 1.56
| @@ -1,6 +1,8 @@ | | | @@ -1,6 +1,8 @@ |
1 | $NetBSD: distinfo,v 1.55 2009/08/26 12:47:17 tron Exp $ | | 1 | $NetBSD: distinfo,v 1.56 2009/10/04 01:27:15 taca Exp $ |
2 | | | 2 | |
3 | SHA1 (squirrelmail-1.4.20-RC2.tar.bz2) = f1cdccfdd17d8974adc0b79aba44b62f98f78f64 | | 3 | SHA1 (squirrelmail-1.4.20-RC2.tar.bz2) = f1cdccfdd17d8974adc0b79aba44b62f98f78f64 |
4 | RMD160 (squirrelmail-1.4.20-RC2.tar.bz2) = f736e33af6f7b5a4c49f96968ed3fdeb2d42f06f | | 4 | RMD160 (squirrelmail-1.4.20-RC2.tar.bz2) = f736e33af6f7b5a4c49f96968ed3fdeb2d42f06f |
5 | Size (squirrelmail-1.4.20-RC2.tar.bz2) = 516825 bytes | | 5 | Size (squirrelmail-1.4.20-RC2.tar.bz2) = 516825 bytes |
6 | SHA1 (patch-aa) = 4c5556c804c1b728eec87322272abb06edcfcc2a | | 6 | SHA1 (patch-aa) = 4c5556c804c1b728eec87322272abb06edcfcc2a |
| | | 7 | SHA1 (patch-ab) = 503bef625388a3224ad6f54aa332190e7440dde3 |
| | | 8 | SHA1 (patch-ai) = 701fdbc84afde5f8e255af13ba0e44469343e17c |
$NetBSD: patch-ab,v 1.14 2009/10/04 01:27:15 taca Exp $
* Use case ignore match for detecting encoded word.
* Fix encoding problem of attached filenames; don't convert encoding here.
--- functions/i18n.php.orig 2009-07-29 11:21:06.000000000 +0900
+++ functions/i18n.php
@@ -675,18 +675,11 @@ function japanese_charset_xtra() {
break;
case 'decodeheader':
$ret = str_replace("\t", "", $ret);
- if (preg_match('/=\?([^?]+)\?(q|b)\?([^?]+)\?=/', $ret))
+ if (preg_match('/=\?([^?]*)\?(Q|B)\?([^?]*)\?=/Ui', $ret))
$ret = @mb_decode_mimeheader($ret);
$ret = @mb_convert_encoding($ret, 'EUC-JP', 'AUTO');
break;
case 'downloadfilename':
- $useragent = func_get_arg(2);
- if (strstr($useragent, 'Windows') !== false ||
- strstr($useragent, 'Mac_') !== false) {
- $ret = mb_convert_encoding($ret, 'SJIS', 'AUTO');
- } else {
- $ret = mb_convert_encoding($ret, 'EUC-JP', 'AUTO');
-}
break;
case 'wordwrap':
$no_begin = "\x21\x25\x29\x2c\x2e\x3a\x3b\x3f\x5d\x7d\xa1\xf1\xa1\xeb\xa1" .
$NetBSD: patch-ai,v 1.1 2009/10/04 01:27:15 taca Exp $
* Fix encoding problem of attached filenames; convert to Shift_JIS when
using Internet Explore in Japanese environment, sigh.
--- functions/mime.php.orig 2009-07-31 19:12:46.000000000 +0900
+++ functions/mime.php
@@ -2563,6 +2563,10 @@ function SendDownloadHeaders($type0, $ty
//set all the Cache Control Headers for IE
if ($isIE) {
$filename=rawurlencode($filename);
+ if ($squirrelmail_language == 'ja_JP') {
+ $filename = rawurldecode($filename);
+ $filename = mb_convert_encoding($filename, 'SJIS', 'AUTO');
+ }
header ("Pragma: public");
header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); // HTTP/1.1
header ("Cache-Control: post-check=0, pre-check=0", false);