mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix phpunit
This commit is contained in:
parent
08d32dbf25
commit
8d3e7bfc6d
|
|
@ -208,45 +208,43 @@ if ($rss) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($result >= 0) {
|
||||
$attachment = false;
|
||||
if (GETPOSTISSET("attachment")) {
|
||||
$attachment = GETPOST("attachment");
|
||||
}
|
||||
//$attachment = false;
|
||||
$contenttype = 'application/rss+xml';
|
||||
if (GETPOSTISSET("contenttype")) {
|
||||
$contenttype = GETPOST("contenttype");
|
||||
}
|
||||
//$contenttype='text/plain';
|
||||
$outputencoding = 'UTF-8';
|
||||
|
||||
if ($contenttype) {
|
||||
header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : ''));
|
||||
}
|
||||
if ($attachment) {
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
}
|
||||
|
||||
// Ajout directives pour resoudre bug IE
|
||||
//header('Cache-Control: Public, must-revalidate');
|
||||
//header('Pragma: public');
|
||||
if ($cachedelay) {
|
||||
header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate');
|
||||
} else {
|
||||
header('Cache-Control: private, must-revalidate');
|
||||
}
|
||||
|
||||
// Clean parameters
|
||||
$outputfile = $dir_temp.'/'.$filename;
|
||||
$result = readfile($outputfile);
|
||||
if (!$result) {
|
||||
print 'File '.$outputfile.' was empty.';
|
||||
}
|
||||
|
||||
// header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
|
||||
exit;
|
||||
$attachment = false;
|
||||
if (GETPOSTISSET("attachment")) {
|
||||
$attachment = GETPOST("attachment");
|
||||
}
|
||||
//$attachment = false;
|
||||
$contenttype = 'application/rss+xml';
|
||||
if (GETPOSTISSET("contenttype")) {
|
||||
$contenttype = GETPOST("contenttype");
|
||||
}
|
||||
//$contenttype='text/plain';
|
||||
$outputencoding = 'UTF-8';
|
||||
|
||||
if ($contenttype) {
|
||||
header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : ''));
|
||||
}
|
||||
if ($attachment) {
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
}
|
||||
|
||||
// Ajout directives pour resoudre bug IE
|
||||
//header('Cache-Control: Public, must-revalidate');
|
||||
//header('Pragma: public');
|
||||
if ($cachedelay) {
|
||||
header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate');
|
||||
} else {
|
||||
header('Cache-Control: private, must-revalidate');
|
||||
}
|
||||
|
||||
// Clean parameters
|
||||
$outputfile = $dir_temp.'/'.$filename;
|
||||
$result = readfile($outputfile);
|
||||
if (!$result) {
|
||||
print 'File '.$outputfile.' was empty.';
|
||||
}
|
||||
|
||||
// header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
|
||||
exit;
|
||||
} elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) {
|
||||
// Get logos
|
||||
readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user