Thomas Bruederli
2014-06-05 99cdca46b7bcc46fe6affd9e9f9f60a546b2e5b8
program/steps/mail/compose.inc
@@ -611,7 +611,7 @@
                $text = $html = $sql_arr['signature'];
                if ($sql_arr['html_signature']) {
                    $h2t  = new rcube_html2text($sql_arr['signature'], false, false);
                    $h2t  = new rcube_html2text($sql_arr['signature'], false, true);
                    $text = trim($h2t->get_text());
                }
                else {
@@ -624,7 +624,8 @@
                }
                if (!$sql_arr['html_signature']) {
                    $html = "<pre>" . $html . "</pre>";
                    $t2h  = new rcube_text2html($sql_arr['signature'], false);
                    $html = $t2h->get_html();
                }
                $a_signatures[$identity_id]['text'] = $text;
@@ -826,15 +827,8 @@
                }
            }
            if ($part->ctype_parameters['format'] == 'flowed') {
                $body = rcube_mime::unfold_flowed($body);
            }
            // add HTML formatting
            $body = rcmail_plain_body($body);
            if ($body) {
                $body = '<pre>' . $body . '</pre>';
            }
            $body = rcmail_plain_body($body, $part->ctype_parameters['format'] == 'flowed');
        }
    }
    else {
@@ -957,8 +951,7 @@
            "googie.setLanguages(%s);\n".
            "googie.setCurrentLanguage('%s');\n".
            "googie.setDecoration(false);\n".
            "googie.decorateTextarea('%s');\n".
            "%s.set_env('spellcheck', googie);",
            "googie.decorateTextarea('%s');\n",
            $RCMAIL->output->get_skin_path(),
            $RCMAIL->url(array('_task' => 'utils', '_action' => 'spell', '_remote' => 1)),
                !empty($dictionary) ? 'true' : 'false',
@@ -970,8 +963,7 @@
            rcube::JQ(rcube::Q($RCMAIL->gettext('addtodict'))),
            rcube_output::json_serialize($spellcheck_langs),
            $lang,
            $attrib['id'],
            rcmail_output::JS_OBJECT_NAME), 'foot');
            $attrib['id']), 'foot');
        $OUTPUT->add_label('checking');
        $OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set));
@@ -1463,6 +1455,9 @@
            $subject = $MESSAGE->subject;
        else
            $subject = 'Re: '.$MESSAGE->subject;
        // replace (was: ...) (#1489375)
        $subject = preg_replace('/\s*\([wW]as:[^\)]+\)\s*$/', '', $subject);
    }
    // create a forward-subject
    else if ($compose_mode == RCUBE_COMPOSE_FORWARD) {
@@ -1707,7 +1702,7 @@
    if (empty($attrib['name']))
        $attrib['name'] = 'editorSelect';
    $attrib['onchange'] = "return rcmail_toggle_editor(this, '".$attrib['editorid']."', '_is_html')";
    $attrib['onchange'] = "return rcmail.command('toggle-editor', {id: '".$attrib['editorid']."', html: this.value == 'html'}, '', event)";
    $select = new html_select($attrib);