Changeset b620493a in github
- Timestamp:
- Feb 5, 2010 6:35:11 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- f6b145d
- Parents:
- ad18d63
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/steps/mail/compose.inc (modified) (6 diffs)
-
program/steps/mail/sendmail.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rad18d63 rb620493a 2 2 =========================== 3 3 4 - Fix quoted text wrapping when replying to an HTML email in plain text (#1484141) 4 5 - Fix handling of extended mailto links (with params) (#1486354) 5 6 - Fix sorting by date of messages without date header on servers without SORT (#1486286) -
program/steps/mail/compose.inc
r9e63e28 rb620493a 129 129 $OUTPUT->set_env('show_sig', false); 130 130 131 // set line length for body wrapping 132 $LINE_LENGTH = $RCMAIL->config->get('line_length', 75); 133 131 134 if (!empty($msg_uid)) 132 135 { 133 136 // similar as in program/steps/mail/show.inc 134 137 // re-set 'prefer_html' to have possibility to use html part for compose 135 $CONFIG['prefer_html'] = $CONFIG[' htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT;138 $CONFIG['prefer_html'] = $CONFIG['prefer_html'] || $CONFIG['htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT; 136 139 $MESSAGE = new rcube_message($msg_uid); 137 140 … … 396 399 function rcmail_compose_body($attrib) 397 400 { 398 global $RCMAIL, $CONFIG, $OUTPUT, $MESSAGE, $compose_mode ;401 global $RCMAIL, $CONFIG, $OUTPUT, $MESSAGE, $compose_mode, $LINE_LENGTH; 399 402 400 403 list($form_start, $form_end) = get_form_tags($attrib); … … 425 428 else if ($compose_mode) 426 429 { 427 if (($isHtml || $compose_mode == RCUBE_COMPOSE_DRAFT) && $MESSAGE->has_html_part()) 430 $has_html_part = $MESSAGE->has_html_part(); 431 if (($isHtml || $compose_mode == RCUBE_COMPOSE_DRAFT) && $has_html_part) 428 432 { 429 433 $body = $MESSAGE->first_html_part(); 430 434 $isHtml = true; 435 } 436 else if ($has_html_part) 437 { 438 // use html part if it has been used for message (pre)viewing 439 // decrease line length for quoting 440 $len = $compose_mode == RCUBE_COMPOSE_REPLY ? $LINE_LENGTH-2 : $LINE_LENGTH; 441 $txt = new html2text($MESSAGE->first_html_part(), false, true, $len); 442 $body = $txt->get_text(); 443 $isHtml = false; 431 444 } 432 445 else … … 523 536 function rcmail_create_reply_body($body, $bodyIsHtml) 524 537 { 525 global $RCMAIL, $MESSAGE ;538 global $RCMAIL, $MESSAGE, $LINE_LENGTH; 526 539 527 540 if (!$bodyIsHtml) { … … 533 546 534 547 // soft-wrap message first 535 $body = rcmail_wrap_quoted($body, 75);548 $body = rcmail_wrap_quoted($body, $LINE_LENGTH); 536 549 537 550 $body = rtrim($body, "\r\n"); … … 555 568 $prefix = rc_wordwrap(sprintf("On %s, %s wrote:\n", 556 569 $MESSAGE->headers->date, 557 $MESSAGE->get_header('from')), 76);570 $MESSAGE->get_header('from')), $LINE_LENGTH); 558 571 559 572 $suffix = ''; -
program/steps/mail/sendmail.inc
r10eedbe rb620493a 358 358 } 359 359 360 // set line length for body wrapping 361 $LINE_LENGTH = $RCMAIL->config->get('line_length', 75); 362 360 363 // create extended PEAR::Mail_mime instance 361 364 $MAIL_MIME = new rcube_mail_mime($RCMAIL->config->header_delimiter()); … … 370 373 // add a plain text version of the e-mail as an alternative part. 371 374 $h2t = new html2text($plugin['body'], false, true, 0); 372 $plainTextPart = rc_wordwrap($h2t->get_text(), 75, "\r\n") . ($footer ? "\r\n".$footer : '');375 $plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n") . ($footer ? "\r\n".$footer : ''); 373 376 $plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true); 374 377 if (!strlen($plainTextPart)) { … … 384 387 else 385 388 { 386 $message_body = rc_wordwrap($message_body, 75, "\r\n");389 $message_body = rc_wordwrap($message_body, $LINE_LENGTH, "\r\n"); 387 390 if ($footer) 388 391 $message_body .= "\r\n" . $footer;
Note: See TracChangeset
for help on using the changeset viewer.
