summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-11-10 11:02:52 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-11-10 11:02:52 +0000
commit25fa4bafb78494e7fc766e51c9bdcc9d48b34079 (patch)
tree100d8e026ee937687b62a816b5126ae6400f6254 /roundcubemail/program
parentdefb54fd237ae638a468dc3a7250da30c8072e07 (diff)
- additional character set name cleanup to support e.g. "_ISO-2022-JP$SIO"
git-svn-id: https://svn.roundcube.net/trunk@3103 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/include/main.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index 258f719ce..7466be7c3 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/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;