X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FICalendar.php;h=7eee09c9ebc777a001860a5c3061e281c6aece5a;hb=4521630a5f9dc502ec8b47aa90f1db7a46d44214;hp=6f71bf8b6d60320af6443a3986aa4cc61d8b56a8;hpb=4a857b55aa93910463dad24efcdf76035b50a517;p=civicrm-core.git diff --git a/CRM/Utils/ICalendar.php b/CRM/Utils/ICalendar.php index 6f71bf8b6d..7eee09c9eb 100644 --- a/CRM/Utils/ICalendar.php +++ b/CRM/Utils/ICalendar.php @@ -61,7 +61,7 @@ class CRM_Utils_ICalendar { /** * Escape date elements for safe ICalendar use. * - * @param $date + * @param string $date * Date to escape. * * @param bool $gdata @@ -85,8 +85,7 @@ class CRM_Utils_ICalendar { /** * Send the ICalendar to the browser with the specified content type - * - 'text/calendar' : used for downloaded ics file - * - 'text/plain' : used for iCal formatted feed + * - 'text/calendar' : used for iCal formatted feed * - 'text/xml' : used for gData or rss formatted feeds * * @@ -106,7 +105,7 @@ class CRM_Utils_ICalendar { CRM_Utils_System::setHttpHeader("Content-Language", $lang); CRM_Utils_System::setHttpHeader("Content-Type", "$content_type; charset=$charset"); - if ($content_type == 'text/calendar') { + if ($fileName) { CRM_Utils_System::setHttpHeader('Content-Length', strlen($calendar)); CRM_Utils_System::setHttpHeader("Content-Disposition", "$disposition; filename=\"$fileName\""); CRM_Utils_System::setHttpHeader("Pragma", "no-cache");