Changeset 2b180b1 in github
- Timestamp:
- Oct 13, 2008 3:05:31 AM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 87b7959
- Parents:
- 34942eb
- File:
-
- 1 edited
-
program/steps/mail/compose.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/steps/mail/compose.inc
r70087c5 r2b180b1 500 500 if (! $bodyIsHtml) 501 501 { 502 // try to remove the signature 503 if (($sp = strrpos($body, '-- ')) !== false && ($sp == 0 || $body{$sp-1} == "\n")) 504 { 505 if ($body{$sp+3}==' ' || $body{$sp+3}=="\n" || $body{$sp+3}=="\r") 506 $body = substr($body, 0, max(0, $sp-1)); 507 } 508 502 509 // soft-wrap message first 503 510 $body = rcmail_wrap_quoted($body, 75); 504 505 // split body into single lines 506 $a_lines = preg_split('/\r?\n/', $body); 507 508 // add > to each line 509 for($n=0; $n<sizeof($a_lines); $n++) 510 { 511 if (strpos($a_lines[$n], '>')===0) 512 $a_lines[$n] = '>'.$a_lines[$n]; 513 else 514 $a_lines[$n] = '> '.$a_lines[$n]; 515 } 511 512 $body = rtrim($body, "\r\n"); 513 514 if ($body) { 515 // split body into single lines 516 $a_lines = preg_split('/\r?\n/', $body); 517 518 // add > to each line 519 for($n=0; $n<sizeof($a_lines); $n++) { 520 if (strpos($a_lines[$n], '>')===0) 521 $a_lines[$n] = '>'.$a_lines[$n]; 522 else 523 $a_lines[$n] = '> '.$a_lines[$n]; 524 } 516 525 517 $body = join("\n", $a_lines); 526 $body = join("\n", $a_lines); 527 } 518 528 519 529 // add title line … … 522 532 $MESSAGE->get_header('from')); 523 533 524 // try to remove the signature525 if ($sp = strrpos($body, '-- '))526 {527 if ($body{$sp+3}==' ' || $body{$sp+3}=="\n" || $body{$sp+3}=="\r")528 $body = substr($body, 0, $sp-1);529 }530 534 $suffix = ''; 531 535 }
Note: See TracChangeset
for help on using the changeset viewer.
