diff options
author | alecpl <alec@alec.pl> | 2010-03-02 13:08:12 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-03-02 13:08:12 +0000 |
commit | 47ad83f337c9eeb4bc53afb85a71cf90a8a34106 (patch) | |
tree | be27fe9e46d89f7035ce59359a84ede526c1ce9a | |
parent | d5ffb58726237d81f167c7460ce4eabb4b768c51 (diff) |
- Added force_7bit option to force MIME encoding of plain/text messages (#1486510)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | config/main.inc.php.dist | 3 | ||||
-rw-r--r-- | program/localization/en_US/labels.inc | 1 | ||||
-rw-r--r-- | program/localization/pl_PL/labels.inc | 1 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 12 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 1 |
7 files changed, 19 insertions, 2 deletions
@@ -1,6 +1,7 @@ CHANGELOG RoundCube Webmail =========================== +- Added force_7bit option to force MIME encoding of plain/text messages (#1486510) - Use case sensitive check when checking for default folders (#1486346) - Fix checking for new mail: now checks unseen count of inbox (#1485794) - Improve performance by avoiding unnecessary updates to the session table (#1486325) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index c35d4e1fc..d9bf34036 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -472,5 +472,8 @@ $rcmail_config['show_sig'] = 1; // When replying or forwarding place sender's signature above existing message $rcmail_config['sig_above'] = FALSE; +// Use MIME encoding (quoted-printable) for 8bit characters in message body +$rcmail_config['force_7bit'] = FALSE; + // end of config file ?> diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index e7d99d22b..7aaee3721 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -302,6 +302,7 @@ $labels['mimeparamfolding'] = 'Attachment names'; $labels['2231folding'] = 'Full RFC 2231 (Thunderbird)'; $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; $labels['2047folding'] = 'Full RFC 2047 (other)'; +$labels['force7bit'] = 'Use MIME encoding for 8-bit characters'; $labels['advancedoptions'] = 'Advanced options'; $labels['focusonnewmessage'] = 'Focus browser window on new message'; $labels['checkallfolders'] = 'Check all folders for new messages'; diff --git a/program/localization/pl_PL/labels.inc b/program/localization/pl_PL/labels.inc index 38c762c96..72ba4792c 100644 --- a/program/localization/pl_PL/labels.inc +++ b/program/localization/pl_PL/labels.inc @@ -236,6 +236,7 @@ $labels['mimeparamfolding'] = 'Stosuj nazwy załączników zgodne z'; $labels['2231folding'] = 'RFC 2231 (Thunderbird)'; $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)'; $labels['2047folding'] = 'RFC 2047 (przestarzałe)'; +$labels['force7bit'] = 'Używaj kodowania MIME dla znaków 8-bitowych'; $labels['advancedoptions'] = 'opcje zaawansowane'; $labels['readwhendeleted'] = 'Podczas usuwania oznacz wiadomość jako przeczytaną'; $labels['flagfordeletion'] = 'Oznacz wiadomość do usunięcia zamiast ją usuwać'; diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 6691e000c..134664b85 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -456,7 +456,7 @@ if (is_array($_SESSION['compose']['attachments'])) // choose transfer encoding for plain/text body if (preg_match('/[^\x00-\x7F]/', $MAIL_MIME->getTXTBody())) - $transfer_encoding = '8bit'; + $transfer_encoding = $RCMAIL->config->get('force_7bit') ? 'quoted-printable' : '8bit'; else $transfer_encoding = '7bit'; diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 094fa5995..7d59e73f1 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -449,7 +449,17 @@ function rcmail_user_prefs($current=null) 'content' => $select_param_folding->show($config['mime_param_folding']), ); } - + + if (!isset($no_override['force_7bit'])) { + $field_id = 'rcmfd_force_7bit'; + $input_7bit = new html_checkbox(array('name' => '_force_7bit', 'id' => $field_id, 'value' => 1)); + + $blocks['main']['options']['force_7bit'] = array( + 'title' => html::label($field_id, Q(rcube_label('force7bit'))), + 'content' => $input_7bit->show($config['force_7bit']?1:0), + ); + } + if (!isset($no_override['top_posting'])) { $field_id = 'rcmfd_top_posting'; $select_replymode = new html_select(array('name' => '_top_posting', 'id' => $field_id, 'onchange' => "\$('#rcmfd_sig_above').attr('disabled',this.selectedIndex==0)")); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 531942557..8a732bf45 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -62,6 +62,7 @@ switch ($CURR_SECTION) 'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE, 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0, + 'force_7bit' => isset($_POST['_force_7bit']) ? TRUE : FALSE, 'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, 'top_posting' => !empty($_POST['_top_posting']), 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), |