Fix flowed text when resuming draft
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Sep 2010 21:13:19 +0000 (15:13 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Sep 2010 22:57:47 +0000 (16:57 -0600)
imp/lib/Compose.php

index 89c6143..524a006 100644 (file)
@@ -375,7 +375,7 @@ class IMP_Compose
 
         $msg_text = $this->_getMessageText($contents, array(
             'html' => $compose_html,
-            'toflowed' => true
+            'toflowed' => false
         ));
 
         if (empty($msg_text)) {
@@ -2535,7 +2535,7 @@ class IMP_Compose
      * <pre>
      * 'html' - (boolean) Return text/html part, if available.
      * 'replylimit' - (boolean) Enforce length limits?
-     * 'toflowed' - (boolean) Convert to flowed?
+     * 'toflowed' - (boolean) Do flowed conversion?
      * </pre>
      *
      * @return mixed  Null if bodypart not found, or array with the following
@@ -2608,9 +2608,11 @@ class IMP_Compose
                 $msg = preg_replace("/\s*\n/U", "\n", $msg);
             }
 
-            if (!empty($options['toflowed'])) {
+            if (isset($options['toflowed'])) {
                 $flowed = new Horde_Text_Flowed($msg);
-                $msg = $flowed->toFlowed(true);
+                $msg = $options['toflowed']
+                    ? $flowed->toFlowed(true)
+                    : $flowed->toFlowed(false, array('nowrap' => true));
             }
         }