Completed
Push — master ( f4e951...875ae4 )
by cam
04:24
created
ecrire/notifications/instituerarticle.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -12,53 +12,53 @@
 block discarded – undo
12 12
 
13 13
 
14 14
 if (!defined('_ECRIRE_INC_VERSION')) {
15
-	return;
15
+    return;
16 16
 }
17 17
 
18 18
 // Fonction appelee par divers pipelines
19 19
 // https://code.spip.net/@notifications_instituerarticle_dist
20 20
 function notifications_instituerarticle_dist($quoi, $id_article, $options) {
21 21
 
22
-	// ne devrait jamais se produire
23
-	if ($options['statut'] == $options['statut_ancien']) {
24
-		spip_log('statut inchange', 'notifications');
22
+    // ne devrait jamais se produire
23
+    if ($options['statut'] == $options['statut_ancien']) {
24
+        spip_log('statut inchange', 'notifications');
25 25
 
26
-		return;
27
-	}
26
+        return;
27
+    }
28 28
 
29
-	include_spip('inc/texte');
29
+    include_spip('inc/texte');
30 30
 
31
-	$modele = '';
32
-	if ($options['statut'] == 'publie') {
33
-		if ($GLOBALS['meta']['post_dates'] == 'non'
34
-			and strtotime($options['date']) > time()
35
-		) {
36
-			$modele = 'notifications/article_valide';
37
-		} else {
38
-			$modele = 'notifications/article_publie';
39
-		}
40
-	}
31
+    $modele = '';
32
+    if ($options['statut'] == 'publie') {
33
+        if ($GLOBALS['meta']['post_dates'] == 'non'
34
+            and strtotime($options['date']) > time()
35
+        ) {
36
+            $modele = 'notifications/article_valide';
37
+        } else {
38
+            $modele = 'notifications/article_publie';
39
+        }
40
+    }
41 41
 
42
-	if ($options['statut'] == 'prop' and $options['statut_ancien'] != 'publie') {
43
-		$modele = 'notifications/article_propose';
44
-	}
42
+    if ($options['statut'] == 'prop' and $options['statut_ancien'] != 'publie') {
43
+        $modele = 'notifications/article_propose';
44
+    }
45 45
 
46
-	if ($modele) {
47
-		$destinataires = array();
48
-		if ($GLOBALS['meta']['suivi_edito'] == 'oui') {
49
-			$destinataires = explode(',', $GLOBALS['meta']['adresse_suivi']);
50
-		}
46
+    if ($modele) {
47
+        $destinataires = array();
48
+        if ($GLOBALS['meta']['suivi_edito'] == 'oui') {
49
+            $destinataires = explode(',', $GLOBALS['meta']['adresse_suivi']);
50
+        }
51 51
 
52 52
 
53
-		$destinataires = pipeline(
54
-			'notifications_destinataires',
55
-			array(
56
-				'args' => array('quoi' => $quoi, 'id' => $id_article, 'options' => $options),
57
-				'data' => $destinataires
58
-			)
59
-		);
53
+        $destinataires = pipeline(
54
+            'notifications_destinataires',
55
+            array(
56
+                'args' => array('quoi' => $quoi, 'id' => $id_article, 'options' => $options),
57
+                'data' => $destinataires
58
+            )
59
+        );
60 60
 
61
-		$texte = email_notification_article($id_article, $modele);
62
-		notifications_envoyer_mails($destinataires, $texte);
63
-	}
61
+        $texte = email_notification_article($id_article, $modele);
62
+        notifications_envoyer_mails($destinataires, $texte);
63
+    }
64 64
 }
Please login to merge, or discard this patch.