feat: ajout fichier traiter_pieces_jointes pour ajouter des pieces jointes avant l'envoi, utilie si on utilise envoi_separe
This commit is contained in:
parent
35584c2a49
commit
143faff6c4
1 changed files with 15 additions and 1 deletions
|
@ -276,7 +276,7 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, &
|
||||||
if (!empty($docs_spip)) {
|
if (!empty($docs_spip)) {
|
||||||
foreach ($docs_spip as $id_document) {
|
foreach ($docs_spip as $id_document) {
|
||||||
$protected = '';
|
$protected = '';
|
||||||
$Tdocument = sql_fetsel('*','spip_documents','id_document='.intval($id_document));
|
$Tdocument = sql_fetsel('*','spip_documents','id_document='.intval($id_document));
|
||||||
if (
|
if (
|
||||||
array_key_exists('protected', $Tdocument)
|
array_key_exists('protected', $Tdocument)
|
||||||
and $Tdocument['protected'] === 'oui'
|
and $Tdocument['protected'] === 'oui'
|
||||||
|
@ -349,6 +349,20 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, &
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($f = charger_fonction('traiter_pieces_jointes', 'gamumail', true)) {
|
||||||
|
$pc = $f($options, $destinataires, $Tclient, $Tpdf);
|
||||||
|
if (!empty($pc)) {
|
||||||
|
$pieces_jointes[] = $pc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($f = charger_fonction($slug . '_traiter_pieces_jointes', 'gamumail', true)) {
|
||||||
|
$pc = $f($options, $destinataires, $Tclient, $Tpdf);
|
||||||
|
if (!empty($pc)) {
|
||||||
|
$pieces_jointes[] = $pc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$html_header = '';
|
$html_header = '';
|
||||||
if (find_in_path('gamumail/'.$slug .'_html_header.html')) {
|
if (find_in_path('gamumail/'.$slug .'_html_header.html')) {
|
||||||
$html_header = recuperer_fond('gamumail/'.$slug . '_html_header', $options);
|
$html_header = recuperer_fond('gamumail/'.$slug . '_html_header', $options);
|
||||||
|
|
Loading…
Add table
Reference in a new issue