mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-23 11:21:42 +02:00
Now using new browser class to hopefully help with IE downloads
This commit is contained in:
parent
da3fec9d7c
commit
cdf93f7ee7
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||||
$phpgw_info["flags"]["enable_contacts_class"] = True;
|
$phpgw_info["flags"]["enable_contacts_class"] = True;
|
||||||
|
$phpgw_info["flags"]["enable_browser_class"] = True;
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
$sep = SEP;
|
$sep = SEP;
|
||||||
@ -117,8 +118,17 @@
|
|||||||
|
|
||||||
$tsvfilename = $phpgw_info['server']['temp_dir'].$sep.$tsvfilename;
|
$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') ) {
|
if ( ($download == "on") || ($o->type == 'pdb') ) {
|
||||||
header("Content-disposition: attachment; filename=\"".$tsvfilename."\"");
|
header("Content-disposition:".$attachment." filename=\"".$tsvfilename."\"");
|
||||||
header("Content-type: application/octetstream");
|
header("Content-type: application/octetstream");
|
||||||
header("Content-length: ".strlen($buffer));
|
header("Content-length: ".strlen($buffer));
|
||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
|
@ -14,17 +14,22 @@
|
|||||||
|
|
||||||
if ($nolname || $nofname) {
|
if ($nolname || $nofname) {
|
||||||
$phpgw_info["flags"] = array(
|
$phpgw_info["flags"] = array(
|
||||||
"noheader" => False,
|
"noheader" => False,
|
||||||
"nonavbar" => False
|
"nonavbar" => False,
|
||||||
|
"noappheader" => False,
|
||||||
|
"noappfooter" => False
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$phpgw_info["flags"] = array(
|
$phpgw_info["flags"] = array(
|
||||||
"noheader" => True,
|
"noheader" => True,
|
||||||
"nonavbar" => True
|
"nonavbar" => True,
|
||||||
|
"noappheader" => True,
|
||||||
|
"noappfooter" => True
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw_info["flags"]["enable_contacts_class"] = True;
|
$phpgw_info["flags"]["enable_contacts_class"] = True;
|
||||||
|
$phpgw_info["flags"]["enable_browser_class"] = True;
|
||||||
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
@ -88,11 +93,19 @@
|
|||||||
$buffer[$myexport[$name]] = $value;
|
$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
|
// create a vcard from this translated array
|
||||||
$entry = $vcard->out($buffer);
|
$entry = $vcard->out($buffer);
|
||||||
// print it
|
// print it
|
||||||
header("Content-type: text/x-vcard");
|
header("Content-type: text/x-vcard");
|
||||||
header("Content-Disposition: attachment; filename=$filename");
|
header("Content-Disposition:$attachment filename=$filename");
|
||||||
echo $entry;
|
echo $entry;
|
||||||
$phpgw->common->exit;
|
$phpgw->common->exit;
|
||||||
} /* !nolname && !nofname */
|
} /* !nolname && !nofname */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user