From 1b2006df8a9337419186bd26d78384350214283c Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 14 Jul 2016 13:24:50 -0400 Subject: [PATCH] CRM-17608 - Fix missing tokens in docx --- CRM/Contact/Form/Task/PDFLetterCommon.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Task/PDFLetterCommon.php b/CRM/Contact/Form/Task/PDFLetterCommon.php index bb2755d1b7..2fc4b0ee66 100644 --- a/CRM/Contact/Form/Task/PDFLetterCommon.php +++ b/CRM/Contact/Form/Task/PDFLetterCommon.php @@ -302,6 +302,8 @@ class CRM_Contact_Form_Task_PDFLetterCommon { elseif (!empty($formValues['document_file'])) { list($html_message, $formValues['document_type']) = CRM_Utils_PDF_Document::docReader($formValues['document_file']['name'], $formValues['document_file']['type'], TRUE); $formValues['document_file_path'] = $formValues['document_file']['name']; + // Fixme: this shouldn't be necessary but the above docReader function is giving blank output for docx files + list($html_message) = CRM_Utils_PDF_Document::unzipDoc($formValues['document_file_path'], $formValues['document_type']); } if (!empty($formValues['update_format'])) { @@ -309,8 +311,6 @@ class CRM_Contact_Form_Task_PDFLetterCommon { $bao->savePdfFormat($formValues, $formValues['format_id']); } - $html = array(); - $tokens = array(); CRM_Utils_Hook::tokens($tokens); $categories = array_keys($tokens); -- 2.25.1