Revision: 1669
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1669&view=rev
Author:   cimorrison
Date:     2010-12-06 13:32:33 +0000 (Mon, 06 Dec 2010)

Log Message:
-----------
Fixed bug whereby the event description wasn't being entered in the iCalendar 
object properly

Modified Paths:
--------------
    mrbs/branches/ics_attachments/web/functions_mail.inc

Modified: mrbs/branches/ics_attachments/web/functions_mail.inc
===================================================================
--- mrbs/branches/ics_attachments/web/functions_mail.inc        2010-12-05 
18:40:21 UTC (rev 1668)
+++ mrbs/branches/ics_attachments/web/functions_mail.inc        2010-12-06 
13:32:33 UTC (rev 1669)
@@ -778,13 +778,13 @@
   // Create the text body
   $compare = !$new_entry;
   $text_body = array();
-  $text_body['text'] = create_body($data, $compare, $series, $action);
+  $text_body['content'] = create_body($data, $compare, $series, $action);
   
   // Create the HTML body
   $html_body = array();
   if ($mail_settings['html'])
   {
-    $html_body['text'] = create_body($data, $compare, $series, $action, TRUE);
+    $html_body['content'] = create_body($data, $compare, $series, $action, 
TRUE);
     $html_body['cid'] = generate_global_uid("html");
   }
   
@@ -793,7 +793,7 @@
   if ($mail_settings['icalendar'])
   {
     $attachment['method']   = "REQUEST";
-    $attachment['content']  = create_icalendar($attachment['method'], $data, 
$text_body, $series, $html_body['cid']);
+    $attachment['content']  = create_icalendar($attachment['method'], $data, 
$text_body['content'], $series, $html_body['cid']);
     $attachment['name']     = "meeting.ics";
   }
 
@@ -847,13 +847,13 @@
   // Create the text body
   $data = $mail_previous;
   $text_body = array();
-  $text_body['text'] = create_body($data, FALSE, $series, $action, FALSE);
+  $text_body['content'] = create_body($data, FALSE, $series, $action, FALSE);
   
   // Create the HTML body
   $html_body = array();
   if ($mail_settings['html'])
   {
-    $html_body['text'] = create_body($data, FALSE, $series, $action, TRUE);
+    $html_body['content'] = create_body($data, FALSE, $series, $action, TRUE);
     $html_body['cid'] = generate_global_uid("html");
   }
   
@@ -862,7 +862,7 @@
   if ($mail_settings['icalendar'])
   {
     $attachment['method']   = "CANCEL";
-    $attachment['content']  = create_icalendar($attachment['method'], 
$mail_previous, $text_body, $series, $html_body['cid']);
+    $attachment['content']  = create_icalendar($attachment['method'], 
$mail_previous, $text_body['content'], $series, $html_body['cid']);
     $attachment['name']     = "meeting.ics";
   }
   
@@ -981,8 +981,12 @@
  *                                    'cc'
  *                                    'bcc'
  * @param string  $subject          email subject
- * @param string  $text_body        text part of body
- * @param string  $text_html        HTML part of body
+ * @param array   $text_body        text part of body, an array consisting of
+ *                                    'content'  the content itself
+ *                                    'cid'      the content id
+ * @param array   $text_html        HTML part of body, an array consisting of
+ *                                    'content'  the content itself
+ *                                    'cid'      the content id
  * @param array   $attachment       file to attach.   An array consisting of
  *                                    'content' the file or data to attach
  *                                    'method'  the iCalendar METHOD
@@ -1056,15 +1060,14 @@
   $mime_params['content_type'] = "text/plain";
   $mime_params['encoding']     = "7bit";
   $mime_params['charset']      = $charset;
-  $mime->addSubPart($text_body['text'], $mime_params);
+  $mime->addSubPart($text_body['content'], $mime_params);
   
   // Add the HTML mail
   if (!empty($html_body))
   {
     $mime_params['content_type'] = "text/html";
     $mime_params['cid'] = $html_body['cid'];
-    $mime->addSubPart($html_body['text'], $mime_params);
-    unset($mime_params['charset']);
+    $mime->addSubPart($html_body['content'], $mime_params);
   }
   
   if ($mail_settings['icalendar'])
@@ -1077,7 +1080,6 @@
     $mime_params['encoding']     = "base64";
     $mime_params['disposition']  = "attachment";
     $mime_params['dfilename']    = $attachment['name'];
-    unset($mime_params['charset']);
     $mime->addSubPart($attachment['content'], $mime_params);
   }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to