From 5bc8cb662fc3bcda9aa641b7a5e88c0b81dd63d6 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 18 Nov 2005 10:47:00 -0500
Subject: [PATCH] Minor bugfixes
---
program/include/main.inc | 7 +++++--
program/steps/mail/sendmail.inc | 5 +++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/program/include/main.inc b/program/include/main.inc
index 936cad3..ddb4218 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -231,7 +231,7 @@
// init output object for GUI and add common scripts
function load_gui()
{
- global $CONFIG, $OUTPUT, $COMM_PATH, $JS_OBJECT_NAME, $sess_user_lang;
+ global $CONFIG, $OUTPUT, $COMM_PATH, $JS_OBJECT_NAME, $CHARSET, $sess_user_lang;
// init output page
$OUTPUT = new rcube_html_page();
@@ -248,8 +248,11 @@
$OUTPUT->include_script('program/js/app.js');
// set user-selected charset
- if ($CONFIG['charset'])
+ if (!empty($CONFIG['charset']))
+ {
$OUTPUT->set_charset($CONFIG['charset']);
+ $CHARSET = $CONFIG['charset'];
+ }
else
rcmail_set_locale($sess_user_lang);
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 4531aa3..11fb559 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -73,6 +73,11 @@
}
+// set default charset
+if (empty($CHARSET))
+ $CHARSET = 'ISO-8859-1';
+
+
$mailto_regexp = array('/,\s*[\r\n]+/', '/[\r\n]+/', '/,\s*$/m');
$mailto_replace = array(' ', ', ', '');
--
Gitblit v1.9.1