diff --git a/addressbook/export.php b/addressbook/export.php index 4b7e296154..2030f5f649 100644 --- a/addressbook/export.php +++ b/addressbook/export.php @@ -26,6 +26,7 @@ $phpgw_info["flags"]["currentapp"] = "addressbook"; $phpgw_info["flags"]["enable_contacts_class"] = True; + $phpgw_info["flags"]["enable_browser_class"] = True; include("../header.inc.php"); $sep = SEP; @@ -117,8 +118,17 @@ $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-disposition:".$attachment." filename=\"".$tsvfilename."\""); header("Content-type: application/octetstream"); header("Content-length: ".strlen($buffer)); header("Pragma: no-cache"); diff --git a/addressbook/vcardout.php b/addressbook/vcardout.php index 18e2ad648d..17b61e07ed 100644 --- a/addressbook/vcardout.php +++ b/addressbook/vcardout.php @@ -14,17 +14,22 @@ if ($nolname || $nofname) { $phpgw_info["flags"] = array( - "noheader" => False, - "nonavbar" => False + "noheader" => False, + "nonavbar" => False, + "noappheader" => False, + "noappfooter" => False ); } else { $phpgw_info["flags"] = array( - "noheader" => True, - "nonavbar" => True + "noheader" => True, + "nonavbar" => True, + "noappheader" => True, + "noappfooter" => True ); } $phpgw_info["flags"]["enable_contacts_class"] = True; + $phpgw_info["flags"]["enable_browser_class"] = True; $phpgw_info["flags"]["currentapp"] = "addressbook"; include("../header.inc.php"); @@ -88,11 +93,19 @@ $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"); + header("Content-Disposition:$attachment filename=$filename"); echo $entry; $phpgw->common->exit; } /* !nolname && !nofname */