X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FDownload%2FCustomFieldValue%2Fdhandler;fp=rt%2Fshare%2Fhtml%2FDownload%2FCustomFieldValue%2Fdhandler;h=d8c7039047df6c02440dc4b9e1ba0833e6841578;hb=e70abd21bab68b23488f7ef1ee2e693a3b365691;hp=218de33c85607a4b76817bc5e179457be7ccf02f;hpb=b4b0c7e72d7eaee2fbfc7022022c9698323203dd;p=freeside.git diff --git a/rt/share/html/Download/CustomFieldValue/dhandler b/rt/share/html/Download/CustomFieldValue/dhandler index 218de33c8..d8c703904 100644 --- a/rt/share/html/Download/CustomFieldValue/dhandler +++ b/rt/share/html/Download/CustomFieldValue/dhandler @@ -63,7 +63,10 @@ unless ($OCFV->id) { my $content_type = $OCFV->ContentType || 'text/plain'; -unless (RT->Config->Get('TrustHTMLAttachments')) { +if (RT->Config->Get('AlwaysDownloadAttachments')) { + $r->headers_out->{'Content-Disposition'} = "attachment; filename=" . $OCFV->Content; +} +elsif (!RT->Config->Get('TrustHTMLAttachments')) { $content_type = 'text/plain' if ($content_type =~ /^text\/html/i); }