From ccd63c5591d56e9dcb43ddc5171b4b54dda08c42 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sat, 06 Sep 2008 12:41:43 -0400
Subject: [PATCH] Don't wrap worwarded text; better wrap reply message text

---
 program/steps/mail/compose.inc |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 783ac98..0a5226e 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -32,7 +32,7 @@
   if (is_array($_SESSION['compose']['attachments'][$id]))
   {
     @unlink($_SESSION['compose']['attachments'][$id]['path']);
-    $_SESSION['compose']['attachments'][$id] = NULL;
+    unset($_SESSION['compose']['attachments'][$id]);
     $OUTPUT->command('remove_from_attachment_list', "rcmfile$id");
     $OUTPUT->send();
     exit;
@@ -478,7 +478,7 @@
   if (! $bodyIsHtml)
   {
     // soft-wrap message first
-    $body = wordwrap($body, 75);
+    $body = rcmail_wrap_quoted($body, 75);
   
     // split body into single lines
     $a_lines = preg_split('/\r?\n/', $body);
@@ -526,9 +526,6 @@
 
   if (!$bodyIsHtml)
   {
-    // soft-wrap message first
-    $body = wordwrap($body, 80);
-
     $prefix = sprintf("\n\n\n-------- Original Message --------\nSubject: %s\nDate: %s\nFrom: %s\nTo: %s\n\n",
       $MESSAGE->subject,
       $MESSAGE->headers->date,

--
Gitblit v1.9.1