From f3d73690c6a8139590ff7db7b752909e72379deb Mon Sep 17 00:00:00 2001 From: Randall Mora <50120822+randallmoraes@users.noreply.github.com> Date: Wed, 28 Dec 2022 08:29:55 -0600 Subject: [PATCH] Update notify.class.php Allows modification of attachments using the hook --- htdocs/core/class/notify.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 2a3a2b805da..c85339f7df8 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -658,6 +658,11 @@ class Notify $reshook = $hookmanager->executeHooks('formatNotificationMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { + if (!empty($hookmanager->resArray['files'])) { + $filename_list = $hookmanager->resArray['files']['file']; + $mimetype_list = $hookmanager->resArray['files']['mimefile']; + $mimefilename_list = $hookmanager->resArray['files']['filename']; + } if (!empty($hookmanager->resArray['subject'])) { $subject .= $hookmanager->resArray['subject']; } @@ -901,6 +906,11 @@ class Notify $parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); $reshook = $hookmanager->executeHooks('formatNotificationMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { + if (!empty($hookmanager->resArray['files'])) { + $filename_list = $hookmanager->resArray['files']['file']; + $mimetype_list = $hookmanager->resArray['files']['mimefile']; + $mimefilename_list = $hookmanager->resArray['files']['filename']; + } if (!empty($hookmanager->resArray['subject'])) { $subject .= $hookmanager->resArray['subject']; }