diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-10-12 08:56:46 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-10-12 08:56:46 +0000 |
| commit | d91c3b0c1338f9798d18d4e006e7680fad2744c0 (patch) | |
| tree | 8c0a0df71ff70f84c1a785a570bccef2a93eaf00 /roundcubemail/program/steps/mail/func.inc | |
| parent | 57dc3a2e6d272093ee0f8c711a0f8d40266c3037 (diff) | |
- Fix signature removal when replying in HTML to plain/text message
git-svn-id: https://svn.roundcube.net/trunk@4077 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/func.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 1d65390c2..9a24a97c0 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -843,12 +843,13 @@ function rcmail_plain_body($body, $flowed=false) // quote plain text $body = Q(join("\n", $a_lines), 'dummy', false); - // colorize signature + // colorize signature (up to <sig_max_lines> lines) $len = strlen($body); + $sig_max_lines = $RCMAIL->config->get('sig_max_lines', 15); while (($sp = strrpos($body, "-- \n", $sp ? -$len+$sp-1 : 0)) !== false) { if ($sp == 0 || $body[$sp-1] == "\n") { // do not touch blocks with more that X lines - if (substr_count($body, "\n", $sp) < $RCMAIL->config->get('sig_max_lines', 15)) + if (substr_count($body, "\n", $sp) < $sig_max_lines) $body = substr($body, 0, max(0, $sp)) .'<span class="sig">'.substr($body, $sp).'</span>'; break; |
