From 5dfe337efd6f038f737b1a54bd2217eeba620d9a Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Thu, 3 Apr 2014 16:30:56 -0500 Subject: [PATCH] Hide inline attachments on PDF output --- include/class.pdf.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/class.pdf.php b/include/class.pdf.php index 5e58a80a5..8f41ec2db 100644 --- a/include/class.pdf.php +++ b/include/class.pdf.php @@ -299,9 +299,11 @@ class Ticket2PDF extends mPDF && ($attachments = $tentry->getAttachments())) { $files = array(); foreach($attachments as $attachment) - $files[]= $attachment['name']; + if (!$attachment['inline']) + $files[]= $attachment['name']; - $text.="<div>Files Attached: [".implode(', ',$files)."]</div>"; + if ($files) + $text.="<div>Files Attached: [".implode(', ',$files)."]</div>"; } $this->WriteHtml('<div class="thread-body">'.$text.'</div>', 2, false, false); $this->Ln(5); -- GitLab