From 32ca1f9fc8a78e092565b51cc97faa724bb4e6cf Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 30 May 2009 05:09:57 -0400
Subject: [PATCH] - css fixes (#1485869)

---
 program/lib/Mail/mimePart.php |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/program/lib/Mail/mimePart.php b/program/lib/Mail/mimePart.php
index 9b9f26c..01c6280 100644
--- a/program/lib/Mail/mimePart.php
+++ b/program/lib/Mail/mimePart.php
@@ -185,6 +185,9 @@
 	
         if (isset($contentType['type'])) {
             $headers['Content-Type'] = $contentType['type'];
+	    if (isset($contentType['charset'])) {
+                $headers['Content-Type'] .= "; charset=\"{$contentType['charset']}\"";
+            }
             if (isset($contentType['name'])) {
                 $headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF;
                 $headers['Content-Type'] .=
@@ -192,8 +195,6 @@
                         isset($contentType['charset']) ? $contentType['charset'] : 'US-ASCII', 
                         isset($contentType['language']) ? $contentType['language'] : NULL,
 			isset($params['name-encoding']) ?  $params['name-encoding'] : NULL);
-            } elseif (isset($contentType['charset'])) {
-                $headers['Content-Type'] .= "; charset=\"{$contentType['charset']}\"";
             }
         }
 
@@ -242,7 +243,6 @@
         $encoded =& $this->_encoded;
 
         if (count($this->_subparts)) {
-            srand((double)microtime()*1000000);
             $boundary = '=_' . md5(rand() . microtime());
             $this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"';
 
@@ -257,8 +257,8 @@
             }
 
             $encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF . 
-                               rtrim(implode('--' . $boundary . MAIL_MIMEPART_CRLF , $subparts), MAIL_MIMEPART_CRLF) . MAIL_MIMEPART_CRLF . 
-                               '--' . $boundary.'--' . MAIL_MIMEPART_CRLF;
+				implode('--' . $boundary . MAIL_MIMEPART_CRLF , $subparts) .
+                        	'--' . $boundary.'--' . MAIL_MIMEPART_CRLF;
 
         } else {
             $encoded['body'] = $this->_getEncodedData($this->_body, $this->_encoding);
@@ -436,7 +436,7 @@
             }
             $headCount++;
         }
-        $headers = implode(MAIL_MIMEPART_CRLF, $headers) . ';';
+        $headers = implode(';' . MAIL_MIMEPART_CRLF, $headers) . ';';
         return $headers;
     }
 

--
Gitblit v1.9.1