Use a better name for vcal exports (from context menu, etc) if only exporting one record

This commit is contained in:
Nathan Gray 2012-10-24 16:15:17 +00:00
parent e16ea584ba
commit 9c2fb9ffda

View File

@ -1021,7 +1021,8 @@ class addressbook_vcal extends addressbook_bo
{
if (!$file)
{
html::content_header('addressbook.vcf','text/x-vcard');
$filename = count($ids) == 1 ? egw_link::title('addressbook',$ids[0]): 'egw_addressbook_'.date('Y-m-d');
html::content_header(($filename ? $filename : 'addressbook').'.vcf','text/x-vcard');
}
if (!($fp = fopen($file ? $file : 'php://output','w')))
{