Fix: Export ical webcal
This commit is contained in:
parent
8ecc7b5cf0
commit
129ddd5d18
@ -28,13 +28,16 @@ set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
|||||||
require("../master.inc.php");
|
require("../master.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/webcal/webcal.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/webcal/webcal.class.php');
|
||||||
|
|
||||||
|
|
||||||
// C'est un wrapper, donc header vierge
|
// C'est un wrapper, donc header vierge
|
||||||
function llxHeader() { print '<html><title>Export cal</title><body>'; }
|
function llxHeader() { print '<html><title>Export cal</title><body>'; }
|
||||||
function llxFooter() { print '</body></html>'; }
|
function llxFooter() { print '</body></html>'; }
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if (! $conf->webcal->enabled)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
// Check config
|
// Check config
|
||||||
if (! $conf->webcal->enabled && empty($conf->global->PHPWEBCALENDAR_URL))
|
if (empty($conf->global->PHPWEBCALENDAR_URL))
|
||||||
{
|
{
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
|
|
||||||
@ -99,7 +102,7 @@ if ($result >= 0)
|
|||||||
{
|
{
|
||||||
$attachment = false;
|
$attachment = false;
|
||||||
$encoding='UTF-8';
|
$encoding='UTF-8';
|
||||||
$type='text/plain';
|
$type='text/calendar';
|
||||||
//$type='text/calendar';
|
//$type='text/calendar';
|
||||||
|
|
||||||
if ($encoding) header('Content-Encoding: '.$encoding);
|
if ($encoding) header('Content-Encoding: '.$encoding);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user