5 * Distribue sous licence GPL
10 if (!defined('_ECRIRE_INC_VERSION')) return;
12 // Fonction appelee par divers pipelines
13 // http://doc.spip.org/@notifications_instituerarticle_dist
14 function notifications_instituerarticle_dist($quoi, $id_article, $options) {
16 // ne devrait jamais se produire
17 if ($options['statut'] == $options['statut_ancien']) {
18 spip_log("statut inchange",'notifications');
22 include_spip('inc/texte');
25 if ($options['statut'] == 'publie') {
26 if ($GLOBALS['meta']["post_dates"]=='non'
27 AND strtotime($options['date'])>time())
28 $modele = "notifications/article_valide";
30 $modele = "notifications/article_publie";
33 if ($options['statut'] == 'prop' AND $options['statut_ancien'] != 'publie')
34 $modele = "notifications/article_propose";
37 $destinataires = array();
38 if ($GLOBALS['meta']["suivi_edito"] == "oui")
39 $destinataires = explode(',',$GLOBALS['meta']["adresse_suivi"]);
42 $destinataires = pipeline('notifications_destinataires',
44 'args'=>array('quoi'=>$quoi,'id'=>$id_article,'options'=>$options)
46 'data'=>$destinataires)
49 $texte = email_notification_article($id_article, $modele);
50 notifications_envoyer_mails($destinataires, $texte);