Revision: 1839
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1839&view=rev
Author:   cimorrison
Date:     2011-06-21 18:36:27 +0000 (Tue, 21 Jun 2011)

Log Message:
-----------
If we're sending iCalendar notifications, then it seems that some calendar 
applications use the email subject as the booking title instead of the iCal 
SUMMARY field.   As far as I can see this is wrong, but as a circumvention 
we'll put the booking title in the email subject line instead of the standard 
subject.   (See also SF Tracker id 3297799)

Modified Paths:
--------------
    mrbs/trunk/web/functions_mail.inc

Modified: mrbs/trunk/web/functions_mail.inc
===================================================================
--- mrbs/trunk/web/functions_mail.inc   2011-06-21 15:01:31 UTC (rev 1838)
+++ mrbs/trunk/web/functions_mail.inc   2011-06-21 18:36:27 UTC (rev 1839)
@@ -827,29 +827,42 @@
     return;
   }
   
-  // set up the subject
-  switch ($action)
+  // Set up the subject
+  //
+  // If we're sending iCalendar notifications, then it seems that some calendar
+  // applications use the email subject as the booking title instead of the 
iCal
+  // SUMMARY field.   As far as I can see this is wrong, but as a circumvention
+  // we'll put the booking title in the email subject line.   (See also
+  // SF Tracker id 3297799)
+  if ($mail_settings['icalendar'] && !$enable_periods)
   {
-    case "approve":
-      $subject = get_mail_vocab("mail_subject_approved");
-      break;
-    case "more_info":
-      $subject = get_mail_vocab("mail_subject_more_info");
-      break;
-    case "remind":
-      $subject = get_mail_vocab("mail_subject_reminder");
-      break;
-    default:
-      if ($new_entry)
-      {
-        $subject = get_mail_vocab("mail_subject_new_entry");
-      }
-      else
-      {
-        $subject = get_mail_vocab("mail_subject_changed_entry");
-      }
-      break;
+    $subject = $data['name'];
   }
+  else
+  {
+    switch ($action)
+    {
+      case "approve":
+        $subject = get_mail_vocab("mail_subject_approved");
+        break;
+      case "more_info":
+        $subject = get_mail_vocab("mail_subject_more_info");
+        break;
+      case "remind":
+        $subject = get_mail_vocab("mail_subject_reminder");
+        break;
+      default:
+        if ($new_entry)
+        {
+          $subject = get_mail_vocab("mail_subject_new_entry");
+        }
+        else
+        {
+          $subject = get_mail_vocab("mail_subject_changed_entry");
+        }
+        break;
+    }
+  }
 
   // Create the text body
   $compare = !$new_entry;
@@ -927,8 +940,18 @@
   }
   
   // Set the subject
-  if ($action == "reject")
+  //
+  // If we're sending iCalendar notifications, then it seems that some calendar
+  // applications use the email subject as the booking title instead of the 
iCal
+  // SUMMARY field.   As far as I can see this is wrong, but as a circumvention
+  // we'll put the booking title in the email subject line.   (See also
+  // SF Tracker id 3297799)
+  if ($mail_settings['icalendar'] && !$enable_periods)
   {
+    $subject = $data['name'];
+  }
+  elseif ($action == "reject")
+  {
     $subject = get_mail_vocab("mail_subject_rejected");
   }
   else


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

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to