5 * Distribue sous licence GPL
9 if (!defined("_ECRIRE_INC_VERSION")) return;
11 // Fonction appelee par divers pipelines
12 // http://doc.spip.org/@notifications_instituerbreve_dist
13 function notifications_instituerbreve_dist($quoi, $id_breve, $options) {
15 // ne devrait jamais se produire
16 if ($options['statut'] == $options['statut_ancien']) {
17 spip_log("statut inchange",'notifications');
21 include_spip('inc/texte');
24 if ($options['statut'] == 'publie') {
25 $modele = "notifications/breve_publie";
28 if ($options['statut'] == 'prop' AND $options['statut_ancien'] != 'publie')
29 $modele = "notifications/breve_propose";
32 $destinataires = array();
33 if ($GLOBALS['meta']["suivi_edito"] == "oui")
34 $destinataires = explode(',',$GLOBALS['meta']["adresse_suivi"]);
37 $destinataires = pipeline('notifications_destinataires',
39 'args'=>array('quoi'=>$quoi,'id'=>$id_breve,'options'=>$options)
41 'data'=>$destinataires)
44 $texte = email_notification_objet($id_breve, "breve", $modele);
45 notifications_envoyer_mails($destinataires, $texte);