Add options to help debug

This commit is contained in:
Laurent Destailleur 2008-11-26 09:47:34 +00:00
parent f7f2202f66
commit d10b916cbf

View File

@ -104,13 +104,15 @@ if ($format == 'ical' || $format == 'vcal')
if ($result >= 0) if ($result >= 0)
{ {
$attachment = true; $attachment = true;
$type='text/calendar'; if (isset($_GET["attachment"])) $attachment=$_GET["attachment"];
//$type='text/plain'; // OK //$attachment = false;
//$attachment = false; // OK $contenttype='text/calendar';
if (isset($_GET["contenttype"])) $contenttype=$_GET["contenttype"];
//$contenttype='text/plain';
$outputencoding='UTF-8'; $outputencoding='UTF-8';
if ($outputencoding) header('Content-Encoding: '.$outputencoding); 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.'"'); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
// Ajout directives pour resoudre bug IE // Ajout directives pour resoudre bug IE
@ -133,13 +135,15 @@ if ($format == 'rss')
if ($result >= 0) if ($result >= 0)
{ {
$attachment = false; $attachment = false;
$type='application/rss+xml'; if (isset($_GET["attachment"])) $attachment=$_GET["attachment"];
//$type='text/plain'; // OK //$attachment = false;
//$attachment = false; // OK $contenttype='application/rss+xml';
if (isset($_GET["contenttype"])) $contenttype=$_GET["contenttype"];
//$contenttype='text/plain';
$outputencoding='UTF-8'; $outputencoding='UTF-8';
if ($outputencoding) header('Content-Encoding: '.$outputencoding); 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.'"'); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
// Ajout directives pour resoudre bug IE // Ajout directives pour resoudre bug IE