5 * Distribue sous licence GPL
9 if (!defined("_ECRIRE_INC_VERSION")) return;
11 // Fonction appelee par divers pipelines
12 // http://doc.spip.org/@notifications_instituerarticle_dist
13 function notifications_instituerarticle_dist($quoi, $id_article, $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 if ($GLOBALS['meta']["post_dates"]=='non'
26 AND strtotime($options['date'])>time())
27 $modele = "notifications/article_valide";
29 $modele = "notifications/article_publie";
32 if ($options['statut'] == 'prop' AND $options['statut_ancien'] != 'publie')
33 $modele = "notifications/article_propose";
36 $destinataires = array();
37 if ($GLOBALS['meta']["suivi_edito"] == "oui")
38 $destinataires = explode(',',$GLOBALS['meta']["adresse_suivi"]);
41 $destinataires = pipeline('notifications_destinataires',
43 'args'=>array('quoi'=>$quoi,'id'=>$id_article,'options'=>$options)
45 'data'=>$destinataires)
48 $texte = email_notification_objet($id_article, "article", $modele);
49 notifications_envoyer_mails($destinataires, $texte);