WIP: on ajoute id_auteur
This commit is contained in:
parent
ffc6d5d849
commit
3751287a9d
1 changed files with 11 additions and 3 deletions
|
@ -42,8 +42,10 @@ function formulaires_gamumail_charger_dist($slug, $destinataires = 0, $Tclient =
|
||||||
|
|
||||||
foreach ($destinataires as $dest) {
|
foreach ($destinataires as $dest) {
|
||||||
if (is_numeric($dest)) {
|
if (is_numeric($dest)) {
|
||||||
|
$dest = (int) $dest;
|
||||||
if ($tM = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$dest)) {
|
if ($tM = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$dest)) {
|
||||||
$Tmails[] = [
|
$Tmails[] = [
|
||||||
|
'id_auteur' => $dest,
|
||||||
'email' => $tM['email'],
|
'email' => $tM['email'],
|
||||||
'texte' => $tM['nom'] . ' ' . ($tM['prenom'] ?? '') . ' ' . '<' . $tM['email'] . '>',
|
'texte' => $tM['nom'] . ' ' . ($tM['prenom'] ?? '') . ' ' . '<' . $tM['email'] . '>',
|
||||||
];
|
];
|
||||||
|
@ -301,11 +303,14 @@ function formulaires_gamumail_traiter_dist($slug, $destinataires = 0, $Tclient =
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($redirect AND $redirect != '') {
|
if ($redirect AND $redirect != '') {
|
||||||
$retour['redirect'] = $redirect;
|
$retour['redirect'] = $redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// debug
|
||||||
|
// $retour['redirect'] = "";
|
||||||
|
// fin debug
|
||||||
|
|
||||||
return $retour;
|
return $retour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,6 +471,9 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $Tfiles, $re
|
||||||
|
|
||||||
if ($f = charger_fonction('traiter_pieces_jointes', 'gamumail', true)) {
|
if ($f = charger_fonction('traiter_pieces_jointes', 'gamumail', true)) {
|
||||||
$pc = $f($slug, $options, $destinataires, $Tclient, $Tpdf);
|
$pc = $f($slug, $options, $destinataires, $Tclient, $Tpdf);
|
||||||
|
var_dump($destinataires);
|
||||||
|
var_dump($options);
|
||||||
|
var_dump($pc);
|
||||||
if (!empty($pc)) {
|
if (!empty($pc)) {
|
||||||
$pieces_jointes[] = $pc;
|
$pieces_jointes[] = $pc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue