Changeset 0207c45 in github for program/steps/mail/compose.inc
- Timestamp:
- Nov 2, 2009 4:58:14 AM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- f8a216eb
- Parents:
- 31ddb5e
- File:
-
- 1 edited
-
program/steps/mail/compose.inc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/steps/mail/compose.inc
r50f56d2 r0207c45 104 104 // set current mailbox in client environment 105 105 $OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name()); 106 $OUTPUT->set_env('sig_above', $CONFIG['sig_above']); 106 107 $OUTPUT->set_env('top_posting', $CONFIG['top_posting']); 107 108 … … 118 119 } 119 120 120 if (!$CONFIG['show_sig']) 121 $config_show_sig = $RCMAIL->config->get('show_sig', 1); 122 if ($config_show_sig == 1) 121 123 $OUTPUT->set_env('show_sig', true); 122 else if ($ CONFIG['show_sig'] == 2 && empty($compose_mode))124 else if ($config_show_sig == 2 && (empty($compose_mode) || $compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT)) 123 125 $OUTPUT->set_env('show_sig', true); 124 else if ($ CONFIG['show_sig']== 3 && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD))126 else if ($config_show_sig == 3 && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD)) 125 127 $OUTPUT->set_env('show_sig', true); 128 else 129 $OUTPUT->set_env('show_sig', false); 126 130 127 131 if (!empty($msg_uid)) … … 519 523 function rcmail_create_reply_body($body, $bodyIsHtml) 520 524 { 521 global $MESSAGE; 522 523 $rcmail = rcmail::get_instance(); 524 525 if (! $bodyIsHtml) 526 { 525 global $RCMAIL, $MESSAGE; 526 527 if (!$bodyIsHtml) { 527 528 // try to remove the signature 528 if (!$rcmail->config->get('top_posting') && ($sp = strrpos($body, '-- ')) !== false && ($sp == 0 || $body{$sp-1} == "\n")) 529 { 529 if ($RCMAIL->config->get('strip_existing_sig', true) && ($sp = strrpos($body, '-- ')) !== false && ($sp == 0 || $body{$sp-1} == "\n")) { 530 530 if ($body{$sp+3}==' ' || $body{$sp+3}=="\n" || $body{$sp+3}=="\r") 531 531 $body = substr($body, 0, max(0, $sp-1)); 532 }532 } 533 533 534 534 // soft-wrap message first … … 542 542 543 543 // add > to each line 544 for ($n=0; $n<sizeof($a_lines); $n++) {544 for ($n=0; $n<sizeof($a_lines); $n++) { 545 545 if (strpos($a_lines[$n], '>')===0) 546 546 $a_lines[$n] = '>'.$a_lines[$n]; 547 547 else 548 548 $a_lines[$n] = '> '.$a_lines[$n]; 549 }549 } 550 550 551 551 $body = join("\n", $a_lines); 552 }552 } 553 553 554 554 // add title line(s) … … 558 558 559 559 $suffix = ''; 560 561 if ($ rcmail->config->get('top_posting'))560 561 if ($RCMAIL->config->get('top_posting')) 562 562 $prefix = "\n\n\n" . $prefix; 563 563 } 564 else 565 { 564 else { 566 565 // save inline images to files 567 566 $cid_map = rcmail_write_inline_attachments($MESSAGE); … … 574 573 $prefix = sprintf("On %s, %s wrote:<br />\n", 575 574 $MESSAGE->headers->date, 576 htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $ rcmail->output->get_charset()));575 htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $RCMAIL->output->get_charset())); 577 576 $prefix .= '<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">'; 578 579 if ($ rcmail->config->get('top_posting')) {580 $prefix = "<p></p>" . $prefix;581 $suffix = "</blockquote>";577 578 if ($RCMAIL->config->get('top_posting')) { 579 $prefix = "<p></p>" . $prefix; 580 $suffix = "</blockquote>"; 582 581 } 583 582 else {
Note: See TracChangeset
for help on using the changeset viewer.
