From 5faac054c30d38459e157ebc90e8e7b4b3c292b2 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 10 Feb 2009 06:49:29 -0500
Subject: [PATCH] - Use default_charset for messages without specified charset (#1485661, #1484961)
---
CHANGELOG | 4 ++++
program/steps/mail/func.inc | 6 ++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index c608c40..7e57645 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
+2009/02/10 (alec)
+----------
+- Use default_charset for messages without specified charset (#1485661, #1484961)
+
2009/02/08 (thomasb)
----------
- Added TNEF support to decode MS Outlook attachments (winmail.dat)
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 0ccc2cc..f54d4fa 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -295,8 +295,7 @@
$out .= sprintf("<td class=\"icon\">%s</td>\n", $message_icon ? sprintf($image_tag, $skin_path, $message_icon, '') : '');
- if (!empty($header->charset))
- $IMAP->set_charset($header->charset);
+ $IMAP->set_charset(!empty($header->charset) ? $header->charset : $CONFIG['default_charset']);
// format each col
foreach ($a_show_cols as $col)
@@ -404,8 +403,7 @@
if (empty($header))
continue;
- if (!empty($header->charset))
- $IMAP->set_charset($header->charset);
+ $IMAP->set_charset(!empty($header->charset) ? $header->charset : $CONFIG['default_charset']);
// remove 'attachment' and 'flag' columns, we don't need them here
if(($key = array_search('attachment', $a_show_cols)) !== FALSE)
--
Gitblit v1.9.1