summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-11-10 11:02:52 +0000
committeralecpl <alec@alec.pl>2009-11-10 11:02:52 +0000
commit7d0b34db310042ef624a06118380f2a099096f08 (patch)
treeff35ba8f9797f80e6bf0e2cbc6d971a089b956d9 /program
parent3597cc2c1b22dc29fe1169075601c72fa5c8558c (diff)
- additional character set name cleanup to support e.g. "_ISO-2022-JP$SIO"
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 258f719ce..7466be7c3 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -300,8 +300,11 @@ function rcube_parse_charset($charset)
{
$charset = strtoupper($charset);
- # RFC1642
- $charset = str_replace('UNICODE-1-1-', '', $charset);
+ $charset = preg_replace(array(
+ '/^[^0-9A-Z]+/', // e.g. _ISO-8859-JP$SIO
+ '/\$.*$/', // e.g. _ISO-8859-JP$SIO
+ '/UNICODE-1-1-/', // RFC1642
+ ), '', $charset);
# Aliases: some of them from HTML5 spec.
$aliases = array(
@@ -1410,7 +1413,7 @@ function rcube_https_check($port=null, $use_https=true)
{
global $RCMAIL;
- if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off')
+ if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
return true;
if ($port && $_SERVER['SERVER_PORT'] == $port)
return true;