forked from extern/egroupware
Use browser class header function
This commit is contained in:
parent
a17a84fd72
commit
68c78fc532
@ -118,21 +118,9 @@
|
||||
|
||||
$tsvfilename = $phpgw_info['server']['temp_dir'].$sep.$tsvfilename;
|
||||
|
||||
if ($phpgw->browser->get_agent() == "IE") // && browser_get_version() == "5.5")
|
||||
{
|
||||
$attachment = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$attachment = " attachment;";
|
||||
}
|
||||
|
||||
if ( ($download == "on") || ($o->type == 'pdb') ) {
|
||||
header("Content-disposition:".$attachment." filename=\"".$tsvfilename."\"");
|
||||
header("Content-type: application/octetstream");
|
||||
header("Content-length: ".strlen($buffer));
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
// filename, default application/octet-stream, length of file, default nocache True
|
||||
$phpgw->browser->content_header($tsvfilename,'',strlen($buffer));
|
||||
echo $buffer;
|
||||
} else {
|
||||
echo "<pre>\n";
|
||||
|
@ -164,22 +164,10 @@
|
||||
fclose($fp);
|
||||
$buffer = $this->import_end_file($buffer,$private,$cat_id);
|
||||
|
||||
if ($phpgw->browser->get_agent() == "IE") // && browser_get_version() == "5.5")
|
||||
{
|
||||
$attachment = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$attachment = " attachment;";
|
||||
}
|
||||
|
||||
if ($download == "") {
|
||||
if($conv_type=="Debug LDAP" || $conv_type=="Debug SQL" ) {
|
||||
header("Content-disposition:".$attachment." filename=\"conversion.txt\"");
|
||||
header("Content-type: application/octetstream");
|
||||
header("Content-length: ".strlen($buffer));
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
// filename, default application/octet-stream, length of file, default nocache True
|
||||
$phpgw->browser->content_header($tsvfilename,'',strlen($buffer));
|
||||
echo $buffer;
|
||||
} else {
|
||||
echo "<pre>$buffer</pre>";
|
||||
|
@ -93,19 +93,12 @@
|
||||
$buffer[$myexport[$name]] = $value;
|
||||
}
|
||||
}
|
||||
if ($phpgw->browser->get_agent() == "IE") // && browser_get_version() == "5.5")
|
||||
{
|
||||
$attachment = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$attachment = " attachment;";
|
||||
}
|
||||
|
||||
// create a vcard from this translated array
|
||||
$entry = $vcard->out($buffer);
|
||||
// print it
|
||||
header("Content-type: text/x-vcard");
|
||||
header("Content-Disposition:$attachment filename=$filename");
|
||||
// print it using browser class for headers
|
||||
// filename, mimetype, no length, default nocache True
|
||||
$phpgw->browser->content_header($filename,'text/x-vcard');
|
||||
echo $entry;
|
||||
$phpgw->common->exit;
|
||||
} /* !nolname && !nofname */
|
||||
|
Loading…
Reference in New Issue
Block a user