diff --git a/formulaires/gamumail.php b/formulaires/gamumail.php index 84d9312..6be6c97 100644 --- a/formulaires/gamumail.php +++ b/formulaires/gamumail.php @@ -276,7 +276,7 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, & if (!empty($docs_spip)) { foreach ($docs_spip as $id_document) { $protected = ''; - $Tdocument = sql_fetsel('*','spip_documents','id_document='.intval($id_document)); + $Tdocument = sql_fetsel('*','spip_documents','id_document='.intval($id_document)); if ( array_key_exists('protected', $Tdocument) 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 = ''; if (find_in_path('gamumail/'.$slug .'_html_header.html')) { $html_header = recuperer_fond('gamumail/'.$slug . '_html_header', $options);