Revision: 1682
http://mrbs.svn.sourceforge.net/mrbs/?rev=1682&view=rev
Author: cimorrison
Date: 2010-12-09 14:53:14 +0000 (Thu, 09 Dec 2010)
Log Message:
-----------
Stopped iCalendar information being generated when using periods, as there's no
point: a calendar app will not be able to import an event defined in periods.
(At some stage in the future I suppose we could define a mapping between
periods and real times).
Modified Paths:
--------------
mrbs/branches/ics_attachments/web/functions_mail.inc
mrbs/branches/ics_attachments/web/systemdefaults.inc.php
Modified: mrbs/branches/ics_attachments/web/functions_mail.inc
===================================================================
--- mrbs/branches/ics_attachments/web/functions_mail.inc 2010-12-09
14:37:48 UTC (rev 1681)
+++ mrbs/branches/ics_attachments/web/functions_mail.inc 2010-12-09
14:53:14 UTC (rev 1682)
@@ -779,7 +779,7 @@
*/
function notifyAdminOnBooking($data, $mail_previous, $new_entry, $series,
$action="book", $note='')
{
- global $mail_settings;
+ global $mail_settings, $enable_periods;
// Add some values to the $data array before we go and create the addresses
if (!$new_entry)
@@ -834,7 +834,7 @@
// Create the iCalendar if required
$attachment = array();
- if ($mail_settings['icalendar'])
+ if ($mail_settings['icalendar'] && !$enable_periods)
{
$attachment['method'] = "REQUEST";
$attachment['content'] = create_icalendar($attachment['method'], $data,
$text_body, $html_body, $addresses, $series);
@@ -870,7 +870,7 @@
*/
function notifyAdminOnDelete($data, $series=FALSE, $action="delete", $note="")
{
- global $mail_settings;
+ global $mail_settings, $enable_periods;
// Set up the addresses (from, to and cc)
$addresses = create_addresses($data, $action);
@@ -903,7 +903,7 @@
// Set up the attachment
$attachment = array();
- if ($mail_settings['icalendar'])
+ if ($mail_settings['icalendar'] && !$enable_periods)
{
$attachment['method'] = "CANCEL";
$attachment['content'] = create_icalendar($attachment['method'], $data,
$text_body, $html_body, $addresses, $series);
@@ -959,7 +959,7 @@
require_once "Mail/mime.php";
require_once "Mail/mimePart.php";
- global $mail_settings, $sendmail_settings, $smtp_settings;
+ global $mail_settings, $sendmail_settings, $smtp_settings, $enable_periods;
// for cases where the mail server refuses
// to send emails with cc or bcc set, put the cc
@@ -1055,7 +1055,7 @@
unset($mime_params['cid']);
}
- if (!$mail_settings['icalendar'])
+ if (!$mail_settings['icalendar'] || $enable_periods)
{
// If we're not sending iCalendar information we've now got everything,
// so we'll make the "inner" section the complete mime.
Modified: mrbs/branches/ics_attachments/web/systemdefaults.inc.php
===================================================================
--- mrbs/branches/ics_attachments/web/systemdefaults.inc.php 2010-12-09
14:37:48 UTC (rev 1681)
+++ mrbs/branches/ics_attachments/web/systemdefaults.inc.php 2010-12-09
14:53:14 UTC (rev 1682)
@@ -773,7 +773,11 @@
// otherwise you just get a link to the
entry
$mail_settings['html'] = FALSE; // Set to true if you want HTML mail
$mail_settings['icalendar'] = FALSE; // Set to TRUE to include iCalendar
details
- // which can be imported into a calendar
+ // which can be imported into a calendar.
(Note:
+ // iCalendar details will not be sent for
areas
+ // that use periods as there isn't a
mapping between
+ // periods and time of day, so the
calendar would not
+ // be able to import the booking)
// HOW TO EMAIL - CHARACTER SET AND LANGUAGE
// -----------------------------------------
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:
WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits