Merge pull request #23360 from randallmoraes/patch-7

Update notify.class.php
This commit is contained in:
Laurent Destailleur 2022-12-30 13:32:13 +01:00 committed by GitHub
commit 9828debb50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'];
}