From 129ddd5d18325339fb9bc03a3ce38fc5cac9b0f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Apr 2008 17:33:51 +0000 Subject: [PATCH] Fix: Export ical webcal --- htdocs/webcal/webcalexport.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/webcal/webcalexport.php b/htdocs/webcal/webcalexport.php index cfbab3a00d5..05240bb95fc 100644 --- a/htdocs/webcal/webcalexport.php +++ b/htdocs/webcal/webcalexport.php @@ -28,13 +28,16 @@ set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); require("../master.inc.php"); require_once(DOL_DOCUMENT_ROOT.'/webcal/webcal.class.php'); - // C'est un wrapper, donc header vierge function llxHeader() { print 'Export cal'; } function llxFooter() { print ''; } +// Security check +if (! $conf->webcal->enabled) + accessforbidden(); + // Check config -if (! $conf->webcal->enabled && empty($conf->global->PHPWEBCALENDAR_URL)) +if (empty($conf->global->PHPWEBCALENDAR_URL)) { $user->getrights(); @@ -99,7 +102,7 @@ if ($result >= 0) { $attachment = false; $encoding='UTF-8'; - $type='text/plain'; + $type='text/calendar'; //$type='text/calendar'; if ($encoding) header('Content-Encoding: '.$encoding);