feat: on passe par remplacements slug sur le nom du fichier pdf
This commit is contained in:
parent
ab2476fdcf
commit
9c1ad3591d
1 changed files with 11 additions and 3 deletions
|
@ -267,6 +267,10 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, &
|
|||
$Tid_doc = _request('Tid_doc');
|
||||
$texte = facteur_mail_html2text($html);
|
||||
|
||||
$args = $options;
|
||||
$args['slug'] = $slug;
|
||||
$args['destinataires'] = $destinataires;
|
||||
|
||||
$pieces_jointes = [];
|
||||
if ($f = charger_fonction('traiter_av_pdf', 'gamumail', true)) {
|
||||
$options = $f($options, $destinataires, $Tclient, $Tpdf);
|
||||
|
@ -333,6 +337,7 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, &
|
|||
|
||||
$recup_pdf = charger_fonction('charger_pdf','inc');
|
||||
foreach ($Tpdfs_ok as $pdf) {
|
||||
$nom = "mon_fichier";
|
||||
foreach ($Tpdf as $cle => $p) {
|
||||
if ($p['fichier'].'_'.$cle === $pdf) {
|
||||
$fichier = $p['fichier'];
|
||||
|
@ -340,6 +345,12 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, &
|
|||
$nom = isset($p['nom']) ? $p['nom'] : $fichier;
|
||||
}
|
||||
}
|
||||
|
||||
$nom = pipeline('remplacements_slug', array(
|
||||
'args' => $args,
|
||||
'data' => $nom
|
||||
));
|
||||
|
||||
$c = pipeline('tpdf_charger_contexte', [
|
||||
'args' => [
|
||||
'destinataires' => $destinataires,
|
||||
|
@ -392,9 +403,6 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, &
|
|||
$html = $html_header . $html . $html_footer;
|
||||
|
||||
// pipeline pour les traitement du contenu des slugs spécifiques de chaque plugin
|
||||
$args = $options;
|
||||
$args['slug'] = $slug;
|
||||
$args['destinataires'] = $destinataires;
|
||||
$html = pipeline('remplacements_slug', array(
|
||||
'args' => $args,
|
||||
'data' => $html
|
||||
|
|
Loading…
Add table
Reference in a new issue