From d10b916cbf64501d002e22755418f1fe7c3bbddd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Wed, 26 Nov 2008 09:47:34 +0000 Subject: [PATCH] Add options to help debug --- htdocs/comm/action/agendaexport.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/action/agendaexport.php b/htdocs/comm/action/agendaexport.php index 76a3605de8b..850a7ef2c5e 100644 --- a/htdocs/comm/action/agendaexport.php +++ b/htdocs/comm/action/agendaexport.php @@ -104,13 +104,15 @@ if ($format == 'ical' || $format == 'vcal') if ($result >= 0) { $attachment = true; - $type='text/calendar'; - //$type='text/plain'; // OK - //$attachment = false; // OK + if (isset($_GET["attachment"])) $attachment=$_GET["attachment"]; + //$attachment = false; + $contenttype='text/calendar'; + if (isset($_GET["contenttype"])) $contenttype=$_GET["contenttype"]; + //$contenttype='text/plain'; $outputencoding='UTF-8'; if ($outputencoding) header('Content-Encoding: '.$outputencoding); - if ($type) header('Content-Type: '.$type); + if ($contenttype) header('Content-Type: '.$contenttype); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); // Ajout directives pour resoudre bug IE @@ -133,13 +135,15 @@ if ($format == 'rss') if ($result >= 0) { $attachment = false; - $type='application/rss+xml'; - //$type='text/plain'; // OK - //$attachment = false; // OK + if (isset($_GET["attachment"])) $attachment=$_GET["attachment"]; + //$attachment = false; + $contenttype='application/rss+xml'; + if (isset($_GET["contenttype"])) $contenttype=$_GET["contenttype"]; + //$contenttype='text/plain'; $outputencoding='UTF-8'; if ($outputencoding) header('Content-Encoding: '.$outputencoding); - if ($type) header('Content-Type: '.$type); + if ($contenttype) header('Content-Type: '.$contenttype); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); // Ajout directives pour resoudre bug IE -- GitLab