From 6d5dbae53cd4b4b97da0b0c558292a7f1062a524 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 25 Jul 2008 11:13:15 -0400
Subject: [PATCH] Prefer File_Info over mime_content_type + detect mime type when uploading + some code style

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

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 3660589..7a986c1 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -563,7 +563,10 @@
         $html = '<head></head>' . $html;
       $html = substr_replace($html, '<meta http-equiv="Content-Type" content="text/html; charset='.RCMAIL_CHARSET.'" />', intval(stripos($html, '</head>')), 0);
     }
-    
+
+    // PHP bug #32547 workaround: remove title tag
+    $html = preg_replace('/<title>.*<\/title>/', '', $html);
+
     // clean HTML with washhtml by Frederic Motte
     $wash_opts = array(
       'show_washed' => false,
@@ -595,7 +598,7 @@
   // text/enriched
   else if ($part->ctype_secondary=='enriched') {
     $part->ctype_secondary = 'html';
-    return Q(enriched_to_html($body), 'show');
+    return Q(enriched_to_html($part->body), 'show');
   }
   else
     $body = $part->body;

--
Gitblit v1.9.1