Completed
Push — master ( 3a7980...c8fa57 )
by cam
04:18
created
ecrire/action/tester.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			} else {
44 44
 				# Attention GD sait lire le gif mais pas forcement l'ecrire
45 45
 				if (function_exists('ImageCreateFromGIF')) {
46
-					$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
46
+					$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK."test.gif");
47 47
 					if ($srcImage) {
48 48
 						$gd_formats_read_gif = ",gif";
49 49
 						ImageDestroy($srcImage);
@@ -67,28 +67,28 @@  discard block
 block discarded – undo
67 67
 			# les formats disponibles en ecriture... (cf. inc_logos)
68 68
 
69 69
 			if (function_exists('ImageCreateFromJPEG')) {
70
-				$srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK . "test.jpg");
70
+				$srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK."test.jpg");
71 71
 				if ($srcImage) {
72 72
 					$gd_formats[] = "jpg";
73 73
 					ImageDestroy($srcImage);
74 74
 				}
75 75
 			}
76 76
 			if (function_exists('ImageCreateFromGIF')) {
77
-				$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
77
+				$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK."test.gif");
78 78
 				if ($srcImage) {
79 79
 					$gd_formats[] = "gif";
80 80
 					ImageDestroy($srcImage);
81 81
 				}
82 82
 			}
83 83
 			if (function_exists('ImageCreateFromPNG')) {
84
-				$srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK . "test.png");
84
+				$srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK."test.png");
85 85
 				if ($srcImage) {
86 86
 					$gd_formats[] = "png";
87 87
 					ImageDestroy($srcImage);
88 88
 				}
89 89
 			}
90 90
 			if (function_exists('ImageCreateFromWEBP')) {
91
-				$srcImage = @ImageCreateFromWEBP(_ROOT_IMG_PACK . "test.webp");
91
+				$srcImage = @ImageCreateFromWEBP(_ROOT_IMG_PACK."test.webp");
92 92
 				if ($srcImage) {
93 93
 					$gd_formats[] = "webp";
94 94
 					ImageDestroy($srcImage);
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 			}
97 97
 		}
98 98
 
99
-		if (! empty($gd_formats)) {
99
+		if (!empty($gd_formats)) {
100 100
 			$gd_formats = join(",", $gd_formats);
101 101
 		}
102
-		ecrire_meta("gd_formats_read", $gd_formats . $gd_formats_read_gif);
102
+		ecrire_meta("gd_formats_read", $gd_formats.$gd_formats_read_gif);
103 103
 		ecrire_meta("gd_formats", $gd_formats);
104 104
 	} // verifier les formats netpbm
105 105
 	else {
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 			$pnmtojpeg_command = str_replace("pnmscale",
118 118
 				"pnmtojpeg", _PNMSCALE_COMMAND);
119 119
 
120
-			$vignette = _ROOT_IMG_PACK . "test.jpg";
121
-			$dest = _DIR_VAR . "test-jpg.jpg";
122
-			$commande = "$jpegtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
120
+			$vignette = _ROOT_IMG_PACK."test.jpg";
121
+			$dest = _DIR_VAR."test-jpg.jpg";
122
+			$commande = "$jpegtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
123 123
 			spip_log($commande);
124 124
 			exec($commande);
125 125
 			if ($taille = @getimagesize($dest)) {
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 			}
130 130
 			$giftopnm_command = str_replace("pnmscale", "giftopnm", _PNMSCALE_COMMAND);
131 131
 			$pnmtojpeg_command = str_replace("pnmscale", "pnmtojpeg", _PNMSCALE_COMMAND);
132
-			$vignette = _ROOT_IMG_PACK . "test.gif";
133
-			$dest = _DIR_VAR . "test-gif.jpg";
134
-			$commande = "$giftopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
132
+			$vignette = _ROOT_IMG_PACK."test.gif";
133
+			$dest = _DIR_VAR."test-gif.jpg";
134
+			$commande = "$giftopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
135 135
 			spip_log($commande);
136 136
 			exec($commande);
137 137
 			if ($taille = @getimagesize($dest)) {
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
 			}
142 142
 
143 143
 			$pngtopnm_command = str_replace("pnmscale", "pngtopnm", _PNMSCALE_COMMAND);
144
-			$vignette = _ROOT_IMG_PACK . "test.png";
145
-			$dest = _DIR_VAR . "test-gif.jpg";
146
-			$commande = "$pngtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
144
+			$vignette = _ROOT_IMG_PACK."test.png";
145
+			$dest = _DIR_VAR."test-gif.jpg";
146
+			$commande = "$pngtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
147 147
 			spip_log($commande);
148 148
 			exec($commande);
149 149
 			if ($taille = @getimagesize($dest)) {
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
 		include_spip('inc/filtres');
168 168
 		include_spip('inc/filtres_images_mini');
169 169
 		$taille_preview = 150;
170
-		$image = _image_valeurs_trans(_DIR_IMG_PACK . 'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
170
+		$image = _image_valeurs_trans(_DIR_IMG_PACK.'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
171 171
 
172
-		$image['fichier_dest'] = _DIR_VAR . "test_$arg";
172
+		$image['fichier_dest'] = _DIR_VAR."test_$arg";
173 173
 
174 174
 		if ($preview = _image_creer_vignette($image, $taille_preview, $taille_preview, $arg, true)
175 175
 			and ($preview['width'] * $preview['height'] > 0)
Please login to merge, or discard this patch.
Indentation   +151 added lines, -151 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 /**
@@ -30,154 +30,154 @@  discard block
 block discarded – undo
30 30
  * redirige sur l'image ainsi créée (sinon sur une image d'echec).
31 31
  **/
32 32
 function action_tester_dist() {
33
-	$arg = _request('arg');
34
-
35
-	$gd_formats = array();
36
-	$gd_formats_read_gif = "";
37
-	// verifier les formats acceptes par GD
38
-	if ($arg == "gd1") {
39
-		// Si GD est installe et php >= 4.0.2
40
-		if (function_exists('imagetypes')) {
41
-			if (imagetypes() & IMG_GIF) {
42
-				$gd_formats[] = "gif";
43
-			} else {
44
-				# Attention GD sait lire le gif mais pas forcement l'ecrire
45
-				if (function_exists('ImageCreateFromGIF')) {
46
-					$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
47
-					if ($srcImage) {
48
-						$gd_formats_read_gif = ",gif";
49
-						ImageDestroy($srcImage);
50
-					}
51
-				}
52
-			}
53
-
54
-			if (imagetypes() & IMG_JPG) {
55
-				$gd_formats[] = "jpg";
56
-			}
57
-			if (imagetypes() & IMG_PNG) {
58
-				$gd_formats[] = "png";
59
-			}
60
-			if (imagetypes() & IMG_WEBP) {
61
-				$gd_formats[] = "webp";
62
-			}
63
-		} else {
64
-			# ancienne methode de detection des formats, qui en plus
65
-			# est bugguee car elle teste les formats en lecture
66
-			# alors que la valeur deduite sert a identifier
67
-			# les formats disponibles en ecriture... (cf. inc_logos)
68
-
69
-			if (function_exists('ImageCreateFromJPEG')) {
70
-				$srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK . "test.jpg");
71
-				if ($srcImage) {
72
-					$gd_formats[] = "jpg";
73
-					ImageDestroy($srcImage);
74
-				}
75
-			}
76
-			if (function_exists('ImageCreateFromGIF')) {
77
-				$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
78
-				if ($srcImage) {
79
-					$gd_formats[] = "gif";
80
-					ImageDestroy($srcImage);
81
-				}
82
-			}
83
-			if (function_exists('ImageCreateFromPNG')) {
84
-				$srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK . "test.png");
85
-				if ($srcImage) {
86
-					$gd_formats[] = "png";
87
-					ImageDestroy($srcImage);
88
-				}
89
-			}
90
-			if (function_exists('ImageCreateFromWEBP')) {
91
-				$srcImage = @ImageCreateFromWEBP(_ROOT_IMG_PACK . "test.webp");
92
-				if ($srcImage) {
93
-					$gd_formats[] = "webp";
94
-					ImageDestroy($srcImage);
95
-				}
96
-			}
97
-		}
98
-
99
-		if (! empty($gd_formats)) {
100
-			$gd_formats = join(",", $gd_formats);
101
-		}
102
-		ecrire_meta("gd_formats_read", $gd_formats . $gd_formats_read_gif);
103
-		ecrire_meta("gd_formats", $gd_formats);
104
-	} // verifier les formats netpbm
105
-	else {
106
-		if ($arg == "netpbm") {
107
-			if (!defined('_PNMSCALE_COMMAND')) {
108
-				define('_PNMSCALE_COMMAND', 'pnmscale');
109
-			} // Securite : mes_options.php peut preciser le chemin absolu
110
-			if (_PNMSCALE_COMMAND == '') {
111
-				return;
112
-			}
113
-			$netpbm_formats = array();
114
-
115
-			$jpegtopnm_command = str_replace("pnmscale",
116
-				"jpegtopnm", _PNMSCALE_COMMAND);
117
-			$pnmtojpeg_command = str_replace("pnmscale",
118
-				"pnmtojpeg", _PNMSCALE_COMMAND);
119
-
120
-			$vignette = _ROOT_IMG_PACK . "test.jpg";
121
-			$dest = _DIR_VAR . "test-jpg.jpg";
122
-			$commande = "$jpegtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
123
-			spip_log($commande);
124
-			exec($commande);
125
-			if ($taille = @getimagesize($dest)) {
126
-				if ($taille[1] == 10) {
127
-					$netpbm_formats[] = "jpg";
128
-				}
129
-			}
130
-			$giftopnm_command = str_replace("pnmscale", "giftopnm", _PNMSCALE_COMMAND);
131
-			$pnmtojpeg_command = str_replace("pnmscale", "pnmtojpeg", _PNMSCALE_COMMAND);
132
-			$vignette = _ROOT_IMG_PACK . "test.gif";
133
-			$dest = _DIR_VAR . "test-gif.jpg";
134
-			$commande = "$giftopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
135
-			spip_log($commande);
136
-			exec($commande);
137
-			if ($taille = @getimagesize($dest)) {
138
-				if ($taille[1] == 10) {
139
-					$netpbm_formats[] = "gif";
140
-				}
141
-			}
142
-
143
-			$pngtopnm_command = str_replace("pnmscale", "pngtopnm", _PNMSCALE_COMMAND);
144
-			$vignette = _ROOT_IMG_PACK . "test.png";
145
-			$dest = _DIR_VAR . "test-gif.jpg";
146
-			$commande = "$pngtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
147
-			spip_log($commande);
148
-			exec($commande);
149
-			if ($taille = @getimagesize($dest)) {
150
-				if ($taille[1] == 10) {
151
-					$netpbm_formats[] = "png";
152
-				}
153
-			}
154
-
155
-
156
-			if ($netpbm_formats) {
157
-				$netpbm_formats = join(",", $netpbm_formats);
158
-			} else {
159
-				$netpbm_formats = '';
160
-			}
161
-			ecrire_meta("netpbm_formats", $netpbm_formats);
162
-		}
163
-	}
164
-
165
-	// et maintenant envoyer la vignette de tests
166
-	if (in_array($arg, array("gd1", "gd2", "imagick", "convert", "netpbm"))) {
167
-		include_spip('inc/filtres');
168
-		include_spip('inc/filtres_images_mini');
169
-		$taille_preview = 150;
170
-		$image = _image_valeurs_trans(_DIR_IMG_PACK . 'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
171
-
172
-		$image['fichier_dest'] = _DIR_VAR . "test_$arg";
173
-
174
-		if ($preview = _image_creer_vignette($image, $taille_preview, $taille_preview, $arg, true)
175
-			and ($preview['width'] * $preview['height'] > 0)
176
-		) {
177
-			redirige_par_entete($preview['fichier']);
178
-		}
179
-	}
180
-
181
-	# image echec
182
-	redirige_par_entete(chemin_image('echec-reducteur-xx.svg'));
33
+    $arg = _request('arg');
34
+
35
+    $gd_formats = array();
36
+    $gd_formats_read_gif = "";
37
+    // verifier les formats acceptes par GD
38
+    if ($arg == "gd1") {
39
+        // Si GD est installe et php >= 4.0.2
40
+        if (function_exists('imagetypes')) {
41
+            if (imagetypes() & IMG_GIF) {
42
+                $gd_formats[] = "gif";
43
+            } else {
44
+                # Attention GD sait lire le gif mais pas forcement l'ecrire
45
+                if (function_exists('ImageCreateFromGIF')) {
46
+                    $srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
47
+                    if ($srcImage) {
48
+                        $gd_formats_read_gif = ",gif";
49
+                        ImageDestroy($srcImage);
50
+                    }
51
+                }
52
+            }
53
+
54
+            if (imagetypes() & IMG_JPG) {
55
+                $gd_formats[] = "jpg";
56
+            }
57
+            if (imagetypes() & IMG_PNG) {
58
+                $gd_formats[] = "png";
59
+            }
60
+            if (imagetypes() & IMG_WEBP) {
61
+                $gd_formats[] = "webp";
62
+            }
63
+        } else {
64
+            # ancienne methode de detection des formats, qui en plus
65
+            # est bugguee car elle teste les formats en lecture
66
+            # alors que la valeur deduite sert a identifier
67
+            # les formats disponibles en ecriture... (cf. inc_logos)
68
+
69
+            if (function_exists('ImageCreateFromJPEG')) {
70
+                $srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK . "test.jpg");
71
+                if ($srcImage) {
72
+                    $gd_formats[] = "jpg";
73
+                    ImageDestroy($srcImage);
74
+                }
75
+            }
76
+            if (function_exists('ImageCreateFromGIF')) {
77
+                $srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
78
+                if ($srcImage) {
79
+                    $gd_formats[] = "gif";
80
+                    ImageDestroy($srcImage);
81
+                }
82
+            }
83
+            if (function_exists('ImageCreateFromPNG')) {
84
+                $srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK . "test.png");
85
+                if ($srcImage) {
86
+                    $gd_formats[] = "png";
87
+                    ImageDestroy($srcImage);
88
+                }
89
+            }
90
+            if (function_exists('ImageCreateFromWEBP')) {
91
+                $srcImage = @ImageCreateFromWEBP(_ROOT_IMG_PACK . "test.webp");
92
+                if ($srcImage) {
93
+                    $gd_formats[] = "webp";
94
+                    ImageDestroy($srcImage);
95
+                }
96
+            }
97
+        }
98
+
99
+        if (! empty($gd_formats)) {
100
+            $gd_formats = join(",", $gd_formats);
101
+        }
102
+        ecrire_meta("gd_formats_read", $gd_formats . $gd_formats_read_gif);
103
+        ecrire_meta("gd_formats", $gd_formats);
104
+    } // verifier les formats netpbm
105
+    else {
106
+        if ($arg == "netpbm") {
107
+            if (!defined('_PNMSCALE_COMMAND')) {
108
+                define('_PNMSCALE_COMMAND', 'pnmscale');
109
+            } // Securite : mes_options.php peut preciser le chemin absolu
110
+            if (_PNMSCALE_COMMAND == '') {
111
+                return;
112
+            }
113
+            $netpbm_formats = array();
114
+
115
+            $jpegtopnm_command = str_replace("pnmscale",
116
+                "jpegtopnm", _PNMSCALE_COMMAND);
117
+            $pnmtojpeg_command = str_replace("pnmscale",
118
+                "pnmtojpeg", _PNMSCALE_COMMAND);
119
+
120
+            $vignette = _ROOT_IMG_PACK . "test.jpg";
121
+            $dest = _DIR_VAR . "test-jpg.jpg";
122
+            $commande = "$jpegtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
123
+            spip_log($commande);
124
+            exec($commande);
125
+            if ($taille = @getimagesize($dest)) {
126
+                if ($taille[1] == 10) {
127
+                    $netpbm_formats[] = "jpg";
128
+                }
129
+            }
130
+            $giftopnm_command = str_replace("pnmscale", "giftopnm", _PNMSCALE_COMMAND);
131
+            $pnmtojpeg_command = str_replace("pnmscale", "pnmtojpeg", _PNMSCALE_COMMAND);
132
+            $vignette = _ROOT_IMG_PACK . "test.gif";
133
+            $dest = _DIR_VAR . "test-gif.jpg";
134
+            $commande = "$giftopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
135
+            spip_log($commande);
136
+            exec($commande);
137
+            if ($taille = @getimagesize($dest)) {
138
+                if ($taille[1] == 10) {
139
+                    $netpbm_formats[] = "gif";
140
+                }
141
+            }
142
+
143
+            $pngtopnm_command = str_replace("pnmscale", "pngtopnm", _PNMSCALE_COMMAND);
144
+            $vignette = _ROOT_IMG_PACK . "test.png";
145
+            $dest = _DIR_VAR . "test-gif.jpg";
146
+            $commande = "$pngtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
147
+            spip_log($commande);
148
+            exec($commande);
149
+            if ($taille = @getimagesize($dest)) {
150
+                if ($taille[1] == 10) {
151
+                    $netpbm_formats[] = "png";
152
+                }
153
+            }
154
+
155
+
156
+            if ($netpbm_formats) {
157
+                $netpbm_formats = join(",", $netpbm_formats);
158
+            } else {
159
+                $netpbm_formats = '';
160
+            }
161
+            ecrire_meta("netpbm_formats", $netpbm_formats);
162
+        }
163
+    }
164
+
165
+    // et maintenant envoyer la vignette de tests
166
+    if (in_array($arg, array("gd1", "gd2", "imagick", "convert", "netpbm"))) {
167
+        include_spip('inc/filtres');
168
+        include_spip('inc/filtres_images_mini');
169
+        $taille_preview = 150;
170
+        $image = _image_valeurs_trans(_DIR_IMG_PACK . 'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
171
+
172
+        $image['fichier_dest'] = _DIR_VAR . "test_$arg";
173
+
174
+        if ($preview = _image_creer_vignette($image, $taille_preview, $taille_preview, $arg, true)
175
+            and ($preview['width'] * $preview['height'] > 0)
176
+        ) {
177
+            redirige_par_entete($preview['fichier']);
178
+        }
179
+    }
180
+
181
+    # image echec
182
+    redirige_par_entete(chemin_image('echec-reducteur-xx.svg'));
183 183
 }
Please login to merge, or discard this patch.
ecrire/public/phraser_html.php 4 patches
Doc Comments   +22 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,6 +102,10 @@  discard block
 block discarded – undo
102 102
 }
103 103
 
104 104
 // https://code.spip.net/@phraser_polyglotte
105
+/**
106
+ * @param string $texte
107
+ * @param integer $ligne
108
+ */
105 109
 function phraser_polyglotte($texte, $ligne, $result) {
106 110
 
107 111
 	if (preg_match_all(BALISE_POLYGLOTTE, $texte, $m, PREG_SET_ORDER)) {
@@ -266,6 +270,9 @@  discard block
 block discarded – undo
266 270
 // on recommence tant qu'il y a des [...] en substituant a l'appel suivant
267 271
 
268 272
 // https://code.spip.net/@phraser_champs_etendus
273
+/**
274
+ * @param integer $ligne
275
+ */
269 276
 function phraser_champs_etendus($texte, $ligne, $result) {
270 277
 	if ($texte === "") {
271 278
 		return $result;
@@ -314,6 +321,10 @@  discard block
 block discarded – undo
314 321
 }
315 322
 
316 323
 // https://code.spip.net/@phraser_arg
324
+/**
325
+ * @param string $texte
326
+ * @param string $sep
327
+ */
317 328
 function phraser_arg(&$texte, $sep, $result, &$pointeur_champ) {
318 329
 	preg_match(",^(\|?[^}{)|]*)(.*)$,ms", $texte, $match);
319 330
 	$suite = ltrim($match[2]);
@@ -451,6 +462,9 @@  discard block
 block discarded – undo
451 462
 
452 463
 
453 464
 // https://code.spip.net/@phraser_champs_exterieurs
465
+/**
466
+ * @param string $texte
467
+ */
454 468
 function phraser_champs_exterieurs($texte, $ligne, $sep, $nested) {
455 469
 	$res = array();
456 470
 	while (($p = strpos($texte, "%$sep")) !== false) {
@@ -470,6 +484,9 @@  discard block
 block discarded – undo
470 484
 }
471 485
 
472 486
 // https://code.spip.net/@phraser_champs_interieurs
487
+/**
488
+ * @param string $sep
489
+ */
473 490
 function phraser_champs_interieurs($texte, $ligne, $sep, $result) {
474 491
 	$i = 0; // en fait count($result)
475 492
 	$x = "";
@@ -766,6 +783,10 @@  discard block
 block discarded – undo
766 783
 }
767 784
 
768 785
 // https://code.spip.net/@phraser_critere_infixe
786
+/**
787
+ * @param string $arg1
788
+ * @param string $arg2
789
+ */
769 790
 function phraser_critere_infixe($arg1, $arg2, $args, $op, $not, $cond) {
770 791
 	$args[0] = new Texte;
771 792
 	$args[0]->texte = $arg1;
@@ -895,7 +916,7 @@  discard block
 block discarded – undo
895 916
  * @param $texte
896 917
  * @param $id_parent
897 918
  * @param $boucle
898
- * @param $pos_debut_texte
919
+ * @param integer $pos_debut_texte
899 920
  * @param $result
900 921
  * @return mixed
901 922
  */
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -48,19 +48,19 @@  discard block
 block discarded – undo
48 48
  * Nom d'une balise #TOTO
49 49
  *
50 50
  * Écriture alambiquée pour rester compatible avec les hexadecimaux des vieux squelettes */
51
-define('NOM_DE_CHAMP', "#((" . NOM_DE_BOUCLE . "):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})");
51
+define('NOM_DE_CHAMP', "#((".NOM_DE_BOUCLE."):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})");
52 52
 /** Balise complète [...(#TOTO) ... ] */
53
-define('CHAMP_ETENDU', '/\[([^]\[]*)\(' . NOM_DE_CHAMP . '([^[)]*\)[^]\[]*)\]/S');
53
+define('CHAMP_ETENDU', '/\[([^]\[]*)\('.NOM_DE_CHAMP.'([^[)]*\)[^]\[]*)\]/S');
54 54
 
55 55
 define('BALISE_INCLURE', '/<INCLU[DR]E[[:space:]]*(\(([^)]*)\))?/S');
56 56
 define('BALISE_POLYGLOTTE', ',<multi>(.*)</multi>,Uims');
57 57
 define('BALISE_IDIOMES', ',<:(([a-z0-9_]+):)?([a-z0-9_]*)({([^\|=>]*=[^\|>]*)})?((\|[^>]*)?:/?>),iS');
58
-define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*((' . NOM_DE_CHAMP . '[{][^}]*})?[^,]*)\s*,?\s*@s');
58
+define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*(('.NOM_DE_CHAMP.'[{][^}]*})?[^,]*)\s*,?\s*@s');
59 59
 
60 60
 /** Champ sql dans parenthèse ex: (id_article) */
61 61
 define('SQL_ARGS', '(\([^)]*\))');
62 62
 /** Fonction SQL sur un champ ex: SUM(visites) */
63
-define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)' . SQL_ARGS . '?`?');
63
+define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)'.SQL_ARGS.'?`?');
64 64
 
65 65
 // https://code.spip.net/@phraser_inclure
66 66
 function phraser_inclure($texte, $ligne, $result) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
  * @return array
218 218
  **/
219 219
 function phraser_champs($texte, $ligne, $result) {
220
-	while (preg_match("/" . NOM_DE_CHAMP . "/S", $texte, $match)) {
220
+	while (preg_match("/".NOM_DE_CHAMP."/S", $texte, $match)) {
221 221
 		$p = strpos($texte, $match[0]);
222 222
 		// texte après la balise
223 223
 		$suite = substr($texte, $p + strlen($match[0]));
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 			$collecte[] = $champ;
370 370
 			$args = ltrim($regs[count($regs) - 1]);
371 371
 		} else {
372
-			if (!preg_match("/" . NOM_DE_CHAMP . "([{|])/", $arg, $r)) {
372
+			if (!preg_match("/".NOM_DE_CHAMP."([{|])/", $arg, $r)) {
373 373
 				// 0 est un aveu d'impuissance. A completer
374 374
 				$arg = phraser_champs_exterieurs($arg, 0, $sep, $result);
375 375
 
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 function phraser_champs_exterieurs($texte, $ligne, $sep, $nested) {
455 455
 	$res = array();
456 456
 	while (($p = strpos($texte, "%$sep")) !== false) {
457
-		if (!preg_match(',^%' . preg_quote($sep) . '([0-9]+)@,', substr($texte, $p), $m)) {
457
+		if (!preg_match(',^%'.preg_quote($sep).'([0-9]+)@,', substr($texte, $p), $m)) {
458 458
 			break;
459 459
 		}
460 460
 		$debut = substr($texte, 0, $p);
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 			$pos_apres = 0;
496 496
 			$result = phraser_args($match[7], ")", $sep, $result, $champ, $pos_apres);
497 497
 			phraser_vieux($champ);
498
-			$champ->avant =	phraser_champs_exterieurs($match[1], $n, $sep, $result);
498
+			$champ->avant = phraser_champs_exterieurs($match[1], $n, $sep, $result);
499 499
 			$debut = substr($match[7], $pos_apres + 1);
500 500
 			if (!empty($debut)) {
501 501
 				$n += substr_count(substr($texte, 0, strpos($texte, $debut)), "\n");
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 					// une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"}
626 626
 					if (preg_match(',^(["\'])(.*)\1$,', $m[4])) {
627 627
 						$c = null;
628
-						eval('$c = ' . $m[4] . ';');
628
+						eval('$c = '.$m[4].';');
629 629
 						if (isset($c)) {
630 630
 							$m[4] = $c;
631 631
 						}
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
 
704 704
 					if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', $param, $m)) {
705 705
 						$crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', '');
706
-					} elseif (preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC .
706
+					} elseif (preg_match(',^([!]?)('.CHAMP_SQL_PLUS_FONC.
707 707
 						')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', $param, $m)) {
708 708
 						$a2 = trim($m[8]);
709 709
 						if ($a2 and ($a2[0] == "'" or $a2[0] == '"') and ($a2[0] == substr($a2, -1))) {
@@ -713,8 +713,8 @@  discard block
 block discarded – undo
713 713
 							(($m[2] == 'lang_select') ? $m[2] : $m[7]),
714 714
 							$m[6], $m[5]);
715 715
 						$crit->exclus = $m[1];
716
-					} elseif (preg_match("/^([!]?)\s*(" .
717
-						CHAMP_SQL_PLUS_FONC .
716
+					} elseif (preg_match("/^([!]?)\s*(".
717
+						CHAMP_SQL_PLUS_FONC.
718 718
 						")\s*(\??)(.*)$/is", $param, $m)) {
719 719
 						// contient aussi les comparaisons implicites !
720 720
 						// Comme ci-dessus: 
@@ -816,11 +816,11 @@  discard block
 block discarded – undo
816 816
 	$current_pos = $pos_debut_texte;
817 817
 	while (($pos_boucle = strpos($texte, BALISE_BOUCLE, $current_pos)) !== false) {
818 818
 		$current_pos = $pos_boucle + 1;
819
-		$pos_parent = strpos($texte,'(', $pos_boucle);
819
+		$pos_parent = strpos($texte, '(', $pos_boucle);
820 820
 
821 821
 		$id_boucle = '';
822 822
 		if ($pos_parent !== false) {
823
-			$id_boucle = trim(substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), $pos_parent - $pos_boucle - strlen(BALISE_BOUCLE)));
823
+			$id_boucle = trim(substr($texte, $pos_boucle + strlen(BALISE_BOUCLE), $pos_parent - $pos_boucle - strlen(BALISE_BOUCLE)));
824 824
 		}
825 825
 		if ($pos_parent === false
826 826
 		  or (strlen($id_boucle) and !(is_numeric($id_boucle) or strpos($id_boucle, '_') === 0))) {
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 
832 832
 			// un id_boucle pour l'affichage de l'erreur
833 833
 			if (!strlen($id_boucle)) {
834
-				$id_boucle = substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), 15);
834
+				$id_boucle = substr($texte, $pos_boucle + strlen(BALISE_BOUCLE), 15);
835 835
 			}
836 836
 			$result->id_boucle = $id_boucle;
837 837
 			$err_b = array('zbug_erreur_boucle_syntaxe', array('id' => $id_boucle));
@@ -854,11 +854,11 @@  discard block
 block discarded – undo
854 854
 
855 855
 			// un id_boucle pour l'affichage de l'erreur sur les boucle anonymes
856 856
 			if (!strlen($id_boucle)) {
857
-				$boucle['id_boucle_err'] = substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), 15);
857
+				$boucle['id_boucle_err'] = substr($texte, $pos_boucle + strlen(BALISE_BOUCLE), 15);
858 858
 			}
859 859
 
860 860
 			// trouver sa position de depart reelle : au <Bxx> ou au <BBxx>
861
-			$precond_boucle = BALISE_PRECOND_BOUCLE . $id_boucle . '>';
861
+			$precond_boucle = BALISE_PRECOND_BOUCLE.$id_boucle.'>';
862 862
 			$pos_precond = strpos($texte, $precond_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
863 863
 			if ($pos_precond !== false
864 864
 				and $pos_precond < $boucle['debut_boucle']) {
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
 				$boucle['pos_precond_inside'] = $pos_precond + strlen($precond_boucle);
868 868
 			}
869 869
 
870
-			$preaff_boucle = BALISE_PREAFF_BOUCLE . $id_boucle . '>';
870
+			$preaff_boucle = BALISE_PREAFF_BOUCLE.$id_boucle.'>';
871 871
 			$pos_preaff = strpos($texte, $preaff_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
872 872
 			if ($pos_preaff !== false
873 873
 				and $pos_preaff < $boucle['debut_boucle']) {
@@ -913,26 +913,26 @@  discard block
 block discarded – undo
913 913
 	$pos_anonyme_next = null;
914 914
 	// si c'est une boucle anonyme, chercher la position de la prochaine boucle anonyme
915 915
 	if (!strlen($id_boucle)) {
916
-		$pos_anonyme_next = strpos($texte, BALISE_BOUCLE . '(', $pos_courante);
916
+		$pos_anonyme_next = strpos($texte, BALISE_BOUCLE.'(', $pos_courante);
917 917
 	}
918 918
 
919 919
 	//
920 920
 	// 1. Recuperer la partie conditionnelle apres
921 921
 	//
922
-	$apres_boucle = BALISE_POSTCOND_BOUCLE . $id_boucle . ">";
922
+	$apres_boucle = BALISE_POSTCOND_BOUCLE.$id_boucle.">";
923 923
 	$pos_apres = strpos($texte, $apres_boucle, $pos_courante);
924 924
 	if ($pos_apres !== false
925 925
 		and (!$pos_anonyme_next or $pos_apres < $pos_anonyme_next)) {
926 926
 		$boucle['pos_postcond'] = $pos_apres;
927 927
 		$pos_apres += strlen($apres_boucle);
928 928
 		$boucle['pos_postcond_inside'] = $pos_apres;
929
-		$pos_courante = $pos_apres ;
929
+		$pos_courante = $pos_apres;
930 930
 	}
931 931
 
932 932
 	//
933 933
 	// 2. Récuperer la partie alternative apres
934 934
 	//
935
-	$altern_boucle = BALISE_ALT_BOUCLE . $id_boucle . ">";
935
+	$altern_boucle = BALISE_ALT_BOUCLE.$id_boucle.">";
936 936
 	$pos_altern = strpos($texte, $altern_boucle, $pos_courante);
937 937
 	if ($pos_altern !== false
938 938
 		and (!$pos_anonyme_next or $pos_altern < $pos_anonyme_next)) {
@@ -945,14 +945,14 @@  discard block
 block discarded – undo
945 945
 	//
946 946
 	// 3. Recuperer la partie footer non alternative
947 947
 	//
948
-	$postaff_boucle = BALISE_POSTAFF_BOUCLE . $id_boucle . ">";
948
+	$postaff_boucle = BALISE_POSTAFF_BOUCLE.$id_boucle.">";
949 949
 	$pos_postaff = strpos($texte, $postaff_boucle, $pos_courante);
950 950
 	if ($pos_postaff !== false
951 951
 	  and (!$pos_anonyme_next or $pos_postaff < $pos_anonyme_next)) {
952 952
 		$boucle['pos_postaff'] = $pos_postaff;
953 953
 		$pos_postaff += strlen($postaff_boucle);
954 954
 		$boucle['pos_postaff_inside'] = $pos_postaff;
955
-		$pos_courante = $pos_postaff ;
955
+		$pos_courante = $pos_postaff;
956 956
 	}
957 957
 
958 958
 	return $boucle;
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
  * @param null|string $boucle_placeholder
965 965
  * @param null|object $boucle
966 966
  */
967
-function phraser_boucle_placeholder(&$champ, $boucle_placeholder=null, $boucle = null) {
967
+function phraser_boucle_placeholder(&$champ, $boucle_placeholder = null, $boucle = null) {
968 968
 	static $boucles_connues = array();
969 969
 	// si c'est un appel pour memoriser une boucle, memorisons la
970 970
 	if (is_string($champ) and !empty($boucle_placeholder) and !empty($boucle)) {
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
  * @return string
993 993
  */
994 994
 function public_generer_boucle_placeholder($id_boucle, &$boucle, $boucle_placeholder, $nb_lignes) {
995
-	$placeholder = "[(#{$boucle_placeholder}{" . $id_boucle . '})' . str_pad("", $nb_lignes, "\n") . "]";
995
+	$placeholder = "[(#{$boucle_placeholder}{".$id_boucle.'})'.str_pad("", $nb_lignes, "\n")."]";
996 996
 	//memoriser la boucle a reinjecter
997 997
 	$id_boucle = "$id_boucle";
998 998
 	phraser_boucle_placeholder($id_boucle, $boucle_placeholder, $boucle);
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
 	// definir un placholder pour les boucles dont on est sur d'avoir aucune occurence dans le squelette
1006 1006
 	if (is_null($boucle_placeholder)) {
1007 1007
 		do {
1008
-			$boucle_placeholder = "BOUCLE_PLACEHOLDER_" . strtoupper(md5(uniqid()));
1008
+			$boucle_placeholder = "BOUCLE_PLACEHOLDER_".strtoupper(md5(uniqid()));
1009 1009
 		} while (strpos($texte, $boucle_placeholder) !== false);
1010 1010
 	}
1011 1011
 
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 
1026 1026
 		// boucle anonyme ?
1027 1027
 		if (!strlen($id_boucle)) {
1028
-			$id_boucle = '_anon_L' . $ligne_milieu . '_' . substr(md5('anonyme:' .$id_parent.':'. json_encode($boucle)), 0, 8);
1028
+			$id_boucle = '_anon_L'.$ligne_milieu.'_'.substr(md5('anonyme:'.$id_parent.':'.json_encode($boucle)), 0, 8);
1029 1029
 		}
1030 1030
 
1031 1031
 		$pos_debut_boucle = $pos_courante;
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
 
1040 1040
 			$pos_avant = $boucle['pos_precond_inside'];
1041 1041
 			$result->avant = substr($texte, $pos_avant, $pos_courante - $pos_avant);
1042
-			$ligne_avant = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1042
+			$ligne_avant = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1043 1043
 		}
1044 1044
 
1045 1045
 		// Regarder si on a une partie inconditionnelle avant <BB_xxx>
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
 
1050 1050
 			$pos_preaff = $boucle['pos_preaff_inside'];
1051 1051
 			$result->preaff = substr($texte, $pos_preaff, $end_preaff - $pos_preaff);
1052
-			$ligne_preaff = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1052
+			$ligne_preaff = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1053 1053
 		}
1054 1054
 
1055 1055
 		$result->id_boucle = $id_boucle;
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
 		} else {
1106 1106
 			$pos_milieu += 1;
1107 1107
 
1108
-			$fin_boucle = BALISE_FIN_BOUCLE . $id_boucle_search . ">";
1108
+			$fin_boucle = BALISE_FIN_BOUCLE.$id_boucle_search.">";
1109 1109
 			$pos_fin = strpos($texte, $fin_boucle, $pos_milieu);
1110 1110
 			if ($pos_fin === false) {
1111 1111
 				$err_b = array(
@@ -1118,7 +1118,7 @@  discard block
 block discarded – undo
1118 1118
 			else {
1119 1119
 				// verifier une eventuelle imbrication d'une boucle homonyme
1120 1120
 				// (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1121
-				$search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
1121
+				$search_debut_boucle = BALISE_BOUCLE.$id_boucle_search.'(';
1122 1122
 				$search_from = $pos_milieu;
1123 1123
 				$nb_open = 1;
1124 1124
 				$nb_close = 1;
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
 						$nb_open++;
1139 1139
 						$search_from = $p + 1;
1140 1140
 					}
1141
-				} while($nb_close < $nb_open and $maxiter++ < 5);
1141
+				} while ($nb_close < $nb_open and $maxiter++ < 5);
1142 1142
 
1143 1143
 				$pos_courante = $pos_fin + strlen($fin_boucle);
1144 1144
 			}
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
 		if ($boucle['pos_postcond']) {
1155 1155
 			$result->apres = substr($texte, $pos_courante, $boucle['pos_postcond'] - $pos_courante);
1156 1156
 			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postcond_inside']);
1157
-			$pos_courante = $boucle['pos_postcond_inside'] ;
1157
+			$pos_courante = $boucle['pos_postcond_inside'];
1158 1158
 		}
1159 1159
 
1160 1160
 
@@ -1210,7 +1210,7 @@  discard block
 block discarded – undo
1210 1210
 		// reserver la place dans la pile des boucles pour compiler ensuite dans le bon ordre
1211 1211
 		// ie les boucles qui apparaissent dans les partie conditionnelles doivent etre compilees apres cette boucle
1212 1212
 		// si il y a deja une boucle de ce nom, cela declenchera une erreur ensuite
1213
-		if (empty($boucles[$id_boucle])){
1213
+		if (empty($boucles[$id_boucle])) {
1214 1214
 			$boucles[$id_boucle] = null;
1215 1215
 		}
1216 1216
 		$result->preaff = public_phraser_html_dist($result->preaff, $id_parent, $boucles, $descr, $ligne_preaff, $boucle_placeholder);
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -791,8 +791,7 @@  discard block
 block discarded – undo
791 791
 function public_compte_ligne($texte, $debut = 0, $fin = null) {
792 792
 	if (is_null($fin)) {
793 793
 		return substr_count($texte, "\n", $debut);
794
-	}
795
-	else {
794
+	} else {
796 795
 		return substr_count($texte, "\n", $debut, $fin - $debut);
797 796
 	}
798 797
 }
@@ -838,8 +837,7 @@  discard block
 block discarded – undo
838 837
 			erreur_squelette($err_b, $result);
839 838
 
840 839
 			continue;
841
-		}
842
-		else {
840
+		} else {
843 841
 			$boucle = [
844 842
 				'id_boucle' => $id_boucle,
845 843
 				'id_boucle_err' => $id_boucle,
@@ -969,8 +967,7 @@  discard block
 block discarded – undo
969 967
 	// si c'est un appel pour memoriser une boucle, memorisons la
970 968
 	if (is_string($champ) and !empty($boucle_placeholder) and !empty($boucle)) {
971 969
 		$boucles_connues[$boucle_placeholder][$champ] = &$boucle;
972
-	}
973
-	else {
970
+	} else {
974 971
 		if (!empty($champ->nom_champ) and !empty($boucles_connues[$champ->nom_champ])) {
975 972
 			$placeholder = $champ->nom_champ;
976 973
 			$id = reset($champ->param[0][1]);
@@ -1114,8 +1111,7 @@  discard block
 block discarded – undo
1114 1111
 				);
1115 1112
 				erreur_squelette($err_b, $result);
1116 1113
 				$pos_courante += strlen($fin_boucle);
1117
-			}
1118
-			else {
1114
+			} else {
1119 1115
 				// verifier une eventuelle imbrication d'une boucle homonyme
1120 1116
 				// (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1121 1117
 				$search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
Please login to merge, or discard this patch.
Indentation   +1005 added lines, -1005 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  **/
21 21
 
22 22
 if (!defined('_ECRIRE_INC_VERSION')) {
23
-	return;
23
+    return;
24 24
 }
25 25
 
26 26
 /** Début de la partie principale d'une boucle */
@@ -65,83 +65,83 @@  discard block
 block discarded – undo
65 65
 // https://code.spip.net/@phraser_inclure
66 66
 function phraser_inclure($texte, $ligne, $result) {
67 67
 
68
-	while (preg_match(BALISE_INCLURE, $texte, $match)) {
69
-		$match = array_pad($match, 3, null);
70
-		$p = strpos($texte, $match[0]);
71
-		$debut = substr($texte, 0, $p);
72
-		if ($p) {
73
-			$result = phraser_idiomes($debut, $ligne, $result);
74
-		}
75
-		$ligne += substr_count($debut, "\n");
76
-		$champ = new Inclure;
77
-		$champ->ligne = $ligne;
78
-		$ligne += substr_count($match[0], "\n");
79
-		$fichier = $match[2];
80
-		# assurer ici la migration .php3 => .php
81
-		# et de l'ancienne syntaxe INCLURE(page.php3) devenue surperflue
82
-		if ($fichier and preg_match(',^(.*[.]php)3$,', $fichier, $r)) {
83
-			$fichier = $r[1];
84
-		}
85
-		$champ->texte = ($fichier !== 'page.php') ? $fichier : '';
86
-		$texte = substr($texte, $p + strlen($match[0]));
87
-		// on assimile {var=val} a une liste de un argument sans fonction
88
-		$pos_apres = 0;
89
-		phraser_args($texte, "/>", "", $result, $champ, $pos_apres);
90
-		if (!$champ->texte or count($champ->param) > 1) {
91
-			if (!function_exists('normaliser_inclure')) {
92
-				include_spip('public/normaliser');
93
-			}
94
-			normaliser_inclure($champ);
95
-		}
96
-		$texte = substr($texte, strpos($texte, '>', $pos_apres) + 1);
97
-		$texte = preg_replace(',^</INCLU[DR]E>,', '', $texte);
98
-		$result[] = $champ;
99
-	}
100
-
101
-	return (($texte === "") ? $result : phraser_idiomes($texte, $ligne, $result));
68
+    while (preg_match(BALISE_INCLURE, $texte, $match)) {
69
+        $match = array_pad($match, 3, null);
70
+        $p = strpos($texte, $match[0]);
71
+        $debut = substr($texte, 0, $p);
72
+        if ($p) {
73
+            $result = phraser_idiomes($debut, $ligne, $result);
74
+        }
75
+        $ligne += substr_count($debut, "\n");
76
+        $champ = new Inclure;
77
+        $champ->ligne = $ligne;
78
+        $ligne += substr_count($match[0], "\n");
79
+        $fichier = $match[2];
80
+        # assurer ici la migration .php3 => .php
81
+        # et de l'ancienne syntaxe INCLURE(page.php3) devenue surperflue
82
+        if ($fichier and preg_match(',^(.*[.]php)3$,', $fichier, $r)) {
83
+            $fichier = $r[1];
84
+        }
85
+        $champ->texte = ($fichier !== 'page.php') ? $fichier : '';
86
+        $texte = substr($texte, $p + strlen($match[0]));
87
+        // on assimile {var=val} a une liste de un argument sans fonction
88
+        $pos_apres = 0;
89
+        phraser_args($texte, "/>", "", $result, $champ, $pos_apres);
90
+        if (!$champ->texte or count($champ->param) > 1) {
91
+            if (!function_exists('normaliser_inclure')) {
92
+                include_spip('public/normaliser');
93
+            }
94
+            normaliser_inclure($champ);
95
+        }
96
+        $texte = substr($texte, strpos($texte, '>', $pos_apres) + 1);
97
+        $texte = preg_replace(',^</INCLU[DR]E>,', '', $texte);
98
+        $result[] = $champ;
99
+    }
100
+
101
+    return (($texte === "") ? $result : phraser_idiomes($texte, $ligne, $result));
102 102
 }
103 103
 
104 104
 // https://code.spip.net/@phraser_polyglotte
105 105
 function phraser_polyglotte($texte, $ligne, $result) {
106 106
 
107
-	if (preg_match_all(BALISE_POLYGLOTTE, $texte, $m, PREG_SET_ORDER)) {
108
-		foreach ($m as $match) {
109
-			$p = strpos($texte, $match[0]);
110
-			$debut = substr($texte, 0, $p);
111
-			if ($p) {
112
-				$champ = new Texte;
113
-				$champ->texte = $debut;
114
-				$champ->ligne = $ligne;
115
-				$result[] = $champ;
116
-				$ligne += substr_count($champ->texte, "\n");
117
-			}
118
-
119
-			$champ = new Polyglotte;
120
-			$champ->ligne = $ligne;
121
-			$ligne += substr_count($match[0], "\n");
122
-			$lang = '';
123
-			$bloc = $match[1];
124
-			$texte = substr($texte, $p + strlen($match[0]));
125
-			while (preg_match("/^[[:space:]]*([^[{]*)[[:space:]]*[[{]([a-z_]+)[]}](.*)$/si", $bloc, $regs)) {
126
-				$trad = $regs[1];
127
-				if ($trad or $lang) {
128
-					$champ->traductions[$lang] = $trad;
129
-				}
130
-				$lang = $regs[2];
131
-				$bloc = $regs[3];
132
-			}
133
-			$champ->traductions[$lang] = $bloc;
134
-			$result[] = $champ;
135
-		}
136
-	}
137
-	if ($texte !== "") {
138
-		$champ = new Texte;
139
-		$champ->texte = $texte;
140
-		$champ->ligne = $ligne;
141
-		$result[] = $champ;
142
-	}
143
-
144
-	return $result;
107
+    if (preg_match_all(BALISE_POLYGLOTTE, $texte, $m, PREG_SET_ORDER)) {
108
+        foreach ($m as $match) {
109
+            $p = strpos($texte, $match[0]);
110
+            $debut = substr($texte, 0, $p);
111
+            if ($p) {
112
+                $champ = new Texte;
113
+                $champ->texte = $debut;
114
+                $champ->ligne = $ligne;
115
+                $result[] = $champ;
116
+                $ligne += substr_count($champ->texte, "\n");
117
+            }
118
+
119
+            $champ = new Polyglotte;
120
+            $champ->ligne = $ligne;
121
+            $ligne += substr_count($match[0], "\n");
122
+            $lang = '';
123
+            $bloc = $match[1];
124
+            $texte = substr($texte, $p + strlen($match[0]));
125
+            while (preg_match("/^[[:space:]]*([^[{]*)[[:space:]]*[[{]([a-z_]+)[]}](.*)$/si", $bloc, $regs)) {
126
+                $trad = $regs[1];
127
+                if ($trad or $lang) {
128
+                    $champ->traductions[$lang] = $trad;
129
+                }
130
+                $lang = $regs[2];
131
+                $bloc = $regs[3];
132
+            }
133
+            $champ->traductions[$lang] = $bloc;
134
+            $result[] = $champ;
135
+        }
136
+    }
137
+    if ($texte !== "") {
138
+        $champ = new Texte;
139
+        $champ->texte = $texte;
140
+        $champ->ligne = $ligne;
141
+        $result[] = $champ;
142
+    }
143
+
144
+    return $result;
145 145
 }
146 146
 
147 147
 
@@ -163,43 +163,43 @@  discard block
 block discarded – undo
163 163
  * @return array
164 164
  **/
165 165
 function phraser_idiomes($texte, $ligne, $result) {
166
-	while (preg_match(BALISE_IDIOMES, $texte, $match)) {
167
-		$match = array_pad($match, 8, null);
168
-		$p = strpos($texte, $match[0]);
169
-		$ko = (!$match[3] && ($match[5][0] !== '='));
170
-		$debut = substr($texte, 0, $p + ($ko ? strlen($match[0]) : 0));
171
-		if ($debut) {
172
-			$result = phraser_champs($debut, $ligne, $result);
173
-		}
174
-		$texte = substr($texte, $p + strlen($match[0]));
175
-		$ligne += substr_count($debut, "\n");
176
-		if ($ko) {
177
-			continue;
178
-		} // faux idiome
179
-		$champ = new Idiome;
180
-		$champ->ligne = $ligne;
181
-		$ligne += substr_count($match[0], "\n");
182
-		// Stocker les arguments de la balise de traduction
183
-		$args = array();
184
-		$largs = $match[5];
185
-		while (preg_match(BALISE_IDIOMES_ARGS, $largs, $r)) {
186
-			$args[$r[1]] = phraser_champs($r[2], 0, array());
187
-			$largs = substr($largs, strlen($r[0]));
188
-		}
189
-		$champ->arg = $args;
190
-		$champ->nom_champ = strtolower($match[3]);
191
-		$champ->module = $match[2];
192
-		// pas d'imbrication pour les filtres sur langue
193
-		$pos_apres = 0;
194
-		phraser_args($match[7], ":", '', array(), $champ, $pos_apres);
195
-		$champ->apres = substr($match[7], $pos_apres);
196
-		$result[] = $champ;
197
-	}
198
-	if ($texte !== "") {
199
-		$result = phraser_champs($texte, $ligne, $result);
200
-	}
201
-
202
-	return $result;
166
+    while (preg_match(BALISE_IDIOMES, $texte, $match)) {
167
+        $match = array_pad($match, 8, null);
168
+        $p = strpos($texte, $match[0]);
169
+        $ko = (!$match[3] && ($match[5][0] !== '='));
170
+        $debut = substr($texte, 0, $p + ($ko ? strlen($match[0]) : 0));
171
+        if ($debut) {
172
+            $result = phraser_champs($debut, $ligne, $result);
173
+        }
174
+        $texte = substr($texte, $p + strlen($match[0]));
175
+        $ligne += substr_count($debut, "\n");
176
+        if ($ko) {
177
+            continue;
178
+        } // faux idiome
179
+        $champ = new Idiome;
180
+        $champ->ligne = $ligne;
181
+        $ligne += substr_count($match[0], "\n");
182
+        // Stocker les arguments de la balise de traduction
183
+        $args = array();
184
+        $largs = $match[5];
185
+        while (preg_match(BALISE_IDIOMES_ARGS, $largs, $r)) {
186
+            $args[$r[1]] = phraser_champs($r[2], 0, array());
187
+            $largs = substr($largs, strlen($r[0]));
188
+        }
189
+        $champ->arg = $args;
190
+        $champ->nom_champ = strtolower($match[3]);
191
+        $champ->module = $match[2];
192
+        // pas d'imbrication pour les filtres sur langue
193
+        $pos_apres = 0;
194
+        phraser_args($match[7], ":", '', array(), $champ, $pos_apres);
195
+        $champ->apres = substr($match[7], $pos_apres);
196
+        $result[] = $champ;
197
+    }
198
+    if ($texte !== "") {
199
+        $result = phraser_champs($texte, $ligne, $result);
200
+    }
201
+
202
+    return $result;
203 203
 }
204 204
 
205 205
 /**
@@ -217,47 +217,47 @@  discard block
 block discarded – undo
217 217
  * @return array
218 218
  **/
219 219
 function phraser_champs($texte, $ligne, $result) {
220
-	while (preg_match("/" . NOM_DE_CHAMP . "/S", $texte, $match)) {
221
-		$p = strpos($texte, $match[0]);
222
-		// texte après la balise
223
-		$suite = substr($texte, $p + strlen($match[0]));
224
-
225
-		$debut = substr($texte, 0, $p);
226
-		if ($p) {
227
-			$result = phraser_polyglotte($debut, $ligne, $result);
228
-		}
229
-		$ligne += substr_count($debut, "\n");
230
-		$champ = new Champ;
231
-		$champ->ligne = $ligne;
232
-		$ligne += substr_count($match[0], "\n");
233
-		$champ->nom_boucle = $match[2];
234
-		$champ->nom_champ = $match[3];
235
-		$champ->etoile = $match[5];
236
-
237
-		if ($suite and $suite[0] == '{') {
238
-			phraser_arg($suite, '', array(), $champ);
239
-			// ce ltrim est une ereur de conception
240
-			// mais on le conserve par souci de compatibilite
241
-			$texte = ltrim($suite);
242
-			// Il faudrait le normaliser dans l'arbre de syntaxe abstraite
243
-			// pour faire sauter ce cas particulier a la decompilation.
244
-			/* Ce qui suit est malheureusement incomplet pour cela:
220
+    while (preg_match("/" . NOM_DE_CHAMP . "/S", $texte, $match)) {
221
+        $p = strpos($texte, $match[0]);
222
+        // texte après la balise
223
+        $suite = substr($texte, $p + strlen($match[0]));
224
+
225
+        $debut = substr($texte, 0, $p);
226
+        if ($p) {
227
+            $result = phraser_polyglotte($debut, $ligne, $result);
228
+        }
229
+        $ligne += substr_count($debut, "\n");
230
+        $champ = new Champ;
231
+        $champ->ligne = $ligne;
232
+        $ligne += substr_count($match[0], "\n");
233
+        $champ->nom_boucle = $match[2];
234
+        $champ->nom_champ = $match[3];
235
+        $champ->etoile = $match[5];
236
+
237
+        if ($suite and $suite[0] == '{') {
238
+            phraser_arg($suite, '', array(), $champ);
239
+            // ce ltrim est une ereur de conception
240
+            // mais on le conserve par souci de compatibilite
241
+            $texte = ltrim($suite);
242
+            // Il faudrait le normaliser dans l'arbre de syntaxe abstraite
243
+            // pour faire sauter ce cas particulier a la decompilation.
244
+            /* Ce qui suit est malheureusement incomplet pour cela:
245 245
 			if ($n = (strlen($suite) - strlen($texte))) {
246 246
 				$champ->apres = array(new Texte);
247 247
 				$champ->apres[0]->texte = substr($suite,0,$n);
248 248
 			}
249 249
 			*/
250
-		} else {
251
-			$texte = $suite;
252
-		}
253
-		phraser_vieux($champ);
254
-		$result[] = $champ;
255
-	}
256
-	if ($texte !== "") {
257
-		$result = phraser_polyglotte($texte, $ligne, $result);
258
-	}
259
-
260
-	return $result;
250
+        } else {
251
+            $texte = $suite;
252
+        }
253
+        phraser_vieux($champ);
254
+        $result[] = $champ;
255
+    }
256
+    if ($texte !== "") {
257
+        $result = phraser_polyglotte($texte, $ligne, $result);
258
+    }
259
+
260
+    return $result;
261 261
 }
262 262
 
263 263
 // Gestion des imbrications:
@@ -267,15 +267,15 @@  discard block
 block discarded – undo
267 267
 
268 268
 // https://code.spip.net/@phraser_champs_etendus
269 269
 function phraser_champs_etendus($texte, $ligne, $result) {
270
-	if ($texte === "") {
271
-		return $result;
272
-	}
273
-	$sep = '##';
274
-	while (strpos($texte, $sep) !== false) {
275
-		$sep .= '#';
276
-	}
277
-
278
-	return array_merge($result, phraser_champs_interieurs($texte, $ligne, $sep, array()));
270
+    if ($texte === "") {
271
+        return $result;
272
+    }
273
+    $sep = '##';
274
+    while (strpos($texte, $sep) !== false) {
275
+        $sep .= '#';
276
+    }
277
+
278
+    return array_merge($result, phraser_champs_interieurs($texte, $ligne, $sep, array()));
279 279
 }
280 280
 
281 281
 /**
@@ -296,278 +296,278 @@  discard block
 block discarded – undo
296 296
  * @return array
297 297
  */
298 298
 function phraser_args($texte, $fin, $sep, $result, &$pointeur_champ, &$pos_debut) {
299
-	$length = strlen($texte);
300
-	while ($pos_debut < $length and trim($texte[$pos_debut]) === '') {
301
-		$pos_debut++;
302
-	}
303
-	while (($pos_debut < $length) && strpos($fin, $texte[$pos_debut]) === false) {
304
-		// phraser_arg modifie directement le $texte, on fait donc avec ici en passant par une sous chaine
305
-		$st = substr($texte, $pos_debut);
306
-		$result = phraser_arg($st, $sep, $result, $pointeur_champ);
307
-		$pos_debut = $length - strlen($st);
308
-		while ($pos_debut < $length and trim($texte[$pos_debut]) === '') {
309
-			$pos_debut++;
310
-		}
311
-	}
312
-
313
-	return $result;
299
+    $length = strlen($texte);
300
+    while ($pos_debut < $length and trim($texte[$pos_debut]) === '') {
301
+        $pos_debut++;
302
+    }
303
+    while (($pos_debut < $length) && strpos($fin, $texte[$pos_debut]) === false) {
304
+        // phraser_arg modifie directement le $texte, on fait donc avec ici en passant par une sous chaine
305
+        $st = substr($texte, $pos_debut);
306
+        $result = phraser_arg($st, $sep, $result, $pointeur_champ);
307
+        $pos_debut = $length - strlen($st);
308
+        while ($pos_debut < $length and trim($texte[$pos_debut]) === '') {
309
+            $pos_debut++;
310
+        }
311
+    }
312
+
313
+    return $result;
314 314
 }
315 315
 
316 316
 // https://code.spip.net/@phraser_arg
317 317
 function phraser_arg(&$texte, $sep, $result, &$pointeur_champ) {
318
-	preg_match(",^(\|?[^}{)|]*)(.*)$,ms", $texte, $match);
319
-	$suite = ltrim($match[2]);
320
-	$fonc = trim($match[1]);
321
-	if ($fonc && $fonc[0] == "|") {
322
-		$fonc = ltrim(substr($fonc, 1));
323
-	}
324
-	$res = array($fonc);
325
-	$err_f = '';
326
-	// cas du filtre sans argument ou du critere /
327
-	if (($suite && ($suite[0] != '{')) || ($fonc && $fonc[0] == '/')) {
328
-		// si pas d'argument, alors il faut une fonction ou un double |
329
-		if (!$match[1]) {
330
-			$err_f = array('zbug_erreur_filtre', array('filtre' => $texte));
331
-			erreur_squelette($err_f, $pointeur_champ);
332
-			$texte = '';
333
-		} else {
334
-			$texte = $suite;
335
-		}
336
-		if ($err_f) {
337
-			$pointeur_champ->param = false;
338
-		} elseif ($fonc !== '') {
339
-			$pointeur_champ->param[] = $res;
340
-		}
341
-		// pour les balises avec faux filtres qui boudent ce dur larbeur
342
-		$pointeur_champ->fonctions[] = array($fonc, '');
343
-
344
-		return $result;
345
-	}
346
-	$args = ltrim(substr($suite, 1)); // virer le '(' initial
347
-	$collecte = array();
348
-	while ($args && $args[0] != '}') {
349
-		if ($args[0] == '"') {
350
-			preg_match('/^(")([^"]*)(")(.*)$/ms', $args, $regs);
351
-		} elseif ($args[0] == "'") {
352
-			preg_match("/^(')([^']*)(')(.*)$/ms", $args, $regs);
353
-		} else {
354
-			preg_match("/^([[:space:]]*)([^,([{}]*([(\[{][^])}]*[])}])?[^,}]*)([,}].*)$/ms", $args, $regs);
355
-			if (!isset($regs[2]) or !strlen($regs[2])) {
356
-				$err_f = array('zbug_erreur_filtre', array('filtre' => $args));
357
-				erreur_squelette($err_f, $pointeur_champ);
358
-				$champ = new Texte;
359
-				$champ->apres = $champ->avant = $args = "";
360
-				break;
361
-			}
362
-		}
363
-		$arg = $regs[2];
364
-		if (trim($regs[1])) {
365
-			$champ = new Texte;
366
-			$champ->texte = $arg;
367
-			$champ->apres = $champ->avant = $regs[1];
368
-			$result[] = $champ;
369
-			$collecte[] = $champ;
370
-			$args = ltrim($regs[count($regs) - 1]);
371
-		} else {
372
-			if (!preg_match("/" . NOM_DE_CHAMP . "([{|])/", $arg, $r)) {
373
-				// 0 est un aveu d'impuissance. A completer
374
-				$arg = phraser_champs_exterieurs($arg, 0, $sep, $result);
375
-
376
-				$args = ltrim($regs[count($regs) - 1]);
377
-				$collecte = array_merge($collecte, $arg);
378
-				$result = array_merge($result, $arg);
379
-			} else {
380
-				$n = strpos($args, $r[0]);
381
-				$pred = substr($args, 0, $n);
382
-				$par = ',}';
383
-				if (preg_match('/^(.*)\($/', $pred, $m)) {
384
-					$pred = $m[1];
385
-					$par = ')';
386
-				}
387
-				if ($pred) {
388
-					$champ = new Texte;
389
-					$champ->texte = $pred;
390
-					$champ->apres = $champ->avant = "";
391
-					$result[] = $champ;
392
-					$collecte[] = $champ;
393
-				}
394
-				$rec = substr($args, $n + strlen($r[0]) - 1);
395
-				$champ = new Champ;
396
-				$champ->nom_boucle = $r[2];
397
-				$champ->nom_champ = $r[3];
398
-				$champ->etoile = $r[5];
399
-				$next = $r[6];
400
-				while ($next == '{') {
401
-					phraser_arg($rec, $sep, array(), $champ);
402
-					$args = ltrim($rec);
403
-					$next = isset($args[0]) ? $args[0] : '';
404
-				}
405
-				while ($next == '|') {
406
-					$pos_apres = 0;
407
-					phraser_args($rec, $par, $sep, array(), $champ, $pos_apres);
408
-					$args = substr($rec, $pos_apres);
409
-					$next = isset($args[0]) ? $args[0] : '';
410
-				}
411
-				// Si erreur de syntaxe dans un sous-argument, propager.
412
-				if ($champ->param === false) {
413
-					$err_f = true;
414
-				} else {
415
-					phraser_vieux($champ);
416
-				}
417
-				if ($par == ')') {
418
-					$args = substr($args, 1);
419
-				}
420
-				$collecte[] = $champ;
421
-				$result[] = $champ;
422
-			}
423
-		}
424
-		if (isset($args[0]) and $args[0] == ',') {
425
-			$args = ltrim(substr($args, 1));
426
-			if ($collecte) {
427
-				$res[] = $collecte;
428
-				$collecte = array();
429
-			}
430
-		}
431
-	}
432
-	if ($collecte) {
433
-		$res[] = $collecte;
434
-		$collecte = array();
435
-	}
436
-	$texte = substr($args, 1);
437
-	$source = substr($suite, 0, strlen($suite) - strlen($texte));
438
-	// propager les erreurs, et ignorer les param vides
439
-	if ($pointeur_champ->param !== false) {
440
-		if ($err_f) {
441
-			$pointeur_champ->param = false;
442
-		} elseif ($fonc !== '' || count($res) > 1) {
443
-			$pointeur_champ->param[] = $res;
444
-		}
445
-	}
446
-	// pour les balises avec faux filtres qui boudent ce dur larbeur
447
-	$pointeur_champ->fonctions[] = array($fonc, $source);
448
-
449
-	return $result;
318
+    preg_match(",^(\|?[^}{)|]*)(.*)$,ms", $texte, $match);
319
+    $suite = ltrim($match[2]);
320
+    $fonc = trim($match[1]);
321
+    if ($fonc && $fonc[0] == "|") {
322
+        $fonc = ltrim(substr($fonc, 1));
323
+    }
324
+    $res = array($fonc);
325
+    $err_f = '';
326
+    // cas du filtre sans argument ou du critere /
327
+    if (($suite && ($suite[0] != '{')) || ($fonc && $fonc[0] == '/')) {
328
+        // si pas d'argument, alors il faut une fonction ou un double |
329
+        if (!$match[1]) {
330
+            $err_f = array('zbug_erreur_filtre', array('filtre' => $texte));
331
+            erreur_squelette($err_f, $pointeur_champ);
332
+            $texte = '';
333
+        } else {
334
+            $texte = $suite;
335
+        }
336
+        if ($err_f) {
337
+            $pointeur_champ->param = false;
338
+        } elseif ($fonc !== '') {
339
+            $pointeur_champ->param[] = $res;
340
+        }
341
+        // pour les balises avec faux filtres qui boudent ce dur larbeur
342
+        $pointeur_champ->fonctions[] = array($fonc, '');
343
+
344
+        return $result;
345
+    }
346
+    $args = ltrim(substr($suite, 1)); // virer le '(' initial
347
+    $collecte = array();
348
+    while ($args && $args[0] != '}') {
349
+        if ($args[0] == '"') {
350
+            preg_match('/^(")([^"]*)(")(.*)$/ms', $args, $regs);
351
+        } elseif ($args[0] == "'") {
352
+            preg_match("/^(')([^']*)(')(.*)$/ms", $args, $regs);
353
+        } else {
354
+            preg_match("/^([[:space:]]*)([^,([{}]*([(\[{][^])}]*[])}])?[^,}]*)([,}].*)$/ms", $args, $regs);
355
+            if (!isset($regs[2]) or !strlen($regs[2])) {
356
+                $err_f = array('zbug_erreur_filtre', array('filtre' => $args));
357
+                erreur_squelette($err_f, $pointeur_champ);
358
+                $champ = new Texte;
359
+                $champ->apres = $champ->avant = $args = "";
360
+                break;
361
+            }
362
+        }
363
+        $arg = $regs[2];
364
+        if (trim($regs[1])) {
365
+            $champ = new Texte;
366
+            $champ->texte = $arg;
367
+            $champ->apres = $champ->avant = $regs[1];
368
+            $result[] = $champ;
369
+            $collecte[] = $champ;
370
+            $args = ltrim($regs[count($regs) - 1]);
371
+        } else {
372
+            if (!preg_match("/" . NOM_DE_CHAMP . "([{|])/", $arg, $r)) {
373
+                // 0 est un aveu d'impuissance. A completer
374
+                $arg = phraser_champs_exterieurs($arg, 0, $sep, $result);
375
+
376
+                $args = ltrim($regs[count($regs) - 1]);
377
+                $collecte = array_merge($collecte, $arg);
378
+                $result = array_merge($result, $arg);
379
+            } else {
380
+                $n = strpos($args, $r[0]);
381
+                $pred = substr($args, 0, $n);
382
+                $par = ',}';
383
+                if (preg_match('/^(.*)\($/', $pred, $m)) {
384
+                    $pred = $m[1];
385
+                    $par = ')';
386
+                }
387
+                if ($pred) {
388
+                    $champ = new Texte;
389
+                    $champ->texte = $pred;
390
+                    $champ->apres = $champ->avant = "";
391
+                    $result[] = $champ;
392
+                    $collecte[] = $champ;
393
+                }
394
+                $rec = substr($args, $n + strlen($r[0]) - 1);
395
+                $champ = new Champ;
396
+                $champ->nom_boucle = $r[2];
397
+                $champ->nom_champ = $r[3];
398
+                $champ->etoile = $r[5];
399
+                $next = $r[6];
400
+                while ($next == '{') {
401
+                    phraser_arg($rec, $sep, array(), $champ);
402
+                    $args = ltrim($rec);
403
+                    $next = isset($args[0]) ? $args[0] : '';
404
+                }
405
+                while ($next == '|') {
406
+                    $pos_apres = 0;
407
+                    phraser_args($rec, $par, $sep, array(), $champ, $pos_apres);
408
+                    $args = substr($rec, $pos_apres);
409
+                    $next = isset($args[0]) ? $args[0] : '';
410
+                }
411
+                // Si erreur de syntaxe dans un sous-argument, propager.
412
+                if ($champ->param === false) {
413
+                    $err_f = true;
414
+                } else {
415
+                    phraser_vieux($champ);
416
+                }
417
+                if ($par == ')') {
418
+                    $args = substr($args, 1);
419
+                }
420
+                $collecte[] = $champ;
421
+                $result[] = $champ;
422
+            }
423
+        }
424
+        if (isset($args[0]) and $args[0] == ',') {
425
+            $args = ltrim(substr($args, 1));
426
+            if ($collecte) {
427
+                $res[] = $collecte;
428
+                $collecte = array();
429
+            }
430
+        }
431
+    }
432
+    if ($collecte) {
433
+        $res[] = $collecte;
434
+        $collecte = array();
435
+    }
436
+    $texte = substr($args, 1);
437
+    $source = substr($suite, 0, strlen($suite) - strlen($texte));
438
+    // propager les erreurs, et ignorer les param vides
439
+    if ($pointeur_champ->param !== false) {
440
+        if ($err_f) {
441
+            $pointeur_champ->param = false;
442
+        } elseif ($fonc !== '' || count($res) > 1) {
443
+            $pointeur_champ->param[] = $res;
444
+        }
445
+    }
446
+    // pour les balises avec faux filtres qui boudent ce dur larbeur
447
+    $pointeur_champ->fonctions[] = array($fonc, $source);
448
+
449
+    return $result;
450 450
 }
451 451
 
452 452
 
453 453
 // https://code.spip.net/@phraser_champs_exterieurs
454 454
 function phraser_champs_exterieurs($texte, $ligne, $sep, $nested) {
455
-	$res = array();
456
-	while (($p = strpos($texte, "%$sep")) !== false) {
457
-		if (!preg_match(',^%' . preg_quote($sep) . '([0-9]+)@,', substr($texte, $p), $m)) {
458
-			break;
459
-		}
460
-		$debut = substr($texte, 0, $p);
461
-		$texte = substr($texte, $p + strlen($m[0]));
462
-		if ($p) {
463
-			$res = phraser_inclure($debut, $ligne, $res);
464
-		}
465
-		$ligne += substr_count($debut, "\n");
466
-		$res[] = $nested[$m[1]];
467
-	}
468
-
469
-	return (($texte === '') ? $res : phraser_inclure($texte, $ligne, $res));
455
+    $res = array();
456
+    while (($p = strpos($texte, "%$sep")) !== false) {
457
+        if (!preg_match(',^%' . preg_quote($sep) . '([0-9]+)@,', substr($texte, $p), $m)) {
458
+            break;
459
+        }
460
+        $debut = substr($texte, 0, $p);
461
+        $texte = substr($texte, $p + strlen($m[0]));
462
+        if ($p) {
463
+            $res = phraser_inclure($debut, $ligne, $res);
464
+        }
465
+        $ligne += substr_count($debut, "\n");
466
+        $res[] = $nested[$m[1]];
467
+    }
468
+
469
+    return (($texte === '') ? $res : phraser_inclure($texte, $ligne, $res));
470 470
 }
471 471
 
472 472
 // https://code.spip.net/@phraser_champs_interieurs
473 473
 function phraser_champs_interieurs($texte, $ligne, $sep, $result) {
474
-	$i = 0; // en fait count($result)
475
-	$x = "";
476
-
477
-	while (true) {
478
-		$j = $i;
479
-		$n = $ligne;
480
-		while (preg_match(CHAMP_ETENDU, $texte, $match)) {
481
-			$p = strpos($texte, $match[0]);
482
-			$debut = substr($texte, 0, $p);
483
-			if ($p) {
484
-				$result[$i] = $debut;
485
-				$i++;
486
-			}
487
-			$nom = $match[4];
488
-			$champ = new Champ;
489
-			// ca ne marche pas encore en cas de champ imbrique
490
-			$champ->ligne = $x ? 0 : ($n + substr_count($debut, "\n"));
491
-			$champ->nom_boucle = $match[3];
492
-			$champ->nom_champ = $nom;
493
-			$champ->etoile = $match[6];
494
-			// phraser_args indiquera ou commence apres
495
-			$pos_apres = 0;
496
-			$result = phraser_args($match[7], ")", $sep, $result, $champ, $pos_apres);
497
-			phraser_vieux($champ);
498
-			$champ->avant =	phraser_champs_exterieurs($match[1], $n, $sep, $result);
499
-			$debut = substr($match[7], $pos_apres + 1);
500
-			if (!empty($debut)) {
501
-				$n += substr_count(substr($texte, 0, strpos($texte, $debut)), "\n");
502
-			}
503
-			$champ->apres = phraser_champs_exterieurs($debut, $n, $sep, $result);
504
-
505
-			// reinjecter la boucle si c'en est une
506
-			phraser_boucle_placeholder($champ);
507
-
508
-			$result[$i] = $champ;
509
-			$i++;
510
-			$texte = substr($texte, $p + strlen($match[0]));
511
-		}
512
-		if ($texte !== "") {
513
-			$result[$i] = $texte;
514
-			$i++;
515
-		}
516
-		$x = '';
517
-
518
-		while ($j < $i) {
519
-			$z = $result[$j];
520
-			// j'aurais besoin de connaitre le nombre de lignes...
521
-			if (is_object($z)) {
522
-				$x .= "%$sep$j@";
523
-			} else {
524
-				$x .= $z;
525
-			}
526
-			$j++;
527
-		}
528
-		if (preg_match(CHAMP_ETENDU, $x)) {
529
-			$texte = $x;
530
-		} else {
531
-			return phraser_champs_exterieurs($x, $ligne, $sep, $result);
532
-		}
533
-	}
474
+    $i = 0; // en fait count($result)
475
+    $x = "";
476
+
477
+    while (true) {
478
+        $j = $i;
479
+        $n = $ligne;
480
+        while (preg_match(CHAMP_ETENDU, $texte, $match)) {
481
+            $p = strpos($texte, $match[0]);
482
+            $debut = substr($texte, 0, $p);
483
+            if ($p) {
484
+                $result[$i] = $debut;
485
+                $i++;
486
+            }
487
+            $nom = $match[4];
488
+            $champ = new Champ;
489
+            // ca ne marche pas encore en cas de champ imbrique
490
+            $champ->ligne = $x ? 0 : ($n + substr_count($debut, "\n"));
491
+            $champ->nom_boucle = $match[3];
492
+            $champ->nom_champ = $nom;
493
+            $champ->etoile = $match[6];
494
+            // phraser_args indiquera ou commence apres
495
+            $pos_apres = 0;
496
+            $result = phraser_args($match[7], ")", $sep, $result, $champ, $pos_apres);
497
+            phraser_vieux($champ);
498
+            $champ->avant =	phraser_champs_exterieurs($match[1], $n, $sep, $result);
499
+            $debut = substr($match[7], $pos_apres + 1);
500
+            if (!empty($debut)) {
501
+                $n += substr_count(substr($texte, 0, strpos($texte, $debut)), "\n");
502
+            }
503
+            $champ->apres = phraser_champs_exterieurs($debut, $n, $sep, $result);
504
+
505
+            // reinjecter la boucle si c'en est une
506
+            phraser_boucle_placeholder($champ);
507
+
508
+            $result[$i] = $champ;
509
+            $i++;
510
+            $texte = substr($texte, $p + strlen($match[0]));
511
+        }
512
+        if ($texte !== "") {
513
+            $result[$i] = $texte;
514
+            $i++;
515
+        }
516
+        $x = '';
517
+
518
+        while ($j < $i) {
519
+            $z = $result[$j];
520
+            // j'aurais besoin de connaitre le nombre de lignes...
521
+            if (is_object($z)) {
522
+                $x .= "%$sep$j@";
523
+            } else {
524
+                $x .= $z;
525
+            }
526
+            $j++;
527
+        }
528
+        if (preg_match(CHAMP_ETENDU, $x)) {
529
+            $texte = $x;
530
+        } else {
531
+            return phraser_champs_exterieurs($x, $ligne, $sep, $result);
532
+        }
533
+    }
534 534
 }
535 535
 
536 536
 function phraser_vieux(&$champ) {
537
-	$nom = $champ->nom_champ;
538
-	if ($nom == 'EMBED_DOCUMENT') {
539
-		if (!function_exists('phraser_vieux_emb')) {
540
-			include_spip('public/normaliser');
541
-		}
542
-		phraser_vieux_emb($champ);
543
-	} elseif ($nom == 'EXPOSER') {
544
-		if (!function_exists('phraser_vieux_exposer')) {
545
-			include_spip('public/normaliser');
546
-		}
547
-		phraser_vieux_exposer($champ);
548
-	} elseif ($champ->param) {
549
-		if ($nom == 'FORMULAIRE_RECHERCHE') {
550
-			if (!function_exists('phraser_vieux_recherche')) {
551
-				include_spip('public/normaliser');
552
-			}
553
-			phraser_vieux_recherche($champ);
554
-		} elseif (preg_match(",^LOGO_[A-Z]+,", $nom)) {
555
-			if (!function_exists('phraser_vieux_logos')) {
556
-				include_spip('public/normaliser');
557
-			}
558
-			phraser_vieux_logos($champ);
559
-		} elseif ($nom == 'MODELE') {
560
-			if (!function_exists('phraser_vieux_modele')) {
561
-				include_spip('public/normaliser');
562
-			}
563
-			phraser_vieux_modele($champ);
564
-		} elseif ($nom == 'INCLURE' or $nom == 'INCLUDE') {
565
-			if (!function_exists('phraser_vieux_inclu')) {
566
-				include_spip('public/normaliser');
567
-			}
568
-			phraser_vieux_inclu($champ);
569
-		}
570
-	}
537
+    $nom = $champ->nom_champ;
538
+    if ($nom == 'EMBED_DOCUMENT') {
539
+        if (!function_exists('phraser_vieux_emb')) {
540
+            include_spip('public/normaliser');
541
+        }
542
+        phraser_vieux_emb($champ);
543
+    } elseif ($nom == 'EXPOSER') {
544
+        if (!function_exists('phraser_vieux_exposer')) {
545
+            include_spip('public/normaliser');
546
+        }
547
+        phraser_vieux_exposer($champ);
548
+    } elseif ($champ->param) {
549
+        if ($nom == 'FORMULAIRE_RECHERCHE') {
550
+            if (!function_exists('phraser_vieux_recherche')) {
551
+                include_spip('public/normaliser');
552
+            }
553
+            phraser_vieux_recherche($champ);
554
+        } elseif (preg_match(",^LOGO_[A-Z]+,", $nom)) {
555
+            if (!function_exists('phraser_vieux_logos')) {
556
+                include_spip('public/normaliser');
557
+            }
558
+            phraser_vieux_logos($champ);
559
+        } elseif ($nom == 'MODELE') {
560
+            if (!function_exists('phraser_vieux_modele')) {
561
+                include_spip('public/normaliser');
562
+            }
563
+            phraser_vieux_modele($champ);
564
+        } elseif ($nom == 'INCLURE' or $nom == 'INCLUDE') {
565
+            if (!function_exists('phraser_vieux_inclu')) {
566
+                include_spip('public/normaliser');
567
+            }
568
+            phraser_vieux_inclu($champ);
569
+        }
570
+    }
571 571
 }
572 572
 
573 573
 
@@ -595,190 +595,190 @@  discard block
 block discarded – undo
595 595
  **/
596 596
 function phraser_criteres($params, &$result) {
597 597
 
598
-	$err_ci = ''; // indiquera s'il y a eu une erreur
599
-	$args = array();
600
-	$type = $result->type_requete;
601
-	$doublons = array();
602
-	foreach ($params as $v) {
603
-		$var = $v[1][0];
604
-		$param = ($var->type != 'texte') ? "" : $var->texte;
605
-		if ((count($v) > 2) && (!preg_match(",[^A-Za-z]IN[^A-Za-z],i", $param))) {
606
-			// plus d'un argument et pas le critere IN:
607
-			// detecter comme on peut si c'est le critere implicite LIMIT debut, fin
608
-			if ($var->type != 'texte'
609
-				or preg_match("/^(n|n-|(n-)?\d+)$/S", $param)
610
-			) {
611
-				$op = ',';
612
-				$not = "";
613
-				$cond = false;
614
-			} else {
615
-				// Le debut du premier argument est l'operateur
616
-				preg_match("/^([!]?)([a-zA-Z][a-zA-Z0-9_]*)[[:space:]]*(\??)[[:space:]]*(.*)$/ms", $param, $m);
617
-				$op = $m[2];
618
-				$not = $m[1];
619
-				$cond = $m[3];
620
-				// virer le premier argument,
621
-				// et mettre son reliquat eventuel
622
-				// Recopier pour ne pas alterer le texte source
623
-				// utile au debusqueur
624
-				if ($m[4]) {
625
-					// une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"}
626
-					if (preg_match(',^(["\'])(.*)\1$,', $m[4])) {
627
-						$c = null;
628
-						eval('$c = ' . $m[4] . ';');
629
-						if (isset($c)) {
630
-							$m[4] = $c;
631
-						}
632
-					}
633
-					$texte = new Texte;
634
-					$texte->texte = $m[4];
635
-					$v[1][0] = $texte;
636
-				} else {
637
-					array_shift($v[1]);
638
-				}
639
-			}
640
-			array_shift($v); // $v[O] est vide
641
-			$crit = new Critere;
642
-			$crit->op = $op;
643
-			$crit->not = $not;
644
-			$crit->cond = $cond;
645
-			$crit->exclus = "";
646
-			$crit->param = $v;
647
-			$args[] = $crit;
648
-		} else {
649
-			if ($var->type != 'texte') {
650
-				// cas 1 seul arg ne commencant pas par du texte brut: 
651
-				// erreur ou critere infixe "/"
652
-				if (($v[1][1]->type != 'texte') || (trim($v[1][1]->texte) != '/')) {
653
-					$err_ci = array(
654
-						'zbug_critere_inconnu',
655
-						array('critere' => $var->nom_champ)
656
-					);
657
-					erreur_squelette($err_ci, $result);
658
-				} else {
659
-					$crit = new Critere;
660
-					$crit->op = '/';
661
-					$crit->not = "";
662
-					$crit->exclus = "";
663
-					$crit->param = array(array($v[1][0]), array($v[1][2]));
664
-					$args[] = $crit;
665
-				}
666
-			} else {
667
-				// traiter qq lexemes particuliers pour faciliter la suite
668
-				// les separateurs
669
-				if ($var->apres) {
670
-					$result->separateur[] = $param;
671
-				} elseif (($param == 'tout') or ($param == 'tous')) {
672
-					$result->modificateur['tout'] = true;
673
-				} elseif ($param == 'plat') {
674
-					$result->modificateur['plat'] = true;
675
-				}
676
-
677
-				// Boucle hierarchie, analyser le critere id_rubrique
678
-				// et les autres critères {id_x} pour forcer {tout} sur
679
-				// ceux-ci pour avoir la rubrique mere...
680
-				// Les autres critères de la boucle hierarchie doivent être
681
-				// traités normalement.
682
-				elseif (strcasecmp($type, 'hierarchie') == 0
683
-					and !preg_match(",^id_rubrique\b,", $param)
684
-					and preg_match(",^id_\w+\s*$,", $param)
685
-				) {
686
-					$result->modificateur['tout'] = true;
687
-				} elseif (strcasecmp($type, 'hierarchie') == 0 and $param == "id_rubrique") {
688
-					// rien a faire sur {id_rubrique} tout seul
689
-				} else {
690
-					// pas d'emplacement statique, faut un dynamique
691
-					// mais il y a 2 cas qui ont les 2 !
692
-					if (($param == 'unique') || (preg_match(',^!?doublons *,', $param))) {
693
-						// cette variable sera inseree dans le code
694
-						// et son nom sert d'indicateur des maintenant
695
-						$result->doublons = '$doublons_index';
696
-						if ($param == 'unique') {
697
-							$param = 'doublons';
698
-						}
699
-					} elseif ($param == 'recherche') {
700
-						// meme chose (a cause de #nom_de_boucle:URL_*)
701
-						$result->hash = ' ';
702
-					}
703
-
704
-					if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', $param, $m)) {
705
-						$crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', '');
706
-					} elseif (preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC .
707
-						')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', $param, $m)) {
708
-						$a2 = trim($m[8]);
709
-						if ($a2 and ($a2[0] == "'" or $a2[0] == '"') and ($a2[0] == substr($a2, -1))) {
710
-							$a2 = substr($a2, 1, -1);
711
-						}
712
-						$crit = phraser_critere_infixe($m[2], $a2, $v,
713
-							(($m[2] == 'lang_select') ? $m[2] : $m[7]),
714
-							$m[6], $m[5]);
715
-						$crit->exclus = $m[1];
716
-					} elseif (preg_match("/^([!]?)\s*(" .
717
-						CHAMP_SQL_PLUS_FONC .
718
-						")\s*(\??)(.*)$/is", $param, $m)) {
719
-						// contient aussi les comparaisons implicites !
720
-						// Comme ci-dessus: 
721
-						// le premier arg contient l'operateur
722
-						array_shift($v);
723
-						if ($m[6]) {
724
-							$v[0][0] = new Texte;
725
-							$v[0][0]->texte = $m[6];
726
-						} else {
727
-							array_shift($v[0]);
728
-							if (!$v[0]) {
729
-								array_shift($v);
730
-							}
731
-						}
732
-						$crit = new Critere;
733
-						$crit->op = $m[2];
734
-						$crit->param = $v;
735
-						$crit->not = $m[1];
736
-						$crit->cond = $m[5];
737
-					} else {
738
-						$err_ci = array(
739
-							'zbug_critere_inconnu',
740
-							array('critere' => $param)
741
-						);
742
-						erreur_squelette($err_ci, $result);
743
-					}
744
-
745
-					if ((!preg_match(',^!?doublons *,', $param)) || $crit->not) {
746
-						$args[] = $crit;
747
-					} else {
748
-						$doublons[] = $crit;
749
-					}
750
-				}
751
-			}
752
-		}
753
-	}
754
-
755
-	// les doublons non nies doivent etre le dernier critere
756
-	// pour que la variable $doublon_index ait la bonne valeur
757
-	// cf critere_doublon
758
-	if ($doublons) {
759
-		$args = array_merge($args, $doublons);
760
-	}
761
-
762
-	// Si erreur, laisser la chaine dans ce champ pour le HTTP 503
763
-	if (!$err_ci) {
764
-		$result->criteres = $args;
765
-	}
598
+    $err_ci = ''; // indiquera s'il y a eu une erreur
599
+    $args = array();
600
+    $type = $result->type_requete;
601
+    $doublons = array();
602
+    foreach ($params as $v) {
603
+        $var = $v[1][0];
604
+        $param = ($var->type != 'texte') ? "" : $var->texte;
605
+        if ((count($v) > 2) && (!preg_match(",[^A-Za-z]IN[^A-Za-z],i", $param))) {
606
+            // plus d'un argument et pas le critere IN:
607
+            // detecter comme on peut si c'est le critere implicite LIMIT debut, fin
608
+            if ($var->type != 'texte'
609
+                or preg_match("/^(n|n-|(n-)?\d+)$/S", $param)
610
+            ) {
611
+                $op = ',';
612
+                $not = "";
613
+                $cond = false;
614
+            } else {
615
+                // Le debut du premier argument est l'operateur
616
+                preg_match("/^([!]?)([a-zA-Z][a-zA-Z0-9_]*)[[:space:]]*(\??)[[:space:]]*(.*)$/ms", $param, $m);
617
+                $op = $m[2];
618
+                $not = $m[1];
619
+                $cond = $m[3];
620
+                // virer le premier argument,
621
+                // et mettre son reliquat eventuel
622
+                // Recopier pour ne pas alterer le texte source
623
+                // utile au debusqueur
624
+                if ($m[4]) {
625
+                    // une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"}
626
+                    if (preg_match(',^(["\'])(.*)\1$,', $m[4])) {
627
+                        $c = null;
628
+                        eval('$c = ' . $m[4] . ';');
629
+                        if (isset($c)) {
630
+                            $m[4] = $c;
631
+                        }
632
+                    }
633
+                    $texte = new Texte;
634
+                    $texte->texte = $m[4];
635
+                    $v[1][0] = $texte;
636
+                } else {
637
+                    array_shift($v[1]);
638
+                }
639
+            }
640
+            array_shift($v); // $v[O] est vide
641
+            $crit = new Critere;
642
+            $crit->op = $op;
643
+            $crit->not = $not;
644
+            $crit->cond = $cond;
645
+            $crit->exclus = "";
646
+            $crit->param = $v;
647
+            $args[] = $crit;
648
+        } else {
649
+            if ($var->type != 'texte') {
650
+                // cas 1 seul arg ne commencant pas par du texte brut: 
651
+                // erreur ou critere infixe "/"
652
+                if (($v[1][1]->type != 'texte') || (trim($v[1][1]->texte) != '/')) {
653
+                    $err_ci = array(
654
+                        'zbug_critere_inconnu',
655
+                        array('critere' => $var->nom_champ)
656
+                    );
657
+                    erreur_squelette($err_ci, $result);
658
+                } else {
659
+                    $crit = new Critere;
660
+                    $crit->op = '/';
661
+                    $crit->not = "";
662
+                    $crit->exclus = "";
663
+                    $crit->param = array(array($v[1][0]), array($v[1][2]));
664
+                    $args[] = $crit;
665
+                }
666
+            } else {
667
+                // traiter qq lexemes particuliers pour faciliter la suite
668
+                // les separateurs
669
+                if ($var->apres) {
670
+                    $result->separateur[] = $param;
671
+                } elseif (($param == 'tout') or ($param == 'tous')) {
672
+                    $result->modificateur['tout'] = true;
673
+                } elseif ($param == 'plat') {
674
+                    $result->modificateur['plat'] = true;
675
+                }
676
+
677
+                // Boucle hierarchie, analyser le critere id_rubrique
678
+                // et les autres critères {id_x} pour forcer {tout} sur
679
+                // ceux-ci pour avoir la rubrique mere...
680
+                // Les autres critères de la boucle hierarchie doivent être
681
+                // traités normalement.
682
+                elseif (strcasecmp($type, 'hierarchie') == 0
683
+                    and !preg_match(",^id_rubrique\b,", $param)
684
+                    and preg_match(",^id_\w+\s*$,", $param)
685
+                ) {
686
+                    $result->modificateur['tout'] = true;
687
+                } elseif (strcasecmp($type, 'hierarchie') == 0 and $param == "id_rubrique") {
688
+                    // rien a faire sur {id_rubrique} tout seul
689
+                } else {
690
+                    // pas d'emplacement statique, faut un dynamique
691
+                    // mais il y a 2 cas qui ont les 2 !
692
+                    if (($param == 'unique') || (preg_match(',^!?doublons *,', $param))) {
693
+                        // cette variable sera inseree dans le code
694
+                        // et son nom sert d'indicateur des maintenant
695
+                        $result->doublons = '$doublons_index';
696
+                        if ($param == 'unique') {
697
+                            $param = 'doublons';
698
+                        }
699
+                    } elseif ($param == 'recherche') {
700
+                        // meme chose (a cause de #nom_de_boucle:URL_*)
701
+                        $result->hash = ' ';
702
+                    }
703
+
704
+                    if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', $param, $m)) {
705
+                        $crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', '');
706
+                    } elseif (preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC .
707
+                        ')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', $param, $m)) {
708
+                        $a2 = trim($m[8]);
709
+                        if ($a2 and ($a2[0] == "'" or $a2[0] == '"') and ($a2[0] == substr($a2, -1))) {
710
+                            $a2 = substr($a2, 1, -1);
711
+                        }
712
+                        $crit = phraser_critere_infixe($m[2], $a2, $v,
713
+                            (($m[2] == 'lang_select') ? $m[2] : $m[7]),
714
+                            $m[6], $m[5]);
715
+                        $crit->exclus = $m[1];
716
+                    } elseif (preg_match("/^([!]?)\s*(" .
717
+                        CHAMP_SQL_PLUS_FONC .
718
+                        ")\s*(\??)(.*)$/is", $param, $m)) {
719
+                        // contient aussi les comparaisons implicites !
720
+                        // Comme ci-dessus: 
721
+                        // le premier arg contient l'operateur
722
+                        array_shift($v);
723
+                        if ($m[6]) {
724
+                            $v[0][0] = new Texte;
725
+                            $v[0][0]->texte = $m[6];
726
+                        } else {
727
+                            array_shift($v[0]);
728
+                            if (!$v[0]) {
729
+                                array_shift($v);
730
+                            }
731
+                        }
732
+                        $crit = new Critere;
733
+                        $crit->op = $m[2];
734
+                        $crit->param = $v;
735
+                        $crit->not = $m[1];
736
+                        $crit->cond = $m[5];
737
+                    } else {
738
+                        $err_ci = array(
739
+                            'zbug_critere_inconnu',
740
+                            array('critere' => $param)
741
+                        );
742
+                        erreur_squelette($err_ci, $result);
743
+                    }
744
+
745
+                    if ((!preg_match(',^!?doublons *,', $param)) || $crit->not) {
746
+                        $args[] = $crit;
747
+                    } else {
748
+                        $doublons[] = $crit;
749
+                    }
750
+                }
751
+            }
752
+        }
753
+    }
754
+
755
+    // les doublons non nies doivent etre le dernier critere
756
+    // pour que la variable $doublon_index ait la bonne valeur
757
+    // cf critere_doublon
758
+    if ($doublons) {
759
+        $args = array_merge($args, $doublons);
760
+    }
761
+
762
+    // Si erreur, laisser la chaine dans ce champ pour le HTTP 503
763
+    if (!$err_ci) {
764
+        $result->criteres = $args;
765
+    }
766 766
 }
767 767
 
768 768
 // https://code.spip.net/@phraser_critere_infixe
769 769
 function phraser_critere_infixe($arg1, $arg2, $args, $op, $not, $cond) {
770
-	$args[0] = new Texte;
771
-	$args[0]->texte = $arg1;
772
-	$args[0] = array($args[0]);
773
-	$args[1][0] = new Texte;
774
-	$args[1][0]->texte = $arg2;
775
-	$crit = new Critere;
776
-	$crit->op = $op;
777
-	$crit->not = $not;
778
-	$crit->cond = $cond;
779
-	$crit->param = $args;
780
-
781
-	return $crit;
770
+    $args[0] = new Texte;
771
+    $args[0]->texte = $arg1;
772
+    $args[0] = array($args[0]);
773
+    $args[1][0] = new Texte;
774
+    $args[1][0]->texte = $arg2;
775
+    $crit = new Critere;
776
+    $crit->op = $op;
777
+    $crit->not = $not;
778
+    $crit->cond = $cond;
779
+    $crit->param = $args;
780
+
781
+    return $crit;
782 782
 }
783 783
 
784 784
 /**
@@ -789,12 +789,12 @@  discard block
 block discarded – undo
789 789
  * @return int
790 790
  */
791 791
 function public_compte_ligne($texte, $debut = 0, $fin = null) {
792
-	if (is_null($fin)) {
793
-		return substr_count($texte, "\n", $debut);
794
-	}
795
-	else {
796
-		return substr_count($texte, "\n", $debut, $fin - $debut);
797
-	}
792
+    if (is_null($fin)) {
793
+        return substr_count($texte, "\n", $debut);
794
+    }
795
+    else {
796
+        return substr_count($texte, "\n", $debut, $fin - $debut);
797
+    }
798 798
 }
799 799
 
800 800
 
@@ -810,82 +810,82 @@  discard block
 block discarded – undo
810 810
  * @return array|null
811 811
  */
812 812
 function public_trouver_premiere_boucle($texte, $id_parent, $descr, $pos_debut_texte = 0) {
813
-	$premiere_boucle = null;
814
-	$pos_derniere_boucle_anonyme = $pos_debut_texte;
815
-
816
-	$current_pos = $pos_debut_texte;
817
-	while (($pos_boucle = strpos($texte, BALISE_BOUCLE, $current_pos)) !== false) {
818
-		$current_pos = $pos_boucle + 1;
819
-		$pos_parent = strpos($texte,'(', $pos_boucle);
820
-
821
-		$id_boucle = '';
822
-		if ($pos_parent !== false) {
823
-			$id_boucle = trim(substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), $pos_parent - $pos_boucle - strlen(BALISE_BOUCLE)));
824
-		}
825
-		if ($pos_parent === false
826
-		  or (strlen($id_boucle) and !(is_numeric($id_boucle) or strpos($id_boucle, '_') === 0))) {
827
-
828
-			$result = new Boucle;
829
-			$result->id_parent = $id_parent;
830
-			$result->descr = $descr;
831
-
832
-			// un id_boucle pour l'affichage de l'erreur
833
-			if (!strlen($id_boucle)) {
834
-				$id_boucle = substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), 15);
835
-			}
836
-			$result->id_boucle = $id_boucle;
837
-			$err_b = array('zbug_erreur_boucle_syntaxe', array('id' => $id_boucle));
838
-			erreur_squelette($err_b, $result);
839
-
840
-			continue;
841
-		}
842
-		else {
843
-			$boucle = [
844
-				'id_boucle' => $id_boucle,
845
-				'id_boucle_err' => $id_boucle,
846
-				'debut_boucle' => $pos_boucle,
847
-				'pos_boucle' => $pos_boucle,
848
-				'pos_parent' => $pos_parent,
849
-				'pos_precond' => false,
850
-				'pos_precond_inside' => false,
851
-				'pos_preaff' => false,
852
-				'pos_preaff_inside' => false,
853
-			];
854
-
855
-			// un id_boucle pour l'affichage de l'erreur sur les boucle anonymes
856
-			if (!strlen($id_boucle)) {
857
-				$boucle['id_boucle_err'] = substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), 15);
858
-			}
859
-
860
-			// trouver sa position de depart reelle : au <Bxx> ou au <BBxx>
861
-			$precond_boucle = BALISE_PRECOND_BOUCLE . $id_boucle . '>';
862
-			$pos_precond = strpos($texte, $precond_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
863
-			if ($pos_precond !== false
864
-				and $pos_precond < $boucle['debut_boucle']) {
865
-				$boucle['debut_boucle'] = $pos_precond;
866
-				$boucle['pos_precond'] = $pos_precond;
867
-				$boucle['pos_precond_inside'] = $pos_precond + strlen($precond_boucle);
868
-			}
869
-
870
-			$preaff_boucle = BALISE_PREAFF_BOUCLE . $id_boucle . '>';
871
-			$pos_preaff = strpos($texte, $preaff_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
872
-			if ($pos_preaff !== false
873
-				and $pos_preaff < $boucle['debut_boucle']) {
874
-				$boucle['debut_boucle'] = $pos_preaff;
875
-				$boucle['pos_preaff'] = $pos_preaff;
876
-				$boucle['pos_preaff_inside'] = $pos_preaff + strlen($preaff_boucle);
877
-			}
878
-			if (!strlen($id_boucle)) {
879
-				$pos_derniere_boucle_anonyme = $pos_boucle;
880
-			}
881
-
882
-			if (is_null($premiere_boucle) or $premiere_boucle['debut_boucle'] > $boucle['debut_boucle']) {
883
-				$premiere_boucle = $boucle;
884
-			}
885
-		}
886
-	}
887
-
888
-	return $premiere_boucle;
813
+    $premiere_boucle = null;
814
+    $pos_derniere_boucle_anonyme = $pos_debut_texte;
815
+
816
+    $current_pos = $pos_debut_texte;
817
+    while (($pos_boucle = strpos($texte, BALISE_BOUCLE, $current_pos)) !== false) {
818
+        $current_pos = $pos_boucle + 1;
819
+        $pos_parent = strpos($texte,'(', $pos_boucle);
820
+
821
+        $id_boucle = '';
822
+        if ($pos_parent !== false) {
823
+            $id_boucle = trim(substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), $pos_parent - $pos_boucle - strlen(BALISE_BOUCLE)));
824
+        }
825
+        if ($pos_parent === false
826
+          or (strlen($id_boucle) and !(is_numeric($id_boucle) or strpos($id_boucle, '_') === 0))) {
827
+
828
+            $result = new Boucle;
829
+            $result->id_parent = $id_parent;
830
+            $result->descr = $descr;
831
+
832
+            // un id_boucle pour l'affichage de l'erreur
833
+            if (!strlen($id_boucle)) {
834
+                $id_boucle = substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), 15);
835
+            }
836
+            $result->id_boucle = $id_boucle;
837
+            $err_b = array('zbug_erreur_boucle_syntaxe', array('id' => $id_boucle));
838
+            erreur_squelette($err_b, $result);
839
+
840
+            continue;
841
+        }
842
+        else {
843
+            $boucle = [
844
+                'id_boucle' => $id_boucle,
845
+                'id_boucle_err' => $id_boucle,
846
+                'debut_boucle' => $pos_boucle,
847
+                'pos_boucle' => $pos_boucle,
848
+                'pos_parent' => $pos_parent,
849
+                'pos_precond' => false,
850
+                'pos_precond_inside' => false,
851
+                'pos_preaff' => false,
852
+                'pos_preaff_inside' => false,
853
+            ];
854
+
855
+            // un id_boucle pour l'affichage de l'erreur sur les boucle anonymes
856
+            if (!strlen($id_boucle)) {
857
+                $boucle['id_boucle_err'] = substr($texte,$pos_boucle + strlen(BALISE_BOUCLE), 15);
858
+            }
859
+
860
+            // trouver sa position de depart reelle : au <Bxx> ou au <BBxx>
861
+            $precond_boucle = BALISE_PRECOND_BOUCLE . $id_boucle . '>';
862
+            $pos_precond = strpos($texte, $precond_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
863
+            if ($pos_precond !== false
864
+                and $pos_precond < $boucle['debut_boucle']) {
865
+                $boucle['debut_boucle'] = $pos_precond;
866
+                $boucle['pos_precond'] = $pos_precond;
867
+                $boucle['pos_precond_inside'] = $pos_precond + strlen($precond_boucle);
868
+            }
869
+
870
+            $preaff_boucle = BALISE_PREAFF_BOUCLE . $id_boucle . '>';
871
+            $pos_preaff = strpos($texte, $preaff_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
872
+            if ($pos_preaff !== false
873
+                and $pos_preaff < $boucle['debut_boucle']) {
874
+                $boucle['debut_boucle'] = $pos_preaff;
875
+                $boucle['pos_preaff'] = $pos_preaff;
876
+                $boucle['pos_preaff_inside'] = $pos_preaff + strlen($preaff_boucle);
877
+            }
878
+            if (!strlen($id_boucle)) {
879
+                $pos_derniere_boucle_anonyme = $pos_boucle;
880
+            }
881
+
882
+            if (is_null($premiere_boucle) or $premiere_boucle['debut_boucle'] > $boucle['debut_boucle']) {
883
+                $premiere_boucle = $boucle;
884
+            }
885
+        }
886
+    }
887
+
888
+    return $premiere_boucle;
889 889
 }
890 890
 
891 891
 /**
@@ -900,62 +900,62 @@  discard block
 block discarded – undo
900 900
  * @return mixed
901 901
  */
902 902
 function public_trouver_fin_boucle($texte, $id_parent, $boucle, $pos_debut_texte, $result) {
903
-	$id_boucle = $boucle['id_boucle'];
904
-	$pos_courante = $pos_debut_texte;
905
-
906
-	$boucle['pos_postcond'] = false;
907
-	$boucle['pos_postcond_inside'] = false;
908
-	$boucle['pos_altern'] = false;
909
-	$boucle['pos_altern_inside'] = false;
910
-	$boucle['pos_postaff'] = false;
911
-	$boucle['pos_postaff_inside'] = false;
912
-
913
-	$pos_anonyme_next = null;
914
-	// si c'est une boucle anonyme, chercher la position de la prochaine boucle anonyme
915
-	if (!strlen($id_boucle)) {
916
-		$pos_anonyme_next = strpos($texte, BALISE_BOUCLE . '(', $pos_courante);
917
-	}
918
-
919
-	//
920
-	// 1. Recuperer la partie conditionnelle apres
921
-	//
922
-	$apres_boucle = BALISE_POSTCOND_BOUCLE . $id_boucle . ">";
923
-	$pos_apres = strpos($texte, $apres_boucle, $pos_courante);
924
-	if ($pos_apres !== false
925
-		and (!$pos_anonyme_next or $pos_apres < $pos_anonyme_next)) {
926
-		$boucle['pos_postcond'] = $pos_apres;
927
-		$pos_apres += strlen($apres_boucle);
928
-		$boucle['pos_postcond_inside'] = $pos_apres;
929
-		$pos_courante = $pos_apres ;
930
-	}
931
-
932
-	//
933
-	// 2. Récuperer la partie alternative apres
934
-	//
935
-	$altern_boucle = BALISE_ALT_BOUCLE . $id_boucle . ">";
936
-	$pos_altern = strpos($texte, $altern_boucle, $pos_courante);
937
-	if ($pos_altern !== false
938
-		and (!$pos_anonyme_next or $pos_altern < $pos_anonyme_next)) {
939
-		$boucle['pos_altern'] = $pos_altern;
940
-		$pos_altern += strlen($altern_boucle);
941
-		$boucle['pos_altern_inside'] = $pos_altern;
942
-		$pos_courante = $pos_altern;
943
-	}
944
-
945
-	//
946
-	// 3. Recuperer la partie footer non alternative
947
-	//
948
-	$postaff_boucle = BALISE_POSTAFF_BOUCLE . $id_boucle . ">";
949
-	$pos_postaff = strpos($texte, $postaff_boucle, $pos_courante);
950
-	if ($pos_postaff !== false
951
-	  and (!$pos_anonyme_next or $pos_postaff < $pos_anonyme_next)) {
952
-		$boucle['pos_postaff'] = $pos_postaff;
953
-		$pos_postaff += strlen($postaff_boucle);
954
-		$boucle['pos_postaff_inside'] = $pos_postaff;
955
-		$pos_courante = $pos_postaff ;
956
-	}
957
-
958
-	return $boucle;
903
+    $id_boucle = $boucle['id_boucle'];
904
+    $pos_courante = $pos_debut_texte;
905
+
906
+    $boucle['pos_postcond'] = false;
907
+    $boucle['pos_postcond_inside'] = false;
908
+    $boucle['pos_altern'] = false;
909
+    $boucle['pos_altern_inside'] = false;
910
+    $boucle['pos_postaff'] = false;
911
+    $boucle['pos_postaff_inside'] = false;
912
+
913
+    $pos_anonyme_next = null;
914
+    // si c'est une boucle anonyme, chercher la position de la prochaine boucle anonyme
915
+    if (!strlen($id_boucle)) {
916
+        $pos_anonyme_next = strpos($texte, BALISE_BOUCLE . '(', $pos_courante);
917
+    }
918
+
919
+    //
920
+    // 1. Recuperer la partie conditionnelle apres
921
+    //
922
+    $apres_boucle = BALISE_POSTCOND_BOUCLE . $id_boucle . ">";
923
+    $pos_apres = strpos($texte, $apres_boucle, $pos_courante);
924
+    if ($pos_apres !== false
925
+        and (!$pos_anonyme_next or $pos_apres < $pos_anonyme_next)) {
926
+        $boucle['pos_postcond'] = $pos_apres;
927
+        $pos_apres += strlen($apres_boucle);
928
+        $boucle['pos_postcond_inside'] = $pos_apres;
929
+        $pos_courante = $pos_apres ;
930
+    }
931
+
932
+    //
933
+    // 2. Récuperer la partie alternative apres
934
+    //
935
+    $altern_boucle = BALISE_ALT_BOUCLE . $id_boucle . ">";
936
+    $pos_altern = strpos($texte, $altern_boucle, $pos_courante);
937
+    if ($pos_altern !== false
938
+        and (!$pos_anonyme_next or $pos_altern < $pos_anonyme_next)) {
939
+        $boucle['pos_altern'] = $pos_altern;
940
+        $pos_altern += strlen($altern_boucle);
941
+        $boucle['pos_altern_inside'] = $pos_altern;
942
+        $pos_courante = $pos_altern;
943
+    }
944
+
945
+    //
946
+    // 3. Recuperer la partie footer non alternative
947
+    //
948
+    $postaff_boucle = BALISE_POSTAFF_BOUCLE . $id_boucle . ">";
949
+    $pos_postaff = strpos($texte, $postaff_boucle, $pos_courante);
950
+    if ($pos_postaff !== false
951
+      and (!$pos_anonyme_next or $pos_postaff < $pos_anonyme_next)) {
952
+        $boucle['pos_postaff'] = $pos_postaff;
953
+        $pos_postaff += strlen($postaff_boucle);
954
+        $boucle['pos_postaff_inside'] = $pos_postaff;
955
+        $pos_courante = $pos_postaff ;
956
+    }
957
+
958
+    return $boucle;
959 959
 }
960 960
 
961 961
 
@@ -965,21 +965,21 @@  discard block
 block discarded – undo
965 965
  * @param null|object $boucle
966 966
  */
967 967
 function phraser_boucle_placeholder(&$champ, $boucle_placeholder=null, $boucle = null) {
968
-	static $boucles_connues = array();
969
-	// si c'est un appel pour memoriser une boucle, memorisons la
970
-	if (is_string($champ) and !empty($boucle_placeholder) and !empty($boucle)) {
971
-		$boucles_connues[$boucle_placeholder][$champ] = &$boucle;
972
-	}
973
-	else {
974
-		if (!empty($champ->nom_champ) and !empty($boucles_connues[$champ->nom_champ])) {
975
-			$placeholder = $champ->nom_champ;
976
-			$id = reset($champ->param[0][1]);
977
-			$id = $id->texte;
978
-			if (!empty($boucles_connues[$placeholder][$id])) {
979
-				$champ = $boucles_connues[$placeholder][$id];
980
-			}
981
-		}
982
-	}
968
+    static $boucles_connues = array();
969
+    // si c'est un appel pour memoriser une boucle, memorisons la
970
+    if (is_string($champ) and !empty($boucle_placeholder) and !empty($boucle)) {
971
+        $boucles_connues[$boucle_placeholder][$champ] = &$boucle;
972
+    }
973
+    else {
974
+        if (!empty($champ->nom_champ) and !empty($boucles_connues[$champ->nom_champ])) {
975
+            $placeholder = $champ->nom_champ;
976
+            $id = reset($champ->param[0][1]);
977
+            $id = $id->texte;
978
+            if (!empty($boucles_connues[$placeholder][$id])) {
979
+                $champ = $boucles_connues[$placeholder][$id];
980
+            }
981
+        }
982
+    }
983 983
 }
984 984
 
985 985
 
@@ -992,269 +992,269 @@  discard block
 block discarded – undo
992 992
  * @return string
993 993
  */
994 994
 function public_generer_boucle_placeholder($id_boucle, &$boucle, $boucle_placeholder, $nb_lignes) {
995
-	$placeholder = "[(#{$boucle_placeholder}{" . $id_boucle . '})' . str_pad("", $nb_lignes, "\n") . "]";
996
-	//memoriser la boucle a reinjecter
997
-	$id_boucle = "$id_boucle";
998
-	phraser_boucle_placeholder($id_boucle, $boucle_placeholder, $boucle);
999
-	return $placeholder;
995
+    $placeholder = "[(#{$boucle_placeholder}{" . $id_boucle . '})' . str_pad("", $nb_lignes, "\n") . "]";
996
+    //memoriser la boucle a reinjecter
997
+    $id_boucle = "$id_boucle";
998
+    phraser_boucle_placeholder($id_boucle, $boucle_placeholder, $boucle);
999
+    return $placeholder;
1000 1000
 }
1001 1001
 
1002 1002
 function public_phraser_html_dist($texte, $id_parent, &$boucles, $descr, $ligne_debut_texte = 1, $boucle_placeholder = null) {
1003 1003
 
1004
-	$all_res = array();
1005
-	// definir un placholder pour les boucles dont on est sur d'avoir aucune occurence dans le squelette
1006
-	if (is_null($boucle_placeholder)) {
1007
-		do {
1008
-			$boucle_placeholder = "BOUCLE_PLACEHOLDER_" . strtoupper(md5(uniqid()));
1009
-		} while (strpos($texte, $boucle_placeholder) !== false);
1010
-	}
1011
-
1012
-	$ligne_debut_initial = $ligne_debut_texte;
1013
-	$pos_debut_texte = 0;
1014
-	while ($boucle = public_trouver_premiere_boucle($texte, $id_parent, $descr, $pos_debut_texte)) {
1015
-		$err_b = ''; // indiquera s'il y a eu une erreur
1016
-		$result = new Boucle;
1017
-		$result->id_parent = $id_parent;
1018
-		$result->descr = $descr;
1019
-
1020
-		$pos_courante = $boucle['pos_boucle'];
1021
-		$pos_parent = $boucle['pos_parent'];
1022
-		$id_boucle_search = $id_boucle = $boucle['id_boucle'];
1023
-
1024
-		$ligne_preaff = $ligne_avant = $ligne_milieu = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_parent);
1025
-
1026
-		// boucle anonyme ?
1027
-		if (!strlen($id_boucle)) {
1028
-			$id_boucle = '_anon_L' . $ligne_milieu . '_' . substr(md5('anonyme:' .$id_parent.':'. json_encode($boucle)), 0, 8);
1029
-		}
1030
-
1031
-		$pos_debut_boucle = $pos_courante;
1032
-
1033
-		$pos_milieu = $pos_parent;
1034
-
1035
-		// Regarder si on a une partie conditionnelle avant <B_xxx>
1036
-		if ($boucle['pos_precond'] !== false) {
1037
-
1038
-			$pos_debut_boucle = $boucle['pos_precond'];
1039
-
1040
-			$pos_avant = $boucle['pos_precond_inside'];
1041
-			$result->avant = substr($texte, $pos_avant, $pos_courante - $pos_avant);
1042
-			$ligne_avant = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1043
-		}
1044
-
1045
-		// Regarder si on a une partie inconditionnelle avant <BB_xxx>
1046
-		if ($boucle['pos_preaff'] !== false) {
1047
-
1048
-			$end_preaff = $pos_debut_boucle;
1049
-
1050
-			$pos_preaff = $boucle['pos_preaff_inside'];
1051
-			$result->preaff = substr($texte, $pos_preaff, $end_preaff - $pos_preaff);
1052
-			$ligne_preaff = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1053
-		}
1054
-
1055
-		$result->id_boucle = $id_boucle;
1056
-
1057
-		if (!preg_match(SPEC_BOUCLE, $texte, $match, 0, $pos_milieu)
1058
-		  or ($pos_match = strpos($texte, $match[0], $pos_milieu)) === false
1059
-			or $pos_match > $pos_milieu
1060
-		) {
1061
-			$err_b = array('zbug_erreur_boucle_syntaxe', array('id' => $id_boucle));
1062
-			erreur_squelette($err_b, $result);
1063
-
1064
-			$ligne_debut_texte += public_compte_ligne($texte, $pos_debut_texte, $pos_courante + 1);
1065
-			$pos_debut_texte = $pos_courante + 1;
1066
-			continue;
1067
-		}
1068
-
1069
-		$result->type_requete = $match[0];
1070
-		$pos_milieu += strlen($match[0]);
1071
-		$pos_courante = $pos_milieu; // on s'en sert pour compter les lignes plus precisemment
1072
-
1073
-		$type = $match[1];
1074
-		$jointures = trim($match[2]);
1075
-		$table_optionnelle = ($match[3]);
1076
-		if ($jointures) {
1077
-			// on affecte pas ici les jointures explicites, mais dans la compilation
1078
-			// ou elles seront completees des jointures declarees
1079
-			$result->jointures_explicites = $jointures;
1080
-		}
1081
-
1082
-		if ($table_optionnelle) {
1083
-			$result->table_optionnelle = $type;
1084
-		}
1085
-
1086
-		// 1ere passe sur les criteres, vu comme des arguments sans fct
1087
-		// Resultat mis dans result->param
1088
-		$pos_fin_criteres = $pos_milieu;
1089
-		phraser_args($texte, "/>", "", $all_res, $result, $pos_fin_criteres);
1090
-
1091
-		// En 2e passe result->criteres contiendra un tableau
1092
-		// pour l'instant on met le source (chaine) :
1093
-		// si elle reste ici au final, c'est qu'elle contient une erreur
1094
-		$pos_courante = $pos_fin_criteres; // on s'en sert pour compter les lignes plus precisemment
1095
-		$result->criteres = substr($texte, $pos_milieu, $pos_fin_criteres - $pos_milieu);
1096
-		$pos_milieu = $pos_fin_criteres;
1097
-
1098
-		//
1099
-		// Recuperer la fin :
1100
-		//
1101
-		if ($texte[$pos_milieu] === '/') {
1102
-			// boucle autofermante : pas de partie conditionnelle apres
1103
-			$pos_courante += 2;
1104
-			$result->milieu = '';
1105
-		} else {
1106
-			$pos_milieu += 1;
1107
-
1108
-			$fin_boucle = BALISE_FIN_BOUCLE . $id_boucle_search . ">";
1109
-			$pos_fin = strpos($texte, $fin_boucle, $pos_milieu);
1110
-			if ($pos_fin === false) {
1111
-				$err_b = array(
1112
-					'zbug_erreur_boucle_fermant',
1113
-					array('id' => $id_boucle)
1114
-				);
1115
-				erreur_squelette($err_b, $result);
1116
-				$pos_courante += strlen($fin_boucle);
1117
-			}
1118
-			else {
1119
-				// verifier une eventuelle imbrication d'une boucle homonyme
1120
-				// (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1121
-				$search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
1122
-				$search_from = $pos_milieu;
1123
-				$nb_open = 1;
1124
-				$nb_close = 1;
1125
-				$maxiter = 0;
1126
-				do {
1127
-					while ($nb_close < $nb_open
1128
-						and $p = strpos($texte, $fin_boucle, $pos_fin + 1)) {
1129
-						$nb_close++;
1130
-						$pos_fin = $p;
1131
-					}
1132
-					// si on a pas trouve assez de boucles fermantes, sortir de la, on a fait de notre mieux
1133
-					if ($nb_close < $nb_open) {
1134
-						break;
1135
-					}
1136
-					while ($p = strpos($texte, $search_debut_boucle, $search_from)
1137
-					  and $p < $pos_fin) {
1138
-						$nb_open++;
1139
-						$search_from = $p + 1;
1140
-					}
1141
-				} while($nb_close < $nb_open and $maxiter++ < 5);
1142
-
1143
-				$pos_courante = $pos_fin + strlen($fin_boucle);
1144
-			}
1145
-			$result->milieu = substr($texte, $pos_milieu, $pos_fin - $pos_milieu);
1146
-		}
1147
-
1148
-		$ligne_suite = $ligne_apres = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_courante);
1149
-		$boucle = public_trouver_fin_boucle($texte, $id_parent, $boucle, $pos_courante, $result);
1150
-
1151
-		//
1152
-		// 1. Partie conditionnelle apres ?
1153
-		//
1154
-		if ($boucle['pos_postcond']) {
1155
-			$result->apres = substr($texte, $pos_courante, $boucle['pos_postcond'] - $pos_courante);
1156
-			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postcond_inside']);
1157
-			$pos_courante = $boucle['pos_postcond_inside'] ;
1158
-		}
1159
-
1160
-
1161
-		//
1162
-		// 2. Partie alternative apres ?
1163
-		//
1164
-		$ligne_altern = $ligne_suite;
1165
-		if ($boucle['pos_altern']) {
1166
-			$result->altern = substr($texte, $pos_courante, $boucle['pos_altern'] - $pos_courante);
1167
-			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_altern_inside']);
1168
-			$pos_courante = $boucle['pos_altern_inside'];
1169
-		}
1170
-
1171
-		//
1172
-		// 3. Partie footer non alternative ?
1173
-		//
1174
-		$ligne_postaff = $ligne_suite;
1175
-		if ($boucle['pos_postaff']) {
1176
-			$result->postaff = substr($texte, $pos_courante, $boucle['pos_postaff'] - $pos_courante);
1177
-			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postaff_inside']);
1178
-			$pos_courante = $boucle['pos_postaff_inside'];
1179
-		}
1180
-
1181
-		$result->ligne = $ligne_preaff;
1182
-
1183
-		if ($p = strpos($type, ':')) {
1184
-			$result->sql_serveur = substr($type, 0, $p);
1185
-			$type = substr($type, $p + 1);
1186
-		}
1187
-		$soustype = strtolower($type);
1188
-
1189
-		if (!isset($GLOBALS["table_des_tables"][$soustype])) {
1190
-			$soustype = $type;
1191
-		}
1192
-
1193
-		$result->type_requete = $soustype;
1194
-		// Lancer la 2e passe sur les criteres si la 1ere etait bonne
1195
-		if (!is_array($result->param)) {
1196
-			$err_b = true;
1197
-		} else {
1198
-			phraser_criteres($result->param, $result);
1199
-			if (strncasecmp($soustype, TYPE_RECURSIF, strlen(TYPE_RECURSIF)) == 0) {
1200
-				$result->type_requete = TYPE_RECURSIF;
1201
-				$args = $result->param;
1202
-				array_unshift($args,
1203
-					substr($type, strlen(TYPE_RECURSIF)));
1204
-				$result->param = $args;
1205
-			}
1206
-		}
1207
-
1208
-		$descr['id_mere_contexte'] = $id_boucle;
1209
-		$result->milieu = public_phraser_html_dist($result->milieu, $id_boucle, $boucles, $descr, $ligne_milieu, $boucle_placeholder);
1210
-		// reserver la place dans la pile des boucles pour compiler ensuite dans le bon ordre
1211
-		// ie les boucles qui apparaissent dans les partie conditionnelles doivent etre compilees apres cette boucle
1212
-		// si il y a deja une boucle de ce nom, cela declenchera une erreur ensuite
1213
-		if (empty($boucles[$id_boucle])){
1214
-			$boucles[$id_boucle] = null;
1215
-		}
1216
-		$result->preaff = public_phraser_html_dist($result->preaff, $id_parent, $boucles, $descr, $ligne_preaff, $boucle_placeholder);
1217
-		$result->avant = public_phraser_html_dist($result->avant, $id_parent, $boucles, $descr, $ligne_avant, $boucle_placeholder);
1218
-		$result->apres = public_phraser_html_dist($result->apres, $id_parent, $boucles, $descr, $ligne_apres, $boucle_placeholder);
1219
-		$result->altern = public_phraser_html_dist($result->altern, $id_parent, $boucles, $descr, $ligne_altern, $boucle_placeholder);
1220
-		$result->postaff = public_phraser_html_dist($result->postaff, $id_parent, $boucles, $descr, $ligne_postaff, $boucle_placeholder);
1221
-
1222
-		// Prevenir le generateur de code que le squelette est faux
1223
-		if ($err_b) {
1224
-			$result->type_requete = false;
1225
-		}
1226
-
1227
-		// Verifier qu'il n'y a pas double definition
1228
-		// apres analyse des sous-parties (pas avant).
1229
-		if (!empty($boucles[$id_boucle])) {
1230
-			if ($boucles[$id_boucle]->type_requete !== false) {
1231
-				$err_b_d = array(
1232
-					'zbug_erreur_boucle_double',
1233
-					array('id' => $id_boucle)
1234
-				);
1235
-				erreur_squelette($err_b_d, $result);
1236
-				// Prevenir le generateur de code que le squelette est faux
1237
-				$boucles[$id_boucle]->type_requete = false;
1238
-			}
1239
-		} else {
1240
-			$boucles[$id_boucle] = $result;
1241
-		}
1242
-
1243
-		// remplacer la boucle par un placeholder qui compte le meme nombre de lignes
1244
-		$placeholder = public_generer_boucle_placeholder($id_boucle, $boucles[$id_boucle], $boucle_placeholder, $ligne_suite - $ligne_debut_texte);
1245
-		$longueur_boucle = $pos_courante - $boucle['debut_boucle'];
1246
-		$texte = substr_replace($texte, $placeholder, $boucle['debut_boucle'], $longueur_boucle);
1247
-		$pos_courante = $pos_courante - $longueur_boucle + strlen($placeholder);
1248
-
1249
-		// phraser la partie avant le debut de la boucle
1250
-		#$all_res = phraser_champs_etendus(substr($texte, $pos_debut_texte, $boucle['debut_boucle'] - $pos_debut_texte), $ligne_debut_texte, $all_res);
1251
-		#$all_res[] = &$boucles[$id_boucle];
1252
-
1253
-		$ligne_debut_texte = $ligne_suite;
1254
-		$pos_debut_texte = $pos_courante;
1255
-	}
1256
-
1257
-	$all_res = phraser_champs_etendus($texte, $ligne_debut_initial, $all_res);
1258
-
1259
-	return $all_res;
1004
+    $all_res = array();
1005
+    // definir un placholder pour les boucles dont on est sur d'avoir aucune occurence dans le squelette
1006
+    if (is_null($boucle_placeholder)) {
1007
+        do {
1008
+            $boucle_placeholder = "BOUCLE_PLACEHOLDER_" . strtoupper(md5(uniqid()));
1009
+        } while (strpos($texte, $boucle_placeholder) !== false);
1010
+    }
1011
+
1012
+    $ligne_debut_initial = $ligne_debut_texte;
1013
+    $pos_debut_texte = 0;
1014
+    while ($boucle = public_trouver_premiere_boucle($texte, $id_parent, $descr, $pos_debut_texte)) {
1015
+        $err_b = ''; // indiquera s'il y a eu une erreur
1016
+        $result = new Boucle;
1017
+        $result->id_parent = $id_parent;
1018
+        $result->descr = $descr;
1019
+
1020
+        $pos_courante = $boucle['pos_boucle'];
1021
+        $pos_parent = $boucle['pos_parent'];
1022
+        $id_boucle_search = $id_boucle = $boucle['id_boucle'];
1023
+
1024
+        $ligne_preaff = $ligne_avant = $ligne_milieu = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_parent);
1025
+
1026
+        // boucle anonyme ?
1027
+        if (!strlen($id_boucle)) {
1028
+            $id_boucle = '_anon_L' . $ligne_milieu . '_' . substr(md5('anonyme:' .$id_parent.':'. json_encode($boucle)), 0, 8);
1029
+        }
1030
+
1031
+        $pos_debut_boucle = $pos_courante;
1032
+
1033
+        $pos_milieu = $pos_parent;
1034
+
1035
+        // Regarder si on a une partie conditionnelle avant <B_xxx>
1036
+        if ($boucle['pos_precond'] !== false) {
1037
+
1038
+            $pos_debut_boucle = $boucle['pos_precond'];
1039
+
1040
+            $pos_avant = $boucle['pos_precond_inside'];
1041
+            $result->avant = substr($texte, $pos_avant, $pos_courante - $pos_avant);
1042
+            $ligne_avant = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1043
+        }
1044
+
1045
+        // Regarder si on a une partie inconditionnelle avant <BB_xxx>
1046
+        if ($boucle['pos_preaff'] !== false) {
1047
+
1048
+            $end_preaff = $pos_debut_boucle;
1049
+
1050
+            $pos_preaff = $boucle['pos_preaff_inside'];
1051
+            $result->preaff = substr($texte, $pos_preaff, $end_preaff - $pos_preaff);
1052
+            $ligne_preaff = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1053
+        }
1054
+
1055
+        $result->id_boucle = $id_boucle;
1056
+
1057
+        if (!preg_match(SPEC_BOUCLE, $texte, $match, 0, $pos_milieu)
1058
+          or ($pos_match = strpos($texte, $match[0], $pos_milieu)) === false
1059
+            or $pos_match > $pos_milieu
1060
+        ) {
1061
+            $err_b = array('zbug_erreur_boucle_syntaxe', array('id' => $id_boucle));
1062
+            erreur_squelette($err_b, $result);
1063
+
1064
+            $ligne_debut_texte += public_compte_ligne($texte, $pos_debut_texte, $pos_courante + 1);
1065
+            $pos_debut_texte = $pos_courante + 1;
1066
+            continue;
1067
+        }
1068
+
1069
+        $result->type_requete = $match[0];
1070
+        $pos_milieu += strlen($match[0]);
1071
+        $pos_courante = $pos_milieu; // on s'en sert pour compter les lignes plus precisemment
1072
+
1073
+        $type = $match[1];
1074
+        $jointures = trim($match[2]);
1075
+        $table_optionnelle = ($match[3]);
1076
+        if ($jointures) {
1077
+            // on affecte pas ici les jointures explicites, mais dans la compilation
1078
+            // ou elles seront completees des jointures declarees
1079
+            $result->jointures_explicites = $jointures;
1080
+        }
1081
+
1082
+        if ($table_optionnelle) {
1083
+            $result->table_optionnelle = $type;
1084
+        }
1085
+
1086
+        // 1ere passe sur les criteres, vu comme des arguments sans fct
1087
+        // Resultat mis dans result->param
1088
+        $pos_fin_criteres = $pos_milieu;
1089
+        phraser_args($texte, "/>", "", $all_res, $result, $pos_fin_criteres);
1090
+
1091
+        // En 2e passe result->criteres contiendra un tableau
1092
+        // pour l'instant on met le source (chaine) :
1093
+        // si elle reste ici au final, c'est qu'elle contient une erreur
1094
+        $pos_courante = $pos_fin_criteres; // on s'en sert pour compter les lignes plus precisemment
1095
+        $result->criteres = substr($texte, $pos_milieu, $pos_fin_criteres - $pos_milieu);
1096
+        $pos_milieu = $pos_fin_criteres;
1097
+
1098
+        //
1099
+        // Recuperer la fin :
1100
+        //
1101
+        if ($texte[$pos_milieu] === '/') {
1102
+            // boucle autofermante : pas de partie conditionnelle apres
1103
+            $pos_courante += 2;
1104
+            $result->milieu = '';
1105
+        } else {
1106
+            $pos_milieu += 1;
1107
+
1108
+            $fin_boucle = BALISE_FIN_BOUCLE . $id_boucle_search . ">";
1109
+            $pos_fin = strpos($texte, $fin_boucle, $pos_milieu);
1110
+            if ($pos_fin === false) {
1111
+                $err_b = array(
1112
+                    'zbug_erreur_boucle_fermant',
1113
+                    array('id' => $id_boucle)
1114
+                );
1115
+                erreur_squelette($err_b, $result);
1116
+                $pos_courante += strlen($fin_boucle);
1117
+            }
1118
+            else {
1119
+                // verifier une eventuelle imbrication d'une boucle homonyme
1120
+                // (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1121
+                $search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
1122
+                $search_from = $pos_milieu;
1123
+                $nb_open = 1;
1124
+                $nb_close = 1;
1125
+                $maxiter = 0;
1126
+                do {
1127
+                    while ($nb_close < $nb_open
1128
+                        and $p = strpos($texte, $fin_boucle, $pos_fin + 1)) {
1129
+                        $nb_close++;
1130
+                        $pos_fin = $p;
1131
+                    }
1132
+                    // si on a pas trouve assez de boucles fermantes, sortir de la, on a fait de notre mieux
1133
+                    if ($nb_close < $nb_open) {
1134
+                        break;
1135
+                    }
1136
+                    while ($p = strpos($texte, $search_debut_boucle, $search_from)
1137
+                      and $p < $pos_fin) {
1138
+                        $nb_open++;
1139
+                        $search_from = $p + 1;
1140
+                    }
1141
+                } while($nb_close < $nb_open and $maxiter++ < 5);
1142
+
1143
+                $pos_courante = $pos_fin + strlen($fin_boucle);
1144
+            }
1145
+            $result->milieu = substr($texte, $pos_milieu, $pos_fin - $pos_milieu);
1146
+        }
1147
+
1148
+        $ligne_suite = $ligne_apres = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_courante);
1149
+        $boucle = public_trouver_fin_boucle($texte, $id_parent, $boucle, $pos_courante, $result);
1150
+
1151
+        //
1152
+        // 1. Partie conditionnelle apres ?
1153
+        //
1154
+        if ($boucle['pos_postcond']) {
1155
+            $result->apres = substr($texte, $pos_courante, $boucle['pos_postcond'] - $pos_courante);
1156
+            $ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postcond_inside']);
1157
+            $pos_courante = $boucle['pos_postcond_inside'] ;
1158
+        }
1159
+
1160
+
1161
+        //
1162
+        // 2. Partie alternative apres ?
1163
+        //
1164
+        $ligne_altern = $ligne_suite;
1165
+        if ($boucle['pos_altern']) {
1166
+            $result->altern = substr($texte, $pos_courante, $boucle['pos_altern'] - $pos_courante);
1167
+            $ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_altern_inside']);
1168
+            $pos_courante = $boucle['pos_altern_inside'];
1169
+        }
1170
+
1171
+        //
1172
+        // 3. Partie footer non alternative ?
1173
+        //
1174
+        $ligne_postaff = $ligne_suite;
1175
+        if ($boucle['pos_postaff']) {
1176
+            $result->postaff = substr($texte, $pos_courante, $boucle['pos_postaff'] - $pos_courante);
1177
+            $ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postaff_inside']);
1178
+            $pos_courante = $boucle['pos_postaff_inside'];
1179
+        }
1180
+
1181
+        $result->ligne = $ligne_preaff;
1182
+
1183
+        if ($p = strpos($type, ':')) {
1184
+            $result->sql_serveur = substr($type, 0, $p);
1185
+            $type = substr($type, $p + 1);
1186
+        }
1187
+        $soustype = strtolower($type);
1188
+
1189
+        if (!isset($GLOBALS["table_des_tables"][$soustype])) {
1190
+            $soustype = $type;
1191
+        }
1192
+
1193
+        $result->type_requete = $soustype;
1194
+        // Lancer la 2e passe sur les criteres si la 1ere etait bonne
1195
+        if (!is_array($result->param)) {
1196
+            $err_b = true;
1197
+        } else {
1198
+            phraser_criteres($result->param, $result);
1199
+            if (strncasecmp($soustype, TYPE_RECURSIF, strlen(TYPE_RECURSIF)) == 0) {
1200
+                $result->type_requete = TYPE_RECURSIF;
1201
+                $args = $result->param;
1202
+                array_unshift($args,
1203
+                    substr($type, strlen(TYPE_RECURSIF)));
1204
+                $result->param = $args;
1205
+            }
1206
+        }
1207
+
1208
+        $descr['id_mere_contexte'] = $id_boucle;
1209
+        $result->milieu = public_phraser_html_dist($result->milieu, $id_boucle, $boucles, $descr, $ligne_milieu, $boucle_placeholder);
1210
+        // reserver la place dans la pile des boucles pour compiler ensuite dans le bon ordre
1211
+        // ie les boucles qui apparaissent dans les partie conditionnelles doivent etre compilees apres cette boucle
1212
+        // si il y a deja une boucle de ce nom, cela declenchera une erreur ensuite
1213
+        if (empty($boucles[$id_boucle])){
1214
+            $boucles[$id_boucle] = null;
1215
+        }
1216
+        $result->preaff = public_phraser_html_dist($result->preaff, $id_parent, $boucles, $descr, $ligne_preaff, $boucle_placeholder);
1217
+        $result->avant = public_phraser_html_dist($result->avant, $id_parent, $boucles, $descr, $ligne_avant, $boucle_placeholder);
1218
+        $result->apres = public_phraser_html_dist($result->apres, $id_parent, $boucles, $descr, $ligne_apres, $boucle_placeholder);
1219
+        $result->altern = public_phraser_html_dist($result->altern, $id_parent, $boucles, $descr, $ligne_altern, $boucle_placeholder);
1220
+        $result->postaff = public_phraser_html_dist($result->postaff, $id_parent, $boucles, $descr, $ligne_postaff, $boucle_placeholder);
1221
+
1222
+        // Prevenir le generateur de code que le squelette est faux
1223
+        if ($err_b) {
1224
+            $result->type_requete = false;
1225
+        }
1226
+
1227
+        // Verifier qu'il n'y a pas double definition
1228
+        // apres analyse des sous-parties (pas avant).
1229
+        if (!empty($boucles[$id_boucle])) {
1230
+            if ($boucles[$id_boucle]->type_requete !== false) {
1231
+                $err_b_d = array(
1232
+                    'zbug_erreur_boucle_double',
1233
+                    array('id' => $id_boucle)
1234
+                );
1235
+                erreur_squelette($err_b_d, $result);
1236
+                // Prevenir le generateur de code que le squelette est faux
1237
+                $boucles[$id_boucle]->type_requete = false;
1238
+            }
1239
+        } else {
1240
+            $boucles[$id_boucle] = $result;
1241
+        }
1242
+
1243
+        // remplacer la boucle par un placeholder qui compte le meme nombre de lignes
1244
+        $placeholder = public_generer_boucle_placeholder($id_boucle, $boucles[$id_boucle], $boucle_placeholder, $ligne_suite - $ligne_debut_texte);
1245
+        $longueur_boucle = $pos_courante - $boucle['debut_boucle'];
1246
+        $texte = substr_replace($texte, $placeholder, $boucle['debut_boucle'], $longueur_boucle);
1247
+        $pos_courante = $pos_courante - $longueur_boucle + strlen($placeholder);
1248
+
1249
+        // phraser la partie avant le debut de la boucle
1250
+        #$all_res = phraser_champs_etendus(substr($texte, $pos_debut_texte, $boucle['debut_boucle'] - $pos_debut_texte), $ligne_debut_texte, $all_res);
1251
+        #$all_res[] = &$boucles[$id_boucle];
1252
+
1253
+        $ligne_debut_texte = $ligne_suite;
1254
+        $pos_debut_texte = $pos_courante;
1255
+    }
1256
+
1257
+    $all_res = phraser_champs_etendus($texte, $ligne_debut_initial, $all_res);
1258
+
1259
+    return $all_res;
1260 1260
 }
1261 1261
\ No newline at end of file
Please login to merge, or discard this patch.
ecrire/inc/puce_statut.php 3 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -412,6 +412,13 @@
 block discarded – undo
412 412
 }
413 413
 
414 414
 
415
+/**
416
+ * @param integer $id
417
+ * @param string $type
418
+ * @param double $n
419
+ * @param string|null $img
420
+ * @param string $titre
421
+ */
415 422
 function afficher_script_statut($id, $type, $n, $img, $statut, $titre, $act = '') {
416 423
 	$h = generer_action_auteur("instituer_objet", "$type-$id-$statut");
417 424
 	$t = supprimer_tags($titre);
Please login to merge, or discard this patch.
Indentation   +236 added lines, -236 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
  **/
19 19
 
20 20
 if (!defined('_ECRIRE_INC_VERSION')) {
21
-	return;
21
+    return;
22 22
 }
23 23
 
24 24
 if (!defined('_ACTIVER_PUCE_RAPIDE')) {
25
-	/**
26
-	 * Activer le changement rapide de statut sur les listes d'objets ?
27
-	 *
28
-	 * Peut ralentir un site sur des listes très longues.
29
-	 *
30
-	 * @var bool
31
-	 **/
32
-	define('_ACTIVER_PUCE_RAPIDE', true);
25
+    /**
26
+     * Activer le changement rapide de statut sur les listes d'objets ?
27
+     *
28
+     * Peut ralentir un site sur des listes très longues.
29
+     *
30
+     * @var bool
31
+     **/
32
+    define('_ACTIVER_PUCE_RAPIDE', true);
33 33
 }
34 34
 
35 35
 /**
@@ -57,31 +57,31 @@  discard block
 block discarded – undo
57 57
  *     Code HTML de l'image de puce de statut à insérer (et du menu de changement si présent)
58 58
  */
59 59
 function inc_puce_statut_dist(
60
-	$id_objet,
61
-	$statut,
62
-	$id_parent,
63
-	$type,
64
-	$ajax = false,
65
-	$menu_rapide = _ACTIVER_PUCE_RAPIDE
60
+    $id_objet,
61
+    $statut,
62
+    $id_parent,
63
+    $type,
64
+    $ajax = false,
65
+    $menu_rapide = _ACTIVER_PUCE_RAPIDE
66 66
 ) {
67
-	static $f_puce_statut = array();
68
-	$type = objet_type($type);
69
-	// cas prioritaire : fonction perso, qui permet aussi de gerer les cas historiques
70
-	if (!isset($f_puce_statut[$type]) or is_null($f_puce_statut[$type])) {
71
-		$f_puce_statut[$type] = charger_fonction($type, 'puce_statut', true);
72
-	}
73
-	if ($f_puce_statut[$type]) {
74
-		return $f_puce_statut[$type]($id_objet, $statut, $id_parent, $type, $ajax, $menu_rapide);
75
-	}
76
-
77
-	// si statut_image trouve quelque chose (et '' est quelque chose)
78
-	// composer une puce, avec si possible changement rapide
79
-	elseif (!is_null($puce = puce_statut_changement_rapide($id_objet, $statut, $id_parent, $type, $ajax, $menu_rapide))) {
80
-		return $puce;
81
-	} // sinon fausse puce avec le type de l'image
82
-	else {
83
-		return http_img_pack("$type-16.png", '');
84
-	}
67
+    static $f_puce_statut = array();
68
+    $type = objet_type($type);
69
+    // cas prioritaire : fonction perso, qui permet aussi de gerer les cas historiques
70
+    if (!isset($f_puce_statut[$type]) or is_null($f_puce_statut[$type])) {
71
+        $f_puce_statut[$type] = charger_fonction($type, 'puce_statut', true);
72
+    }
73
+    if ($f_puce_statut[$type]) {
74
+        return $f_puce_statut[$type]($id_objet, $statut, $id_parent, $type, $ajax, $menu_rapide);
75
+    }
76
+
77
+    // si statut_image trouve quelque chose (et '' est quelque chose)
78
+    // composer une puce, avec si possible changement rapide
79
+    elseif (!is_null($puce = puce_statut_changement_rapide($id_objet, $statut, $id_parent, $type, $ajax, $menu_rapide))) {
80
+        return $puce;
81
+    } // sinon fausse puce avec le type de l'image
82
+    else {
83
+        return http_img_pack("$type-16.png", '');
84
+    }
85 85
 }
86 86
 
87 87
 /**
@@ -110,41 +110,41 @@  discard block
 block discarded – undo
110 110
  *   null si pas capable de déterminer l'image
111 111
  */
112 112
 function statut_image($objet, $statut) {
113
-	$src = null;
114
-	$table = table_objet_sql($objet);
115
-	$desc = lister_tables_objets_sql($table);
116
-	if (isset($desc['statut_images'])) {
117
-		// si une declaration statut_images
118
-		// mais rien pour le statut demande, ne rien afficher
119
-		$src = '';
120
-		if (isset($desc['statut_images'][$statut])) {
121
-			$src = $desc['statut_images'][$statut];
122
-		} // sinon image par defaut ?
123
-		elseif (isset($desc['statut_images'][0])) {
124
-			$src = $desc['statut_images'][0];
125
-		}
126
-	} else {
127
-		switch ($statut) {
128
-			case 'prepa':
129
-				$src = 'puce-preparer-8.png';
130
-				break;
131
-			case 'prop':
132
-				$src = 'puce-proposer-8.png';
133
-				break;
134
-			case 'publie':
135
-				$src = 'puce-publier-8.png';
136
-				break;
137
-			case 'refuse':
138
-				$src = 'puce-refuser-8.png';
139
-				break;
140
-			case 'poubelle':
141
-			case 'poub':
142
-				$src = 'puce-supprimer-8.png';
143
-				break;
144
-		}
145
-	}
146
-
147
-	return $src;
113
+    $src = null;
114
+    $table = table_objet_sql($objet);
115
+    $desc = lister_tables_objets_sql($table);
116
+    if (isset($desc['statut_images'])) {
117
+        // si une declaration statut_images
118
+        // mais rien pour le statut demande, ne rien afficher
119
+        $src = '';
120
+        if (isset($desc['statut_images'][$statut])) {
121
+            $src = $desc['statut_images'][$statut];
122
+        } // sinon image par defaut ?
123
+        elseif (isset($desc['statut_images'][0])) {
124
+            $src = $desc['statut_images'][0];
125
+        }
126
+    } else {
127
+        switch ($statut) {
128
+            case 'prepa':
129
+                $src = 'puce-preparer-8.png';
130
+                break;
131
+            case 'prop':
132
+                $src = 'puce-proposer-8.png';
133
+                break;
134
+            case 'publie':
135
+                $src = 'puce-publier-8.png';
136
+                break;
137
+            case 'refuse':
138
+                $src = 'puce-refuser-8.png';
139
+                break;
140
+            case 'poubelle':
141
+            case 'poub':
142
+                $src = 'puce-supprimer-8.png';
143
+                break;
144
+        }
145
+    }
146
+
147
+    return $src;
148 148
 }
149 149
 
150 150
 /**
@@ -172,40 +172,40 @@  discard block
 block discarded – undo
172 172
  * @return string
173 173
  */
174 174
 function statut_titre($objet, $statut) {
175
-	$titre = '';
176
-	$table = table_objet_sql($objet);
177
-	$desc = lister_tables_objets_sql($table);
178
-	if (isset($desc['statut_titres'])) {
179
-		// si une declaration statut_titres
180
-		// mais rien pour le statut demande, ne rien afficher
181
-		if (isset($desc['statut_titres'][$statut])) {
182
-			$titre = $desc['statut_titres'][$statut];
183
-		} // sinon image par defaut ?
184
-		elseif (isset($desc['statut_titres'][0])) {
185
-			$titre = $desc['statut_titres'][0];
186
-		}
187
-	} else {
188
-		switch ($statut) {
189
-			case 'prepa':
190
-				$titre = 'texte_statut_en_cours_redaction';
191
-				break;
192
-			case 'prop':
193
-				$titre = 'texte_statut_propose_evaluation';
194
-				break;
195
-			case 'publie':
196
-				$titre = 'texte_statut_publie';
197
-				break;
198
-			case 'refuse':
199
-				$titre = 'texte_statut_refuse';
200
-				break;
201
-			case 'poubelle':
202
-			case 'poub':
203
-				$titre = 'texte_statut_poubelle';
204
-				break;
205
-		}
206
-	}
207
-
208
-	return $titre ? _T($titre) : '';
175
+    $titre = '';
176
+    $table = table_objet_sql($objet);
177
+    $desc = lister_tables_objets_sql($table);
178
+    if (isset($desc['statut_titres'])) {
179
+        // si une declaration statut_titres
180
+        // mais rien pour le statut demande, ne rien afficher
181
+        if (isset($desc['statut_titres'][$statut])) {
182
+            $titre = $desc['statut_titres'][$statut];
183
+        } // sinon image par defaut ?
184
+        elseif (isset($desc['statut_titres'][0])) {
185
+            $titre = $desc['statut_titres'][0];
186
+        }
187
+    } else {
188
+        switch ($statut) {
189
+            case 'prepa':
190
+                $titre = 'texte_statut_en_cours_redaction';
191
+                break;
192
+            case 'prop':
193
+                $titre = 'texte_statut_propose_evaluation';
194
+                break;
195
+            case 'publie':
196
+                $titre = 'texte_statut_publie';
197
+                break;
198
+            case 'refuse':
199
+                $titre = 'texte_statut_refuse';
200
+                break;
201
+            case 'poubelle':
202
+            case 'poub':
203
+                $titre = 'texte_statut_poubelle';
204
+                break;
205
+        }
206
+    }
207
+
208
+    return $titre ? _T($titre) : '';
209 209
 }
210 210
 
211 211
 
@@ -225,37 +225,37 @@  discard block
 block discarded – undo
225 225
  * @return string
226 226
  */
227 227
 function statut_texte_instituer($objet, $statut) {
228
-	$texte = '';
229
-	$table = table_objet_sql($objet);
230
-	$desc = lister_tables_objets_sql($table);
231
-	if (isset($desc['statut_textes_instituer'])) {
232
-		// si une declaration statut_titres
233
-		// mais rien pour le statut demande, ne rien afficher
234
-		if (isset($desc['statut_textes_instituer'][$statut])) {
235
-			$texte = $desc['statut_textes_instituer'][$statut];
236
-		}
237
-	} else {
238
-		switch ($statut) {
239
-			case 'prepa':
240
-				$texte = 'texte_statut_en_cours_redaction';
241
-				break;
242
-			case 'prop':
243
-				$texte = 'texte_statut_propose_evaluation';
244
-				break;
245
-			case 'publie':
246
-				$texte = 'texte_statut_publie';
247
-				break;
248
-			case 'refuse':
249
-				$texte = 'texte_statut_refuse';
250
-				break;
251
-			case 'poubelle':
252
-			case 'poub':
253
-				$texte = 'texte_statut_poubelle';
254
-				break;
255
-		}
256
-	}
257
-
258
-	return $texte ? _T($texte) : '';
228
+    $texte = '';
229
+    $table = table_objet_sql($objet);
230
+    $desc = lister_tables_objets_sql($table);
231
+    if (isset($desc['statut_textes_instituer'])) {
232
+        // si une declaration statut_titres
233
+        // mais rien pour le statut demande, ne rien afficher
234
+        if (isset($desc['statut_textes_instituer'][$statut])) {
235
+            $texte = $desc['statut_textes_instituer'][$statut];
236
+        }
237
+    } else {
238
+        switch ($statut) {
239
+            case 'prepa':
240
+                $texte = 'texte_statut_en_cours_redaction';
241
+                break;
242
+            case 'prop':
243
+                $texte = 'texte_statut_propose_evaluation';
244
+                break;
245
+            case 'publie':
246
+                $texte = 'texte_statut_publie';
247
+                break;
248
+            case 'refuse':
249
+                $texte = 'texte_statut_refuse';
250
+                break;
251
+            case 'poubelle':
252
+            case 'poub':
253
+                $texte = 'texte_statut_poubelle';
254
+                break;
255
+        }
256
+    }
257
+
258
+    return $texte ? _T($texte) : '';
259 259
 }
260 260
 
261 261
 
@@ -275,16 +275,16 @@  discard block
 block discarded – undo
275 275
  * @return string
276 276
  */
277 277
 function puce_statut_auteur_dist($id, $statut, $id_parent, $type, $ajax = '', $menu_rapide = _ACTIVER_PUCE_RAPIDE) {
278
-	$img = statut_image('auteur', $statut);
279
-	if (!$img) {
280
-		return '';
281
-	}
282
-	$alt = statut_titre('auteur', $statut);
278
+    $img = statut_image('auteur', $statut);
279
+    if (!$img) {
280
+        return '';
281
+    }
282
+    $alt = statut_titre('auteur', $statut);
283 283
 
284
-	$fond = '';
285
-	$titre = '';
284
+    $fond = '';
285
+    $titre = '';
286 286
 
287
-	/*
287
+    /*
288 288
 	if ($type != 'auteur') {
289 289
 	  $img2 = chemin_image('del-16.png');
290 290
 	  $titre = _T('titre_image_redacteur');
@@ -294,12 +294,12 @@  discard block
 block discarded – undo
294 294
 	}
295 295
 	*/
296 296
 
297
-	return http_img_pack($img, $alt, $fond, $alt);
297
+    return http_img_pack($img, $alt, $fond, $alt);
298 298
 }
299 299
 
300 300
 
301 301
 function puce_statut_rubrique_dist($id, $statut, $id_rubrique, $type, $ajax = '', $menu_rapide = _ACTIVER_PUCE_RAPIDE) {
302
-	return http_img_pack('rubrique-16.png', '');
302
+    return http_img_pack('rubrique-16.png', '');
303 303
 }
304 304
 
305 305
 /**
@@ -323,110 +323,110 @@  discard block
 block discarded – undo
323 323
  *     Code HTML de l'image de puce de statut à insérer (et du menu de changement si présent)
324 324
  **/
325 325
 function puce_statut_changement_rapide(
326
-	$id,
327
-	$statut,
328
-	$id_rubrique,
329
-	$type = 'article',
330
-	$ajax = false,
331
-	$menu_rapide = _ACTIVER_PUCE_RAPIDE
326
+    $id,
327
+    $statut,
328
+    $id_rubrique,
329
+    $type = 'article',
330
+    $ajax = false,
331
+    $menu_rapide = _ACTIVER_PUCE_RAPIDE
332 332
 ) {
333
-	$src = statut_image($type, $statut);
334
-	if (!$src) {
335
-		return $src;
336
-	}
337
-
338
-	if (!$id
339
-		or !_SPIP_AJAX
340
-		or !$menu_rapide
341
-	) {
342
-		$ajax_node = '';
343
-	} else {
344
-		$ajax_node = " class='imgstatut$type$id'";
345
-	}
346
-
347
-
348
-	$t = statut_titre($type, $statut);
349
-	$inser_puce = http_img_pack($src, $t, $ajax_node, $t);
350
-
351
-	if (!$ajax_node) {
352
-		return $inser_puce;
353
-	}
354
-
355
-	$table = table_objet_sql($type);
356
-	$desc = lister_tables_objets_sql($table);
357
-	if (!isset($desc['statut_textes_instituer'])) {
358
-		return $inser_puce;
359
-	}
360
-
361
-	if (!function_exists('autoriser')) {
362
-		include_spip('inc/autoriser');
363
-	}
364
-
365
-	// cas ou l'on a un parent connu (devrait disparaitre au profit du second cas plus generique)
366
-	if ($id_rubrique) {
367
-		if (!autoriser('publierdans', 'rubrique', $id_rubrique)) {
368
-			return $inser_puce;
369
-		}
370
-	} // si pas d'id_rubrique fourni, tester directement instituer type avec le statut publie
371
-	else {
372
-		if (!autoriser('instituer', $type, $id, null, array('statut' => 'publie'))) {
373
-			return $inser_puce;
374
-		}
375
-	}
376
-
377
-	$coord = array_flip(array_keys($desc['statut_textes_instituer']));
378
-	if (!isset($coord[$statut])) {
379
-		return $inser_puce;
380
-	}
381
-
382
-	$unit = 8/*widh de img*/ + 4/*padding*/
383
-	;
384
-	$margin = 4; /* marge a gauche + droite */
385
-	$zero = 1 /*border*/ + $margin / 2 + 2 /*padding*/
386
-	;
387
-	$clip = $zero + ($unit * $coord[$statut]);
388
-
389
-	if ($ajax) {
390
-		$width = $unit * count($desc['statut_textes_instituer']) + $margin;
391
-		$out = "<span class='puce_objet_fixe $type'>"
392
-			. $inser_puce
393
-			. "</span>"
394
-			. "<span class='puce_objet_popup $type statutdecal$type$id' style='width:{$width}px;margin-left:-{$clip}px;'>";
395
-		$i = 0;
396
-		foreach ($desc['statut_textes_instituer'] as $s => $t) {
397
-			$out .= afficher_script_statut($id, $type, -$zero - $i++ * $unit, statut_image($type, $s), $s, _T($t));
398
-		}
399
-		$out .= "</span>";
400
-
401
-		return $out;
402
-	} else {
403
-
404
-		$nom = "puce_statut_";
405
-		$action = generer_url_ecrire('puce_statut', "", true);
406
-		$lang_dir = lang_dir(lang_typo());
407
-
408
-		return "<span class='puce_objet $type' id='$nom$type$id' dir='$lang_dir' data-puce-nom='$nom' data-puce-type='$type' data-puce-id='$id' data-puce-action='$action'>"
409
-		. $inser_puce
410
-		. '</span>';
411
-	}
333
+    $src = statut_image($type, $statut);
334
+    if (!$src) {
335
+        return $src;
336
+    }
337
+
338
+    if (!$id
339
+        or !_SPIP_AJAX
340
+        or !$menu_rapide
341
+    ) {
342
+        $ajax_node = '';
343
+    } else {
344
+        $ajax_node = " class='imgstatut$type$id'";
345
+    }
346
+
347
+
348
+    $t = statut_titre($type, $statut);
349
+    $inser_puce = http_img_pack($src, $t, $ajax_node, $t);
350
+
351
+    if (!$ajax_node) {
352
+        return $inser_puce;
353
+    }
354
+
355
+    $table = table_objet_sql($type);
356
+    $desc = lister_tables_objets_sql($table);
357
+    if (!isset($desc['statut_textes_instituer'])) {
358
+        return $inser_puce;
359
+    }
360
+
361
+    if (!function_exists('autoriser')) {
362
+        include_spip('inc/autoriser');
363
+    }
364
+
365
+    // cas ou l'on a un parent connu (devrait disparaitre au profit du second cas plus generique)
366
+    if ($id_rubrique) {
367
+        if (!autoriser('publierdans', 'rubrique', $id_rubrique)) {
368
+            return $inser_puce;
369
+        }
370
+    } // si pas d'id_rubrique fourni, tester directement instituer type avec le statut publie
371
+    else {
372
+        if (!autoriser('instituer', $type, $id, null, array('statut' => 'publie'))) {
373
+            return $inser_puce;
374
+        }
375
+    }
376
+
377
+    $coord = array_flip(array_keys($desc['statut_textes_instituer']));
378
+    if (!isset($coord[$statut])) {
379
+        return $inser_puce;
380
+    }
381
+
382
+    $unit = 8/*widh de img*/ + 4/*padding*/
383
+    ;
384
+    $margin = 4; /* marge a gauche + droite */
385
+    $zero = 1 /*border*/ + $margin / 2 + 2 /*padding*/
386
+    ;
387
+    $clip = $zero + ($unit * $coord[$statut]);
388
+
389
+    if ($ajax) {
390
+        $width = $unit * count($desc['statut_textes_instituer']) + $margin;
391
+        $out = "<span class='puce_objet_fixe $type'>"
392
+            . $inser_puce
393
+            . "</span>"
394
+            . "<span class='puce_objet_popup $type statutdecal$type$id' style='width:{$width}px;margin-left:-{$clip}px;'>";
395
+        $i = 0;
396
+        foreach ($desc['statut_textes_instituer'] as $s => $t) {
397
+            $out .= afficher_script_statut($id, $type, -$zero - $i++ * $unit, statut_image($type, $s), $s, _T($t));
398
+        }
399
+        $out .= "</span>";
400
+
401
+        return $out;
402
+    } else {
403
+
404
+        $nom = "puce_statut_";
405
+        $action = generer_url_ecrire('puce_statut', "", true);
406
+        $lang_dir = lang_dir(lang_typo());
407
+
408
+        return "<span class='puce_objet $type' id='$nom$type$id' dir='$lang_dir' data-puce-nom='$nom' data-puce-type='$type' data-puce-id='$id' data-puce-action='$action'>"
409
+        . $inser_puce
410
+        . '</span>';
411
+    }
412 412
 }
413 413
 
414 414
 
415 415
 function afficher_script_statut($id, $type, $n, $img, $statut, $titre, $act = '') {
416
-	$h = generer_action_auteur("instituer_objet", "$type-$id-$statut");
417
-	$t = supprimer_tags($titre);
416
+    $h = generer_action_auteur("instituer_objet", "$type-$id-$statut");
417
+    $t = supprimer_tags($titre);
418 418
 
419
-	return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>" . http_img_pack($img, $t) . "</a>";
419
+    return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>" . http_img_pack($img, $t) . "</a>";
420 420
 }
421 421
 
422 422
 // compat
423 423
 // La couleur du statut
424 424
 
425 425
 function puce_statut($statut, $atts = '') {
426
-	$src = statut_image('article', $statut);
427
-	if (!$src) {
428
-		return '';
429
-	}
426
+    $src = statut_image('article', $statut);
427
+    if (!$src) {
428
+        return '';
429
+    }
430 430
 
431
-	return http_img_pack($src, statut_titre('article', $statut), $atts);
431
+    return http_img_pack($src, statut_titre('article', $statut), $atts);
432 432
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -416,7 +416,7 @@
 block discarded – undo
416 416
 	$h = generer_action_auteur("instituer_objet", "$type-$id-$statut");
417 417
 	$t = supprimer_tags($titre);
418 418
 
419
-	return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>" . http_img_pack($img, $t) . "</a>";
419
+	return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>".http_img_pack($img, $t)."</a>";
420 420
 }
421 421
 
422 422
 // compat
Please login to merge, or discard this patch.
ecrire/action/relancer_inscription.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 /**
@@ -26,22 +26,22 @@  discard block
 block discarded – undo
26 26
  * @return void
27 27
  */
28 28
 function action_relancer_inscription_dist() {
29
-	$securiser_action = charger_fonction('securiser_action', 'inc');
30
-	$id_auteur = $securiser_action();
29
+    $securiser_action = charger_fonction('securiser_action', 'inc');
30
+    $id_auteur = $securiser_action();
31 31
 
32
-	if (intval($id_auteur) and autoriser('relancer', 'inscription')) {
33
-		$auteur = sql_fetsel('prefs, email, nom, statut', 'spip_auteurs', "id_auteur=$id_auteur");
34
-		if ($auteur['statut'] == 'nouveau') {
35
-			include_spip('action/inscrire_auteur');
36
-			action_inscrire_auteur_dist($auteur['prefs'], $auteur['email'], $auteur['nom'], array('force_nouveau' => true));
37
-		}
38
-	} elseif ($id_auteur === '*' and autoriser('relancer', 'inscription')) {
39
-		$auteurs = sql_allfetsel('prefs, email, nom', 'spip_auteurs', "statut='nouveau'");
40
-		if (is_array($auteurs)) {
41
-			include_spip('action/inscrire_auteur');
42
-			while ($row = array_pop($auteurs)) {
43
-				action_inscrire_auteur_dist($row['prefs'], $row['email'], $row['nom'], array('force_nouveau' => true));
44
-			}
45
-		}
46
-	}
32
+    if (intval($id_auteur) and autoriser('relancer', 'inscription')) {
33
+        $auteur = sql_fetsel('prefs, email, nom, statut', 'spip_auteurs', "id_auteur=$id_auteur");
34
+        if ($auteur['statut'] == 'nouveau') {
35
+            include_spip('action/inscrire_auteur');
36
+            action_inscrire_auteur_dist($auteur['prefs'], $auteur['email'], $auteur['nom'], array('force_nouveau' => true));
37
+        }
38
+    } elseif ($id_auteur === '*' and autoriser('relancer', 'inscription')) {
39
+        $auteurs = sql_allfetsel('prefs, email, nom', 'spip_auteurs', "statut='nouveau'");
40
+        if (is_array($auteurs)) {
41
+            include_spip('action/inscrire_auteur');
42
+            while ($row = array_pop($auteurs)) {
43
+                action_inscrire_auteur_dist($row['prefs'], $row['email'], $row['nom'], array('force_nouveau' => true));
44
+            }
45
+        }
46
+    }
47 47
 }
Please login to merge, or discard this patch.
ecrire/lang/ecrire_it_fem.php 1 patch
Indentation   +683 added lines, -683 removed lines patch added patch discarded remove patch
@@ -4,364 +4,364 @@  discard block
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'activer_plugin' => 'Attiva il plugin',
14
-	'affichage' => 'Visualizzazione',
15
-	'aide_non_disponible' => 'Questa parte della guida in linea non è ancora disponibile in italiano.',
16
-	'annuler_recherche' => 'Annullare la ricerca',
17
-	'auteur' => 'Autrice:',
18
-	'avis_acces_interdit' => 'Accesso vietato.',
19
-	'avis_article_modifie' => 'Attenzione, @nom_auteur_modif@ ha lavorato su quest’articolo @date_diff@ minuti fa',
20
-	'avis_aucun_resultat' => 'Nessun risultato.',
21
-	'avis_base_inaccessible' => 'Impossibile connettersi al database @base@.',
22
-	'avis_chemin_invalide_1' => 'il percorso che hai scelto',
23
-	'avis_chemin_invalide_2' => 'non sembra valido. Torna alla pagina precedente e verifica le informazioni fornite.',
24
-	'avis_connexion_echec_1' => 'il collegamento alla base di dati è fallito.',
25
-	'avis_connexion_echec_2' => 'torna alla pagina precedente e verifica le informazioni fornite.',
26
-	'avis_connexion_echec_3' => '<b>N.B.</b> Spesso sul server si deve <b>chiedere</b> l’attivazione dell’accesso alla base di dati prima di poterlo utilizzare. Se è impossibile collegarsi, verificare la configurazione per la connessione con l’amministratrice del sistema.',
27
-	'avis_connexion_erreur_nom_base' => 'Il nome del database può contenere solo lettere, cifre e tratti',
28
-	'avis_connexion_ldap_echec_1' => 'La connessione al server LDAP è fallita.',
29
-	'avis_connexion_ldap_echec_2' => 'Torna alla pagina precedente e verifica le informazioni fornite. ',
30
-	'avis_connexion_ldap_echec_3' => 'In alternativa, non utilizzare il supporto LDAP per importare utenti.',
31
-	'avis_deplacement_rubrique' => 'Attenzione! Questa rubrica contiene @contient_breves@ breve/i: se vuoi spostarla, spunta questa casella per confermare.',
32
-	'avis_erreur_connexion_mysql' => 'Errore di connessione SQL',
33
-	'avis_espace_interdit' => '<b>Area vietata</b> <div>SPIP è già installato.</div>',
34
-	'avis_lecture_noms_bases_1' => 'Il programma di installazione non ha potuto leggere i nomi dei database installati nel server.',
35
-	'avis_lecture_noms_bases_2' => 'Nessun database è disponibile, o la funzione che permette di accedere alla lista database è
12
+    // A
13
+    'activer_plugin' => 'Attiva il plugin',
14
+    'affichage' => 'Visualizzazione',
15
+    'aide_non_disponible' => 'Questa parte della guida in linea non è ancora disponibile in italiano.',
16
+    'annuler_recherche' => 'Annullare la ricerca',
17
+    'auteur' => 'Autrice:',
18
+    'avis_acces_interdit' => 'Accesso vietato.',
19
+    'avis_article_modifie' => 'Attenzione, @nom_auteur_modif@ ha lavorato su quest’articolo @date_diff@ minuti fa',
20
+    'avis_aucun_resultat' => 'Nessun risultato.',
21
+    'avis_base_inaccessible' => 'Impossibile connettersi al database @base@.',
22
+    'avis_chemin_invalide_1' => 'il percorso che hai scelto',
23
+    'avis_chemin_invalide_2' => 'non sembra valido. Torna alla pagina precedente e verifica le informazioni fornite.',
24
+    'avis_connexion_echec_1' => 'il collegamento alla base di dati è fallito.',
25
+    'avis_connexion_echec_2' => 'torna alla pagina precedente e verifica le informazioni fornite.',
26
+    'avis_connexion_echec_3' => '<b>N.B.</b> Spesso sul server si deve <b>chiedere</b> l’attivazione dell’accesso alla base di dati prima di poterlo utilizzare. Se è impossibile collegarsi, verificare la configurazione per la connessione con l’amministratrice del sistema.',
27
+    'avis_connexion_erreur_nom_base' => 'Il nome del database può contenere solo lettere, cifre e tratti',
28
+    'avis_connexion_ldap_echec_1' => 'La connessione al server LDAP è fallita.',
29
+    'avis_connexion_ldap_echec_2' => 'Torna alla pagina precedente e verifica le informazioni fornite. ',
30
+    'avis_connexion_ldap_echec_3' => 'In alternativa, non utilizzare il supporto LDAP per importare utenti.',
31
+    'avis_deplacement_rubrique' => 'Attenzione! Questa rubrica contiene @contient_breves@ breve/i: se vuoi spostarla, spunta questa casella per confermare.',
32
+    'avis_erreur_connexion_mysql' => 'Errore di connessione SQL',
33
+    'avis_espace_interdit' => '<b>Area vietata</b> <div>SPIP è già installato.</div>',
34
+    'avis_lecture_noms_bases_1' => 'Il programma di installazione non ha potuto leggere i nomi dei database installati nel server.',
35
+    'avis_lecture_noms_bases_2' => 'Nessun database è disponibile, o la funzione che permette di accedere alla lista database è
36 36
 disattivata per motivi sicurezza (verifica con l’amministratrice di sistema).',
37
-	'avis_lecture_noms_bases_3' => 'Nel secondo caso, è probabile che un database con il tuo nome di login sia utilizzabile:',
38
-	'avis_non_acces_page' => 'Non hai accesso a questa pagina.',
39
-	'avis_operation_echec' => 'L’operazione è fallita.',
40
-	'avis_operation_impossible' => 'Operazione impossibile',
41
-	'avis_suppression_base' => 'ATTENZIONE, la cancellazione dei dati è irreversibile',
37
+    'avis_lecture_noms_bases_3' => 'Nel secondo caso, è probabile che un database con il tuo nome di login sia utilizzabile:',
38
+    'avis_non_acces_page' => 'Non hai accesso a questa pagina.',
39
+    'avis_operation_echec' => 'L’operazione è fallita.',
40
+    'avis_operation_impossible' => 'Operazione impossibile',
41
+    'avis_suppression_base' => 'ATTENZIONE, la cancellazione dei dati è irreversibile',
42 42
 
43
-	// B
44
-	'bouton_acces_ldap' => 'Aggiungi l’accesso a LDAP',
45
-	'bouton_ajouter' => 'Aggiungi',
46
-	'bouton_annuler' => 'Annulla',
47
-	'bouton_cache_activer' => 'Riattivare la cache',
48
-	'bouton_cache_desactiver' => 'Disattivare temporaneamente la cache',
49
-	'bouton_demande_publication' => 'Chiedi la pubblicazione di questo articolo',
50
-	'bouton_desactive_tout' => 'Disattiva tutto',
51
-	'bouton_desinstaller' => 'Disinstalla',
52
-	'bouton_effacer_tout' => 'Cancella TUTTO',
53
-	'bouton_envoyer_message' => 'Messaggio definitivo: Invia',
54
-	'bouton_fermer' => 'Chiudere',
55
-	'bouton_mettre_a_jour_base' => 'Aggiornare il database',
56
-	'bouton_modifier' => 'Modifica',
57
-	'bouton_radio_afficher' => 'Visualizza',
58
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Comparire nell’elenco delle redattrici collegate',
59
-	'bouton_radio_envoi_annonces_adresse' => 'Invia gli annunci all’indirizzo:',
60
-	'bouton_radio_envoi_liste_nouveautes' => 'Invia l’elenco delle novità',
61
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Non comparire nell’elenco delle redattrici collegate ',
62
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Non inviare annunci editoriali ',
63
-	'bouton_redirection' => 'REINDIRIZZAMENTO',
64
-	'bouton_relancer_installation' => 'Rilanciare l’installazione',
65
-	'bouton_suivant' => 'Avanti',
66
-	'bouton_tenter_recuperation' => 'Tentare un ripristino',
67
-	'bouton_test_proxy' => 'Testare il proxy',
68
-	'bouton_vider_cache' => 'Svuota la cache',
43
+    // B
44
+    'bouton_acces_ldap' => 'Aggiungi l’accesso a LDAP',
45
+    'bouton_ajouter' => 'Aggiungi',
46
+    'bouton_annuler' => 'Annulla',
47
+    'bouton_cache_activer' => 'Riattivare la cache',
48
+    'bouton_cache_desactiver' => 'Disattivare temporaneamente la cache',
49
+    'bouton_demande_publication' => 'Chiedi la pubblicazione di questo articolo',
50
+    'bouton_desactive_tout' => 'Disattiva tutto',
51
+    'bouton_desinstaller' => 'Disinstalla',
52
+    'bouton_effacer_tout' => 'Cancella TUTTO',
53
+    'bouton_envoyer_message' => 'Messaggio definitivo: Invia',
54
+    'bouton_fermer' => 'Chiudere',
55
+    'bouton_mettre_a_jour_base' => 'Aggiornare il database',
56
+    'bouton_modifier' => 'Modifica',
57
+    'bouton_radio_afficher' => 'Visualizza',
58
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Comparire nell’elenco delle redattrici collegate',
59
+    'bouton_radio_envoi_annonces_adresse' => 'Invia gli annunci all’indirizzo:',
60
+    'bouton_radio_envoi_liste_nouveautes' => 'Invia l’elenco delle novità',
61
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Non comparire nell’elenco delle redattrici collegate ',
62
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Non inviare annunci editoriali ',
63
+    'bouton_redirection' => 'REINDIRIZZAMENTO',
64
+    'bouton_relancer_installation' => 'Rilanciare l’installazione',
65
+    'bouton_suivant' => 'Avanti',
66
+    'bouton_tenter_recuperation' => 'Tentare un ripristino',
67
+    'bouton_test_proxy' => 'Testare il proxy',
68
+    'bouton_vider_cache' => 'Svuota la cache',
69 69
 
70
-	// C
71
-	'cache_modifiable_webmestre' => 'Questo parametro può essere modificato dalla webmistress del sito.',
72
-	'calendrier_synchro' => 'Se si utilizza un programma di agenda compatibile con <b>iCal</b>, è possibile sincronizzare i dati con le informazioni di questo sito',
73
-	'config_activer_champs' => 'Attiva i campi seguenti',
74
-	'config_choix_base_sup' => 'indicare un database su questo server',
75
-	'config_erreur_base_sup' => 'SPIP non ha accesso all’elenco dei database accessibili ',
76
-	'config_info_base_sup' => 'Se si hanno altri database da interrogare attraverso SPIP, con il proprio server SQL o altro, il form sottostante permette di dichiararli. Se si lasciano alcuni campi vuoti verranno utilizzati i dati della connessione al database principale.',
77
-	'config_info_base_sup_disponibles' => 'Database supplementari già dichiarati:',
78
-	'config_info_enregistree' => 'La nuova configurazione è stata registrata',
79
-	'config_info_logos' => 'Ogni elemento del sito può avere un logo, come pure un « logo per il roll-over »',
80
-	'config_info_logos_utiliser' => 'Utilizza i logo',
81
-	'config_info_logos_utiliser_non' => 'Non utilizzare i logo',
82
-	'config_info_logos_utiliser_survol' => 'Utilizzare i logo di roll-over',
83
-	'config_info_logos_utiliser_survol_non' => 'Non utilizzare i logo di roll-over',
84
-	'config_info_redirection' => 'Attivando questa opzione è possibile creare degli articoli virtuali, semplici riferimenti di articoli pubblicati su altri siti o al di fuori di SPIP.',
85
-	'config_redirection' => 'Articoli virtuali',
86
-	'config_titre_base_sup' => 'Dichiarazione di un database supplementare',
87
-	'config_titre_base_sup_choix' => 'Scegliere un database supplementare',
88
-	'connexion_ldap' => 'Connessione:',
89
-	'creer_et_associer_un_auteur' => 'Creare ed associare un’autrice',
70
+    // C
71
+    'cache_modifiable_webmestre' => 'Questo parametro può essere modificato dalla webmistress del sito.',
72
+    'calendrier_synchro' => 'Se si utilizza un programma di agenda compatibile con <b>iCal</b>, è possibile sincronizzare i dati con le informazioni di questo sito',
73
+    'config_activer_champs' => 'Attiva i campi seguenti',
74
+    'config_choix_base_sup' => 'indicare un database su questo server',
75
+    'config_erreur_base_sup' => 'SPIP non ha accesso all’elenco dei database accessibili ',
76
+    'config_info_base_sup' => 'Se si hanno altri database da interrogare attraverso SPIP, con il proprio server SQL o altro, il form sottostante permette di dichiararli. Se si lasciano alcuni campi vuoti verranno utilizzati i dati della connessione al database principale.',
77
+    'config_info_base_sup_disponibles' => 'Database supplementari già dichiarati:',
78
+    'config_info_enregistree' => 'La nuova configurazione è stata registrata',
79
+    'config_info_logos' => 'Ogni elemento del sito può avere un logo, come pure un « logo per il roll-over »',
80
+    'config_info_logos_utiliser' => 'Utilizza i logo',
81
+    'config_info_logos_utiliser_non' => 'Non utilizzare i logo',
82
+    'config_info_logos_utiliser_survol' => 'Utilizzare i logo di roll-over',
83
+    'config_info_logos_utiliser_survol_non' => 'Non utilizzare i logo di roll-over',
84
+    'config_info_redirection' => 'Attivando questa opzione è possibile creare degli articoli virtuali, semplici riferimenti di articoli pubblicati su altri siti o al di fuori di SPIP.',
85
+    'config_redirection' => 'Articoli virtuali',
86
+    'config_titre_base_sup' => 'Dichiarazione di un database supplementare',
87
+    'config_titre_base_sup_choix' => 'Scegliere un database supplementare',
88
+    'connexion_ldap' => 'Connessione:',
89
+    'creer_et_associer_un_auteur' => 'Creare ed associare un’autrice',
90 90
 
91
-	// D
92
-	'date_mot_heures' => 'ore',
91
+    // D
92
+    'date_mot_heures' => 'ore',
93 93
 
94
-	// E
95
-	'ecran_securite' => ' + schermo di sicurezza @version@', # RELIRE
96
-	'email' => 'email',
97
-	'email_2' => 'email:',
98
-	'en_savoir_plus' => 'Ulteriori informazioni', # RELIRE
99
-	'entree_adresse_annuaire' => 'Indirizzo della rubrica',
100
-	'entree_adresse_email' => 'Il tuo indirizzo email',
101
-	'entree_adresse_email_2' => 'Indirizzo email',
102
-	'entree_base_donnee_1' => 'Indirizzo del database',
103
-	'entree_base_donnee_2' => '(Spesso questo indirizzo coincide con quello dell’intero sito, qualche volta corrisponde a "localhost", altre volte invece non è necessario specificarlo.)',
104
-	'entree_biographie' => 'La tua biografia in breve.',
105
-	'entree_chemin_acces' => '<b>Inserire</b> il percorso d’accesso:',
106
-	'entree_cle_pgp' => 'Chiave PGP',
107
-	'entree_cle_pgp_2' => 'Autenticazione', # RELIRE
108
-	'entree_contenu_rubrique' => '(Contenuto della rubrica in qualche parola)',
109
-	'entree_identifiants_connexion' => 'Identificativo di connessione...',
110
-	'entree_identifiants_connexion_2' => 'Identificativo', # RELIRE
111
-	'entree_informations_connexion_ldap' => 'Inserisci in questo form gli estremi per la connessione alla tua rubrica LDAP.
94
+    // E
95
+    'ecran_securite' => ' + schermo di sicurezza @version@', # RELIRE
96
+    'email' => 'email',
97
+    'email_2' => 'email:',
98
+    'en_savoir_plus' => 'Ulteriori informazioni', # RELIRE
99
+    'entree_adresse_annuaire' => 'Indirizzo della rubrica',
100
+    'entree_adresse_email' => 'Il tuo indirizzo email',
101
+    'entree_adresse_email_2' => 'Indirizzo email',
102
+    'entree_base_donnee_1' => 'Indirizzo del database',
103
+    'entree_base_donnee_2' => '(Spesso questo indirizzo coincide con quello dell’intero sito, qualche volta corrisponde a "localhost", altre volte invece non è necessario specificarlo.)',
104
+    'entree_biographie' => 'La tua biografia in breve.',
105
+    'entree_chemin_acces' => '<b>Inserire</b> il percorso d’accesso:',
106
+    'entree_cle_pgp' => 'Chiave PGP',
107
+    'entree_cle_pgp_2' => 'Autenticazione', # RELIRE
108
+    'entree_contenu_rubrique' => '(Contenuto della rubrica in qualche parola)',
109
+    'entree_identifiants_connexion' => 'Identificativo di connessione...',
110
+    'entree_identifiants_connexion_2' => 'Identificativo', # RELIRE
111
+    'entree_informations_connexion_ldap' => 'Inserisci in questo form gli estremi per la connessione alla tua rubrica LDAP.
112 112
 Se non conosci queste informazioni, richiedile all’amministratrice del sistema o della rete.',
113
-	'entree_infos_perso' => 'Chi sei?',
114
-	'entree_infos_perso_2' => 'Chi è l’autrice ?',
115
-	'entree_interieur_rubrique' => 'All’interno della rubrica:',
116
-	'entree_liens_sites' => '<b>Link ipertestuale</b> (riferimento, sito da visitare...)',
117
-	'entree_login' => 'Login',
118
-	'entree_login_connexion_1' => 'Il login di connessione',
119
-	'entree_login_connexion_2' => '(Corrisponde a volte al login d’accesso via FTP; in alcuni casi non occorre specificare nulla)',
120
-	'entree_mot_passe' => 'Password',
121
-	'entree_mot_passe_1' => 'La password di connessione',
122
-	'entree_mot_passe_2' => '(Corrisponde a volte alla password d’accesso via FTP; in alcuni casi non occorre specificare nulla)',
123
-	'entree_nom_fichier' => 'Inserire il nome del file @texte_compresse@:',
124
-	'entree_nom_pseudo' => 'Nome o pseudonimo',
125
-	'entree_nom_pseudo_1' => '(Nome o pseudonimo)',
126
-	'entree_nom_pseudo_2' => 'Nome o pseudonimo',
127
-	'entree_nom_site' => 'Nome del tuo sito',
128
-	'entree_nom_site_2' => 'Nome del sito dell’autrice', # RELIRE
129
-	'entree_nouveau_passe' => 'Nuova password',
130
-	'entree_passe_ldap' => 'Password',
131
-	'entree_port_annuaire' => 'Il numero di porta della rubrica',
132
-	'entree_signature' => 'Firma',
133
-	'entree_titre_obligatoire' => '<b>Titolo</b> [Obbligatorio]<br />',
134
-	'entree_url' => 'Indirizzo (URL) del sito',
135
-	'entree_url_2' => 'Indirizzo (URL) del sito',
136
-	'erreur_connect_deja_existant' => 'Esiste già un server con questo nome', # RELIRE
137
-	'erreur_email_deja_existant' => 'Questo indirizzo email è già registrato',
138
-	'erreur_nom_connect_incorrect' => 'Questo nome non è autorizzato', # RELIRE
139
-	'erreur_plugin_desinstalation_echouee' => 'La disinstallazione del plug in è fallita. E’ comunque possibile disattivarlo.', # RELIRE
140
-	'erreur_plugin_fichier_absent' => 'File non presente',
141
-	'erreur_plugin_fichier_def_absent' => 'File di definizioni non presente',
142
-	'erreur_plugin_nom_fonction_interdit' => 'Nome di funzione non possibile',
143
-	'erreur_plugin_nom_manquant' => 'Nome del plugin mancante',
144
-	'erreur_plugin_prefix_manquant' => 'Spazio per il nome del plugin non definito',
145
-	'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; mancante nel file di definizione',
146
-	'erreur_plugin_version_manquant' => 'Versione del plugin mancante',
113
+    'entree_infos_perso' => 'Chi sei?',
114
+    'entree_infos_perso_2' => 'Chi è l’autrice ?',
115
+    'entree_interieur_rubrique' => 'All’interno della rubrica:',
116
+    'entree_liens_sites' => '<b>Link ipertestuale</b> (riferimento, sito da visitare...)',
117
+    'entree_login' => 'Login',
118
+    'entree_login_connexion_1' => 'Il login di connessione',
119
+    'entree_login_connexion_2' => '(Corrisponde a volte al login d’accesso via FTP; in alcuni casi non occorre specificare nulla)',
120
+    'entree_mot_passe' => 'Password',
121
+    'entree_mot_passe_1' => 'La password di connessione',
122
+    'entree_mot_passe_2' => '(Corrisponde a volte alla password d’accesso via FTP; in alcuni casi non occorre specificare nulla)',
123
+    'entree_nom_fichier' => 'Inserire il nome del file @texte_compresse@:',
124
+    'entree_nom_pseudo' => 'Nome o pseudonimo',
125
+    'entree_nom_pseudo_1' => '(Nome o pseudonimo)',
126
+    'entree_nom_pseudo_2' => 'Nome o pseudonimo',
127
+    'entree_nom_site' => 'Nome del tuo sito',
128
+    'entree_nom_site_2' => 'Nome del sito dell’autrice', # RELIRE
129
+    'entree_nouveau_passe' => 'Nuova password',
130
+    'entree_passe_ldap' => 'Password',
131
+    'entree_port_annuaire' => 'Il numero di porta della rubrica',
132
+    'entree_signature' => 'Firma',
133
+    'entree_titre_obligatoire' => '<b>Titolo</b> [Obbligatorio]<br />',
134
+    'entree_url' => 'Indirizzo (URL) del sito',
135
+    'entree_url_2' => 'Indirizzo (URL) del sito',
136
+    'erreur_connect_deja_existant' => 'Esiste già un server con questo nome', # RELIRE
137
+    'erreur_email_deja_existant' => 'Questo indirizzo email è già registrato',
138
+    'erreur_nom_connect_incorrect' => 'Questo nome non è autorizzato', # RELIRE
139
+    'erreur_plugin_desinstalation_echouee' => 'La disinstallazione del plug in è fallita. E’ comunque possibile disattivarlo.', # RELIRE
140
+    'erreur_plugin_fichier_absent' => 'File non presente',
141
+    'erreur_plugin_fichier_def_absent' => 'File di definizioni non presente',
142
+    'erreur_plugin_nom_fonction_interdit' => 'Nome di funzione non possibile',
143
+    'erreur_plugin_nom_manquant' => 'Nome del plugin mancante',
144
+    'erreur_plugin_prefix_manquant' => 'Spazio per il nome del plugin non definito',
145
+    'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; mancante nel file di definizione',
146
+    'erreur_plugin_version_manquant' => 'Versione del plugin mancante',
147 147
 
148
-	// H
149
-	'htaccess_a_simuler' => 'Attenzione: la configurazione del vostro server HTTP non tiene conto dei file @htaccess@. Per poter mettere in sicurezza bisognerà modificare la configurazione di questo punto, oppure sarà necessario che i parametri fissi @constantes@ (definiti nel file le_mie_opzioni.php) abbiano i valore dei registri diversi da @document_root@.', # RELIRE
148
+    // H
149
+    'htaccess_a_simuler' => 'Attenzione: la configurazione del vostro server HTTP non tiene conto dei file @htaccess@. Per poter mettere in sicurezza bisognerà modificare la configurazione di questo punto, oppure sarà necessario che i parametri fissi @constantes@ (definiti nel file le_mie_opzioni.php) abbiano i valore dei registri diversi da @document_root@.', # RELIRE
150 150
 
151
-	// I
152
-	'ical_info1' => 'Questa pagina elenca diversi metodi per rimanere in contatto con le varie attività del sito.',
153
-	'ical_info2' => 'Per ulteriori informazioni su tutte queste tecniche, non esitate a consultare <a href="@spipnet@">la documentazione di SPIP</a>.',
154
-	'ical_info_calendrier' => 'Sono disponibili due calendari. Il primo è una mappa del sito che annuncia tutti gli articoli pubblicati. Il secondo contiene gli annunci editoriali e gli ultimi messaggi privati: è un’area riservata, mediante identificativo personale, che è possibile modificare in qualsiasi momento rinnovando la password personale.',
155
-	'ical_methode_http' => 'Download',
156
-	'ical_methode_webcal' => 'Sincronizzazione (webcal://)',
157
-	'ical_texte_js' => 'Una linea in javascript permette di visualizzare, con molta semplicità e su qualsiasi tipo di sito, gli articoli recenti pubblicati su questo sito.',
158
-	'ical_texte_prive' => 'Questo calendario, ad uso strettamente privato, dà informazioni sull’attività redazionale privata di questo sito (impegni e appuntamenti personali, articoli e brevi proposti...).',
159
-	'ical_texte_public' => 'Questo calendario permette di monitorare l’attività pubblica del sito (articoli e brevi pubblicati).',
160
-	'ical_texte_rss' => 'È possibile mettere in syndication le novità di questo sito con qualsiasi lettore di file in formato XML/RSS (Rich Site Summary). Questo è il medesimo formato che permette a SPIP di leggere le novità pubblicate su altri siti che utilizzano un formato di scambio compatibile.',
161
-	'ical_titre_js' => 'Javascript',
162
-	'ical_titre_mailing' => 'Mailing-list',
163
-	'ical_titre_rss' => 'File di syndication',
164
-	'icone_activer_cookie' => 'Attiva il cookie di corrispondenza',
165
-	'icone_activite' => 'Attività',
166
-	'icone_admin_plugin' => 'Gestione dei plugin',
167
-	'icone_afficher_auteurs' => 'Pubblica le autrici',
168
-	'icone_afficher_visiteurs' => 'Pubblica i visitatori',
169
-	'icone_arret_discussion' => 'Non partecipare più a questa discussione',
170
-	'icone_calendrier' => 'Calendario',
171
-	'icone_creer_auteur' => 'Crea una nuova autrice ed associala a questo articolo',
172
-	'icone_creer_mot_cle' => 'Crea una nuova parola chiave e collegala a questo articolo',
173
-	'icone_creer_rubrique_2' => 'Crea una nuova rubrica',
174
-	'icone_ma_langue' => 'La mia lingua',
175
-	'icone_mes_infos' => 'Le mie informazioni',
176
-	'icone_modifier_article' => 'Modifica l’articolo',
177
-	'icone_modifier_rubrique' => 'Modifica la rubrica',
178
-	'icone_relancer_signataire' => 'Rilanciare il firmatario',
179
-	'icone_retour' => 'Indietro',
180
-	'icone_retour_article' => 'Torna all’articolo',
181
-	'icone_supprimer_cookie' => 'Elimina il cookie di corrispondenza',
182
-	'icone_supprimer_rubrique' => 'Elimina la rubrica',
183
-	'icone_supprimer_signature' => 'Cancella l’adesione',
184
-	'icone_valider_signature' => 'Conferma l’adesione',
185
-	'image_administrer_rubrique' => 'Puoi amministrare questa rubrica',
186
-	'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
187
-	'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
188
-	'info_1_article' => '1 articolo',
189
-	'info_activer_cookie' => 'Se vuoi puoi attivare un <b>cookie di corrispondenza</b>, che ti permetterà
151
+    // I
152
+    'ical_info1' => 'Questa pagina elenca diversi metodi per rimanere in contatto con le varie attività del sito.',
153
+    'ical_info2' => 'Per ulteriori informazioni su tutte queste tecniche, non esitate a consultare <a href="@spipnet@">la documentazione di SPIP</a>.',
154
+    'ical_info_calendrier' => 'Sono disponibili due calendari. Il primo è una mappa del sito che annuncia tutti gli articoli pubblicati. Il secondo contiene gli annunci editoriali e gli ultimi messaggi privati: è un’area riservata, mediante identificativo personale, che è possibile modificare in qualsiasi momento rinnovando la password personale.',
155
+    'ical_methode_http' => 'Download',
156
+    'ical_methode_webcal' => 'Sincronizzazione (webcal://)',
157
+    'ical_texte_js' => 'Una linea in javascript permette di visualizzare, con molta semplicità e su qualsiasi tipo di sito, gli articoli recenti pubblicati su questo sito.',
158
+    'ical_texte_prive' => 'Questo calendario, ad uso strettamente privato, dà informazioni sull’attività redazionale privata di questo sito (impegni e appuntamenti personali, articoli e brevi proposti...).',
159
+    'ical_texte_public' => 'Questo calendario permette di monitorare l’attività pubblica del sito (articoli e brevi pubblicati).',
160
+    'ical_texte_rss' => 'È possibile mettere in syndication le novità di questo sito con qualsiasi lettore di file in formato XML/RSS (Rich Site Summary). Questo è il medesimo formato che permette a SPIP di leggere le novità pubblicate su altri siti che utilizzano un formato di scambio compatibile.',
161
+    'ical_titre_js' => 'Javascript',
162
+    'ical_titre_mailing' => 'Mailing-list',
163
+    'ical_titre_rss' => 'File di syndication',
164
+    'icone_activer_cookie' => 'Attiva il cookie di corrispondenza',
165
+    'icone_activite' => 'Attività',
166
+    'icone_admin_plugin' => 'Gestione dei plugin',
167
+    'icone_afficher_auteurs' => 'Pubblica le autrici',
168
+    'icone_afficher_visiteurs' => 'Pubblica i visitatori',
169
+    'icone_arret_discussion' => 'Non partecipare più a questa discussione',
170
+    'icone_calendrier' => 'Calendario',
171
+    'icone_creer_auteur' => 'Crea una nuova autrice ed associala a questo articolo',
172
+    'icone_creer_mot_cle' => 'Crea una nuova parola chiave e collegala a questo articolo',
173
+    'icone_creer_rubrique_2' => 'Crea una nuova rubrica',
174
+    'icone_ma_langue' => 'La mia lingua',
175
+    'icone_mes_infos' => 'Le mie informazioni',
176
+    'icone_modifier_article' => 'Modifica l’articolo',
177
+    'icone_modifier_rubrique' => 'Modifica la rubrica',
178
+    'icone_relancer_signataire' => 'Rilanciare il firmatario',
179
+    'icone_retour' => 'Indietro',
180
+    'icone_retour_article' => 'Torna all’articolo',
181
+    'icone_supprimer_cookie' => 'Elimina il cookie di corrispondenza',
182
+    'icone_supprimer_rubrique' => 'Elimina la rubrica',
183
+    'icone_supprimer_signature' => 'Cancella l’adesione',
184
+    'icone_valider_signature' => 'Conferma l’adesione',
185
+    'image_administrer_rubrique' => 'Puoi amministrare questa rubrica',
186
+    'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
187
+    'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
188
+    'info_1_article' => '1 articolo',
189
+    'info_activer_cookie' => 'Se vuoi puoi attivare un <b>cookie di corrispondenza</b>, che ti permetterà
190 190
 di passare facilmente dal sito pubblico all’interfaccia privata.',
191
-	'info_administrateur' => 'Amministratrice',
192
-	'info_administrateur_1' => 'Amministratrice',
193
-	'info_administrateur_2' => 'del sito (<i>da utilizzare con prudenza</i>)',
194
-	'info_administrateur_site_01' => 'Se sei amministratrice del sito,',
195
-	'info_administrateur_site_02' => 'clicca qui',
196
-	'info_administrateurs' => 'Amministratrici',
197
-	'info_administrer_rubrique' => 'Puoi amministrare questa rubrica',
198
-	'info_adresse' => 'all’indirizzo:',
199
-	'info_adresse_url' => 'Indirizzo (URL) del sito pubblico',
200
-	'info_aide_en_ligne' => 'Guida in linea SPIP',
201
-	'info_ajout_image' => 'Quando aggiungi delle immagini come documenti allegati ad un articolo,
191
+    'info_administrateur' => 'Amministratrice',
192
+    'info_administrateur_1' => 'Amministratrice',
193
+    'info_administrateur_2' => 'del sito (<i>da utilizzare con prudenza</i>)',
194
+    'info_administrateur_site_01' => 'Se sei amministratrice del sito,',
195
+    'info_administrateur_site_02' => 'clicca qui',
196
+    'info_administrateurs' => 'Amministratrici',
197
+    'info_administrer_rubrique' => 'Puoi amministrare questa rubrica',
198
+    'info_adresse' => 'all’indirizzo:',
199
+    'info_adresse_url' => 'Indirizzo (URL) del sito pubblico',
200
+    'info_aide_en_ligne' => 'Guida in linea SPIP',
201
+    'info_ajout_image' => 'Quando aggiungi delle immagini come documenti allegati ad un articolo,
202 202
 SPIP può creare  delle thumbnail (miniature) delle
203 203
 immagini inserite. Ciò permette ad esempio di creare in automatico una galleria di immagini o un portfolio.',
204
-	'info_ajouter_rubrique' => 'Aggiungi un’altra rubrica da amministrare:',
205
-	'info_annonce_nouveautes' => 'Annuncio delle novità',
206
-	'info_article' => 'articolo',
207
-	'info_article_2' => 'articoli',
208
-	'info_article_a_paraitre' => 'Gli articoli postdatati da pubblicare',
209
-	'info_articles_02' => 'articoli',
210
-	'info_articles_2' => 'Articoli',
211
-	'info_articles_auteur' => 'Articoli di questo autore',
212
-	'info_articles_trouves' => 'Articoli trovati',
213
-	'info_attente_validation' => 'I tuoi articoli in attesa di convalida',
214
-	'info_aujourdhui' => 'oggi: ',
215
-	'info_auteurs' => 'Le autrici',
216
-	'info_auteurs_par_tri' => 'Autrici@partri@',
217
-	'info_auteurs_trouves' => 'Autrici trovate',
218
-	'info_authentification_externe' => 'Autenticazione esterna',
219
-	'info_avertissement' => 'Avvertimento',
220
-	'info_barre_outils' => 'con la barra degli strumenti?',
221
-	'info_base_installee' => 'La struttura del vostro database è installata.',
222
-	'info_chapeau' => 'Introduzione',
223
-	'info_chapeau_2' => 'Introduzione:',
224
-	'info_chemin_acces_1' => 'Opzioni: <b>Percorso d’accesso ai dati nell’elenco</b>',
225
-	'info_chemin_acces_2' => 'È necessario specificare il percorso per accedere ai dati nell’elenco. Questa informazione è indispensabile al fine di leggere i profili utente in esso contenuti.',
226
-	'info_chemin_acces_annuaire' => 'Opzioni: <b>Percorso d’accesso ai dati nell’elenco',
227
-	'info_choix_base' => 'Terza fase: ',
228
-	'info_classement_1' => '<sup>o</sup> su @liste@',
229
-	'info_classement_2' => '<sup>o</sup> su @liste@',
230
-	'info_code_acces' => 'Non dimenticare i tuoi codici d’accesso!',
231
-	'info_config_suivi' => 'Se questo indirizzo corrisponde a una mailing-list, è possibile indicare qui sotto l’indirizzo al quale i partecipanti del sito possono iscriversi. Questo indirizzo può essere una URL (per esempio la pagina di iscrizione via Web alla lista), oppure un indirizzo email che contiene un Oggetto specifico (per esempio: <tt>@adresse_suivi@?subject=subscribe</tt>):',
232
-	'info_config_suivi_explication' => 'È possibile abbonarsi alla mailing-list di questo sito. Verranno spedite per email le notifiche degli articoli e delle brevi proposte per la pubblicazione.',
233
-	'info_confirmer_passe' => 'Conferma la nuova password:',
234
-	'info_conflit_edition_avis_non_sauvegarde' => 'Attenzione, i campi seguenti sono già stati modificati. Quindi le vostre modifiche su questi campi non sono state registrate.',
235
-	'info_conflit_edition_differences' => 'Differenze:',
236
-	'info_conflit_edition_version_enregistree' => 'La versione registrata:',
237
-	'info_conflit_edition_votre_version' => 'La tua versione:',
238
-	'info_connexion_base' => 'Prova di connessione al database',
239
-	'info_connexion_base_donnee' => 'Connessione al proprio database',
240
-	'info_connexion_ldap_ok' => 'La connessione LDAP è riuscita.</b><p> È possibile passare alla fase successiva.</p>',
241
-	'info_connexion_mysql' => 'La connessione a SQL',
242
-	'info_connexion_ok' => 'La connessione è riuscita.',
243
-	'info_contact' => 'Contatti',
244
-	'info_contenu_articles' => 'Contentuto degli articoli',
245
-	'info_creation_paragraphe' => 'Per creare dei paragrafi indipendenti, lasciare delle righe vuote.', # RELIRE
246
-	'info_creation_rubrique' => 'Prima di poter scrivere degli articoli, <br />devi creare almeno una rubrica.<br />',
247
-	'info_creation_tables' => 'Creazione delle tabelle nel database',
248
-	'info_creer_base' => '<b>Creare</b> un nuovo database:',
249
-	'info_dans_rubrique' => 'Nella rubrica:',
250
-	'info_date_publication_anterieure' => 'Data di redazione anteriore:',
251
-	'info_date_referencement' => 'DATA DI INSERIMENTO IN REPERTORIO DI QUESTO SITO:',
252
-	'info_derniere_etape' => 'Finito!',
253
-	'info_descriptif' => 'Descrizione:',
254
-	'info_desinstaller_plugin' => 'elimina i dati e disattiva il plug-in',
255
-	'info_discussion_cours' => 'Discussioni in corso',
256
-	'info_ecrire_article' => 'Prima di poter scrivere degli articoli, devi creare almeno una rubrica.',
257
-	'info_email_envoi' => 'Indirizzo email del mittente (opzionale)',
258
-	'info_email_envoi_txt' => 'Indicare qui l’indirizzo da utilizzare per l’invio degli email (come impostazione predefinita l’indirizzo del destinatario sarà utilizzato come indirizzo del mittente):',
259
-	'info_email_webmestre' => 'Indirizzo email della webmistress', # RELIRE
260
-	'info_envoi_email_automatique' => 'Invio di email automatico',
261
-	'info_envoyer_maintenant' => 'Invia adesso',
262
-	'info_etape_suivante' => 'Passare alla fase successiva',
263
-	'info_etape_suivante_1' => 'Puoi passare alla fase successiva.',
264
-	'info_etape_suivante_2' => 'Puoi passare alla fase successiva.',
265
-	'info_exportation_base' => 'esportazione del database verso @archive@',
266
-	'info_facilite_suivi_activite' => 'Al fine di facilitare il monitoraggio
204
+    'info_ajouter_rubrique' => 'Aggiungi un’altra rubrica da amministrare:',
205
+    'info_annonce_nouveautes' => 'Annuncio delle novità',
206
+    'info_article' => 'articolo',
207
+    'info_article_2' => 'articoli',
208
+    'info_article_a_paraitre' => 'Gli articoli postdatati da pubblicare',
209
+    'info_articles_02' => 'articoli',
210
+    'info_articles_2' => 'Articoli',
211
+    'info_articles_auteur' => 'Articoli di questo autore',
212
+    'info_articles_trouves' => 'Articoli trovati',
213
+    'info_attente_validation' => 'I tuoi articoli in attesa di convalida',
214
+    'info_aujourdhui' => 'oggi: ',
215
+    'info_auteurs' => 'Le autrici',
216
+    'info_auteurs_par_tri' => 'Autrici@partri@',
217
+    'info_auteurs_trouves' => 'Autrici trovate',
218
+    'info_authentification_externe' => 'Autenticazione esterna',
219
+    'info_avertissement' => 'Avvertimento',
220
+    'info_barre_outils' => 'con la barra degli strumenti?',
221
+    'info_base_installee' => 'La struttura del vostro database è installata.',
222
+    'info_chapeau' => 'Introduzione',
223
+    'info_chapeau_2' => 'Introduzione:',
224
+    'info_chemin_acces_1' => 'Opzioni: <b>Percorso d’accesso ai dati nell’elenco</b>',
225
+    'info_chemin_acces_2' => 'È necessario specificare il percorso per accedere ai dati nell’elenco. Questa informazione è indispensabile al fine di leggere i profili utente in esso contenuti.',
226
+    'info_chemin_acces_annuaire' => 'Opzioni: <b>Percorso d’accesso ai dati nell’elenco',
227
+    'info_choix_base' => 'Terza fase: ',
228
+    'info_classement_1' => '<sup>o</sup> su @liste@',
229
+    'info_classement_2' => '<sup>o</sup> su @liste@',
230
+    'info_code_acces' => 'Non dimenticare i tuoi codici d’accesso!',
231
+    'info_config_suivi' => 'Se questo indirizzo corrisponde a una mailing-list, è possibile indicare qui sotto l’indirizzo al quale i partecipanti del sito possono iscriversi. Questo indirizzo può essere una URL (per esempio la pagina di iscrizione via Web alla lista), oppure un indirizzo email che contiene un Oggetto specifico (per esempio: <tt>@adresse_suivi@?subject=subscribe</tt>):',
232
+    'info_config_suivi_explication' => 'È possibile abbonarsi alla mailing-list di questo sito. Verranno spedite per email le notifiche degli articoli e delle brevi proposte per la pubblicazione.',
233
+    'info_confirmer_passe' => 'Conferma la nuova password:',
234
+    'info_conflit_edition_avis_non_sauvegarde' => 'Attenzione, i campi seguenti sono già stati modificati. Quindi le vostre modifiche su questi campi non sono state registrate.',
235
+    'info_conflit_edition_differences' => 'Differenze:',
236
+    'info_conflit_edition_version_enregistree' => 'La versione registrata:',
237
+    'info_conflit_edition_votre_version' => 'La tua versione:',
238
+    'info_connexion_base' => 'Prova di connessione al database',
239
+    'info_connexion_base_donnee' => 'Connessione al proprio database',
240
+    'info_connexion_ldap_ok' => 'La connessione LDAP è riuscita.</b><p> È possibile passare alla fase successiva.</p>',
241
+    'info_connexion_mysql' => 'La connessione a SQL',
242
+    'info_connexion_ok' => 'La connessione è riuscita.',
243
+    'info_contact' => 'Contatti',
244
+    'info_contenu_articles' => 'Contentuto degli articoli',
245
+    'info_creation_paragraphe' => 'Per creare dei paragrafi indipendenti, lasciare delle righe vuote.', # RELIRE
246
+    'info_creation_rubrique' => 'Prima di poter scrivere degli articoli, <br />devi creare almeno una rubrica.<br />',
247
+    'info_creation_tables' => 'Creazione delle tabelle nel database',
248
+    'info_creer_base' => '<b>Creare</b> un nuovo database:',
249
+    'info_dans_rubrique' => 'Nella rubrica:',
250
+    'info_date_publication_anterieure' => 'Data di redazione anteriore:',
251
+    'info_date_referencement' => 'DATA DI INSERIMENTO IN REPERTORIO DI QUESTO SITO:',
252
+    'info_derniere_etape' => 'Finito!',
253
+    'info_descriptif' => 'Descrizione:',
254
+    'info_desinstaller_plugin' => 'elimina i dati e disattiva il plug-in',
255
+    'info_discussion_cours' => 'Discussioni in corso',
256
+    'info_ecrire_article' => 'Prima di poter scrivere degli articoli, devi creare almeno una rubrica.',
257
+    'info_email_envoi' => 'Indirizzo email del mittente (opzionale)',
258
+    'info_email_envoi_txt' => 'Indicare qui l’indirizzo da utilizzare per l’invio degli email (come impostazione predefinita l’indirizzo del destinatario sarà utilizzato come indirizzo del mittente):',
259
+    'info_email_webmestre' => 'Indirizzo email della webmistress', # RELIRE
260
+    'info_envoi_email_automatique' => 'Invio di email automatico',
261
+    'info_envoyer_maintenant' => 'Invia adesso',
262
+    'info_etape_suivante' => 'Passare alla fase successiva',
263
+    'info_etape_suivante_1' => 'Puoi passare alla fase successiva.',
264
+    'info_etape_suivante_2' => 'Puoi passare alla fase successiva.',
265
+    'info_exportation_base' => 'esportazione del database verso @archive@',
266
+    'info_facilite_suivi_activite' => 'Al fine di facilitare il monitoraggio
267 267
 dell’attività editoriale del sito, SPIP può far pervenire via email,
268 268
 per esempio ad una mailing-list delle redattrici, l’annuncio delle domande di
269 269
 pubblicazione e di convalida degli articoli.',
270
-	'info_fichiers_authent' => 'File d’autenticazione ".htpasswd"',
271
-	'info_forums_abo_invites' => 'Il sito comprende dei forum accessibili solo a utenti registrate. Nel sito pubblico è quindi presente una pagina d’iscrizione.',
272
-	'info_gauche_admin_tech' => '<b>Questa pagina è accessibile solo alle responsabili del sito.</b><p> Permette l’accesso alle diverse funzioni di manutenzione tecnica. Alcune di esse richiedono una procedura di identificazione specifica, tramite accesso FTP.</p>', # RELIRE
273
-	'info_gauche_admin_vider' => '<b>Questa pagina è accessibile solo alle responsabili del sito.</b><p> Permette l’accesso alle diverse funzioni di manutenzione tecnica. Alcune di esse richiedono una procedura di identificazione specifica, tramite accesso FTP.</p>', # RELIRE
274
-	'info_gauche_auteurs' => 'Elenco di tutte le autrici del sito.
270
+    'info_fichiers_authent' => 'File d’autenticazione ".htpasswd"',
271
+    'info_forums_abo_invites' => 'Il sito comprende dei forum accessibili solo a utenti registrate. Nel sito pubblico è quindi presente una pagina d’iscrizione.',
272
+    'info_gauche_admin_tech' => '<b>Questa pagina è accessibile solo alle responsabili del sito.</b><p> Permette l’accesso alle diverse funzioni di manutenzione tecnica. Alcune di esse richiedono una procedura di identificazione specifica, tramite accesso FTP.</p>', # RELIRE
273
+    'info_gauche_admin_vider' => '<b>Questa pagina è accessibile solo alle responsabili del sito.</b><p> Permette l’accesso alle diverse funzioni di manutenzione tecnica. Alcune di esse richiedono una procedura di identificazione specifica, tramite accesso FTP.</p>', # RELIRE
274
+    'info_gauche_auteurs' => 'Elenco di tutte le autrici del sito.
275 275
 Il loro status è indicato dal colore dell’icona (redattrice = giallo; amministratrice = verde).',
276
-	'info_gauche_auteurs_exterieurs' => 'Le autrici esterne, senza accesso al sito, sono indicate da un’icona blu;
276
+    'info_gauche_auteurs_exterieurs' => 'Le autrici esterne, senza accesso al sito, sono indicate da un’icona blu;
277 277
                 le autrici eliminate sono indicate da un’icona grigia.', # RELIRE
278
-	'info_gauche_messagerie' => 'Il sistema di messaggistica permette di scambiare dei messaggi tra redattrici, di conservare dei memo (promemoria ad uso personale) o di pubblicare degli annunci nel pannello di controllo dell’area riservata (se sei amministratrice).',
279
-	'info_gauche_statistiques_referers' => 'Questa pagina presenta un elenco dei siti che contengono link verso il tuo (<i>referrer</i>). Questo elenco è valido però solo per oggi essendo azzerato ogni 24 ore.',
280
-	'info_gauche_visiteurs_enregistres' => 'Trovi qui i visitatori registrati allo spazio
278
+    'info_gauche_messagerie' => 'Il sistema di messaggistica permette di scambiare dei messaggi tra redattrici, di conservare dei memo (promemoria ad uso personale) o di pubblicare degli annunci nel pannello di controllo dell’area riservata (se sei amministratrice).',
279
+    'info_gauche_statistiques_referers' => 'Questa pagina presenta un elenco dei siti che contengono link verso il tuo (<i>referrer</i>). Questo elenco è valido però solo per oggi essendo azzerato ogni 24 ore.',
280
+    'info_gauche_visiteurs_enregistres' => 'Trovi qui i visitatori registrati allo spazio
281 281
 pubblico del sito (forum su abbonamento).',
282
-	'info_generation_miniatures_images' => 'Generazione di thumbnail di immagini',
283
-	'info_hebergeur_desactiver_envoi_email' => 'Alcuni hoster disattivano l’invio automatico di email
282
+    'info_generation_miniatures_images' => 'Generazione di thumbnail di immagini',
283
+    'info_hebergeur_desactiver_envoi_email' => 'Alcuni hoster disattivano l’invio automatico di email
284 284
 dai loro server. In questo caso, le funzionalità di SPIP di seguito riportate non funzioneranno.',
285
-	'info_hier' => 'ieri:',
286
-	'info_identification_publique' => 'La tua identità pubblica...',
287
-	'info_image_process' => 'Seleziona il metodo migliore per la creazione delle anteprime cliccando sull’immagine corrispondente.',
288
-	'info_image_process2' => 'Se non appare alcuna immagine, ciò significa che la configurazione del server non permette l’uso di tali funzioni. Se si desidera utilizzarle, contattate la responsabile tecnica chiedendo delle estensioni "GD" o "Imagick".', # RELIRE
289
-	'info_images_auto' => 'Immagini elaborate automaticamente',
290
-	'info_informations_personnelles' => 'Informazioni personali',
291
-	'info_inscription_automatique' => 'Iscrizione automatica di nuove redattrici',
292
-	'info_jeu_caractere' => 'Set di caratteri del sito',
293
-	'info_jours' => 'giorni',
294
-	'info_laisser_champs_vides' => 'lasciare questi campi vuoti)',
295
-	'info_langues' => 'Lingua del sito',
296
-	'info_ldap_ok' => 'L’autenticazione LDAP è installata.',
297
-	'info_lien_hypertexte' => 'Link ipertestuale:',
298
-	'info_liste_redacteurs_connectes' => 'Elenco delle redattrici collegate',
299
-	'info_login_existant' => 'Questo login esiste già.',
300
-	'info_login_trop_court' => 'Login troppo corto.',
301
-	'info_logos' => 'I logo',
302
-	'info_maximum' => 'massimo:',
303
-	'info_meme_rubrique' => 'Nella stessa rubrica',
304
-	'info_message_en_redaction' => 'I tuoi messaggi in corso di redazione',
305
-	'info_message_technique' => 'Messaggio tecnico:',
306
-	'info_messagerie_interne' => 'Sistema di messaggistica interna',
307
-	'info_mise_a_niveau_base' => 'aggiornamento del database SQL',
308
-	'info_mise_a_niveau_base_2' => '{{Attenzione!}} È stata installata una versione
285
+    'info_hier' => 'ieri:',
286
+    'info_identification_publique' => 'La tua identità pubblica...',
287
+    'info_image_process' => 'Seleziona il metodo migliore per la creazione delle anteprime cliccando sull’immagine corrispondente.',
288
+    'info_image_process2' => 'Se non appare alcuna immagine, ciò significa che la configurazione del server non permette l’uso di tali funzioni. Se si desidera utilizzarle, contattate la responsabile tecnica chiedendo delle estensioni "GD" o "Imagick".', # RELIRE
289
+    'info_images_auto' => 'Immagini elaborate automaticamente',
290
+    'info_informations_personnelles' => 'Informazioni personali',
291
+    'info_inscription_automatique' => 'Iscrizione automatica di nuove redattrici',
292
+    'info_jeu_caractere' => 'Set di caratteri del sito',
293
+    'info_jours' => 'giorni',
294
+    'info_laisser_champs_vides' => 'lasciare questi campi vuoti)',
295
+    'info_langues' => 'Lingua del sito',
296
+    'info_ldap_ok' => 'L’autenticazione LDAP è installata.',
297
+    'info_lien_hypertexte' => 'Link ipertestuale:',
298
+    'info_liste_redacteurs_connectes' => 'Elenco delle redattrici collegate',
299
+    'info_login_existant' => 'Questo login esiste già.',
300
+    'info_login_trop_court' => 'Login troppo corto.',
301
+    'info_logos' => 'I logo',
302
+    'info_maximum' => 'massimo:',
303
+    'info_meme_rubrique' => 'Nella stessa rubrica',
304
+    'info_message_en_redaction' => 'I tuoi messaggi in corso di redazione',
305
+    'info_message_technique' => 'Messaggio tecnico:',
306
+    'info_messagerie_interne' => 'Sistema di messaggistica interna',
307
+    'info_mise_a_niveau_base' => 'aggiornamento del database SQL',
308
+    'info_mise_a_niveau_base_2' => '{{Attenzione!}} È stata installata una versione
309 309
 dei file di SPIP {precedente} rispetto a quella che era in uso per questo sito:
310 310
 le informazioni contenute nel database sono probabilmente andate perse.<br />{{Reinstallare i file di SPIP.}}',
311
-	'info_modifier_auteur' => 'Modifica l’autrice:',
312
-	'info_modifier_rubrique' => 'Modifica la rubrica:',
313
-	'info_modifier_titre' => 'Modifica: @titre@',
314
-	'info_mon_site_spip' => 'Il mio sito SPIP',
315
-	'info_moyenne' => 'media: ',
316
-	'info_multi_cet_article' => 'Lingua di questo articolo:',
317
-	'info_multi_langues_choisies' => 'Selezionare di seguito le lingue disponibili per le redattrici del sito.
311
+    'info_modifier_auteur' => 'Modifica l’autrice:',
312
+    'info_modifier_rubrique' => 'Modifica la rubrica:',
313
+    'info_modifier_titre' => 'Modifica: @titre@',
314
+    'info_mon_site_spip' => 'Il mio sito SPIP',
315
+    'info_moyenne' => 'media: ',
316
+    'info_multi_cet_article' => 'Lingua di questo articolo:',
317
+    'info_multi_langues_choisies' => 'Selezionare di seguito le lingue disponibili per le redattrici del sito.
318 318
   Le lingue già utilizzate nel sito (visualizzate per prime) non possono essere disattivate.',
319
-	'info_multi_secteurs' => '... solo per le rubriche collocate nella {root} del sito?',
320
-	'info_nom' => 'Nome',
321
-	'info_nom_destinataire' => 'Nome del destinatario',
322
-	'info_nom_site' => 'Nome del tuo sito',
323
-	'info_nombre_articles' => '@nb_articles@ articoli,',
324
-	'info_nombre_rubriques' => '@nb_rubriques@ rubriche,',
325
-	'info_nombre_sites' => '@nb_sites@ siti, ',
326
-	'info_non_deplacer' => 'Non spostare...',
327
-	'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP può inviare regolarmente annunci sulle ultime novità del sito
319
+    'info_multi_secteurs' => '... solo per le rubriche collocate nella {root} del sito?',
320
+    'info_nom' => 'Nome',
321
+    'info_nom_destinataire' => 'Nome del destinatario',
322
+    'info_nom_site' => 'Nome del tuo sito',
323
+    'info_nombre_articles' => '@nb_articles@ articoli,',
324
+    'info_nombre_rubriques' => '@nb_rubriques@ rubriche,',
325
+    'info_nombre_sites' => '@nb_sites@ siti, ',
326
+    'info_non_deplacer' => 'Non spostare...',
327
+    'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP può inviare regolarmente annunci sulle ultime novità del sito
328 328
 (articoli e brevi recentemente pubblicati).',
329
-	'info_non_envoi_liste_nouveautes' => 'Non inviare l’elenco delle novità',
330
-	'info_non_modifiable' => 'non può essere modificato',
331
-	'info_non_suppression_mot_cle' => 'non voglio cancellare questa parola chiave.',
332
-	'info_notes' => 'Note',
333
-	'info_nouvel_article' => 'Nuovo articolo',
334
-	'info_nouvelle_traduction' => 'Nuova traduzione:',
335
-	'info_numero_article' => 'ARTICOLO NUMERO:',
336
-	'info_obligatoire_02' => '(obbligatorio)', # MODIF
337
-	'info_option_accepter_visiteurs' => 'Accetta l’iscrizione di utenti del sito pubblico',
338
-	'info_option_ne_pas_accepter_visiteurs' => 'Rifiuta l’iscrizione di utenti',
339
-	'info_options_avancees' => 'OPZIONE AVANZATA',
340
-	'info_ou' => 'o... ',
341
-	'info_page_interdite' => 'Pagina riservata',
342
-	'info_par_nom' => 'per nome',
343
-	'info_par_nombre_article' => 'per numero di articoli',
344
-	'info_par_statut' => 'per status',
345
-	'info_par_tri' => '’(per @tri@)’',
346
-	'info_passe_trop_court' => 'Password troppo corta.',
347
-	'info_passes_identiques' => 'Le due password non sono uguali.',
348
-	'info_plus_cinq_car' => 'più di 5 caratteri',
349
-	'info_plus_cinq_car_2' => '(Più di 5 caratteri)',
350
-	'info_plus_trois_car' => '(Più di 3 caratteri)',
351
-	'info_popularite' => 'popolarità: @popularite@; visite: @visites@',
352
-	'info_post_scriptum' => 'Post Scriptum',
353
-	'info_post_scriptum_2' => 'Post Scriptum:',
354
-	'info_pour' => 'per',
355
-	'info_preview_texte' => 'È possibile visualizzare un’anteprima del sito comprendente anche gli articoli e le brevi "proposti" per la pubblicazione. Questa funzionalità può essere disattivata, consentita solo alle amministratrici o a tutte le redattrici.', # MODIF
356
-	'info_procedez_par_etape' => 'procedere passo dopo passo',
357
-	'info_procedure_maj_version' => 'è necessario avviare la procedura di aggiornamento per adattare
329
+    'info_non_envoi_liste_nouveautes' => 'Non inviare l’elenco delle novità',
330
+    'info_non_modifiable' => 'non può essere modificato',
331
+    'info_non_suppression_mot_cle' => 'non voglio cancellare questa parola chiave.',
332
+    'info_notes' => 'Note',
333
+    'info_nouvel_article' => 'Nuovo articolo',
334
+    'info_nouvelle_traduction' => 'Nuova traduzione:',
335
+    'info_numero_article' => 'ARTICOLO NUMERO:',
336
+    'info_obligatoire_02' => '(obbligatorio)', # MODIF
337
+    'info_option_accepter_visiteurs' => 'Accetta l’iscrizione di utenti del sito pubblico',
338
+    'info_option_ne_pas_accepter_visiteurs' => 'Rifiuta l’iscrizione di utenti',
339
+    'info_options_avancees' => 'OPZIONE AVANZATA',
340
+    'info_ou' => 'o... ',
341
+    'info_page_interdite' => 'Pagina riservata',
342
+    'info_par_nom' => 'per nome',
343
+    'info_par_nombre_article' => 'per numero di articoli',
344
+    'info_par_statut' => 'per status',
345
+    'info_par_tri' => '’(per @tri@)’',
346
+    'info_passe_trop_court' => 'Password troppo corta.',
347
+    'info_passes_identiques' => 'Le due password non sono uguali.',
348
+    'info_plus_cinq_car' => 'più di 5 caratteri',
349
+    'info_plus_cinq_car_2' => '(Più di 5 caratteri)',
350
+    'info_plus_trois_car' => '(Più di 3 caratteri)',
351
+    'info_popularite' => 'popolarità: @popularite@; visite: @visites@',
352
+    'info_post_scriptum' => 'Post Scriptum',
353
+    'info_post_scriptum_2' => 'Post Scriptum:',
354
+    'info_pour' => 'per',
355
+    'info_preview_texte' => 'È possibile visualizzare un’anteprima del sito comprendente anche gli articoli e le brevi "proposti" per la pubblicazione. Questa funzionalità può essere disattivata, consentita solo alle amministratrici o a tutte le redattrici.', # MODIF
356
+    'info_procedez_par_etape' => 'procedere passo dopo passo',
357
+    'info_procedure_maj_version' => 'è necessario avviare la procedura di aggiornamento per adattare
358 358
 il database alla nuova versione di SPIP.',
359
-	'info_proxy_ok' => 'Test del proxy riuscito.',
360
-	'info_ps' => 'P.S.',
361
-	'info_publier' => 'pubblicare',
362
-	'info_publies' => 'I tuoi articoli pubblicati',
363
-	'info_question_accepter_visiteurs' => 'I modelli di pagina del sito prevedono la registrazione di utenti senza accesso all’area riservata. Attivare la seguente funzionalità:',
364
-	'info_question_inscription_nouveaux_redacteurs' => 'Accettate le iscrizioni di nuove redattrici
359
+    'info_proxy_ok' => 'Test del proxy riuscito.',
360
+    'info_ps' => 'P.S.',
361
+    'info_publier' => 'pubblicare',
362
+    'info_publies' => 'I tuoi articoli pubblicati',
363
+    'info_question_accepter_visiteurs' => 'I modelli di pagina del sito prevedono la registrazione di utenti senza accesso all’area riservata. Attivare la seguente funzionalità:',
364
+    'info_question_inscription_nouveaux_redacteurs' => 'Accettate le iscrizioni di nuove redattrici
365 365
 direttamente dal sito pubblico? In questo caso, chi visita il sito potrà iscriversi
366 366
 grazie ad un modulo automatizzato e potrà accedere all’area riservata per proporre i propri articoli.
367 367
 <div class="notice">Durante la fase d’iscrizione,
@@ -370,317 +370,317 @@  discard block
 block discarded – undo
370 370
 host disattivano l’invio di email dai
371 371
 propri server: in questo caso, l’iscrizione automatica è
372 372
 impossibile.', # RELIRE
373
-	'info_qui_edite' => '@nom_auteur_modif@ ha lavorato su questo contenuto @date_diff@ minuti fa',
374
-	'info_racine_site' => 'Root del sito',
375
-	'info_recharger_page' => 'Aggiorna questa pagina fra qualche istante.',
376
-	'info_recherche_auteur_zero' => 'Nessun risultato per "@cherche_auteur@".',
377
-	'info_recommencer' => 'Ricomincia.',
378
-	'info_redacteur_1' => 'Redattori',
379
-	'info_redacteur_2' => 'avendo accesso allo spazio privato (<i>raccommandato</i>)',
380
-	'info_redacteurs' => 'Redattrici',
381
-	'info_redaction_en_cours' => 'IN CORSO DI REDAZIONE',
382
-	'info_redirection' => 'Reindirizzamento',
383
-	'info_refuses' => 'I tuoi articoli rifiutati',
384
-	'info_reglage_ldap' => 'Opzioni: <b>Parametri per l’importazione LDAP</b>',
385
-	'info_renvoi_article' => '<b>Reindirizzamento.</b> Quest’articolo rimanda alla pagina:',
386
-	'info_reserve_admin' => 'Solo le amministratrici possono modificare quest’indirizzo.',
387
-	'info_restreindre_rubrique' => 'Limita la facoltà di gestione alla rubrica:',
388
-	'info_resultat_recherche' => 'Risultati della ricerca:',
389
-	'info_rubriques' => 'Rubriche',
390
-	'info_rubriques_02' => 'rubriche',
391
-	'info_rubriques_trouvees' => 'Rubriche trovate',
392
-	'info_sans_titre' => 'Senza titolo',
393
-	'info_selection_chemin_acces' => '<b>Seleziona</b> qui sotto il percorso d’accesso nell’elenco:',
394
-	'info_signatures' => 'firme',
395
-	'info_site' => 'Sito',
396
-	'info_site_2' => 'sito: ',
397
-	'info_site_min' => 'sito',
398
-	'info_site_reference_2' => 'Sito repertoriato',
399
-	'info_site_web' => 'Sito Web :',
400
-	'info_sites' => 'siti',
401
-	'info_sites_lies_mot' => 'I siti in repertorio legati a questa parola chiave',
402
-	'info_sites_proxy' => 'Utilizza un proxy',
403
-	'info_sites_trouves' => 'Siti trovati',
404
-	'info_sous_titre' => 'Sottotitolo:',
405
-	'info_statut_administrateur' => 'Amministratrice',
406
-	'info_statut_auteur' => 'Status di questa autrice:',
407
-	'info_statut_auteur_a_confirmer' => 'Iscrizione da confermare',
408
-	'info_statut_auteur_autre' => 'Altro stato:',
409
-	'info_statut_redacteur' => 'Redattrice',
410
-	'info_statut_utilisateurs_1' => 'Status predefinito delle utenti importate',
411
-	'info_statut_utilisateurs_2' => 'Scegli lo status da attribuire alle personne presenti nell’elenco LDAP quando si collegano per la prima volta. Potrai poi modificare questa impostazione per ogni singola autrice.',
412
-	'info_suivi_activite' => 'Monitoraggio dell’attività editoriale',
413
-	'info_surtitre' => 'Occhiello:',
414
-	'info_syndication_integrale_1' => 'Il tuo sito propone dei file di  syndication (vedi « <a href="@url@">@titre@</a> »).',
415
-	'info_syndication_integrale_2' => 'Si desidera trasmettere gli articoli in versione integrale oppure in versione riassunta di un centinaio di caratteri?',
416
-	'info_table_prefix' => 'È possibile modificare il prefisso del nome delle tabelle del database (cosa indispensabile se si desidera installare più siti usando il medesimo database). Questo prefisso si deve scrivere usando esclusivamente lettere minuscole, prive di accenti e senza alcuno spazio.',
417
-	'info_taille_maximale_images' => 'SPIP testerà la dimensione massima delle immagini che può manipolare (in milioni di pixel).<br /> Le immagini di dimensione maggiore non saranno ridotte.',
418
-	'info_taille_maximale_vignette' => 'Dimensione massima delle immagini create dal sistema:',
419
-	'info_terminer_installation' => 'Puoi ora terminare la procedura d’installazione standard.',
420
-	'info_texte' => 'Testo',
421
-	'info_texte_explicatif' => 'Testo esplicativo',
422
-	'info_texte_long' => '(il testo è lungo: è quindi visualizzato in più sezioni che verranno riunificate dopo la convalida)',
423
-	'info_texte_message' => 'Testo del messaggio',
424
-	'info_texte_message_02' => 'Testo del messaggio',
425
-	'info_titre' => 'Titolo:',
426
-	'info_total' => 'totale: ',
427
-	'info_tous_articles_en_redaction' => 'Tutti gli articoli in corso di redazione',
428
-	'info_tous_articles_presents' => 'Tutti gli articoli pubblicati in questa rubrica',
429
-	'info_tous_les' => 'tutti i:',
430
-	'info_tout_site' => 'Tutto il sito',
431
-	'info_tout_site2' => 'L’articolo non è stato tradotto in questa lingua.',
432
-	'info_tout_site3' => 'L’articolo è stato tradotto in questa lingua, ma sono state effettuate alcune modifiche all’articolo di riferimento. La traduzione deve quindi essere aggiornata.',
433
-	'info_tout_site4' => 'L’articolo è stato tradotto in questa lingua e la traduzione è aggiornata.',
434
-	'info_tout_site5' => 'Articolo originale.',
435
-	'info_tout_site6' => '<b>Attenzione:</b> solo gli articoli originali vengono visualizzati.
373
+    'info_qui_edite' => '@nom_auteur_modif@ ha lavorato su questo contenuto @date_diff@ minuti fa',
374
+    'info_racine_site' => 'Root del sito',
375
+    'info_recharger_page' => 'Aggiorna questa pagina fra qualche istante.',
376
+    'info_recherche_auteur_zero' => 'Nessun risultato per "@cherche_auteur@".',
377
+    'info_recommencer' => 'Ricomincia.',
378
+    'info_redacteur_1' => 'Redattori',
379
+    'info_redacteur_2' => 'avendo accesso allo spazio privato (<i>raccommandato</i>)',
380
+    'info_redacteurs' => 'Redattrici',
381
+    'info_redaction_en_cours' => 'IN CORSO DI REDAZIONE',
382
+    'info_redirection' => 'Reindirizzamento',
383
+    'info_refuses' => 'I tuoi articoli rifiutati',
384
+    'info_reglage_ldap' => 'Opzioni: <b>Parametri per l’importazione LDAP</b>',
385
+    'info_renvoi_article' => '<b>Reindirizzamento.</b> Quest’articolo rimanda alla pagina:',
386
+    'info_reserve_admin' => 'Solo le amministratrici possono modificare quest’indirizzo.',
387
+    'info_restreindre_rubrique' => 'Limita la facoltà di gestione alla rubrica:',
388
+    'info_resultat_recherche' => 'Risultati della ricerca:',
389
+    'info_rubriques' => 'Rubriche',
390
+    'info_rubriques_02' => 'rubriche',
391
+    'info_rubriques_trouvees' => 'Rubriche trovate',
392
+    'info_sans_titre' => 'Senza titolo',
393
+    'info_selection_chemin_acces' => '<b>Seleziona</b> qui sotto il percorso d’accesso nell’elenco:',
394
+    'info_signatures' => 'firme',
395
+    'info_site' => 'Sito',
396
+    'info_site_2' => 'sito: ',
397
+    'info_site_min' => 'sito',
398
+    'info_site_reference_2' => 'Sito repertoriato',
399
+    'info_site_web' => 'Sito Web :',
400
+    'info_sites' => 'siti',
401
+    'info_sites_lies_mot' => 'I siti in repertorio legati a questa parola chiave',
402
+    'info_sites_proxy' => 'Utilizza un proxy',
403
+    'info_sites_trouves' => 'Siti trovati',
404
+    'info_sous_titre' => 'Sottotitolo:',
405
+    'info_statut_administrateur' => 'Amministratrice',
406
+    'info_statut_auteur' => 'Status di questa autrice:',
407
+    'info_statut_auteur_a_confirmer' => 'Iscrizione da confermare',
408
+    'info_statut_auteur_autre' => 'Altro stato:',
409
+    'info_statut_redacteur' => 'Redattrice',
410
+    'info_statut_utilisateurs_1' => 'Status predefinito delle utenti importate',
411
+    'info_statut_utilisateurs_2' => 'Scegli lo status da attribuire alle personne presenti nell’elenco LDAP quando si collegano per la prima volta. Potrai poi modificare questa impostazione per ogni singola autrice.',
412
+    'info_suivi_activite' => 'Monitoraggio dell’attività editoriale',
413
+    'info_surtitre' => 'Occhiello:',
414
+    'info_syndication_integrale_1' => 'Il tuo sito propone dei file di  syndication (vedi « <a href="@url@">@titre@</a> »).',
415
+    'info_syndication_integrale_2' => 'Si desidera trasmettere gli articoli in versione integrale oppure in versione riassunta di un centinaio di caratteri?',
416
+    'info_table_prefix' => 'È possibile modificare il prefisso del nome delle tabelle del database (cosa indispensabile se si desidera installare più siti usando il medesimo database). Questo prefisso si deve scrivere usando esclusivamente lettere minuscole, prive di accenti e senza alcuno spazio.',
417
+    'info_taille_maximale_images' => 'SPIP testerà la dimensione massima delle immagini che può manipolare (in milioni di pixel).<br /> Le immagini di dimensione maggiore non saranno ridotte.',
418
+    'info_taille_maximale_vignette' => 'Dimensione massima delle immagini create dal sistema:',
419
+    'info_terminer_installation' => 'Puoi ora terminare la procedura d’installazione standard.',
420
+    'info_texte' => 'Testo',
421
+    'info_texte_explicatif' => 'Testo esplicativo',
422
+    'info_texte_long' => '(il testo è lungo: è quindi visualizzato in più sezioni che verranno riunificate dopo la convalida)',
423
+    'info_texte_message' => 'Testo del messaggio',
424
+    'info_texte_message_02' => 'Testo del messaggio',
425
+    'info_titre' => 'Titolo:',
426
+    'info_total' => 'totale: ',
427
+    'info_tous_articles_en_redaction' => 'Tutti gli articoli in corso di redazione',
428
+    'info_tous_articles_presents' => 'Tutti gli articoli pubblicati in questa rubrica',
429
+    'info_tous_les' => 'tutti i:',
430
+    'info_tout_site' => 'Tutto il sito',
431
+    'info_tout_site2' => 'L’articolo non è stato tradotto in questa lingua.',
432
+    'info_tout_site3' => 'L’articolo è stato tradotto in questa lingua, ma sono state effettuate alcune modifiche all’articolo di riferimento. La traduzione deve quindi essere aggiornata.',
433
+    'info_tout_site4' => 'L’articolo è stato tradotto in questa lingua e la traduzione è aggiornata.',
434
+    'info_tout_site5' => 'Articolo originale.',
435
+    'info_tout_site6' => '<b>Attenzione:</b> solo gli articoli originali vengono visualizzati.
436 436
 Le traduzioni sono associate all’originale,
437 437
  in un colore che indica il loro stato:',
438
-	'info_travail_colaboratif' => 'Lavoro di collaborazione sugli articoli',
439
-	'info_un_article' => 'un articolo, ',
440
-	'info_un_site' => 'un sito, ',
441
-	'info_une_rubrique' => 'una rubrica, ',
442
-	'info_une_rubrique_02' => '1 rubrica',
443
-	'info_url' => 'URL:',
444
-	'info_urlref' => 'Link ipertestuale:',
445
-	'info_utilisation_spip' => 'Puoi ora cominciare ad utilizzare il sistema di pubblicazione assistita...',
446
-	'info_visites_par_mois' => 'Visualizzazione per mese:',
447
-	'info_visiteur_1' => 'Visitatori',
448
-	'info_visiteur_2' => 'del sito pubblico',
449
-	'info_visiteurs' => 'Visitatori',
450
-	'info_visiteurs_02' => 'Visitatori del sito pubblico',
451
-	'install_adresse_base_hebergeur' => 'Indirizzo del database attribuito dal provider',
452
-	'install_echec_annonce' => 'L’installazione potrebbe fallire oppure causare problemi di funzionalità al sito...',
453
-	'install_extension_mbstring' => 'SPIP non funziona con:',
454
-	'install_extension_php_obligatoire' => 'SPIP esige l’estensione php:',
455
-	'install_login_base_hebergeur' => 'Login di connessione attribuito dal provider',
456
-	'install_nom_base_hebergeur' => 'Nome del database attribuito dal provider:',
457
-	'install_pas_table' => 'Database attualmente senza tabelle',
458
-	'install_pass_base_hebergeur' => 'Password di connessione attribuito dal provider',
459
-	'install_php_version' => 'PHP versione @version@ insufficiente (minimo = @minimum@)',
460
-	'install_select_langue' => 'Seleziona una lingua e poi clicca sul bottone « Avanti » per lanciare la procedura di installazione.',
461
-	'install_select_type_db' => 'Indicare il tipo di database:',
462
-	'install_select_type_mysql' => 'MySQL',
463
-	'install_select_type_sqlite2' => 'SQLite 2',
464
-	'install_select_type_sqlite3' => 'SQLite 3',
465
-	'install_serveur_hebergeur' => 'Server del database attribuito dall’hoster',
466
-	'install_table_prefix_hebergeur' => 'Prefisso della tabella attribuito dal provider:',
467
-	'install_tables_base' => 'Tabelle del database',
468
-	'install_types_db_connus' => 'SPIP può utilizzare <b>MySQL</b> (il più diffuso) e <b>SQLite</b>.',
469
-	'install_types_db_connus_avertissement' => 'Il supporto <b>PostgreSQL</b> viene proposto a titolo sperimentale', # RELIRE
470
-	'intem_redacteur' => 'redattrice',
471
-	'intitule_licence' => 'Licenza',
472
-	'item_accepter_inscriptions' => 'Accetta le iscrizioni',
473
-	'item_activer_messages_avertissement' => 'Attiva i messaggi d’avvertimento',
474
-	'item_administrateur_2' => 'amministratrice',
475
-	'item_afficher_calendrier' => 'Pubblica nel calendario',
476
-	'item_autoriser_syndication_integrale' => 'Diffondere la versione integrale degli articoli nei file di syndication',
477
-	'item_choix_administrateurs' => 'le amministratrici',
478
-	'item_choix_generation_miniature' => 'Genera automaticamente le thumbnail delle immagini.',
479
-	'item_choix_non_generation_miniature' => 'Non creare le thumbnail delle immagini.',
480
-	'item_choix_redacteurs' => 'le redattrici',
481
-	'item_choix_visiteurs' => 'i visitatori del sito pubblico',
482
-	'item_creer_fichiers_authent' => 'Crea i file .htpasswd',
483
-	'item_login' => 'Login',
484
-	'item_messagerie_agenda' => 'Attiva la messaggistica e l’agenda',
485
-	'item_mots_cles_association_articles' => 'agli articoli',
486
-	'item_mots_cles_association_rubriques' => 'alle rubriche',
487
-	'item_mots_cles_association_sites' => 'ai siti repertoriati o in syndication.',
488
-	'item_non' => 'No',
489
-	'item_non_accepter_inscriptions' => 'Non accettare le iscrizioni',
490
-	'item_non_activer_messages_avertissement' => 'Nessun messaggio d’avvertimento',
491
-	'item_non_afficher_calendrier' => 'Non pubblicare nel calendario',
492
-	'item_non_autoriser_syndication_integrale' => 'Diffondere solo un riassunto',
493
-	'item_non_creer_fichiers_authent' => 'Non creare questi file',
494
-	'item_non_messagerie_agenda' => 'Disattiva la messaggistica e l’agenda',
495
-	'item_non_publier_articles' => 'Non pubblicare gli articoli prima della data impostata.',
496
-	'item_nouvel_auteur' => 'Nuova autrice',
497
-	'item_nouvelle_rubrique' => 'Nuova rubrica',
498
-	'item_oui' => 'Sì',
499
-	'item_publier_articles' => 'Pubblica gli articoli indipendentemente dalla data impostata.',
500
-	'item_reponse_article' => 'Risposta all’articolo ',
501
-	'item_visiteur' => 'visitatore',
438
+    'info_travail_colaboratif' => 'Lavoro di collaborazione sugli articoli',
439
+    'info_un_article' => 'un articolo, ',
440
+    'info_un_site' => 'un sito, ',
441
+    'info_une_rubrique' => 'una rubrica, ',
442
+    'info_une_rubrique_02' => '1 rubrica',
443
+    'info_url' => 'URL:',
444
+    'info_urlref' => 'Link ipertestuale:',
445
+    'info_utilisation_spip' => 'Puoi ora cominciare ad utilizzare il sistema di pubblicazione assistita...',
446
+    'info_visites_par_mois' => 'Visualizzazione per mese:',
447
+    'info_visiteur_1' => 'Visitatori',
448
+    'info_visiteur_2' => 'del sito pubblico',
449
+    'info_visiteurs' => 'Visitatori',
450
+    'info_visiteurs_02' => 'Visitatori del sito pubblico',
451
+    'install_adresse_base_hebergeur' => 'Indirizzo del database attribuito dal provider',
452
+    'install_echec_annonce' => 'L’installazione potrebbe fallire oppure causare problemi di funzionalità al sito...',
453
+    'install_extension_mbstring' => 'SPIP non funziona con:',
454
+    'install_extension_php_obligatoire' => 'SPIP esige l’estensione php:',
455
+    'install_login_base_hebergeur' => 'Login di connessione attribuito dal provider',
456
+    'install_nom_base_hebergeur' => 'Nome del database attribuito dal provider:',
457
+    'install_pas_table' => 'Database attualmente senza tabelle',
458
+    'install_pass_base_hebergeur' => 'Password di connessione attribuito dal provider',
459
+    'install_php_version' => 'PHP versione @version@ insufficiente (minimo = @minimum@)',
460
+    'install_select_langue' => 'Seleziona una lingua e poi clicca sul bottone « Avanti » per lanciare la procedura di installazione.',
461
+    'install_select_type_db' => 'Indicare il tipo di database:',
462
+    'install_select_type_mysql' => 'MySQL',
463
+    'install_select_type_sqlite2' => 'SQLite 2',
464
+    'install_select_type_sqlite3' => 'SQLite 3',
465
+    'install_serveur_hebergeur' => 'Server del database attribuito dall’hoster',
466
+    'install_table_prefix_hebergeur' => 'Prefisso della tabella attribuito dal provider:',
467
+    'install_tables_base' => 'Tabelle del database',
468
+    'install_types_db_connus' => 'SPIP può utilizzare <b>MySQL</b> (il più diffuso) e <b>SQLite</b>.',
469
+    'install_types_db_connus_avertissement' => 'Il supporto <b>PostgreSQL</b> viene proposto a titolo sperimentale', # RELIRE
470
+    'intem_redacteur' => 'redattrice',
471
+    'intitule_licence' => 'Licenza',
472
+    'item_accepter_inscriptions' => 'Accetta le iscrizioni',
473
+    'item_activer_messages_avertissement' => 'Attiva i messaggi d’avvertimento',
474
+    'item_administrateur_2' => 'amministratrice',
475
+    'item_afficher_calendrier' => 'Pubblica nel calendario',
476
+    'item_autoriser_syndication_integrale' => 'Diffondere la versione integrale degli articoli nei file di syndication',
477
+    'item_choix_administrateurs' => 'le amministratrici',
478
+    'item_choix_generation_miniature' => 'Genera automaticamente le thumbnail delle immagini.',
479
+    'item_choix_non_generation_miniature' => 'Non creare le thumbnail delle immagini.',
480
+    'item_choix_redacteurs' => 'le redattrici',
481
+    'item_choix_visiteurs' => 'i visitatori del sito pubblico',
482
+    'item_creer_fichiers_authent' => 'Crea i file .htpasswd',
483
+    'item_login' => 'Login',
484
+    'item_messagerie_agenda' => 'Attiva la messaggistica e l’agenda',
485
+    'item_mots_cles_association_articles' => 'agli articoli',
486
+    'item_mots_cles_association_rubriques' => 'alle rubriche',
487
+    'item_mots_cles_association_sites' => 'ai siti repertoriati o in syndication.',
488
+    'item_non' => 'No',
489
+    'item_non_accepter_inscriptions' => 'Non accettare le iscrizioni',
490
+    'item_non_activer_messages_avertissement' => 'Nessun messaggio d’avvertimento',
491
+    'item_non_afficher_calendrier' => 'Non pubblicare nel calendario',
492
+    'item_non_autoriser_syndication_integrale' => 'Diffondere solo un riassunto',
493
+    'item_non_creer_fichiers_authent' => 'Non creare questi file',
494
+    'item_non_messagerie_agenda' => 'Disattiva la messaggistica e l’agenda',
495
+    'item_non_publier_articles' => 'Non pubblicare gli articoli prima della data impostata.',
496
+    'item_nouvel_auteur' => 'Nuova autrice',
497
+    'item_nouvelle_rubrique' => 'Nuova rubrica',
498
+    'item_oui' => 'Sì',
499
+    'item_publier_articles' => 'Pubblica gli articoli indipendentemente dalla data impostata.',
500
+    'item_reponse_article' => 'Risposta all’articolo ',
501
+    'item_visiteur' => 'visitatore',
502 502
 
503
-	// J
504
-	'jour_non_connu_nc' => 'n.c.',
503
+    // J
504
+    'jour_non_connu_nc' => 'n.c.',
505 505
 
506
-	// L
507
-	'lien_ajouter_auteur' => 'Aggiungi questa autrice',
508
-	'lien_email' => 'email',
509
-	'lien_nom_site' => 'NOME DEL SITO:',
510
-	'lien_retirer_auteur' => 'Rimuovere l’autrice',
511
-	'lien_site' => 'sito',
512
-	'lien_tout_deplier' => 'Espandi',
513
-	'lien_tout_replier' => 'Richiudi',
514
-	'lien_tout_supprimer' => 'Eliminare tutto',
515
-	'lien_trier_nom' => 'Ordina per nome',
516
-	'lien_trier_nombre_articles' => 'Ordina per numero di articoli',
517
-	'lien_trier_statut' => 'Ordina per status',
518
-	'lien_voir_en_ligne' => 'VEDI ON LINE:',
519
-	'logo_article' => 'Logo dell’articolo',
520
-	'logo_auteur' => 'Logo dell’autrice',
521
-	'logo_rubrique' => 'Logo della rubrica',
522
-	'logo_site' => 'Logo di questo sito',
523
-	'logo_standard_rubrique' => 'Logo standard delle rubriche',
524
-	'logo_survol' => 'Logo rollover', # RELIRE
506
+    // L
507
+    'lien_ajouter_auteur' => 'Aggiungi questa autrice',
508
+    'lien_email' => 'email',
509
+    'lien_nom_site' => 'NOME DEL SITO:',
510
+    'lien_retirer_auteur' => 'Rimuovere l’autrice',
511
+    'lien_site' => 'sito',
512
+    'lien_tout_deplier' => 'Espandi',
513
+    'lien_tout_replier' => 'Richiudi',
514
+    'lien_tout_supprimer' => 'Eliminare tutto',
515
+    'lien_trier_nom' => 'Ordina per nome',
516
+    'lien_trier_nombre_articles' => 'Ordina per numero di articoli',
517
+    'lien_trier_statut' => 'Ordina per status',
518
+    'lien_voir_en_ligne' => 'VEDI ON LINE:',
519
+    'logo_article' => 'Logo dell’articolo',
520
+    'logo_auteur' => 'Logo dell’autrice',
521
+    'logo_rubrique' => 'Logo della rubrica',
522
+    'logo_site' => 'Logo di questo sito',
523
+    'logo_standard_rubrique' => 'Logo standard delle rubriche',
524
+    'logo_survol' => 'Logo rollover', # RELIRE
525 525
 
526
-	// M
527
-	'menu_aide_installation_choix_base' => 'Scegliere il database',
528
-	'module_fichier_langue' => 'File lingua',
529
-	'module_raccourci' => 'Scorciatoia',
530
-	'module_texte_affiche' => 'Testo visualizzato',
531
-	'module_texte_explicatif' => 'È possibile inserire le scorciatoie nel modello di layout del proprio sito pubblico. Queste verranno tradotte automaticamente nelle diverse lingue (se esiste già un file lingua).',
532
-	'module_texte_traduction' => 'Il file lingua «@module@» è disponibile in:',
533
-	'mois_non_connu' => 'sconosciuto',
526
+    // M
527
+    'menu_aide_installation_choix_base' => 'Scegliere il database',
528
+    'module_fichier_langue' => 'File lingua',
529
+    'module_raccourci' => 'Scorciatoia',
530
+    'module_texte_affiche' => 'Testo visualizzato',
531
+    'module_texte_explicatif' => 'È possibile inserire le scorciatoie nel modello di layout del proprio sito pubblico. Queste verranno tradotte automaticamente nelle diverse lingue (se esiste già un file lingua).',
532
+    'module_texte_traduction' => 'Il file lingua «@module@» è disponibile in:',
533
+    'mois_non_connu' => 'sconosciuto',
534 534
 
535
-	// O
536
-	'onglet_contenu' => 'Contenuto',
537
-	'onglet_declarer_une_autre_base' => 'Dichiarare un altro database',
538
-	'onglet_discuter' => 'Discuti',
539
-	'onglet_interactivite' => 'Interattività',
540
-	'onglet_proprietes' => 'Proprietà',
541
-	'onglet_repartition_actuelle' => 'attualmente',
542
-	'onglet_sous_rubriques' => 'Sotto-rubriche',
535
+    // O
536
+    'onglet_contenu' => 'Contenuto',
537
+    'onglet_declarer_une_autre_base' => 'Dichiarare un altro database',
538
+    'onglet_discuter' => 'Discuti',
539
+    'onglet_interactivite' => 'Interattività',
540
+    'onglet_proprietes' => 'Proprietà',
541
+    'onglet_repartition_actuelle' => 'attualmente',
542
+    'onglet_sous_rubriques' => 'Sotto-rubriche',
543 543
 
544
-	// P
545
-	'page_pas_proxy' => 'Questa pagina non deve passare attraverso il proxy',
546
-	'pas_de_proxy_pour' => 'Se necessario, indicare i server o i domini per i quali non si deve applicare questo proxy (per esempio: @exemple@)',
547
-	'plugin_charge_paquet' => 'Caricamento del pacchetto @name@',
548
-	'plugin_erreur_charger' => 'errore: impossibile caricare @zip@',
549
-	'plugin_erreur_droit1' => 'La cartella <code>@dest@</code> non ha i permessi di scrittura.',
550
-	'plugin_erreur_droit2' => 'Verificare i diritti su questa cartella (e, se necessario, crearla), o installare i file tramite FTP.',
551
-	'plugin_erreur_zip' => 'fallimento pclzip: errore @status@',
552
-	'plugin_etat_developpement' => 'in corso di sviluppo',
553
-	'plugin_etat_experimental' => 'sperimentale',
554
-	'plugin_etat_stable' => 'stabile',
555
-	'plugin_etat_test' => 'in prova',
556
-	'plugin_impossible_activer' => 'Impossibile attivare il plug-in @plugin@',
557
-	'plugin_info_automatique1' => 'Se si desidera autorizzare l’installazione automatica dei plug-in è necessario: ',
558
-	'plugin_info_automatique2' => 'creare una cartella <code>@rep@</code>;',
559
-	'plugin_info_automatique3' => 'verificare che il server sia autorizzato a scrivere in questa cartella.',
560
-	'plugin_info_automatique_creer' => 'da creare alla radice del sito.',
561
-	'plugin_info_automatique_exemples' => 'esempi:',
562
-	'plugin_info_automatique_ftp' => 'È possibile installare plug-in tramite FTP, nella cartella <tt>@rep@</tt>',
563
-	'plugin_info_automatique_lib' => 'Alcuni plug-in richiedono anche di poter trasferire dei file nella cartella <code>lib/</code>, da creare (se necessario) alla radice del sito.',
564
-	'plugin_info_automatique_liste' => 'Gli elenchi dei plug-in:',
565
-	'plugin_info_automatique_liste_officielle' => 'i plug-in ufficiali',
566
-	'plugin_info_automatique_liste_update' => 'Aggiornare gli elenchi',
567
-	'plugin_info_automatique_ou' => 'oppure...',
568
-	'plugin_info_automatique_select' => 'Selezionata un plug-in qui sotto: SPIP lo scaricherà e lo installerà nella cartella <code>@rep@</code>; se questo plug-in è già presente verrà aggiornato.',
569
-	'plugin_info_telecharger' => 'da scaricare da @url@ e da installare in @rep@',
570
-	'plugin_librairies_installees' => 'Librerie installate',
571
-	'plugin_necessite_lib' => 'Questo plug-in richiede la libreria @lib@',
572
-	'plugin_necessite_plugin' => 'Necessita il plug-in @plugin@ con almeno la versione @version@.', # MODIF
573
-	'plugin_necessite_spip' => 'Necessita SPIP con almeno la versione @version@.',
574
-	'plugin_source' => 'origine: ',
575
-	'plugin_titre_automatique' => 'Installazione automatica',
576
-	'plugin_titre_automatique_ajouter' => 'Aggiungere dei plug-in',
577
-	'plugin_zip_active' => 'Continuare per attivarlo',
578
-	'plugin_zip_adresse' => 'indicate qui sotto l’indirizzo di un file zip del plug-in da scaricare, oppure l’indirizzo di un elenco di plug-in.',
579
-	'plugin_zip_adresse_champ' => 'Indirizzo del plug-in o dell’elenco ',
580
-	'plugin_zip_content' => 'Esso contiene i file seguenti (@taille@),<br />pronti per essere installati nella cartella <code>@rep@</code>',
581
-	'plugin_zip_installe_finie' => 'Il file @zip@ è stato decompresso e installato.',
582
-	'plugin_zip_installe_rep_finie' => 'Il file @zip@ è stato decompresso e installato nella cartella @rep@',
583
-	'plugin_zip_installer' => 'Ora è possibile installarlo.',
584
-	'plugin_zip_telecharge' => 'Il file @zip@ è stato scaricato',
585
-	'plugins_actifs' => '@count@ plug-in attivati.',
586
-	'plugins_compte' => '@count@ plug-in',
587
-	'plugins_disponibles' => '@count@ plug-in disponibili.',
588
-	'plugins_erreur' => 'Errore nei plug-in: @plugins@',
589
-	'plugins_liste' => 'Elenco dei plugin',
590
-	'plugins_vue_hierarchie' => 'Struttura gerarchica',
591
-	'plugins_vue_liste' => 'Elenco',
592
-	'protocole_ldap' => 'Versione del protocollo:',
544
+    // P
545
+    'page_pas_proxy' => 'Questa pagina non deve passare attraverso il proxy',
546
+    'pas_de_proxy_pour' => 'Se necessario, indicare i server o i domini per i quali non si deve applicare questo proxy (per esempio: @exemple@)',
547
+    'plugin_charge_paquet' => 'Caricamento del pacchetto @name@',
548
+    'plugin_erreur_charger' => 'errore: impossibile caricare @zip@',
549
+    'plugin_erreur_droit1' => 'La cartella <code>@dest@</code> non ha i permessi di scrittura.',
550
+    'plugin_erreur_droit2' => 'Verificare i diritti su questa cartella (e, se necessario, crearla), o installare i file tramite FTP.',
551
+    'plugin_erreur_zip' => 'fallimento pclzip: errore @status@',
552
+    'plugin_etat_developpement' => 'in corso di sviluppo',
553
+    'plugin_etat_experimental' => 'sperimentale',
554
+    'plugin_etat_stable' => 'stabile',
555
+    'plugin_etat_test' => 'in prova',
556
+    'plugin_impossible_activer' => 'Impossibile attivare il plug-in @plugin@',
557
+    'plugin_info_automatique1' => 'Se si desidera autorizzare l’installazione automatica dei plug-in è necessario: ',
558
+    'plugin_info_automatique2' => 'creare una cartella <code>@rep@</code>;',
559
+    'plugin_info_automatique3' => 'verificare che il server sia autorizzato a scrivere in questa cartella.',
560
+    'plugin_info_automatique_creer' => 'da creare alla radice del sito.',
561
+    'plugin_info_automatique_exemples' => 'esempi:',
562
+    'plugin_info_automatique_ftp' => 'È possibile installare plug-in tramite FTP, nella cartella <tt>@rep@</tt>',
563
+    'plugin_info_automatique_lib' => 'Alcuni plug-in richiedono anche di poter trasferire dei file nella cartella <code>lib/</code>, da creare (se necessario) alla radice del sito.',
564
+    'plugin_info_automatique_liste' => 'Gli elenchi dei plug-in:',
565
+    'plugin_info_automatique_liste_officielle' => 'i plug-in ufficiali',
566
+    'plugin_info_automatique_liste_update' => 'Aggiornare gli elenchi',
567
+    'plugin_info_automatique_ou' => 'oppure...',
568
+    'plugin_info_automatique_select' => 'Selezionata un plug-in qui sotto: SPIP lo scaricherà e lo installerà nella cartella <code>@rep@</code>; se questo plug-in è già presente verrà aggiornato.',
569
+    'plugin_info_telecharger' => 'da scaricare da @url@ e da installare in @rep@',
570
+    'plugin_librairies_installees' => 'Librerie installate',
571
+    'plugin_necessite_lib' => 'Questo plug-in richiede la libreria @lib@',
572
+    'plugin_necessite_plugin' => 'Necessita il plug-in @plugin@ con almeno la versione @version@.', # MODIF
573
+    'plugin_necessite_spip' => 'Necessita SPIP con almeno la versione @version@.',
574
+    'plugin_source' => 'origine: ',
575
+    'plugin_titre_automatique' => 'Installazione automatica',
576
+    'plugin_titre_automatique_ajouter' => 'Aggiungere dei plug-in',
577
+    'plugin_zip_active' => 'Continuare per attivarlo',
578
+    'plugin_zip_adresse' => 'indicate qui sotto l’indirizzo di un file zip del plug-in da scaricare, oppure l’indirizzo di un elenco di plug-in.',
579
+    'plugin_zip_adresse_champ' => 'Indirizzo del plug-in o dell’elenco ',
580
+    'plugin_zip_content' => 'Esso contiene i file seguenti (@taille@),<br />pronti per essere installati nella cartella <code>@rep@</code>',
581
+    'plugin_zip_installe_finie' => 'Il file @zip@ è stato decompresso e installato.',
582
+    'plugin_zip_installe_rep_finie' => 'Il file @zip@ è stato decompresso e installato nella cartella @rep@',
583
+    'plugin_zip_installer' => 'Ora è possibile installarlo.',
584
+    'plugin_zip_telecharge' => 'Il file @zip@ è stato scaricato',
585
+    'plugins_actifs' => '@count@ plug-in attivati.',
586
+    'plugins_compte' => '@count@ plug-in',
587
+    'plugins_disponibles' => '@count@ plug-in disponibili.',
588
+    'plugins_erreur' => 'Errore nei plug-in: @plugins@',
589
+    'plugins_liste' => 'Elenco dei plugin',
590
+    'plugins_vue_hierarchie' => 'Struttura gerarchica',
591
+    'plugins_vue_liste' => 'Elenco',
592
+    'protocole_ldap' => 'Versione del protocollo:',
593 593
 
594
-	// R
595
-	'repertoire_plugins' => 'Cartella:',
596
-	'required' => '(obbligatorio)', # MODIF
594
+    // R
595
+    'repertoire_plugins' => 'Cartella:',
596
+    'required' => '(obbligatorio)', # MODIF
597 597
 
598
-	// S
599
-	'sans_heure' => 'ora mancante',
600
-	'statut_admin_restreint' => 'admin limitato', # RELIRE
598
+    // S
599
+    'sans_heure' => 'ora mancante',
600
+    'statut_admin_restreint' => 'admin limitato', # RELIRE
601 601
 
602
-	// T
603
-	'taille_cache_image' => 'Le immagini elaborate automaticamente da SPIP (icone dei documenti, titoli in formato grafico, funzioni matematiche in formato TeX...) occupano nella cartella @dir@ in tutto @taille@.',
604
-	'taille_cache_infinie' => 'Questo sito non prevede limiti alle dimensioni della cartella della cache.',
605
-	'taille_cache_maxi' => 'SPIP tenta di limitare le dimensioni della cartella della cache di questo sito a circa <b>@octets@</b> di dati.',
606
-	'taille_cache_octets' => 'Attualmente la cache è di circa @octets@.', # RELIRE
607
-	'taille_cache_vide' => 'La cache è vuota.',
608
-	'taille_repertoire_cache' => 'Dimensioni della cartella di cache',
609
-	'text_article_propose_publication' => 'Articolo proposto per la pubblicazione. ',
610
-	'texte_acces_ldap_anonyme_1' => 'Alcuni server LDAP non consentono accessi anonimi. In questo caso si deve specificare un identificatore d’accesso iniziale al fine di poter poi ricercare delle informazioni nell’elenco. Nella maggior parte dei casi tuttavia, i campi seguenti potranno essere lasciati vuoti.',
611
-	'texte_admin_effacer_01' => 'Questo commando cancella <i>tutto</i> il contenuto del database,
602
+    // T
603
+    'taille_cache_image' => 'Le immagini elaborate automaticamente da SPIP (icone dei documenti, titoli in formato grafico, funzioni matematiche in formato TeX...) occupano nella cartella @dir@ in tutto @taille@.',
604
+    'taille_cache_infinie' => 'Questo sito non prevede limiti alle dimensioni della cartella della cache.',
605
+    'taille_cache_maxi' => 'SPIP tenta di limitare le dimensioni della cartella della cache di questo sito a circa <b>@octets@</b> di dati.',
606
+    'taille_cache_octets' => 'Attualmente la cache è di circa @octets@.', # RELIRE
607
+    'taille_cache_vide' => 'La cache è vuota.',
608
+    'taille_repertoire_cache' => 'Dimensioni della cartella di cache',
609
+    'text_article_propose_publication' => 'Articolo proposto per la pubblicazione. ',
610
+    'texte_acces_ldap_anonyme_1' => 'Alcuni server LDAP non consentono accessi anonimi. In questo caso si deve specificare un identificatore d’accesso iniziale al fine di poter poi ricercare delle informazioni nell’elenco. Nella maggior parte dei casi tuttavia, i campi seguenti potranno essere lasciati vuoti.',
611
+    'texte_admin_effacer_01' => 'Questo commando cancella <i>tutto</i> il contenuto del database,
612 612
  compresi <i>tutti</i> i login delle redattrici e delle amministratrici. Dopo averlo eseguito, dovrai riavviare la procedura di installazione per ricreare un nuovo database e un primo ID amministrativo.',
613
-	'texte_adresse_annuaire_1' => '(Se la rubrica è installata nella stessa macchina di questo sito, dovrai probabilmente inserire "localhost".)',
614
-	'texte_ajout_auteur' => 'La seguente autrice è stata aggiunta all’articolo:',
615
-	'texte_annuaire_ldap_1' => 'Se hai accesso ad una rubrica (LDAP), puoi utilizzarla per importare automaticamente delle utenti sotto SPIP.',
616
-	'texte_article_statut' => 'Questo articolo è:',
617
-	'texte_article_virtuel' => 'Articolo virtuale',
618
-	'texte_article_virtuel_reference' => '<b>Articolo virtuale:</b> articolo citato nel tuo sito SPIP, ma reindrizzato verso un’altro URL. Per eliminare il reindirizzamento, cancella l’URL qui sopra.',
619
-	'texte_aucun_resultat_auteur' => 'Nessun risultato per "@cherche_auteur@"',
620
-	'texte_auteur_messagerie' => 'Questo sito può costantemente visualizzare la lista delle redattrici collegate, permettendo lo scambio di messaggi in tempo reale. Si può però decidere di non comparire in questo elenco (rendendosi quindi «invisibili» alle altre utenti).',
621
-	'texte_auteurs' => 'LE AUTRICI',
622
-	'texte_choix_base_1' => 'Scegli il database:',
623
-	'texte_choix_base_2' => 'Il server SQL contiene diversi database.',
624
-	'texte_choix_base_3' => '<b>Seleziona</b> quello che è stato attribuito al tuo dominio:',
625
-	'texte_choix_table_prefix' => 'Prefisso delle tabelle:',
626
-	'texte_compte_element' => '@count@ elemento',
627
-	'texte_compte_elements' => '@count@ elementi',
628
-	'texte_conflit_edition_correction' => 'Controllare qui sotto le differenze tra le due versioni del testo; è possibile anche copiare le modifiche e poi ricominciare.',
629
-	'texte_connexion_mysql' => 'Consulta le informazioni fornite dal tuo hoster: devi poterci trovare, i codici di collegamento alla base di dati.',
630
-	'texte_contenu_article' => 'Contenuto dell’articolo in poche parole (<em>abstract</em>)',
631
-	'texte_contenu_articles' => 'A seconda del modello di presentazione adottato per il sito, puoi decidere
613
+    'texte_adresse_annuaire_1' => '(Se la rubrica è installata nella stessa macchina di questo sito, dovrai probabilmente inserire "localhost".)',
614
+    'texte_ajout_auteur' => 'La seguente autrice è stata aggiunta all’articolo:',
615
+    'texte_annuaire_ldap_1' => 'Se hai accesso ad una rubrica (LDAP), puoi utilizzarla per importare automaticamente delle utenti sotto SPIP.',
616
+    'texte_article_statut' => 'Questo articolo è:',
617
+    'texte_article_virtuel' => 'Articolo virtuale',
618
+    'texte_article_virtuel_reference' => '<b>Articolo virtuale:</b> articolo citato nel tuo sito SPIP, ma reindrizzato verso un’altro URL. Per eliminare il reindirizzamento, cancella l’URL qui sopra.',
619
+    'texte_aucun_resultat_auteur' => 'Nessun risultato per "@cherche_auteur@"',
620
+    'texte_auteur_messagerie' => 'Questo sito può costantemente visualizzare la lista delle redattrici collegate, permettendo lo scambio di messaggi in tempo reale. Si può però decidere di non comparire in questo elenco (rendendosi quindi «invisibili» alle altre utenti).',
621
+    'texte_auteurs' => 'LE AUTRICI',
622
+    'texte_choix_base_1' => 'Scegli il database:',
623
+    'texte_choix_base_2' => 'Il server SQL contiene diversi database.',
624
+    'texte_choix_base_3' => '<b>Seleziona</b> quello che è stato attribuito al tuo dominio:',
625
+    'texte_choix_table_prefix' => 'Prefisso delle tabelle:',
626
+    'texte_compte_element' => '@count@ elemento',
627
+    'texte_compte_elements' => '@count@ elementi',
628
+    'texte_conflit_edition_correction' => 'Controllare qui sotto le differenze tra le due versioni del testo; è possibile anche copiare le modifiche e poi ricominciare.',
629
+    'texte_connexion_mysql' => 'Consulta le informazioni fornite dal tuo hoster: devi poterci trovare, i codici di collegamento alla base di dati.',
630
+    'texte_contenu_article' => 'Contenuto dell’articolo in poche parole (<em>abstract</em>)',
631
+    'texte_contenu_articles' => 'A seconda del modello di presentazione adottato per il sito, puoi decidere
632 632
 che alcuni elementi degli articoli siano utilizzati oppure no.
633 633
 Serviti dell’elenco qui sotto per indicare quali elementi rendere disponibili.',
634
-	'texte_crash_base' => 'Se il database è stato danneggiato, puoi tentare un ripristino automatico.',
635
-	'texte_creer_rubrique' => 'Prima di poter scrivere degli articoli,<br /> devi creare una rubrica.',
636
-	'texte_date_creation_article' => 'DATA DI CREAZIONE DELL’ARTICOLO:',
637
-	'texte_date_publication_anterieure' => 'DATA DI REDAZIONE ANTERIORE',
638
-	'texte_date_publication_anterieure_nonaffichee' => 'Non visualizzare la data di redazione anteriore.',
639
-	'texte_date_publication_article' => 'DATA DI PUBBLICAZIONE:',
640
-	'texte_descriptif_rapide' => 'Descrizione rapida',
641
-	'texte_effacer_base' => 'Cancella il database SPIP',
642
-	'texte_effacer_statistiques' => 'Cancellare le statistiche',
643
-	'texte_en_cours_validation' => 'I contenuti qui di seguito sono in attesa di validazione. ', # RELIRE
644
-	'texte_enrichir_mise_a_jour' => 'Puoi arricchire la formattazione del testo utilizzando le «scorciatoie tipografiche»',
645
-	'texte_fichier_authent' => '<b>SPIP deve creare i file speciali
634
+    'texte_crash_base' => 'Se il database è stato danneggiato, puoi tentare un ripristino automatico.',
635
+    'texte_creer_rubrique' => 'Prima di poter scrivere degli articoli,<br /> devi creare una rubrica.',
636
+    'texte_date_creation_article' => 'DATA DI CREAZIONE DELL’ARTICOLO:',
637
+    'texte_date_publication_anterieure' => 'DATA DI REDAZIONE ANTERIORE',
638
+    'texte_date_publication_anterieure_nonaffichee' => 'Non visualizzare la data di redazione anteriore.',
639
+    'texte_date_publication_article' => 'DATA DI PUBBLICAZIONE:',
640
+    'texte_descriptif_rapide' => 'Descrizione rapida',
641
+    'texte_effacer_base' => 'Cancella il database SPIP',
642
+    'texte_effacer_statistiques' => 'Cancellare le statistiche',
643
+    'texte_en_cours_validation' => 'I contenuti qui di seguito sono in attesa di validazione. ', # RELIRE
644
+    'texte_enrichir_mise_a_jour' => 'Puoi arricchire la formattazione del testo utilizzando le «scorciatoie tipografiche»',
645
+    'texte_fichier_authent' => '<b>SPIP deve creare i file speciali
646 646
 <tt>.htpasswd</tt> e <tt>.htpasswd-admin</tt> nella cartella @dossier@ ?</b>
647 647
 <p>Questi file possono servire a limitare l’accesso alle autrici
648 648
 e alle amministratrici in particolari aree del vostro sito (per esempio, per un programma esterno di statistiche).</p>
649 649
 <p>Se ciò non è necessario, lasciare quest’opzione al suo valore predefinito (nessuna creazione 
650 650
 di file).</p>', # RELIRE
651
-	'texte_informations_personnelles_1' => 'Il sistema creerà un tuo accesso personalizzato al sito.',
652
-	'texte_informations_personnelles_2' => '(Nota : trattandosi di una reinstallazione, se il tuo accesso funziona ancora potete ', # RELIRE
653
-	'texte_introductif_article' => 'Testo introduttivo dell’articolo',
654
-	'texte_jeu_caractere' => 'Si consiglia di utilizzare sul proprio sito l’alfabeto universale (<tt>utf-8</tt>): esso permette di visualizzare i testi in tutte le lingue e non pone problemi di compatibilità con i browser moderni.',
655
-	'texte_jeu_caractere_3' => 'Il tuo sito usa attualmente il set di caratteri:',
656
-	'texte_jeu_caractere_4' => 'Se ciò non corrisponde alla realtà dei propri dati (a causa, per esempio, di un ripristino del database), o se  <em>si avvia il sito</em> e si desidera partire con un altro set di caratteri è necessario indicare quest’ultimo qui:',
657
-	'texte_login_ldap_1' => '(Lascia vuoto per un accesso anonimo, o inserisci il percorso completo, per esempio «<tt>uid=rossi, ou=users, dc=mio-dominio, dc=com</tt> ».)',
658
-	'texte_login_precaution' => 'Attenzione! Questo è l’ID con il quale sei attualmente collegato.
651
+    'texte_informations_personnelles_1' => 'Il sistema creerà un tuo accesso personalizzato al sito.',
652
+    'texte_informations_personnelles_2' => '(Nota : trattandosi di una reinstallazione, se il tuo accesso funziona ancora potete ', # RELIRE
653
+    'texte_introductif_article' => 'Testo introduttivo dell’articolo',
654
+    'texte_jeu_caractere' => 'Si consiglia di utilizzare sul proprio sito l’alfabeto universale (<tt>utf-8</tt>): esso permette di visualizzare i testi in tutte le lingue e non pone problemi di compatibilità con i browser moderni.',
655
+    'texte_jeu_caractere_3' => 'Il tuo sito usa attualmente il set di caratteri:',
656
+    'texte_jeu_caractere_4' => 'Se ciò non corrisponde alla realtà dei propri dati (a causa, per esempio, di un ripristino del database), o se  <em>si avvia il sito</em> e si desidera partire con un altro set di caratteri è necessario indicare quest’ultimo qui:',
657
+    'texte_login_ldap_1' => '(Lascia vuoto per un accesso anonimo, o inserisci il percorso completo, per esempio «<tt>uid=rossi, ou=users, dc=mio-dominio, dc=com</tt> ».)',
658
+    'texte_login_precaution' => 'Attenzione! Questo è l’ID con il quale sei attualmente collegato.
659 659
 Utilizza questo modulo con cognizione di causa...',
660
-	'texte_messagerie_agenda' => 'La messageria permette alle redattrici del sito di comunicare tra loro in maniera diretta nell’area riservata. Essa è associata a una agenda.',
661
-	'texte_mise_a_niveau_base_1' => 'Hai aggiornato i file SPIP.
660
+    'texte_messagerie_agenda' => 'La messageria permette alle redattrici del sito di comunicare tra loro in maniera diretta nell’area riservata. Essa è associata a una agenda.',
661
+    'texte_mise_a_niveau_base_1' => 'Hai aggiornato i file SPIP.
662 662
 Adesso è necessario aggiornare il database.',
663
-	'texte_modifier_article' => 'Modifica l’articolo:',
664
-	'texte_multilinguisme' => 'Se desideri gestire gli articoli in diverse lingue, con un sistema di navigazione complesso, è possibile aggiungere un menu di selezione della lingua negli articoli e/o nelle rubriche, in funzione della struttura del sito.', # RELIRE
665
-	'texte_multilinguisme_trad' => 'È anche possibile attivare un sistema di gestione di link fra le diverse traduzioni relative ad alcuni elementi.', # RELIRE
666
-	'texte_non_compresse' => '<i>non compresso</i> (il tuo server non supporta questa funzionalità)',
667
-	'texte_nouvelle_version_spip_1' => 'Hai installato una nuova versione di SPIP.',
668
-	'texte_nouvelle_version_spip_2' => 'Questa nuova versione necessita un aggiornamento più radicale del solito. Se sei la webmistress del sito, cancella il file @connect@ e riprendi l’installazione al fine di aggiornare i parametri di connessione al database.<p> (NB: se hai dimenticato i parametri di connessione, rileggi il file @connect@ prima di cancellarlo...)</p>', # RELIRE
669
-	'texte_operation_echec' => 'Torna alla pagina precedente, seleziona un altro database o creane uno nuovo. Verifica le informazioni fornite dal tuo hoster.',
670
-	'texte_plus_trois_car' => 'più di tre caratteri',
671
-	'texte_plusieurs_articles' => 'Diversi autori trovati per "@cherche_auteur@":',
672
-	'texte_port_annuaire' => '(Il valore predefinito è in genere quello adatto.)',
673
-	'texte_presente_plugin' => 'Questa pagina elenca i plugin disponibili sul sito. È possibile attivare i plugin necessari selezionando la casella corrispondente.',
674
-	'texte_proposer_publication' => 'Quando l’articolo è completo,<br /> puoi proporne la pubblicazione.',
675
-	'texte_proxy' => 'In alcuni casi (intranet, reti protette...), i siti distanti (documetazione di SPIP, siti in syndication, ecc.) sono accessibili unicamente attraverso un <i>proxy HTTP</i>. In questo caso, va indicato l’indirizzo del server nella forma @proxy_en_cours@. In genere questa casella va lasciata vuota.',
676
-	'texte_publication_articles_post_dates' => 'Come si deve comportare SPIP quando gli articoli hanno
663
+    'texte_modifier_article' => 'Modifica l’articolo:',
664
+    'texte_multilinguisme' => 'Se desideri gestire gli articoli in diverse lingue, con un sistema di navigazione complesso, è possibile aggiungere un menu di selezione della lingua negli articoli e/o nelle rubriche, in funzione della struttura del sito.', # RELIRE
665
+    'texte_multilinguisme_trad' => 'È anche possibile attivare un sistema di gestione di link fra le diverse traduzioni relative ad alcuni elementi.', # RELIRE
666
+    'texte_non_compresse' => '<i>non compresso</i> (il tuo server non supporta questa funzionalità)',
667
+    'texte_nouvelle_version_spip_1' => 'Hai installato una nuova versione di SPIP.',
668
+    'texte_nouvelle_version_spip_2' => 'Questa nuova versione necessita un aggiornamento più radicale del solito. Se sei la webmistress del sito, cancella il file @connect@ e riprendi l’installazione al fine di aggiornare i parametri di connessione al database.<p> (NB: se hai dimenticato i parametri di connessione, rileggi il file @connect@ prima di cancellarlo...)</p>', # RELIRE
669
+    'texte_operation_echec' => 'Torna alla pagina precedente, seleziona un altro database o creane uno nuovo. Verifica le informazioni fornite dal tuo hoster.',
670
+    'texte_plus_trois_car' => 'più di tre caratteri',
671
+    'texte_plusieurs_articles' => 'Diversi autori trovati per "@cherche_auteur@":',
672
+    'texte_port_annuaire' => '(Il valore predefinito è in genere quello adatto.)',
673
+    'texte_presente_plugin' => 'Questa pagina elenca i plugin disponibili sul sito. È possibile attivare i plugin necessari selezionando la casella corrispondente.',
674
+    'texte_proposer_publication' => 'Quando l’articolo è completo,<br /> puoi proporne la pubblicazione.',
675
+    'texte_proxy' => 'In alcuni casi (intranet, reti protette...), i siti distanti (documetazione di SPIP, siti in syndication, ecc.) sono accessibili unicamente attraverso un <i>proxy HTTP</i>. In questo caso, va indicato l’indirizzo del server nella forma @proxy_en_cours@. In genere questa casella va lasciata vuota.',
676
+    'texte_publication_articles_post_dates' => 'Come si deve comportare SPIP quando gli articoli hanno
677 677
 una data di pubblicazione impostata nel futuro?',
678
-	'texte_rappel_selection_champs' => '[Non dimenticare di impostare correttamente questo campo]',
679
-	'texte_recalcul_page' => 'Se vuoi rigenerare
678
+    'texte_rappel_selection_champs' => '[Non dimenticare di impostare correttamente questo campo]',
679
+    'texte_recalcul_page' => 'Se vuoi rigenerare
680 680
 una sola pagina, utilizza piuttosto lo spazio pubblico e clicca sul pulsante «rigenera».',
681
-	'texte_recuperer_base' => 'Ripara il database',
682
-	'texte_reference_mais_redirige' => 'articolo catalogato nel tuo sito SPIP, ma con reindirizzamento verso un altro URL.',
683
-	'texte_requetes_echouent' => '<b>Quando alcune query SQL falliscono
681
+    'texte_recuperer_base' => 'Ripara il database',
682
+    'texte_reference_mais_redirige' => 'articolo catalogato nel tuo sito SPIP, ma con reindirizzamento verso un altro URL.',
683
+    'texte_requetes_echouent' => '<b>Quando alcune query SQL falliscono
684 684
 ripetutamente e senza un chiaro motivo, è possibile
685 685
 che sia per colpa del database
686 686
 stesso.</b><p>
@@ -691,79 +691,79 @@  discard block
 block discarded – undo
691 691
 forse, delle informazioni preziose...</p><p>
692 692
 Se il problema persiste, contattate la vostra
693 693
 webmistress.</p>', # RELIRE
694
-	'texte_selection_langue_principale' => 'Puoi selezionare qui sotto la «lingua predefinita» del sito. Questa scelta non obbliga - fortunatamente! - a scrivere gli articoli nella stessa lingua, ma permette di determinare:
694
+    'texte_selection_langue_principale' => 'Puoi selezionare qui sotto la «lingua predefinita» del sito. Questa scelta non obbliga - fortunatamente! - a scrivere gli articoli nella stessa lingua, ma permette di determinare:
695 695
 <ul><li> il formato di default delle date sul sito pubblico;</li>
696 696
 <li> la tipologia di motore tipografico che SPIP deve utilizzare per la resa del testo;</li>
697 697
 <li> la lingua utilizzata nelle finestre di dialogo del sito pubblico;</li>
698 698
 <li> la lingua di default nell’area riservata all’amministrazione.</li></ul>',
699
-	'texte_sous_titre' => 'Sottotitolo',
700
-	'texte_statistiques_visites' => '(barre scure:  domenica / curve scure: evoluzione della media)',
701
-	'texte_statut_attente_validation' => 'in attesa di convalida',
702
-	'texte_statut_publies' => 'pubblicato on line',
703
-	'texte_statut_refuses' => 'rifiutati',
704
-	'texte_suppression_fichiers' => 'Utilizza questo commando per cancellare tutti i file presenti nella
699
+    'texte_sous_titre' => 'Sottotitolo',
700
+    'texte_statistiques_visites' => '(barre scure:  domenica / curve scure: evoluzione della media)',
701
+    'texte_statut_attente_validation' => 'in attesa di convalida',
702
+    'texte_statut_publies' => 'pubblicato on line',
703
+    'texte_statut_refuses' => 'rifiutati',
704
+    'texte_suppression_fichiers' => 'Utilizza questo commando per cancellare tutti i file presenti nella
705 705
 cache di SPIP. Ciò permette ad esempio di forzare la rigenerazione di tutte le pagine se hai fatto delle importanti modifiche di grafica o di struttura del sito.',
706
-	'texte_sur_titre' => 'Occhiello',
707
-	'texte_table_ok' => ': questa tabella è OK.',
708
-	'texte_tentative_recuperation' => 'Tentativo di ripristino',
709
-	'texte_tenter_reparation' => 'Tenta un ripristino del database',
710
-	'texte_test_proxy' => 'Per fare una prova di questo proxy, indicare qui l’indirizzo
706
+    'texte_sur_titre' => 'Occhiello',
707
+    'texte_table_ok' => ': questa tabella è OK.',
708
+    'texte_tentative_recuperation' => 'Tentativo di ripristino',
709
+    'texte_tenter_reparation' => 'Tenta un ripristino del database',
710
+    'texte_test_proxy' => 'Per fare una prova di questo proxy, indicare qui l’indirizzo
711 711
 di un sito Web da testare.',
712
-	'texte_titre_02' => 'Titolo:',
713
-	'texte_titre_obligatoire' => '<b>Titolo</b> [Obbligatorio]',
714
-	'texte_travail_article' => '@nom_auteur_modif@ ha lavorato su questo articolo @date_diff@ minuti fa',
715
-	'texte_travail_collaboratif' => 'Se diverse autrici lavorano spesso sullo stesso articolo,
712
+    'texte_titre_02' => 'Titolo:',
713
+    'texte_titre_obligatoire' => '<b>Titolo</b> [Obbligatorio]',
714
+    'texte_travail_article' => '@nom_auteur_modif@ ha lavorato su questo articolo @date_diff@ minuti fa',
715
+    'texte_travail_collaboratif' => 'Se diverse autrici lavorano spesso sullo stesso articolo,
716 716
 il sistema può segnalare gli articoli «aperti»
717 717
 di recente al fine di evitare modifiche simultanee.
718 718
 Questa opzione è disattivata di default
719 719
 per evitare di generare messaggi d’avvertimento intempestivi.',
720
-	'texte_vide' => 'vuoto',
721
-	'texte_vider_cache' => 'Svuota la cache',
722
-	'titre_admin_tech' => 'Manutenzione tecnica',
723
-	'titre_admin_vider' => 'Manutenzione tecnica',
724
-	'titre_cadre_afficher_article' => 'Visualizza gli articoli',
725
-	'titre_cadre_afficher_traductions' => 'Visualizzare lo stato delle traduzioni per le seguenti lingue:',
726
-	'titre_cadre_ajouter_auteur' => 'AGGIUNGI UN’AUTRICE: ',
727
-	'titre_cadre_interieur_rubrique' => 'All’interno della rubrica',
728
-	'titre_cadre_numero_auteur' => 'AUTRICE NUMERO',
729
-	'titre_cadre_signature_obligatoire' => '<b>Firma</b> [Obbligatoria]<br />',
730
-	'titre_config_contenu_notifications' => 'Notifiche',
731
-	'titre_config_contenu_prive' => 'Nell’area riservata',
732
-	'titre_config_contenu_public' => 'Sul sito pubblico',
733
-	'titre_config_fonctions' => 'Configurazione del sito',
734
-	'titre_configuration' => 'Configurazione del sito',
735
-	'titre_conflit_edition' => 'Conflitto all’atto dell’edizione',
736
-	'titre_connexion_ldap' => 'Opzioni: <b>La connessione LDAP</b>',
737
-	'titre_groupe_mots' => 'GRUPPO DI PAROLE CHIAVE:',
738
-	'titre_langue_article' => 'Lingua dell’articolo',
739
-	'titre_langue_rubrique' => 'Lingua della rubrica',
740
-	'titre_langue_trad_article' => 'LINGUA E TRADUZIONI DELL’ARTICOLO',
741
-	'titre_les_articles' => 'GLI ARTICOLI',
742
-	'titre_messagerie_agenda' => 'Messagistica e agenda',
743
-	'titre_naviguer_dans_le_site' => 'Navigare nel sito...',
744
-	'titre_nouvelle_rubrique' => 'Nuova rubrica',
745
-	'titre_numero_rubrique' => 'RUBRICA NUMERO:',
746
-	'titre_page_articles_edit' => 'Modifica: @titre@',
747
-	'titre_page_articles_page' => 'Gli articoli',
748
-	'titre_page_articles_tous' => 'Tutto il sito',
749
-	'titre_page_calendrier' => 'Calendario @nom_mois@ @annee@',
750
-	'titre_page_config_contenu' => 'Configurazione del sito',
751
-	'titre_page_delete_all' => 'eliminazione totale e irreversible',
752
-	'titre_page_recherche' => 'Risultati della ricerca @recherche@',
753
-	'titre_page_statistiques_referers' => 'Statistiche (link al tuo sito)',
754
-	'titre_page_upgrade' => 'Aggiornamento di SPIP',
755
-	'titre_publication_articles_post_dates' => 'Pubblicazione di articoli postdatati',
756
-	'titre_reparation' => 'Riparazione',
757
-	'titre_suivi_petition' => 'Monitoraggio delle petizioni',
758
-	'tls_ldap' => 'Transport Layer Security:',
759
-	'trad_article_traduction' => 'Tutte le versioni di questo articolo:',
760
-	'trad_delier' => 'Non collegare più a queste traduzioni', # RELIRE
761
-	'trad_lier' => 'Questo articolo è una traduzione dell’articolo numero:',
762
-	'trad_new' => 'Scrivere una nuova traduzione',
720
+    'texte_vide' => 'vuoto',
721
+    'texte_vider_cache' => 'Svuota la cache',
722
+    'titre_admin_tech' => 'Manutenzione tecnica',
723
+    'titre_admin_vider' => 'Manutenzione tecnica',
724
+    'titre_cadre_afficher_article' => 'Visualizza gli articoli',
725
+    'titre_cadre_afficher_traductions' => 'Visualizzare lo stato delle traduzioni per le seguenti lingue:',
726
+    'titre_cadre_ajouter_auteur' => 'AGGIUNGI UN’AUTRICE: ',
727
+    'titre_cadre_interieur_rubrique' => 'All’interno della rubrica',
728
+    'titre_cadre_numero_auteur' => 'AUTRICE NUMERO',
729
+    'titre_cadre_signature_obligatoire' => '<b>Firma</b> [Obbligatoria]<br />',
730
+    'titre_config_contenu_notifications' => 'Notifiche',
731
+    'titre_config_contenu_prive' => 'Nell’area riservata',
732
+    'titre_config_contenu_public' => 'Sul sito pubblico',
733
+    'titre_config_fonctions' => 'Configurazione del sito',
734
+    'titre_configuration' => 'Configurazione del sito',
735
+    'titre_conflit_edition' => 'Conflitto all’atto dell’edizione',
736
+    'titre_connexion_ldap' => 'Opzioni: <b>La connessione LDAP</b>',
737
+    'titre_groupe_mots' => 'GRUPPO DI PAROLE CHIAVE:',
738
+    'titre_langue_article' => 'Lingua dell’articolo',
739
+    'titre_langue_rubrique' => 'Lingua della rubrica',
740
+    'titre_langue_trad_article' => 'LINGUA E TRADUZIONI DELL’ARTICOLO',
741
+    'titre_les_articles' => 'GLI ARTICOLI',
742
+    'titre_messagerie_agenda' => 'Messagistica e agenda',
743
+    'titre_naviguer_dans_le_site' => 'Navigare nel sito...',
744
+    'titre_nouvelle_rubrique' => 'Nuova rubrica',
745
+    'titre_numero_rubrique' => 'RUBRICA NUMERO:',
746
+    'titre_page_articles_edit' => 'Modifica: @titre@',
747
+    'titre_page_articles_page' => 'Gli articoli',
748
+    'titre_page_articles_tous' => 'Tutto il sito',
749
+    'titre_page_calendrier' => 'Calendario @nom_mois@ @annee@',
750
+    'titre_page_config_contenu' => 'Configurazione del sito',
751
+    'titre_page_delete_all' => 'eliminazione totale e irreversible',
752
+    'titre_page_recherche' => 'Risultati della ricerca @recherche@',
753
+    'titre_page_statistiques_referers' => 'Statistiche (link al tuo sito)',
754
+    'titre_page_upgrade' => 'Aggiornamento di SPIP',
755
+    'titre_publication_articles_post_dates' => 'Pubblicazione di articoli postdatati',
756
+    'titre_reparation' => 'Riparazione',
757
+    'titre_suivi_petition' => 'Monitoraggio delle petizioni',
758
+    'tls_ldap' => 'Transport Layer Security:',
759
+    'trad_article_traduction' => 'Tutte le versioni di questo articolo:',
760
+    'trad_delier' => 'Non collegare più a queste traduzioni', # RELIRE
761
+    'trad_lier' => 'Questo articolo è una traduzione dell’articolo numero:',
762
+    'trad_new' => 'Scrivere una nuova traduzione',
763 763
 
764
-	// U
765
-	'utf8_convert_erreur_orig' => 'Errore: il set di caratteri @charset@ non è supportato.',
764
+    // U
765
+    'utf8_convert_erreur_orig' => 'Errore: il set di caratteri @charset@ non è supportato.',
766 766
 
767
-	// V
768
-	'version' => 'Versione:'
767
+    // V
768
+    'version' => 'Versione:'
769 769
 );
Please login to merge, or discard this patch.
ecrire/inc/pipelines.php 2 patches
Indentation   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Pipelines
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 if (test_espace_prive()) {
22
-	include_spip('inc/pipelines_ecrire');
22
+    include_spip('inc/pipelines_ecrire');
23 23
 }
24 24
 
25 25
 
@@ -45,28 +45,28 @@  discard block
 block discarded – undo
45 45
  * @return string          Contenu qui sera inséré dans le head HTML
46 46
  **/
47 47
 function f_jQuery($texte) {
48
-	$x = '';
49
-	$jquery_plugins = pipeline('jquery_plugins',
50
-		array(
51
-			'javascript/jquery.js',
52
-			'javascript/jquery-migrate-3.2.0.js',
53
-			'javascript/jquery.form.js',
54
-			'javascript/jquery.autosave.js',
55
-			'javascript/jquery.placeholder-label.js',
56
-			'javascript/ajaxCallback.js',
57
-			'javascript/js.cookie.js',
58
-			'javascript/jquery.cookie.js'
59
-		));
60
-	foreach (array_unique($jquery_plugins) as $script) {
61
-		if ($script = find_in_path(supprimer_timestamp($script))) {
62
-			$script = timestamp($script);
63
-			$x .= "\n<script src=\"$script\" type=\"text/javascript\"></script>\n";
64
-		}
65
-	}
48
+    $x = '';
49
+    $jquery_plugins = pipeline('jquery_plugins',
50
+        array(
51
+            'javascript/jquery.js',
52
+            'javascript/jquery-migrate-3.2.0.js',
53
+            'javascript/jquery.form.js',
54
+            'javascript/jquery.autosave.js',
55
+            'javascript/jquery.placeholder-label.js',
56
+            'javascript/ajaxCallback.js',
57
+            'javascript/js.cookie.js',
58
+            'javascript/jquery.cookie.js'
59
+        ));
60
+    foreach (array_unique($jquery_plugins) as $script) {
61
+        if ($script = find_in_path(supprimer_timestamp($script))) {
62
+            $script = timestamp($script);
63
+            $x .= "\n<script src=\"$script\" type=\"text/javascript\"></script>\n";
64
+        }
65
+    }
66 66
 
67
-	$texte = $x . $texte;
67
+    $texte = $x . $texte;
68 68
 
69
-	return $texte;
69
+    return $texte;
70 70
 }
71 71
 
72 72
 
@@ -85,27 +85,27 @@  discard block
 block discarded – undo
85 85
  * @return string         Contenu de la page envoyée au navigateur
86 86
  **/
87 87
 function f_surligne($texte) {
88
-	if (!$GLOBALS['html']) {
89
-		return $texte;
90
-	}
91
-	$rech = _request('var_recherche');
92
-	if (!$rech
93
-		and (!defined('_SURLIGNE_RECHERCHE_REFERERS')
94
-			or !_SURLIGNE_RECHERCHE_REFERERS
95
-			or !isset($_SERVER['HTTP_REFERER']))
96
-	) {
97
-		return $texte;
98
-	}
99
-	include_spip('inc/surligne');
88
+    if (!$GLOBALS['html']) {
89
+        return $texte;
90
+    }
91
+    $rech = _request('var_recherche');
92
+    if (!$rech
93
+        and (!defined('_SURLIGNE_RECHERCHE_REFERERS')
94
+            or !_SURLIGNE_RECHERCHE_REFERERS
95
+            or !isset($_SERVER['HTTP_REFERER']))
96
+    ) {
97
+        return $texte;
98
+    }
99
+    include_spip('inc/surligne');
100 100
 
101
-	if (isset($_SERVER['HTTP_REFERER'])) {
102
-		$_SERVER['HTTP_REFERER'] = preg_replace(',[^\w\,/#&;:-]+,', ' ', $_SERVER['HTTP_REFERER']);
103
-	}
104
-	if ($rech){
105
-		$rech = preg_replace(',[^\w\,/#&;:-]+,', ' ', $rech);
106
-	}
101
+    if (isset($_SERVER['HTTP_REFERER'])) {
102
+        $_SERVER['HTTP_REFERER'] = preg_replace(',[^\w\,/#&;:-]+,', ' ', $_SERVER['HTTP_REFERER']);
103
+    }
104
+    if ($rech){
105
+        $rech = preg_replace(',[^\w\,/#&;:-]+,', ' ', $rech);
106
+    }
107 107
 
108
-	return surligner_mots($texte, $rech);
108
+    return surligner_mots($texte, $rech);
109 109
 }
110 110
 
111 111
 /**
@@ -122,32 +122,32 @@  discard block
 block discarded – undo
122 122
  * @return string         Contenu de la page envoyée au navigateur
123 123
  **/
124 124
 function f_tidy($texte) {
125
-	/**
126
-	 * Indentation à faire ?
127
-	 *
128
-	 * - true : actif.
129
-	 * - false par défaut.
130
-	 */
125
+    /**
126
+     * Indentation à faire ?
127
+     *
128
+     * - true : actif.
129
+     * - false par défaut.
130
+     */
131 131
 
132
-	if ($GLOBALS['xhtml'] # tidy demande
133
-		and $GLOBALS['html'] # verifie que la page avait l'entete text/html
134
-		and strlen($texte)
135
-		and !headers_sent()
136
-	) {
137
-		# Compatibilite ascendante
138
-		if (!is_string($GLOBALS['xhtml'])) {
139
-			$GLOBALS['xhtml'] = 'tidy';
140
-		}
132
+    if ($GLOBALS['xhtml'] # tidy demande
133
+        and $GLOBALS['html'] # verifie que la page avait l'entete text/html
134
+        and strlen($texte)
135
+        and !headers_sent()
136
+    ) {
137
+        # Compatibilite ascendante
138
+        if (!is_string($GLOBALS['xhtml'])) {
139
+            $GLOBALS['xhtml'] = 'tidy';
140
+        }
141 141
 
142
-		if (!$f = charger_fonction($GLOBALS['xhtml'], 'inc', true)) {
143
-			spip_log("tidy absent, l'indenteur SPIP le remplace");
144
-			$f = charger_fonction('sax', 'xml');
145
-		}
142
+        if (!$f = charger_fonction($GLOBALS['xhtml'], 'inc', true)) {
143
+            spip_log("tidy absent, l'indenteur SPIP le remplace");
144
+            $f = charger_fonction('sax', 'xml');
145
+        }
146 146
 
147
-		return $f($texte);
148
-	}
147
+        return $f($texte);
148
+    }
149 149
 
150
-	return $texte;
150
+    return $texte;
151 151
 }
152 152
 
153 153
 
@@ -166,21 +166,21 @@  discard block
 block discarded – undo
166 166
  * @return string         Contenu de la page envoyée au navigateur
167 167
  **/
168 168
 function f_insert_head($texte) {
169
-	if (!$GLOBALS['html']) {
170
-		return $texte;
171
-	}
172
-	include_spip('public/admin'); // pour strripos
169
+    if (!$GLOBALS['html']) {
170
+        return $texte;
171
+    }
172
+    include_spip('public/admin'); // pour strripos
173 173
 
174
-	($pos = stripos($texte, '</head>'))
175
-	|| ($pos = stripos($texte, '<body>'))
176
-	|| ($pos = 0);
174
+    ($pos = stripos($texte, '</head>'))
175
+    || ($pos = stripos($texte, '<body>'))
176
+    || ($pos = 0);
177 177
 
178
-	if (false === strpos(substr($texte, 0, $pos), '<!-- insert_head -->')) {
179
-		$insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n";
180
-		$texte = substr_replace($texte, $insert, $pos, 0);
181
-	}
178
+    if (false === strpos(substr($texte, 0, $pos), '<!-- insert_head -->')) {
179
+        $insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n";
180
+        $texte = substr_replace($texte, $insert, $pos, 0);
181
+    }
182 182
 
183
-	return $texte;
183
+    return $texte;
184 184
 }
185 185
 
186 186
 
@@ -196,34 +196,34 @@  discard block
 block discarded – undo
196 196
  * @return string         Contenu de la page envoyée au navigateur
197 197
  **/
198 198
 function f_admin($texte) {
199
-	if (defined('_VAR_PREVIEW') and _VAR_PREVIEW and $GLOBALS['html']) {
200
-		include_spip('inc/filtres'); // pour http_img_pack
201
-		$x = "<div class='spip-previsu' "
202
-			. http_style_background('preview-32.png', '', 32)
203
-			. ">"
204
-			. _T('previsualisation')
205
-			. "</div>";
206
-		if (!$pos = stripos($texte, '</body>')) {
207
-			$pos = strlen($texte);
208
-		}
209
-		$texte = substr_replace($texte, $x, $pos, 0);
210
-		// pas de preview en fenetre enfant
211
-		$x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='".addslashes($GLOBALS['meta']['adresse_site'])."';}</script>";
212
-		if (!$pos = stripos($texte, '<head') or !$pos = strpos($texte, '>', $pos)) {
213
-			$pos = -1;
214
-		}
215
-		$texte = substr_replace($texte, $x, $pos+1, 0);
216
-	}
199
+    if (defined('_VAR_PREVIEW') and _VAR_PREVIEW and $GLOBALS['html']) {
200
+        include_spip('inc/filtres'); // pour http_img_pack
201
+        $x = "<div class='spip-previsu' "
202
+            . http_style_background('preview-32.png', '', 32)
203
+            . ">"
204
+            . _T('previsualisation')
205
+            . "</div>";
206
+        if (!$pos = stripos($texte, '</body>')) {
207
+            $pos = strlen($texte);
208
+        }
209
+        $texte = substr_replace($texte, $x, $pos, 0);
210
+        // pas de preview en fenetre enfant
211
+        $x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='".addslashes($GLOBALS['meta']['adresse_site'])."';}</script>";
212
+        if (!$pos = stripos($texte, '<head') or !$pos = strpos($texte, '>', $pos)) {
213
+            $pos = -1;
214
+        }
215
+        $texte = substr_replace($texte, $x, $pos+1, 0);
216
+    }
217 217
 
218
-	if (isset($GLOBALS['affiche_boutons_admin']) and $GLOBALS['affiche_boutons_admin']) {
219
-		include_spip('public/admin');
220
-		$texte = affiche_boutons_admin($texte);
221
-	}
222
-	if (_request('var_mode') == 'noajax') {
223
-		$texte = preg_replace(',(class=[\'"][^\'"]*)ajax([^\'"]*[\'"]),Uims', "\\1\\2", $texte);
224
-	}
218
+    if (isset($GLOBALS['affiche_boutons_admin']) and $GLOBALS['affiche_boutons_admin']) {
219
+        include_spip('public/admin');
220
+        $texte = affiche_boutons_admin($texte);
221
+    }
222
+    if (_request('var_mode') == 'noajax') {
223
+        $texte = preg_replace(',(class=[\'"][^\'"]*)ajax([^\'"]*[\'"]),Uims', "\\1\\2", $texte);
224
+    }
225 225
 
226
-	return $texte;
226
+    return $texte;
227 227
 }
228 228
 
229 229
 /**
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
  * @return array $flux  Description et contenu de l'inclusion
242 242
  **/
243 243
 function f_recuperer_fond($flux) {
244
-	if (!test_espace_prive()) {
245
-		return $flux;
246
-	}
244
+    if (!test_espace_prive()) {
245
+        return $flux;
246
+    }
247 247
 
248
-	return f_afficher_blocs_ecrire($flux);
248
+    return f_afficher_blocs_ecrire($flux);
249 249
 }
250 250
 
251 251
 /**
@@ -259,29 +259,29 @@  discard block
 block discarded – undo
259 259
  * @return string         Contenu de la page envoyée au navigateur
260 260
  */
261 261
 function f_queue($texte) {
262
-	// eviter une inclusion si rien a faire
263
-	if (_request('action') == 'cron'
264
-		or queue_sleep_time_to_next_job() > 0
265
-		or defined('_DEBUG_BLOCK_QUEUE')
266
-	) {
267
-		return $texte;
268
-	}
262
+    // eviter une inclusion si rien a faire
263
+    if (_request('action') == 'cron'
264
+        or queue_sleep_time_to_next_job() > 0
265
+        or defined('_DEBUG_BLOCK_QUEUE')
266
+    ) {
267
+        return $texte;
268
+    }
269 269
 
270
-	include_spip('inc/queue');
271
-	$code = queue_affichage_cron();
270
+    include_spip('inc/queue');
271
+    $code = queue_affichage_cron();
272 272
 
273
-	// si rien a afficher
274
-	// ou si on est pas dans une page html, on ne sait rien faire de mieux
275
-	if (!$code or !isset($GLOBALS['html']) or !$GLOBALS['html']) {
276
-		return $texte;
277
-	}
273
+    // si rien a afficher
274
+    // ou si on est pas dans une page html, on ne sait rien faire de mieux
275
+    if (!$code or !isset($GLOBALS['html']) or !$GLOBALS['html']) {
276
+        return $texte;
277
+    }
278 278
 
279
-	// inserer avant le </body> fermant si on peut, a la fin de la page sinon
280
-	if (($p = strpos($texte, '</body>')) !== false) {
281
-		$texte = substr($texte, 0, $p) . $code . substr($texte, $p);
282
-	} else {
283
-		$texte .= $code;
284
-	}
279
+    // inserer avant le </body> fermant si on peut, a la fin de la page sinon
280
+    if (($p = strpos($texte, '</body>')) !== false) {
281
+        $texte = substr($texte, 0, $p) . $code . substr($texte, $p);
282
+    } else {
283
+        $texte .= $code;
284
+    }
285 285
 
286
-	return $texte;
286
+    return $texte;
287 287
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		}
65 65
 	}
66 66
 
67
-	$texte = $x . $texte;
67
+	$texte = $x.$texte;
68 68
 
69 69
 	return $texte;
70 70
 }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	if (isset($_SERVER['HTTP_REFERER'])) {
102 102
 		$_SERVER['HTTP_REFERER'] = preg_replace(',[^\w\,/#&;:-]+,', ' ', $_SERVER['HTTP_REFERER']);
103 103
 	}
104
-	if ($rech){
104
+	if ($rech) {
105 105
 		$rech = preg_replace(',[^\w\,/#&;:-]+,', ' ', $rech);
106 106
 	}
107 107
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	|| ($pos = 0);
177 177
 
178 178
 	if (false === strpos(substr($texte, 0, $pos), '<!-- insert_head -->')) {
179
-		$insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n";
179
+		$insert = "\n".pipeline('insert_head', '<!-- f_insert_head -->')."\n";
180 180
 		$texte = substr_replace($texte, $insert, $pos, 0);
181 181
 	}
182 182
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 		if (!$pos = stripos($texte, '<head') or !$pos = strpos($texte, '>', $pos)) {
213 213
 			$pos = -1;
214 214
 		}
215
-		$texte = substr_replace($texte, $x, $pos+1, 0);
215
+		$texte = substr_replace($texte, $x, $pos + 1, 0);
216 216
 	}
217 217
 
218 218
 	if (isset($GLOBALS['affiche_boutons_admin']) and $GLOBALS['affiche_boutons_admin']) {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 
279 279
 	// inserer avant le </body> fermant si on peut, a la fin de la page sinon
280 280
 	if (($p = strpos($texte, '</body>')) !== false) {
281
-		$texte = substr($texte, 0, $p) . $code . substr($texte, $p);
281
+		$texte = substr($texte, 0, $p).$code.substr($texte, $p);
282 282
 	} else {
283 283
 		$texte .= $code;
284 284
 	}
Please login to merge, or discard this patch.
prive/ajax_item_pick_fonctions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 include_spip('inc/filtres_selecteur_generique');
Please login to merge, or discard this patch.
ecrire/inc/filtres_selecteur_generique.php 2 patches
Indentation   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  **/
8 8
 
9 9
 if (!defined('_ECRIRE_INC_VERSION')) {
10
-	return;
10
+    return;
11 11
 }
12 12
 
13 13
 /**
@@ -28,51 +28,51 @@  discard block
 block discarded – undo
28 28
  *     - afficher : tableau des objets à afficher (mais pas forcément sélectionnables)
29 29
  */
30 30
 function selecteur_lister_objets($whitelist = array(), $blacklist = array()) {
31
-	static $liste_selecteurs, $liste_parents;
32
-
33
-	if (!$liste_selecteurs) {
34
-		$liste_selecteurs = find_all_in_path('formulaires/selecteur/', 'hierarchie-[\w]+[.]html$');
35
-	}
36
-	$objets_selectionner = array();
37
-	foreach ($liste_selecteurs as $fichier => $chemin) {
38
-		$objets_selectionner[] = preg_replace('/^hierarchie-([\w]+)[.]html$/', '$1', $fichier);
39
-	}
40
-
41
-	// S'il y a une whitelist on ne garde que ce qui est dedans
42
-	if (!empty($whitelist)) {
43
-		$whitelist = array_map('table_objet', $whitelist);
44
-		$objets_selectionner = array_intersect($objets_selectionner, $whitelist);
45
-	}
46
-	// On supprime ce qui est dans la blacklist
47
-	$blacklist = array_map('table_objet', $blacklist);
48
-	// On enlève toujours la racine
49
-	$blacklist[] = 'racine';
50
-	$objets_selectionner = array_diff($objets_selectionner, $blacklist);
51
-
52
-	// Ensuite on cherche ce qu'on doit afficher : au moins ceux qu'on peut sélectionner
53
-	$objets_afficher = $objets_selectionner;
54
-
55
-	// Il faut alors chercher d'éventuels parents obligatoires en plus :
56
-	// lister-trucs-bidules.html => on doit afficher des "trucs" pour trouver des "bidules"
57
-	if (!$liste_parents) {
58
-		$liste_parents = find_all_in_path('formulaires/selecteur/', 'lister-[\w]+-[\w]+[.]html$');
59
-	}
60
-	foreach ($liste_parents as $fichier => $chemin) {
61
-		preg_match('/^lister-([\w]+)-([\w]+)[.]html$/', $fichier, $captures);
62
-		$parent = $captures[1];
63
-		$type = $captures[2];
64
-		// Si le type fait partie de ce qu'on doit afficher alors on ajoute aussi le parent à l'affichage
65
-		if (in_array($type, $objets_afficher)) {
66
-			$objets_afficher[] = $parent;
67
-		}
68
-	}
69
-
70
-	$objets = array(
71
-		'selectionner' => array_unique($objets_selectionner),
72
-		'afficher' => array_unique($objets_afficher),
73
-	);
74
-
75
-	return $objets;
31
+    static $liste_selecteurs, $liste_parents;
32
+
33
+    if (!$liste_selecteurs) {
34
+        $liste_selecteurs = find_all_in_path('formulaires/selecteur/', 'hierarchie-[\w]+[.]html$');
35
+    }
36
+    $objets_selectionner = array();
37
+    foreach ($liste_selecteurs as $fichier => $chemin) {
38
+        $objets_selectionner[] = preg_replace('/^hierarchie-([\w]+)[.]html$/', '$1', $fichier);
39
+    }
40
+
41
+    // S'il y a une whitelist on ne garde que ce qui est dedans
42
+    if (!empty($whitelist)) {
43
+        $whitelist = array_map('table_objet', $whitelist);
44
+        $objets_selectionner = array_intersect($objets_selectionner, $whitelist);
45
+    }
46
+    // On supprime ce qui est dans la blacklist
47
+    $blacklist = array_map('table_objet', $blacklist);
48
+    // On enlève toujours la racine
49
+    $blacklist[] = 'racine';
50
+    $objets_selectionner = array_diff($objets_selectionner, $blacklist);
51
+
52
+    // Ensuite on cherche ce qu'on doit afficher : au moins ceux qu'on peut sélectionner
53
+    $objets_afficher = $objets_selectionner;
54
+
55
+    // Il faut alors chercher d'éventuels parents obligatoires en plus :
56
+    // lister-trucs-bidules.html => on doit afficher des "trucs" pour trouver des "bidules"
57
+    if (!$liste_parents) {
58
+        $liste_parents = find_all_in_path('formulaires/selecteur/', 'lister-[\w]+-[\w]+[.]html$');
59
+    }
60
+    foreach ($liste_parents as $fichier => $chemin) {
61
+        preg_match('/^lister-([\w]+)-([\w]+)[.]html$/', $fichier, $captures);
62
+        $parent = $captures[1];
63
+        $type = $captures[2];
64
+        // Si le type fait partie de ce qu'on doit afficher alors on ajoute aussi le parent à l'affichage
65
+        if (in_array($type, $objets_afficher)) {
66
+            $objets_afficher[] = $parent;
67
+        }
68
+    }
69
+
70
+    $objets = array(
71
+        'selectionner' => array_unique($objets_selectionner),
72
+        'afficher' => array_unique($objets_afficher),
73
+    );
74
+
75
+    return $objets;
76 76
 }
77 77
 
78 78
 /**
@@ -99,31 +99,31 @@  discard block
 block discarded – undo
99 99
  *     liste des couples (objets => id_objet) ou liste des identifiants d'un type d'objet.
100 100
  **/
101 101
 function picker_selected($selected, $type = '') {
102
-	$select = array();
103
-	$type = preg_replace(',\W,', '', $type);
104
-
105
-	if ($selected and !is_array($selected)) {
106
-		$selected = explode(',', $selected);
107
-	}
108
-
109
-	if (is_array($selected)) {
110
-		foreach ($selected as $value) {
111
-			// Si c'est le bon format déjà
112
-			if (preg_match('/^([\w]+)[|]([0-9]+)$/', $value, $captures)) {
113
-				$objet = $captures[1];
114
-				$id_objet = intval($captures[2]);
115
-
116
-				// Si on cherche un type et que c'est le bon, on renvoit un tableau que d'identifiants
117
-				if (is_string($type) and $type == $objet and ($id_objet or in_array($objet, array('racine', 'rubrique')))) {
118
-					$select[] = $id_objet;
119
-				} elseif (!$type and ($id_objet or in_array($objet, array('racine', 'rubrique')))) {
120
-					$select[] = array('objet' => $objet, 'id_objet' => $id_objet);
121
-				}
122
-			}
123
-		}
124
-	}
125
-
126
-	return $select;
102
+    $select = array();
103
+    $type = preg_replace(',\W,', '', $type);
104
+
105
+    if ($selected and !is_array($selected)) {
106
+        $selected = explode(',', $selected);
107
+    }
108
+
109
+    if (is_array($selected)) {
110
+        foreach ($selected as $value) {
111
+            // Si c'est le bon format déjà
112
+            if (preg_match('/^([\w]+)[|]([0-9]+)$/', $value, $captures)) {
113
+                $objet = $captures[1];
114
+                $id_objet = intval($captures[2]);
115
+
116
+                // Si on cherche un type et que c'est le bon, on renvoit un tableau que d'identifiants
117
+                if (is_string($type) and $type == $objet and ($id_objet or in_array($objet, array('racine', 'rubrique')))) {
118
+                    $select[] = $id_objet;
119
+                } elseif (!$type and ($id_objet or in_array($objet, array('racine', 'rubrique')))) {
120
+                    $select[] = array('objet' => $objet, 'id_objet' => $id_objet);
121
+                }
122
+            }
123
+        }
124
+    }
125
+
126
+    return $select;
127 127
 }
128 128
 
129 129
 /**
@@ -140,49 +140,49 @@  discard block
 block discarded – undo
140 140
  *     Booléen indiquant si les articles sont sélectionnables
141 141
  */
142 142
 function picker_identifie_id_rapide($ref, $rubriques_ou_objets = false, $articles = false) {
143
-	include_spip('inc/json');
144
-	include_spip('inc/lien');
145
-
146
-	// On construit un tableau des objets sélectionnables suivant les paramètres
147
-	$objets = array();
148
-	if ($rubriques_ou_objets and is_array($rubriques_ou_objets)) {
149
-		$objets = $rubriques_ou_objets;
150
-	} else {
151
-		if ($rubriques_ou_objets) {
152
-			$objets[] = 'rubriques';
153
-		}
154
-		if ($articles) {
155
-			$objets[] = 'articles';
156
-		}
157
-	}
158
-
159
-	// si id numerique et un seul objet possible, pas d'ambiguite
160
-	if (is_numeric($ref) and count($objets) === 1) {
161
-		$ref = reset($objets) . $ref;
162
-	}
163
-
164
-	// Si la référence ne correspond à rien, c'est fini
165
-	if (!($match = typer_raccourci($ref))) {
166
-		return json_export(false);
167
-	}
168
-	// Sinon on récupère les infos utiles
169
-	@list($type, , $id, , , , ) = $match;
170
-
171
-	// On regarde si le type trouvé fait partie des objets sélectionnables
172
-	if (!in_array(table_objet($type), $objets)) {
173
-		return json_export(false);
174
-	}
175
-
176
-	// Maintenant que tout est bon, on cherche les informations sur cet objet
177
-	include_spip('inc/filtres');
178
-	if (!$titre = generer_info_entite($id, $type, 'titre')) {
179
-		return json_export(false);
180
-	}
181
-
182
-	// On simplifie le texte
183
-	$titre = attribut_html($titre);
184
-
185
-	return json_export(array('type' => $type, 'id' => "$type|$id", 'titre' => $titre));
143
+    include_spip('inc/json');
144
+    include_spip('inc/lien');
145
+
146
+    // On construit un tableau des objets sélectionnables suivant les paramètres
147
+    $objets = array();
148
+    if ($rubriques_ou_objets and is_array($rubriques_ou_objets)) {
149
+        $objets = $rubriques_ou_objets;
150
+    } else {
151
+        if ($rubriques_ou_objets) {
152
+            $objets[] = 'rubriques';
153
+        }
154
+        if ($articles) {
155
+            $objets[] = 'articles';
156
+        }
157
+    }
158
+
159
+    // si id numerique et un seul objet possible, pas d'ambiguite
160
+    if (is_numeric($ref) and count($objets) === 1) {
161
+        $ref = reset($objets) . $ref;
162
+    }
163
+
164
+    // Si la référence ne correspond à rien, c'est fini
165
+    if (!($match = typer_raccourci($ref))) {
166
+        return json_export(false);
167
+    }
168
+    // Sinon on récupère les infos utiles
169
+    @list($type, , $id, , , , ) = $match;
170
+
171
+    // On regarde si le type trouvé fait partie des objets sélectionnables
172
+    if (!in_array(table_objet($type), $objets)) {
173
+        return json_export(false);
174
+    }
175
+
176
+    // Maintenant que tout est bon, on cherche les informations sur cet objet
177
+    include_spip('inc/filtres');
178
+    if (!$titre = generer_info_entite($id, $type, 'titre')) {
179
+        return json_export(false);
180
+    }
181
+
182
+    // On simplifie le texte
183
+    $titre = attribut_html($titre);
184
+
185
+    return json_export(array('type' => $type, 'id' => "$type|$id", 'titre' => $titre));
186 186
 }
187 187
 
188 188
 /**
@@ -205,34 +205,34 @@  discard block
 block discarded – undo
205 205
  *     Comme le filtre `oui` : espace (` `) si rubrique à afficher, chaîne vide sinon.
206 206
  */
207 207
 function test_enfants_rubrique($id_rubrique, $types = array()) {
208
-	static $has_child = array();
209
-
210
-	if (!isset($has_child[$id_rubrique])) {
211
-		$types = (is_array($types) ? array_filter($types) : array());
212
-
213
-		// recuperer tous les freres et soeurs de la rubrique visee
214
-		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
215
-		$fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . intval($id_parent));
216
-		$fratrie = array_column($fratrie, 'id_rubrique');
217
-		$has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie));
218
-		$has = array_column($has, 'id_parent');
219
-		$fratrie = array_diff($fratrie, $has);
220
-
221
-		while (count($fratrie) and is_array($types) and count($types)) {
222
-			$type = array_shift($types);
223
-			$h = sql_allfetsel('DISTINCT id_rubrique', table_objet_sql($type), sql_in('id_rubrique', $fratrie));
224
-			$h = array_column($h, 'id_rubrique');
225
-			$has = array_merge($has, $h);
226
-			$fratrie = array_diff($fratrie, $h);
227
-		}
228
-
229
-		if (count($has)) {
230
-			$has_child = $has_child + array_combine($has, array_pad(array(), count($has), true));
231
-		}
232
-		if (count($fratrie)) {
233
-			$has_child = $has_child + array_combine($fratrie, array_pad(array(), count($fratrie), false));
234
-		}
235
-	}
236
-
237
-	return $has_child[$id_rubrique] ? ' ' : '';
208
+    static $has_child = array();
209
+
210
+    if (!isset($has_child[$id_rubrique])) {
211
+        $types = (is_array($types) ? array_filter($types) : array());
212
+
213
+        // recuperer tous les freres et soeurs de la rubrique visee
214
+        $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
215
+        $fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . intval($id_parent));
216
+        $fratrie = array_column($fratrie, 'id_rubrique');
217
+        $has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie));
218
+        $has = array_column($has, 'id_parent');
219
+        $fratrie = array_diff($fratrie, $has);
220
+
221
+        while (count($fratrie) and is_array($types) and count($types)) {
222
+            $type = array_shift($types);
223
+            $h = sql_allfetsel('DISTINCT id_rubrique', table_objet_sql($type), sql_in('id_rubrique', $fratrie));
224
+            $h = array_column($h, 'id_rubrique');
225
+            $has = array_merge($has, $h);
226
+            $fratrie = array_diff($fratrie, $h);
227
+        }
228
+
229
+        if (count($has)) {
230
+            $has_child = $has_child + array_combine($has, array_pad(array(), count($has), true));
231
+        }
232
+        if (count($fratrie)) {
233
+            $has_child = $has_child + array_combine($fratrie, array_pad(array(), count($fratrie), false));
234
+        }
235
+    }
236
+
237
+    return $has_child[$id_rubrique] ? ' ' : '';
238 238
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 	// si id numerique et un seul objet possible, pas d'ambiguite
160 160
 	if (is_numeric($ref) and count($objets) === 1) {
161
-		$ref = reset($objets) . $ref;
161
+		$ref = reset($objets).$ref;
162 162
 	}
163 163
 
164 164
 	// Si la référence ne correspond à rien, c'est fini
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 		return json_export(false);
167 167
 	}
168 168
 	// Sinon on récupère les infos utiles
169
-	@list($type, , $id, , , , ) = $match;
169
+	@list($type,, $id,,,,) = $match;
170 170
 
171 171
 	// On regarde si le type trouvé fait partie des objets sélectionnables
172 172
 	if (!in_array(table_objet($type), $objets)) {
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
 		$types = (is_array($types) ? array_filter($types) : array());
212 212
 
213 213
 		// recuperer tous les freres et soeurs de la rubrique visee
214
-		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
215
-		$fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . intval($id_parent));
214
+		$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
215
+		$fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent='.intval($id_parent));
216 216
 		$fratrie = array_column($fratrie, 'id_rubrique');
217 217
 		$has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie));
218 218
 		$has = array_column($has, 'id_parent');
Please login to merge, or discard this patch.
ecrire/inc/filtres_dates.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -205,8 +205,7 @@
 block discarded – undo
205 205
 function heures_minutes($numdate, $forme='') {
206 206
 	if ($forme !='abbr') {
207 207
 		return _T('date_fmt_heures_minutes', array('h' => heures($numdate), 'm' => minutes($numdate)));
208
-	}
209
-	else {
208
+	} else {
210 209
 		return _T('date_fmt_heures_minutes_court', array('h' => heures($numdate), 'm' => minutes($numdate)));
211 210
 	}
212 211
 }
Please login to merge, or discard this patch.
Indentation   +562 added lines, -562 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Filtres
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
  *    Date au format SQL tel que `2008-04-01`
37 37
  **/
38 38
 function extraire_date($texte) {
39
-	// format = 2001-08
40
-	if (preg_match(",([1-2][0-9]{3})[^0-9]*(1[0-2]|0?[1-9]),", $texte, $regs)) {
41
-		return $regs[1] . "-" . sprintf("%02d", $regs[2]) . "-01";
42
-	}
39
+    // format = 2001-08
40
+    if (preg_match(",([1-2][0-9]{3})[^0-9]*(1[0-2]|0?[1-9]),", $texte, $regs)) {
41
+        return $regs[1] . "-" . sprintf("%02d", $regs[2]) . "-01";
42
+    }
43 43
 }
44 44
 
45 45
 
@@ -61,29 +61,29 @@  discard block
 block discarded – undo
61 61
  *     - une chaîne vide si la date est considérée nulle
62 62
  **/
63 63
 function normaliser_date($date, $forcer_jour = false) {
64
-	$date = vider_date($date);
65
-	if ($date) {
66
-		if (preg_match("/^[0-9]{8,10}$/", $date)) {
67
-			$date = date("Y-m-d H:i:s", $date);
68
-		}
69
-		if (preg_match("#^([12][0-9]{3})([-/]00)?( [-0-9:]+)?$#", $date, $regs)) {
70
-			$regs = array_pad($regs, 4, null); // eviter notice php
71
-			$date = $regs[1] . "-00-00" . $regs[3];
72
-		} else {
73
-			if (preg_match("#^([12][0-9]{3}[-/][01]?[0-9])([-/]00)?( [-0-9:]+)?$#", $date, $regs)) {
74
-				$regs = array_pad($regs, 4, null); // eviter notice php
75
-				$date = preg_replace("@/@", "-", $regs[1]) . "-00" . $regs[3];
76
-			} else {
77
-				$date = date("Y-m-d H:i:s", strtotime($date));
78
-			}
79
-		}
80
-
81
-		if ($forcer_jour) {
82
-			$date = str_replace('-00', '-01', $date);
83
-		}
84
-	}
85
-
86
-	return $date;
64
+    $date = vider_date($date);
65
+    if ($date) {
66
+        if (preg_match("/^[0-9]{8,10}$/", $date)) {
67
+            $date = date("Y-m-d H:i:s", $date);
68
+        }
69
+        if (preg_match("#^([12][0-9]{3})([-/]00)?( [-0-9:]+)?$#", $date, $regs)) {
70
+            $regs = array_pad($regs, 4, null); // eviter notice php
71
+            $date = $regs[1] . "-00-00" . $regs[3];
72
+        } else {
73
+            if (preg_match("#^([12][0-9]{3}[-/][01]?[0-9])([-/]00)?( [-0-9:]+)?$#", $date, $regs)) {
74
+                $regs = array_pad($regs, 4, null); // eviter notice php
75
+                $date = preg_replace("@/@", "-", $regs[1]) . "-00" . $regs[3];
76
+            } else {
77
+                $date = date("Y-m-d H:i:s", strtotime($date));
78
+            }
79
+        }
80
+
81
+        if ($forcer_jour) {
82
+            $date = str_replace('-00', '-01', $date);
83
+        }
84
+    }
85
+
86
+    return $date;
87 87
 }
88 88
 
89 89
 /**
@@ -96,21 +96,21 @@  discard block
 block discarded – undo
96 96
  *     - Une chaine vide
97 97
  **/
98 98
 function vider_date($letexte, $verif_format_date = false) {
99
-	if (!$verif_format_date
100
-	  or (in_array(strlen($letexte), [10,19]) and
101
-			  preg_match("/^[0-9]{4}-[0-9]{2}-[0-9]{2}(\s[0-9]{2}:[0-9]{2}:[0-9]{2})?$/", $letexte))) {
102
-
103
-		if (strncmp("0000-00-00", $letexte, 10) == 0) {
104
-			return '';
105
-		}
106
-		if (strncmp("0001-01-01", $letexte, 10) == 0) {
107
-			return '';
108
-		}
109
-		if (strncmp("1970-01-01", $letexte, 10) == 0) {
110
-			return '';
111
-		}  // eviter le bug GMT-1
112
-	}
113
-	return $letexte;
99
+    if (!$verif_format_date
100
+      or (in_array(strlen($letexte), [10,19]) and
101
+              preg_match("/^[0-9]{4}-[0-9]{2}-[0-9]{2}(\s[0-9]{2}:[0-9]{2}:[0-9]{2})?$/", $letexte))) {
102
+
103
+        if (strncmp("0000-00-00", $letexte, 10) == 0) {
104
+            return '';
105
+        }
106
+        if (strncmp("0001-01-01", $letexte, 10) == 0) {
107
+            return '';
108
+        }
109
+        if (strncmp("1970-01-01", $letexte, 10) == 0) {
110
+            return '';
111
+        }  // eviter le bug GMT-1
112
+    }
113
+    return $letexte;
114 114
 }
115 115
 
116 116
 /**
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
  **/
127 127
 function recup_heure($date) {
128 128
 
129
-	static $d = array(0, 0, 0);
130
-	if (!preg_match('#([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $date, $r)) {
131
-		return $d;
132
-	}
129
+    static $d = array(0, 0, 0);
130
+    if (!preg_match('#([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $date, $r)) {
131
+        return $d;
132
+    }
133 133
 
134
-	array_shift($r);
134
+    array_shift($r);
135 135
 
136
-	return $r;
136
+    return $r;
137 137
 }
138 138
 
139 139
 /**
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
  * @return int heures, sinon 0
148 148
  **/
149 149
 function heures($numdate) {
150
-	$date_array = recup_heure($numdate);
151
-	if ($date_array) {
152
-		list($heures, $minutes, $secondes) = $date_array;
153
-	}
150
+    $date_array = recup_heure($numdate);
151
+    if ($date_array) {
152
+        list($heures, $minutes, $secondes) = $date_array;
153
+    }
154 154
 
155
-	return $heures;
155
+    return $heures;
156 156
 }
157 157
 
158 158
 /**
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
  * @return int minutes, sinon 0
167 167
  **/
168 168
 function minutes($numdate) {
169
-	$date_array = recup_heure($numdate);
170
-	if ($date_array) {
171
-		list($heures, $minutes, $secondes) = $date_array;
172
-	}
169
+    $date_array = recup_heure($numdate);
170
+    if ($date_array) {
171
+        list($heures, $minutes, $secondes) = $date_array;
172
+    }
173 173
 
174
-	return $minutes;
174
+    return $minutes;
175 175
 }
176 176
 
177 177
 /**
@@ -185,12 +185,12 @@  discard block
 block discarded – undo
185 185
  * @return int secondes, sinon 0
186 186
  **/
187 187
 function secondes($numdate) {
188
-	$date_array = recup_heure($numdate);
189
-	if ($date_array) {
190
-		list($heures, $minutes, $secondes) = $date_array;
191
-	}
188
+    $date_array = recup_heure($numdate);
189
+    if ($date_array) {
190
+        list($heures, $minutes, $secondes) = $date_array;
191
+    }
192 192
 
193
-	return $secondes;
193
+    return $secondes;
194 194
 }
195 195
 
196 196
 /**
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
  * @return string L'heure formatée dans la langue en cours.
210 210
  **/
211 211
 function heures_minutes($numdate, $forme='') {
212
-	if ($forme !='abbr') {
213
-		return _T('date_fmt_heures_minutes', array('h' => heures($numdate), 'm' => minutes($numdate)));
214
-	}
215
-	else {
216
-		return _T('date_fmt_heures_minutes_court', array('h' => heures($numdate), 'm' => minutes($numdate)));
217
-	}
212
+    if ($forme !='abbr') {
213
+        return _T('date_fmt_heures_minutes', array('h' => heures($numdate), 'm' => minutes($numdate)));
214
+    }
215
+    else {
216
+        return _T('date_fmt_heures_minutes_court', array('h' => heures($numdate), 'm' => minutes($numdate)));
217
+    }
218 218
 }
219 219
 
220 220
 /**
@@ -239,57 +239,57 @@  discard block
 block discarded – undo
239 239
  * @return array [année, mois, jour, heures, minutes, secondes]
240 240
  **/
241 241
 function recup_date($numdate, $forcer_jour = true) {
242
-	if (!$numdate) {
243
-		return '';
244
-	}
245
-	$heures = $minutes = $secondes = 0;
246
-	if (preg_match('#([0-9]{1,2})/([0-9]{1,2})/([0-9]{4}|[0-9]{1,2})#', $numdate, $regs)) {
247
-		$jour = $regs[1];
248
-		$mois = $regs[2];
249
-		$annee = $regs[3];
250
-		if ($annee < 90) {
251
-			$annee = 2000 + $annee;
252
-		} elseif ($annee < 100) {
253
-			$annee = 1900 + $annee;
254
-		}
255
-		list($heures, $minutes, $secondes) = recup_heure($numdate);
256
-
257
-	} elseif (preg_match('#([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})#', $numdate, $regs)) {
258
-		$annee = $regs[1];
259
-		$mois = $regs[2];
260
-		$jour = $regs[3];
261
-		list($heures, $minutes, $secondes) = recup_heure($numdate);
262
-	} elseif (preg_match('#([0-9]{4})-([0-9]{2})#', $numdate, $regs)) {
263
-		$annee = $regs[1];
264
-		$mois = $regs[2];
265
-		$jour = '';
266
-		list($heures, $minutes, $secondes) = recup_heure($numdate);
267
-	} elseif (preg_match('#^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})$#', $numdate, $regs)) {
268
-		$annee = $regs[1];
269
-		$mois = $regs[2];
270
-		$jour = $regs[3];
271
-		$heures = $regs[4];
272
-		$minutes = $regs[5];
273
-		$secondes = $regs[6];
274
-	} else {
275
-		$annee = $mois = $jour = '';
276
-	}
277
-	if ($annee > 4000) {
278
-		$annee -= 9000;
279
-	}
280
-	if (strlen($jour) and substr($jour, 0, 1) == '0') {
281
-		$jour = substr($jour, 1);
282
-	}
283
-
284
-	if ($forcer_jour and $jour == '0') {
285
-		$jour = '1';
286
-	}
287
-	if ($forcer_jour and $mois == '0') {
288
-		$mois = '1';
289
-	}
290
-	if ($annee or $mois or $jour or $heures or $minutes or $secondes) {
291
-		return array($annee, $mois, $jour, $heures, $minutes, $secondes);
292
-	}
242
+    if (!$numdate) {
243
+        return '';
244
+    }
245
+    $heures = $minutes = $secondes = 0;
246
+    if (preg_match('#([0-9]{1,2})/([0-9]{1,2})/([0-9]{4}|[0-9]{1,2})#', $numdate, $regs)) {
247
+        $jour = $regs[1];
248
+        $mois = $regs[2];
249
+        $annee = $regs[3];
250
+        if ($annee < 90) {
251
+            $annee = 2000 + $annee;
252
+        } elseif ($annee < 100) {
253
+            $annee = 1900 + $annee;
254
+        }
255
+        list($heures, $minutes, $secondes) = recup_heure($numdate);
256
+
257
+    } elseif (preg_match('#([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})#', $numdate, $regs)) {
258
+        $annee = $regs[1];
259
+        $mois = $regs[2];
260
+        $jour = $regs[3];
261
+        list($heures, $minutes, $secondes) = recup_heure($numdate);
262
+    } elseif (preg_match('#([0-9]{4})-([0-9]{2})#', $numdate, $regs)) {
263
+        $annee = $regs[1];
264
+        $mois = $regs[2];
265
+        $jour = '';
266
+        list($heures, $minutes, $secondes) = recup_heure($numdate);
267
+    } elseif (preg_match('#^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})$#', $numdate, $regs)) {
268
+        $annee = $regs[1];
269
+        $mois = $regs[2];
270
+        $jour = $regs[3];
271
+        $heures = $regs[4];
272
+        $minutes = $regs[5];
273
+        $secondes = $regs[6];
274
+    } else {
275
+        $annee = $mois = $jour = '';
276
+    }
277
+    if ($annee > 4000) {
278
+        $annee -= 9000;
279
+    }
280
+    if (strlen($jour) and substr($jour, 0, 1) == '0') {
281
+        $jour = substr($jour, 1);
282
+    }
283
+
284
+    if ($forcer_jour and $jour == '0') {
285
+        $jour = '1';
286
+    }
287
+    if ($forcer_jour and $mois == '0') {
288
+        $mois = '1';
289
+    }
290
+    if ($annee or $mois or $jour or $heures or $minutes or $secondes) {
291
+        return array($annee, $mois, $jour, $heures, $minutes, $secondes);
292
+    }
293 293
 }
294 294
 
295 295
 /**
@@ -316,10 +316,10 @@  discard block
 block discarded – undo
316 316
  *     La date relative ou complète
317 317
  **/
318 318
 function date_interface($date, $decalage_maxi = 43200 /* 12*3600 */) {
319
-	return sinon(
320
-		date_relative($date, $decalage_maxi),
321
-		affdate_heure($date)
322
-	);
319
+    return sinon(
320
+        date_relative($date, $decalage_maxi),
321
+        affdate_heure($date)
322
+    );
323 323
 }
324 324
 
325 325
 /**
@@ -352,85 +352,85 @@  discard block
 block discarded – undo
352 352
  **/
353 353
 function date_relative($date, $decalage_maxi = 0, $ref_date = null) {
354 354
 
355
-	if (is_null($ref_date)) {
356
-		$ref_time = time();
357
-	} else {
358
-		$ref_time = strtotime($ref_date);
359
-	}
360
-
361
-	if (!$date) {
362
-		return;
363
-	}
364
-	$decal = date("U", $ref_time) - date("U", strtotime($date));
365
-
366
-	if ($decalage_maxi and ($decal > $decalage_maxi or $decal < 0)) {
367
-		return '';
368
-	}
369
-
370
-	if ($decal < 0) {
371
-		$il_y_a = "date_dans";
372
-		$decal = -1 * $decal;
373
-	} else {
374
-		$il_y_a = "date_il_y_a";
375
-	}
376
-
377
-	if ($decal > 3600 * 24 * 30 * 6) {
378
-		return affdate_court($date);
379
-	}
380
-
381
-	if ($decal > 3600 * 24 * 30) {
382
-		$mois = floor($decal / (3600 * 24 * 30));
383
-		if ($mois < 2) {
384
-			$delai = "$mois " . _T("date_un_mois");
385
-		} else {
386
-			$delai = "$mois " . _T("date_mois");
387
-		}
388
-	} else {
389
-		if ($decal > 3600 * 24 * 7) {
390
-			$semaines = floor($decal / (3600 * 24 * 7));
391
-			if ($semaines < 2) {
392
-				$delai = "$semaines " . _T("date_une_semaine");
393
-			} else {
394
-				$delai = "$semaines " . _T("date_semaines");
395
-			}
396
-		} else {
397
-			if ($decal > 3600 * 24) {
398
-				$jours = floor($decal / (3600 * 24));
399
-				if ($jours < 2) {
400
-					return $il_y_a == "date_dans" ? _T("date_demain") : _T("date_hier");
401
-				} else {
402
-					$delai = "$jours " . _T("date_jours");
403
-				}
404
-			} else {
405
-				if ($decal >= 3600) {
406
-					$heures = floor($decal / 3600);
407
-					if ($heures < 2) {
408
-						$delai = "$heures " . _T("date_une_heure");
409
-					} else {
410
-						$delai = "$heures " . _T("date_heures");
411
-					}
412
-				} else {
413
-					if ($decal >= 60) {
414
-						$minutes = floor($decal / 60);
415
-						if ($minutes < 2) {
416
-							$delai = "$minutes " . _T("date_une_minute");
417
-						} else {
418
-							$delai = "$minutes " . _T("date_minutes");
419
-						}
420
-					} else {
421
-						$secondes = ceil($decal);
422
-						if ($secondes < 2) {
423
-							$delai = "$secondes " . _T("date_une_seconde");
424
-						} else {
425
-							$delai = "$secondes " . _T("date_secondes");
426
-						}
427
-					}
428
-				}
429
-			}
430
-		}
431
-	}
432
-
433
-	return _T($il_y_a, array("delai" => $delai));
355
+    if (is_null($ref_date)) {
356
+        $ref_time = time();
357
+    } else {
358
+        $ref_time = strtotime($ref_date);
359
+    }
360
+
361
+    if (!$date) {
362
+        return;
363
+    }
364
+    $decal = date("U", $ref_time) - date("U", strtotime($date));
365
+
366
+    if ($decalage_maxi and ($decal > $decalage_maxi or $decal < 0)) {
367
+        return '';
368
+    }
369
+
370
+    if ($decal < 0) {
371
+        $il_y_a = "date_dans";
372
+        $decal = -1 * $decal;
373
+    } else {
374
+        $il_y_a = "date_il_y_a";
375
+    }
376
+
377
+    if ($decal > 3600 * 24 * 30 * 6) {
378
+        return affdate_court($date);
379
+    }
380
+
381
+    if ($decal > 3600 * 24 * 30) {
382
+        $mois = floor($decal / (3600 * 24 * 30));
383
+        if ($mois < 2) {
384
+            $delai = "$mois " . _T("date_un_mois");
385
+        } else {
386
+            $delai = "$mois " . _T("date_mois");
387
+        }
388
+    } else {
389
+        if ($decal > 3600 * 24 * 7) {
390
+            $semaines = floor($decal / (3600 * 24 * 7));
391
+            if ($semaines < 2) {
392
+                $delai = "$semaines " . _T("date_une_semaine");
393
+            } else {
394
+                $delai = "$semaines " . _T("date_semaines");
395
+            }
396
+        } else {
397
+            if ($decal > 3600 * 24) {
398
+                $jours = floor($decal / (3600 * 24));
399
+                if ($jours < 2) {
400
+                    return $il_y_a == "date_dans" ? _T("date_demain") : _T("date_hier");
401
+                } else {
402
+                    $delai = "$jours " . _T("date_jours");
403
+                }
404
+            } else {
405
+                if ($decal >= 3600) {
406
+                    $heures = floor($decal / 3600);
407
+                    if ($heures < 2) {
408
+                        $delai = "$heures " . _T("date_une_heure");
409
+                    } else {
410
+                        $delai = "$heures " . _T("date_heures");
411
+                    }
412
+                } else {
413
+                    if ($decal >= 60) {
414
+                        $minutes = floor($decal / 60);
415
+                        if ($minutes < 2) {
416
+                            $delai = "$minutes " . _T("date_une_minute");
417
+                        } else {
418
+                            $delai = "$minutes " . _T("date_minutes");
419
+                        }
420
+                    } else {
421
+                        $secondes = ceil($decal);
422
+                        if ($secondes < 2) {
423
+                            $delai = "$secondes " . _T("date_une_seconde");
424
+                        } else {
425
+                            $delai = "$secondes " . _T("date_secondes");
426
+                        }
427
+                    }
428
+                }
429
+            }
430
+        }
431
+    }
432
+
433
+    return _T($il_y_a, array("delai" => $delai));
434 434
 }
435 435
 
436 436
 
@@ -456,32 +456,32 @@  discard block
 block discarded – undo
456 456
  **/
457 457
 function date_relativecourt($date, $decalage_maxi = 0) {
458 458
 
459
-	if (!$date) {
460
-		return;
461
-	}
462
-	$decal = date("U", strtotime(date('Y-m-d')) - strtotime(date('Y-m-d', strtotime($date))));
463
-
464
-	if ($decalage_maxi and ($decal > $decalage_maxi or $decal < 0)) {
465
-		return '';
466
-	}
467
-
468
-	if ($decal < -24 * 3600) {
469
-		$retour = date_relative($date, $decalage_maxi);
470
-	} elseif ($decal < 0) {
471
-		$retour = _T("date_demain");
472
-	} else {
473
-		if ($decal < (3600 * 24)) {
474
-			$retour = _T("date_aujourdhui");
475
-		} else {
476
-			if ($decal < (3600 * 24 * 2)) {
477
-				$retour = _T("date_hier");
478
-			} else {
479
-				$retour = date_relative($date, $decalage_maxi);
480
-			}
481
-		}
482
-	}
483
-
484
-	return $retour;
459
+    if (!$date) {
460
+        return;
461
+    }
462
+    $decal = date("U", strtotime(date('Y-m-d')) - strtotime(date('Y-m-d', strtotime($date))));
463
+
464
+    if ($decalage_maxi and ($decal > $decalage_maxi or $decal < 0)) {
465
+        return '';
466
+    }
467
+
468
+    if ($decal < -24 * 3600) {
469
+        $retour = date_relative($date, $decalage_maxi);
470
+    } elseif ($decal < 0) {
471
+        $retour = _T("date_demain");
472
+    } else {
473
+        if ($decal < (3600 * 24)) {
474
+            $retour = _T("date_aujourdhui");
475
+        } else {
476
+            if ($decal < (3600 * 24 * 2)) {
477
+                $retour = _T("date_hier");
478
+            } else {
479
+                $retour = date_relative($date, $decalage_maxi);
480
+            }
481
+        }
482
+    }
483
+
484
+    return $retour;
485 485
 }
486 486
 
487 487
 /**
@@ -500,165 +500,165 @@  discard block
 block discarded – undo
500 500
  * @return mixed|string
501 501
  */
502 502
 function affdate_base($numdate, $vue, $options = array()) {
503
-	if (is_string($options)) {
504
-		$options = array('param' => $options);
505
-	}
506
-	$date_array = recup_date($numdate, false);
507
-	if (!$date_array) {
508
-		return;
509
-	}
510
-	list($annee, $mois, $jour, $heures, $minutes, $secondes) = $date_array;
511
-
512
-	// 1er, 21st, etc.
513
-	$journum = $jour;
514
-
515
-	if ($jour == 0) {
516
-		$jour = '';
517
-		$njour = 0;
518
-	} else {
519
-		$njour = intval($jour);
520
-		if ($jourth = _T('date_jnum' . $jour)) {
521
-			$jour = $jourth;
522
-		}
523
-	}
524
-
525
-	$mois = intval($mois);
526
-	if ($mois > 0 and $mois < 13) {
527
-		$nommois = _T('date_mois_' . $mois);
528
-		if ($jour) {
529
-			$jourmois = _T('date_de_mois_' . $mois, array('j' => $jour, 'nommois' => $nommois));
530
-		} else {
531
-			$jourmois = $nommois;
532
-		}
533
-	} else {
534
-		$nommois = '';
535
-		$jourmois = '';
536
-	}
537
-
538
-	if ($annee < 0) {
539
-		$annee = -$annee . " " . _T('date_avant_jc');
540
-		$avjc = true;
541
-	} else {
542
-		$avjc = false;
543
-	}
544
-
545
-	switch ($vue) {
546
-		case 'saison':
547
-		case 'saison_annee':
548
-			$saison = '';
549
-			if ($mois > 0) {
550
-				$saison = ($options['param'] == 'sud') ? 3 : 1;
551
-				if (($mois == 3 and $jour >= 21) or $mois > 3) {
552
-					$saison = ($options['param'] == 'sud') ? 4 : 2;
553
-				}
554
-				if (($mois == 6 and $jour >= 21) or $mois > 6) {
555
-					$saison = ($options['param'] == 'sud') ? 1 : 3;
556
-				}
557
-				if (($mois == 9 and $jour >= 21) or $mois > 9) {
558
-					$saison = ($options['param'] == 'sud') ? 2 : 4;
559
-				}
560
-				if (($mois == 12 and $jour >= 21) or $mois > 12) {
561
-					$saison = ($options['param'] == 'sud') ? 3 : 1;
562
-				}
563
-			}
564
-			if ($vue == 'saison') {
565
-				return $saison ? _T('date_saison_' . $saison) : '';
566
-			} else {
567
-				return $saison ? trim(_T('date_fmt_saison_annee',
568
-					array('saison' => _T('date_saison_' . $saison), 'annee' => $annee))) : '';
569
-			}
570
-
571
-		case 'court':
572
-			if ($avjc) {
573
-				return $annee;
574
-			}
575
-			$a = ((isset($options['annee_courante']) and $options['annee_courante']) ? $options['annee_courante'] : date('Y'));
576
-			if ($annee < ($a - 100) or $annee > ($a + 100)) {
577
-				return $annee;
578
-			}
579
-			if ($annee != $a) {
580
-				return _T('date_fmt_mois_annee',
581
-					array('mois' => $mois, 'nommois' => spip_ucfirst($nommois), 'annee' => $annee));
582
-			}
583
-
584
-			return _T('date_fmt_jour_mois',
585
-				array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
586
-
587
-		case 'jourcourt':
588
-			if ($avjc) {
589
-				return $annee;
590
-			}
591
-			$a = ((isset($options['annee_courante']) and $options['annee_courante']) ? $options['annee_courante'] : date('Y'));
592
-			if ($annee < ($a - 100) or $annee > ($a + 100)) {
593
-				return $annee;
594
-			}
595
-			if ($annee != $a) {
596
-				return _T('date_fmt_jour_mois_annee',
597
-					array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
598
-			}
599
-
600
-			return _T('date_fmt_jour_mois',
601
-				array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
602
-
603
-		case 'entier':
604
-			if ($avjc) {
605
-				return $annee;
606
-			}
607
-			if ($jour) {
608
-				return _T('date_fmt_jour_mois_annee',
609
-					array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
610
-			} elseif ($mois) {
611
-				return trim(_T('date_fmt_mois_annee', array('mois' => $mois, 'nommois' => $nommois, 'annee' => $annee)));
612
-			} else {
613
-				return $annee;
614
-			}
615
-
616
-		case 'nom_mois':
617
-			$param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : '');
618
-			if ($param and $mois) {
619
-				return _T('date_mois_' . $mois . $param);
620
-			}
621
-
622
-			return $nommois;
623
-
624
-		case 'mois':
625
-			return sprintf("%02s", $mois);
626
-
627
-		case 'jour':
628
-			return $jour;
629
-
630
-		case 'journum':
631
-			return $journum;
632
-
633
-		case 'nom_jour':
634
-			if (!$mois or !$njour) {
635
-				return '';
636
-			}
637
-			$nom = mktime(1, 1, 1, $mois, $njour, $annee);
638
-			$nom = 1 + date('w', $nom);
639
-			$param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : '');
640
-
641
-			return _T('date_jour_' . $nom . $param);
642
-
643
-		case 'mois_annee':
644
-			if ($avjc) {
645
-				return $annee;
646
-			}
647
-
648
-			return trim(_T('date_fmt_mois_annee', array('mois' => $mois, 'nommois' => $nommois, 'annee' => $annee)));
649
-
650
-		case 'annee':
651
-			return $annee;
652
-
653
-		// Cas d'une vue non definie : retomber sur le format
654
-		// de date propose par http://www.php.net/date
655
-		default:
656
-			list($annee, $mois, $jour, $heures, $minutes, $secondes) = $date_array;
657
-			if (!$time = mktime($heures, $minutes, $secondes, $mois, $jour, $annee)) {
658
-				$time = strtotime($numdate);
659
-			}
660
-			return date($vue, $time);
661
-	}
503
+    if (is_string($options)) {
504
+        $options = array('param' => $options);
505
+    }
506
+    $date_array = recup_date($numdate, false);
507
+    if (!$date_array) {
508
+        return;
509
+    }
510
+    list($annee, $mois, $jour, $heures, $minutes, $secondes) = $date_array;
511
+
512
+    // 1er, 21st, etc.
513
+    $journum = $jour;
514
+
515
+    if ($jour == 0) {
516
+        $jour = '';
517
+        $njour = 0;
518
+    } else {
519
+        $njour = intval($jour);
520
+        if ($jourth = _T('date_jnum' . $jour)) {
521
+            $jour = $jourth;
522
+        }
523
+    }
524
+
525
+    $mois = intval($mois);
526
+    if ($mois > 0 and $mois < 13) {
527
+        $nommois = _T('date_mois_' . $mois);
528
+        if ($jour) {
529
+            $jourmois = _T('date_de_mois_' . $mois, array('j' => $jour, 'nommois' => $nommois));
530
+        } else {
531
+            $jourmois = $nommois;
532
+        }
533
+    } else {
534
+        $nommois = '';
535
+        $jourmois = '';
536
+    }
537
+
538
+    if ($annee < 0) {
539
+        $annee = -$annee . " " . _T('date_avant_jc');
540
+        $avjc = true;
541
+    } else {
542
+        $avjc = false;
543
+    }
544
+
545
+    switch ($vue) {
546
+        case 'saison':
547
+        case 'saison_annee':
548
+            $saison = '';
549
+            if ($mois > 0) {
550
+                $saison = ($options['param'] == 'sud') ? 3 : 1;
551
+                if (($mois == 3 and $jour >= 21) or $mois > 3) {
552
+                    $saison = ($options['param'] == 'sud') ? 4 : 2;
553
+                }
554
+                if (($mois == 6 and $jour >= 21) or $mois > 6) {
555
+                    $saison = ($options['param'] == 'sud') ? 1 : 3;
556
+                }
557
+                if (($mois == 9 and $jour >= 21) or $mois > 9) {
558
+                    $saison = ($options['param'] == 'sud') ? 2 : 4;
559
+                }
560
+                if (($mois == 12 and $jour >= 21) or $mois > 12) {
561
+                    $saison = ($options['param'] == 'sud') ? 3 : 1;
562
+                }
563
+            }
564
+            if ($vue == 'saison') {
565
+                return $saison ? _T('date_saison_' . $saison) : '';
566
+            } else {
567
+                return $saison ? trim(_T('date_fmt_saison_annee',
568
+                    array('saison' => _T('date_saison_' . $saison), 'annee' => $annee))) : '';
569
+            }
570
+
571
+        case 'court':
572
+            if ($avjc) {
573
+                return $annee;
574
+            }
575
+            $a = ((isset($options['annee_courante']) and $options['annee_courante']) ? $options['annee_courante'] : date('Y'));
576
+            if ($annee < ($a - 100) or $annee > ($a + 100)) {
577
+                return $annee;
578
+            }
579
+            if ($annee != $a) {
580
+                return _T('date_fmt_mois_annee',
581
+                    array('mois' => $mois, 'nommois' => spip_ucfirst($nommois), 'annee' => $annee));
582
+            }
583
+
584
+            return _T('date_fmt_jour_mois',
585
+                array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
586
+
587
+        case 'jourcourt':
588
+            if ($avjc) {
589
+                return $annee;
590
+            }
591
+            $a = ((isset($options['annee_courante']) and $options['annee_courante']) ? $options['annee_courante'] : date('Y'));
592
+            if ($annee < ($a - 100) or $annee > ($a + 100)) {
593
+                return $annee;
594
+            }
595
+            if ($annee != $a) {
596
+                return _T('date_fmt_jour_mois_annee',
597
+                    array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
598
+            }
599
+
600
+            return _T('date_fmt_jour_mois',
601
+                array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
602
+
603
+        case 'entier':
604
+            if ($avjc) {
605
+                return $annee;
606
+            }
607
+            if ($jour) {
608
+                return _T('date_fmt_jour_mois_annee',
609
+                    array('jourmois' => $jourmois, 'jour' => $jour, 'mois' => $mois, 'nommois' => $nommois, 'annee' => $annee));
610
+            } elseif ($mois) {
611
+                return trim(_T('date_fmt_mois_annee', array('mois' => $mois, 'nommois' => $nommois, 'annee' => $annee)));
612
+            } else {
613
+                return $annee;
614
+            }
615
+
616
+        case 'nom_mois':
617
+            $param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : '');
618
+            if ($param and $mois) {
619
+                return _T('date_mois_' . $mois . $param);
620
+            }
621
+
622
+            return $nommois;
623
+
624
+        case 'mois':
625
+            return sprintf("%02s", $mois);
626
+
627
+        case 'jour':
628
+            return $jour;
629
+
630
+        case 'journum':
631
+            return $journum;
632
+
633
+        case 'nom_jour':
634
+            if (!$mois or !$njour) {
635
+                return '';
636
+            }
637
+            $nom = mktime(1, 1, 1, $mois, $njour, $annee);
638
+            $nom = 1 + date('w', $nom);
639
+            $param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : '');
640
+
641
+            return _T('date_jour_' . $nom . $param);
642
+
643
+        case 'mois_annee':
644
+            if ($avjc) {
645
+                return $annee;
646
+            }
647
+
648
+            return trim(_T('date_fmt_mois_annee', array('mois' => $mois, 'nommois' => $nommois, 'annee' => $annee)));
649
+
650
+        case 'annee':
651
+            return $annee;
652
+
653
+        // Cas d'une vue non definie : retomber sur le format
654
+        // de date propose par http://www.php.net/date
655
+        default:
656
+            list($annee, $mois, $jour, $heures, $minutes, $secondes) = $date_array;
657
+            if (!$time = mktime($heures, $minutes, $secondes, $mois, $jour, $annee)) {
658
+                $time = strtotime($numdate);
659
+            }
660
+            return date($vue, $time);
661
+    }
662 662
 }
663 663
 
664 664
 
@@ -685,11 +685,11 @@  discard block
 block discarded – undo
685 685
  *     Nom du jour
686 686
  **/
687 687
 function nom_jour($numdate, $forme = '') {
688
-	if (!($forme == 'abbr' or $forme == 'initiale')) {
689
-		$forme = '';
690
-	}
688
+    if (!($forme == 'abbr' or $forme == 'initiale')) {
689
+        $forme = '';
690
+    }
691 691
 
692
-	return affdate_base($numdate, 'nom_jour', $forme);
692
+    return affdate_base($numdate, 'nom_jour', $forme);
693 693
 }
694 694
 
695 695
 /**
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
  *     Numéro du jour
712 712
  **/
713 713
 function jour($numdate) {
714
-	return affdate_base($numdate, 'jour');
714
+    return affdate_base($numdate, 'jour');
715 715
 }
716 716
 
717 717
 /**
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
  *     Numéro du jour
730 730
  **/
731 731
 function journum($numdate) {
732
-	return affdate_base($numdate, 'journum');
732
+    return affdate_base($numdate, 'journum');
733 733
 }
734 734
 
735 735
 /**
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
  *     Numéro du mois (sur 2 chiffres)
748 748
  **/
749 749
 function mois($numdate) {
750
-	return affdate_base($numdate, 'mois');
750
+    return affdate_base($numdate, 'mois');
751 751
 }
752 752
 
753 753
 /**
@@ -771,11 +771,11 @@  discard block
 block discarded – undo
771 771
  *     Nom du mois
772 772
  **/
773 773
 function nom_mois($numdate, $forme = '') {
774
-	if (!($forme == 'abbr')) {
775
-		$forme = '';
776
-	}
774
+    if (!($forme == 'abbr')) {
775
+        $forme = '';
776
+    }
777 777
 
778
-	return affdate_base($numdate, 'nom_mois', $forme);
778
+    return affdate_base($numdate, 'nom_mois', $forme);
779 779
 }
780 780
 
781 781
 /**
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
  *     Année (sur 4 chiffres)
794 794
  **/
795 795
 function annee($numdate) {
796
-	return affdate_base($numdate, 'annee');
796
+    return affdate_base($numdate, 'annee');
797 797
 }
798 798
 
799 799
 
@@ -823,11 +823,11 @@  discard block
 block discarded – undo
823 823
  *     La date formatée
824 824
  **/
825 825
 function saison($numdate, $hemisphere = 'nord') {
826
-	if ($hemisphere != 'sud') {
827
-		$hemisphere = 'nord';
828
-	}
826
+    if ($hemisphere != 'sud') {
827
+        $hemisphere = 'nord';
828
+    }
829 829
 
830
-	return affdate_base($numdate, 'saison', $hemisphere);
830
+    return affdate_base($numdate, 'saison', $hemisphere);
831 831
 }
832 832
 
833 833
 
@@ -856,11 +856,11 @@  discard block
 block discarded – undo
856 856
  *     La date formatée
857 857
  **/
858 858
 function saison_annee($numdate, $hemisphere = 'nord') {
859
-	if ($hemisphere != 'sud') {
860
-		$hemisphere = 'nord';
861
-	}
859
+    if ($hemisphere != 'sud') {
860
+        $hemisphere = 'nord';
861
+    }
862 862
 
863
-	return affdate_base($numdate, 'saison_annee', $hemisphere);
863
+    return affdate_base($numdate, 'saison_annee', $hemisphere);
864 864
 }
865 865
 
866 866
 /**
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
  *     La date formatée
889 889
  **/
890 890
 function affdate($numdate, $format = 'entier') {
891
-	return affdate_base($numdate, $format);
891
+    return affdate_base($numdate, $format);
892 892
 }
893 893
 
894 894
 
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
  *     La date formatée
916 916
  **/
917 917
 function affdate_court($numdate, $annee_courante = null) {
918
-	return affdate_base($numdate, 'court', array('annee_courante' => $annee_courante));
918
+    return affdate_base($numdate, 'court', array('annee_courante' => $annee_courante));
919 919
 }
920 920
 
921 921
 
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
  *     La date formatée
943 943
  **/
944 944
 function affdate_jourcourt($numdate, $annee_courante = null) {
945
-	return affdate_base($numdate, 'jourcourt', array('annee_courante' => $annee_courante));
945
+    return affdate_base($numdate, 'jourcourt', array('annee_courante' => $annee_courante));
946 946
 }
947 947
 
948 948
 /**
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
  *     La date formatée
961 961
  **/
962 962
 function affdate_mois_annee($numdate) {
963
-	return affdate_base($numdate, 'mois_annee');
963
+    return affdate_base($numdate, 'mois_annee');
964 964
 }
965 965
 
966 966
 /**
@@ -978,16 +978,16 @@  discard block
 block discarded – undo
978 978
  *     La date formatée
979 979
  **/
980 980
 function affdate_heure($numdate) {
981
-	$date_array = recup_date($numdate);
982
-	if (!$date_array) {
983
-		return;
984
-	}
985
-	list($annee, $mois, $jour, $heures, $minutes, $sec) = $date_array;
986
-
987
-	return _T('date_fmt_jour_heure', array(
988
-		'jour' => affdate($numdate),
989
-		'heure' => _T('date_fmt_heures_minutes', array('h' => $heures, 'm' => $minutes))
990
-	));
981
+    $date_array = recup_date($numdate);
982
+    if (!$date_array) {
983
+        return;
984
+    }
985
+    list($annee, $mois, $jour, $heures, $minutes, $sec) = $date_array;
986
+
987
+    return _T('date_fmt_jour_heure', array(
988
+        'jour' => affdate($numdate),
989
+        'heure' => _T('date_fmt_heures_minutes', array('h' => $heures, 'm' => $minutes))
990
+    ));
991 991
 }
992 992
 
993 993
 /**
@@ -1019,114 +1019,114 @@  discard block
 block discarded – undo
1019 1019
  *     Texte de la date
1020 1020
  */
1021 1021
 function affdate_debut_fin($date_debut, $date_fin, $horaire = 'oui', $forme = '') {
1022
-	$abbr = $jour = '';
1023
-	$affdate = "affdate_jourcourt";
1024
-	if (strpos($forme, 'abbr') !== false) {
1025
-		$abbr = 'abbr';
1026
-	}
1027
-	if (strpos($forme, 'annee') !== false) {
1028
-		$affdate = 'affdate';
1029
-	}
1030
-	if (strpos($forme, 'jour') !== false) {
1031
-		$jour = 'jour';
1032
-	}
1033
-
1034
-	$dtstart = $dtend = $dtabbr = "";
1035
-	if (strpos($forme, 'hcal') !== false) {
1036
-		$dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>";
1037
-		$dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>";
1038
-		$dtabbr = "</abbr>";
1039
-	}
1040
-
1041
-	$date_debut = strtotime($date_debut);
1042
-	$date_fin = strtotime($date_fin);
1043
-	$d = date("Y-m-d", $date_debut);
1044
-	$f = date("Y-m-d", $date_fin);
1045
-	$h = ($horaire === 'oui' or $horaire === true);
1046
-	$hd = _T('date_fmt_heures_minutes_court', array('h' => date("H", $date_debut), 'm' => date("i", $date_debut)));
1047
-	$hf = _T('date_fmt_heures_minutes_court', array('h' => date("H", $date_fin), 'm' => date("i", $date_fin)));
1048
-
1049
-	if ($d == $f) { // meme jour
1050
-		$nomjour = nom_jour($d, $abbr);
1051
-		$s = $affdate($d);
1052
-		$s = _T('date_fmt_jour', array('nomjour' => $nomjour, 'jour' => $s));
1053
-		if ($h) {
1054
-			if ($hd == $hf) {
1055
-				// Lundi 20 fevrier a 18h25
1056
-				$s = spip_ucfirst(_T('date_fmt_jour_heure', array('jour' => $s, 'heure' => $hd)));
1057
-				$s = "$dtstart$s$dtabbr";
1058
-			} else {
1059
-				// Le <abbr...>lundi 20 fevrier de 18h00</abbr> a <abbr...>20h00</abbr>
1060
-				if ($dtabbr && $dtstart && $dtend) {
1061
-					$s = _T('date_fmt_jour_heure_debut_fin_abbr', array(
1062
-						'jour' => spip_ucfirst($s),
1063
-						'heure_debut' => $hd,
1064
-						'heure_fin' => $hf,
1065
-						'dtstart' => $dtstart,
1066
-						'dtend' => $dtend,
1067
-						'dtabbr' => $dtabbr
1068
-					),
1069
-						array(
1070
-							'sanitize' => false
1071
-						)
1072
-					);
1073
-				} // Le lundi 20 fevrier de 18h00 a 20h00
1074
-				else {
1075
-					$s = spip_ucfirst(_T('date_fmt_jour_heure_debut_fin',
1076
-						array('jour' => $s, 'heure_debut' => $hd, 'heure_fin' => $hf)));
1077
-				}
1078
-			}
1079
-		} else {
1080
-			if ($dtabbr && $dtstart) {
1081
-				$s = $dtstart . spip_ucfirst($s) . $dtabbr;
1082
-			} else {
1083
-				$s = spip_ucfirst($s);
1084
-			}
1085
-		}
1086
-	} else {
1087
-		if ((date("Y-m", $date_debut)) == date("Y-m", $date_fin)) { // meme annee et mois, jours differents
1088
-			if (!$h) {
1089
-				$date_debut = jour($d);
1090
-			} else {
1091
-				$date_debut = affdate_jourcourt($d, date("Y", $date_fin));
1092
-			}
1093
-			$date_fin = $affdate($f);
1094
-			if ($jour) {
1095
-				$nomjour_debut = nom_jour($d, $abbr);
1096
-				$date_debut = _T('date_fmt_jour', array('nomjour' => $nomjour_debut, 'jour' => $date_debut));
1097
-				$nomjour_fin = nom_jour($f, $abbr);
1098
-				$date_fin = _T('date_fmt_jour', array('nomjour' => $nomjour_fin, 'jour' => $date_fin));
1099
-			}
1100
-			if ($h) {
1101
-				$date_debut = _T('date_fmt_jour_heure', array('jour' => $date_debut, 'heure' => $hd));
1102
-				$date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf));
1103
-			}
1104
-			$date_debut = $dtstart . $date_debut . $dtabbr;
1105
-			$date_fin = $dtend . $date_fin . $dtabbr;
1106
-
1107
-			$s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin));
1108
-		} else {
1109
-			$date_debut = affdate_jourcourt($d, date("Y", $date_fin));
1110
-			$date_fin = $affdate($f);
1111
-			if ($jour) {
1112
-				$nomjour_debut = nom_jour($d, $abbr);
1113
-				$date_debut = _T('date_fmt_jour', array('nomjour' => $nomjour_debut, 'jour' => $date_debut));
1114
-				$nomjour_fin = nom_jour($f, $abbr);
1115
-				$date_fin = _T('date_fmt_jour', array('nomjour' => $nomjour_fin, 'jour' => $date_fin));
1116
-			}
1117
-			if ($h) {
1118
-				$date_debut = _T('date_fmt_jour_heure', array('jour' => $date_debut, 'heure' => $hd));
1119
-				$date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf));
1120
-			}
1121
-
1122
-			$date_debut = $dtstart . $date_debut . $dtabbr;
1123
-			$date_fin = $dtend . $date_fin . $dtabbr;
1124
-			$s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin));
1125
-
1126
-		}
1127
-	}
1128
-
1129
-	return $s;
1022
+    $abbr = $jour = '';
1023
+    $affdate = "affdate_jourcourt";
1024
+    if (strpos($forme, 'abbr') !== false) {
1025
+        $abbr = 'abbr';
1026
+    }
1027
+    if (strpos($forme, 'annee') !== false) {
1028
+        $affdate = 'affdate';
1029
+    }
1030
+    if (strpos($forme, 'jour') !== false) {
1031
+        $jour = 'jour';
1032
+    }
1033
+
1034
+    $dtstart = $dtend = $dtabbr = "";
1035
+    if (strpos($forme, 'hcal') !== false) {
1036
+        $dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>";
1037
+        $dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>";
1038
+        $dtabbr = "</abbr>";
1039
+    }
1040
+
1041
+    $date_debut = strtotime($date_debut);
1042
+    $date_fin = strtotime($date_fin);
1043
+    $d = date("Y-m-d", $date_debut);
1044
+    $f = date("Y-m-d", $date_fin);
1045
+    $h = ($horaire === 'oui' or $horaire === true);
1046
+    $hd = _T('date_fmt_heures_minutes_court', array('h' => date("H", $date_debut), 'm' => date("i", $date_debut)));
1047
+    $hf = _T('date_fmt_heures_minutes_court', array('h' => date("H", $date_fin), 'm' => date("i", $date_fin)));
1048
+
1049
+    if ($d == $f) { // meme jour
1050
+        $nomjour = nom_jour($d, $abbr);
1051
+        $s = $affdate($d);
1052
+        $s = _T('date_fmt_jour', array('nomjour' => $nomjour, 'jour' => $s));
1053
+        if ($h) {
1054
+            if ($hd == $hf) {
1055
+                // Lundi 20 fevrier a 18h25
1056
+                $s = spip_ucfirst(_T('date_fmt_jour_heure', array('jour' => $s, 'heure' => $hd)));
1057
+                $s = "$dtstart$s$dtabbr";
1058
+            } else {
1059
+                // Le <abbr...>lundi 20 fevrier de 18h00</abbr> a <abbr...>20h00</abbr>
1060
+                if ($dtabbr && $dtstart && $dtend) {
1061
+                    $s = _T('date_fmt_jour_heure_debut_fin_abbr', array(
1062
+                        'jour' => spip_ucfirst($s),
1063
+                        'heure_debut' => $hd,
1064
+                        'heure_fin' => $hf,
1065
+                        'dtstart' => $dtstart,
1066
+                        'dtend' => $dtend,
1067
+                        'dtabbr' => $dtabbr
1068
+                    ),
1069
+                        array(
1070
+                            'sanitize' => false
1071
+                        )
1072
+                    );
1073
+                } // Le lundi 20 fevrier de 18h00 a 20h00
1074
+                else {
1075
+                    $s = spip_ucfirst(_T('date_fmt_jour_heure_debut_fin',
1076
+                        array('jour' => $s, 'heure_debut' => $hd, 'heure_fin' => $hf)));
1077
+                }
1078
+            }
1079
+        } else {
1080
+            if ($dtabbr && $dtstart) {
1081
+                $s = $dtstart . spip_ucfirst($s) . $dtabbr;
1082
+            } else {
1083
+                $s = spip_ucfirst($s);
1084
+            }
1085
+        }
1086
+    } else {
1087
+        if ((date("Y-m", $date_debut)) == date("Y-m", $date_fin)) { // meme annee et mois, jours differents
1088
+            if (!$h) {
1089
+                $date_debut = jour($d);
1090
+            } else {
1091
+                $date_debut = affdate_jourcourt($d, date("Y", $date_fin));
1092
+            }
1093
+            $date_fin = $affdate($f);
1094
+            if ($jour) {
1095
+                $nomjour_debut = nom_jour($d, $abbr);
1096
+                $date_debut = _T('date_fmt_jour', array('nomjour' => $nomjour_debut, 'jour' => $date_debut));
1097
+                $nomjour_fin = nom_jour($f, $abbr);
1098
+                $date_fin = _T('date_fmt_jour', array('nomjour' => $nomjour_fin, 'jour' => $date_fin));
1099
+            }
1100
+            if ($h) {
1101
+                $date_debut = _T('date_fmt_jour_heure', array('jour' => $date_debut, 'heure' => $hd));
1102
+                $date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf));
1103
+            }
1104
+            $date_debut = $dtstart . $date_debut . $dtabbr;
1105
+            $date_fin = $dtend . $date_fin . $dtabbr;
1106
+
1107
+            $s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin));
1108
+        } else {
1109
+            $date_debut = affdate_jourcourt($d, date("Y", $date_fin));
1110
+            $date_fin = $affdate($f);
1111
+            if ($jour) {
1112
+                $nomjour_debut = nom_jour($d, $abbr);
1113
+                $date_debut = _T('date_fmt_jour', array('nomjour' => $nomjour_debut, 'jour' => $date_debut));
1114
+                $nomjour_fin = nom_jour($f, $abbr);
1115
+                $date_fin = _T('date_fmt_jour', array('nomjour' => $nomjour_fin, 'jour' => $date_fin));
1116
+            }
1117
+            if ($h) {
1118
+                $date_debut = _T('date_fmt_jour_heure', array('jour' => $date_debut, 'heure' => $hd));
1119
+                $date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf));
1120
+            }
1121
+
1122
+            $date_debut = $dtstart . $date_debut . $dtabbr;
1123
+            $date_fin = $dtend . $date_fin . $dtabbr;
1124
+            $s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin));
1125
+
1126
+        }
1127
+    }
1128
+
1129
+    return $s;
1130 1130
 }
1131 1131
 
1132 1132
 /**
@@ -1147,10 +1147,10 @@  discard block
 block discarded – undo
1147 1147
  *     Date au format ical
1148 1148
  **/
1149 1149
 function date_ical($date, $addminutes = 0) {
1150
-	list($heures, $minutes, $secondes) = recup_heure($date);
1151
-	list($annee, $mois, $jour) = recup_date($date);
1150
+    list($heures, $minutes, $secondes) = recup_heure($date);
1151
+    list($annee, $mois, $jour) = recup_date($date);
1152 1152
 
1153
-	return gmdate("Ymd\THis\Z", mktime($heures, $minutes + $addminutes, $secondes, $mois, $jour, $annee));
1153
+    return gmdate("Ymd\THis\Z", mktime($heures, $minutes + $addminutes, $secondes, $mois, $jour, $annee));
1154 1154
 }
1155 1155
 
1156 1156
 
@@ -1174,11 +1174,11 @@  discard block
 block discarded – undo
1174 1174
  *     La date formatée
1175 1175
  **/
1176 1176
 function date_iso($date_heure) {
1177
-	list($annee, $mois, $jour) = recup_date($date_heure);
1178
-	list($heures, $minutes, $secondes) = recup_heure($date_heure);
1179
-	$time = @mktime($heures, $minutes, $secondes, $mois, $jour, $annee);
1177
+    list($annee, $mois, $jour) = recup_date($date_heure);
1178
+    list($heures, $minutes, $secondes) = recup_heure($date_heure);
1179
+    $time = @mktime($heures, $minutes, $secondes, $mois, $jour, $annee);
1180 1180
 
1181
-	return gmdate('Y-m-d\TH:i:s\Z', $time);
1181
+    return gmdate('Y-m-d\TH:i:s\Z', $time);
1182 1182
 }
1183 1183
 
1184 1184
 /**
@@ -1201,11 +1201,11 @@  discard block
 block discarded – undo
1201 1201
  *     La date formatée
1202 1202
  **/
1203 1203
 function date_822($date_heure) {
1204
-	list($annee, $mois, $jour) = recup_date($date_heure);
1205
-	list($heures, $minutes, $secondes) = recup_heure($date_heure);
1206
-	$time = mktime($heures, $minutes, $secondes, $mois, $jour, $annee);
1204
+    list($annee, $mois, $jour) = recup_date($date_heure);
1205
+    list($heures, $minutes, $secondes) = recup_heure($date_heure);
1206
+    $time = mktime($heures, $minutes, $secondes, $mois, $jour, $annee);
1207 1207
 
1208
-	return date('r', $time);
1208
+    return date('r', $time);
1209 1209
 }
1210 1210
 
1211 1211
 /**
@@ -1221,11 +1221,11 @@  discard block
 block discarded – undo
1221 1221
  *     Date au format `Ymd`
1222 1222
  **/
1223 1223
 function date_anneemoisjour($d) {
1224
-	if (!$d) {
1225
-		$d = date("Y-m-d");
1226
-	}
1224
+    if (!$d) {
1225
+        $d = date("Y-m-d");
1226
+    }
1227 1227
 
1228
-	return substr($d, 0, 4) . substr($d, 5, 2) . substr($d, 8, 2);
1228
+    return substr($d, 0, 4) . substr($d, 5, 2) . substr($d, 8, 2);
1229 1229
 }
1230 1230
 
1231 1231
 /**
@@ -1241,11 +1241,11 @@  discard block
 block discarded – undo
1241 1241
  *     Date au format `Ym`
1242 1242
  **/
1243 1243
 function date_anneemois($d) {
1244
-	if (!$d) {
1245
-		$d = date("Y-m-d");
1246
-	}
1244
+    if (!$d) {
1245
+        $d = date("Y-m-d");
1246
+    }
1247 1247
 
1248
-	return substr($d, 0, 4) . substr($d, 5, 2);
1248
+    return substr($d, 0, 4) . substr($d, 5, 2);
1249 1249
 }
1250 1250
 
1251 1251
 /**
@@ -1261,13 +1261,13 @@  discard block
 block discarded – undo
1261 1261
  *     Date au lundi de la même semaine au format `Ymd`
1262 1262
  **/
1263 1263
 function date_debut_semaine($annee, $mois, $jour) {
1264
-	$w_day = date("w", mktime(0, 0, 0, $mois, $jour, $annee));
1265
-	if ($w_day == 0) {
1266
-		$w_day = 7;
1267
-	} // Gaffe: le dimanche est zero
1268
-	$debut = $jour - $w_day + 1;
1264
+    $w_day = date("w", mktime(0, 0, 0, $mois, $jour, $annee));
1265
+    if ($w_day == 0) {
1266
+        $w_day = 7;
1267
+    } // Gaffe: le dimanche est zero
1268
+    $debut = $jour - $w_day + 1;
1269 1269
 
1270
-	return date("Ymd", mktime(0, 0, 0, $mois, $debut, $annee));
1270
+    return date("Ymd", mktime(0, 0, 0, $mois, $debut, $annee));
1271 1271
 }
1272 1272
 
1273 1273
 /**
@@ -1283,12 +1283,12 @@  discard block
 block discarded – undo
1283 1283
  *     Date au dimanche de la même semaine au format `Ymd`
1284 1284
  **/
1285 1285
 function date_fin_semaine($annee, $mois, $jour) {
1286
-	$w_day = date("w", mktime(0, 0, 0, $mois, $jour, $annee));
1287
-	if ($w_day == 0) {
1288
-		$w_day = 7;
1289
-	} // Gaffe: le dimanche est zero
1290
-	$debut = $jour - $w_day + 1;
1286
+    $w_day = date("w", mktime(0, 0, 0, $mois, $jour, $annee));
1287
+    if ($w_day == 0) {
1288
+        $w_day = 7;
1289
+    } // Gaffe: le dimanche est zero
1290
+    $debut = $jour - $w_day + 1;
1291 1291
 
1292
-	return date("Ymd", mktime(0, 0, 0, $mois, $debut + 6, $annee));
1292
+    return date("Ymd", mktime(0, 0, 0, $mois, $debut + 6, $annee));
1293 1293
 }
1294 1294
 
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 function extraire_date($texte) {
39 39
 	// format = 2001-08
40 40
 	if (preg_match(",([1-2][0-9]{3})[^0-9]*(1[0-2]|0?[1-9]),", $texte, $regs)) {
41
-		return $regs[1] . "-" . sprintf("%02d", $regs[2]) . "-01";
41
+		return $regs[1]."-".sprintf("%02d", $regs[2])."-01";
42 42
 	}
43 43
 }
44 44
 
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
 		}
69 69
 		if (preg_match("#^([12][0-9]{3})([-/]00)?( [-0-9:]+)?$#", $date, $regs)) {
70 70
 			$regs = array_pad($regs, 4, null); // eviter notice php
71
-			$date = $regs[1] . "-00-00" . $regs[3];
71
+			$date = $regs[1]."-00-00".$regs[3];
72 72
 		} else {
73 73
 			if (preg_match("#^([12][0-9]{3}[-/][01]?[0-9])([-/]00)?( [-0-9:]+)?$#", $date, $regs)) {
74 74
 				$regs = array_pad($regs, 4, null); // eviter notice php
75
-				$date = preg_replace("@/@", "-", $regs[1]) . "-00" . $regs[3];
75
+				$date = preg_replace("@/@", "-", $regs[1])."-00".$regs[3];
76 76
 			} else {
77 77
 				$date = date("Y-m-d H:i:s", strtotime($date));
78 78
 			}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
  **/
98 98
 function vider_date($letexte, $verif_format_date = false) {
99 99
 	if (!$verif_format_date
100
-	  or (in_array(strlen($letexte), [10,19]) and
100
+	  or (in_array(strlen($letexte), [10, 19]) and
101 101
 			  preg_match("/^[0-9]{4}-[0-9]{2}-[0-9]{2}(\s[0-9]{2}:[0-9]{2}:[0-9]{2})?$/", $letexte))) {
102 102
 
103 103
 		if (strncmp("0000-00-00", $letexte, 10) == 0) {
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
  *	- si 'abbr' ne précise pas l'unité des minutes : 12h10
209 209
  * @return string L'heure formatée dans la langue en cours.
210 210
  **/
211
-function heures_minutes($numdate, $forme='') {
212
-	if ($forme !='abbr') {
211
+function heures_minutes($numdate, $forme = '') {
212
+	if ($forme != 'abbr') {
213 213
 		return _T('date_fmt_heures_minutes', array('h' => heures($numdate), 'm' => minutes($numdate)));
214 214
 	}
215 215
 	else {
@@ -381,17 +381,17 @@  discard block
 block discarded – undo
381 381
 	if ($decal > 3600 * 24 * 30) {
382 382
 		$mois = floor($decal / (3600 * 24 * 30));
383 383
 		if ($mois < 2) {
384
-			$delai = "$mois " . _T("date_un_mois");
384
+			$delai = "$mois "._T("date_un_mois");
385 385
 		} else {
386
-			$delai = "$mois " . _T("date_mois");
386
+			$delai = "$mois "._T("date_mois");
387 387
 		}
388 388
 	} else {
389 389
 		if ($decal > 3600 * 24 * 7) {
390 390
 			$semaines = floor($decal / (3600 * 24 * 7));
391 391
 			if ($semaines < 2) {
392
-				$delai = "$semaines " . _T("date_une_semaine");
392
+				$delai = "$semaines "._T("date_une_semaine");
393 393
 			} else {
394
-				$delai = "$semaines " . _T("date_semaines");
394
+				$delai = "$semaines "._T("date_semaines");
395 395
 			}
396 396
 		} else {
397 397
 			if ($decal > 3600 * 24) {
@@ -399,30 +399,30 @@  discard block
 block discarded – undo
399 399
 				if ($jours < 2) {
400 400
 					return $il_y_a == "date_dans" ? _T("date_demain") : _T("date_hier");
401 401
 				} else {
402
-					$delai = "$jours " . _T("date_jours");
402
+					$delai = "$jours "._T("date_jours");
403 403
 				}
404 404
 			} else {
405 405
 				if ($decal >= 3600) {
406 406
 					$heures = floor($decal / 3600);
407 407
 					if ($heures < 2) {
408
-						$delai = "$heures " . _T("date_une_heure");
408
+						$delai = "$heures "._T("date_une_heure");
409 409
 					} else {
410
-						$delai = "$heures " . _T("date_heures");
410
+						$delai = "$heures "._T("date_heures");
411 411
 					}
412 412
 				} else {
413 413
 					if ($decal >= 60) {
414 414
 						$minutes = floor($decal / 60);
415 415
 						if ($minutes < 2) {
416
-							$delai = "$minutes " . _T("date_une_minute");
416
+							$delai = "$minutes "._T("date_une_minute");
417 417
 						} else {
418
-							$delai = "$minutes " . _T("date_minutes");
418
+							$delai = "$minutes "._T("date_minutes");
419 419
 						}
420 420
 					} else {
421 421
 						$secondes = ceil($decal);
422 422
 						if ($secondes < 2) {
423
-							$delai = "$secondes " . _T("date_une_seconde");
423
+							$delai = "$secondes "._T("date_une_seconde");
424 424
 						} else {
425
-							$delai = "$secondes " . _T("date_secondes");
425
+							$delai = "$secondes "._T("date_secondes");
426 426
 						}
427 427
 					}
428 428
 				}
@@ -517,16 +517,16 @@  discard block
 block discarded – undo
517 517
 		$njour = 0;
518 518
 	} else {
519 519
 		$njour = intval($jour);
520
-		if ($jourth = _T('date_jnum' . $jour)) {
520
+		if ($jourth = _T('date_jnum'.$jour)) {
521 521
 			$jour = $jourth;
522 522
 		}
523 523
 	}
524 524
 
525 525
 	$mois = intval($mois);
526 526
 	if ($mois > 0 and $mois < 13) {
527
-		$nommois = _T('date_mois_' . $mois);
527
+		$nommois = _T('date_mois_'.$mois);
528 528
 		if ($jour) {
529
-			$jourmois = _T('date_de_mois_' . $mois, array('j' => $jour, 'nommois' => $nommois));
529
+			$jourmois = _T('date_de_mois_'.$mois, array('j' => $jour, 'nommois' => $nommois));
530 530
 		} else {
531 531
 			$jourmois = $nommois;
532 532
 		}
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 	}
537 537
 
538 538
 	if ($annee < 0) {
539
-		$annee = -$annee . " " . _T('date_avant_jc');
539
+		$annee = -$annee." "._T('date_avant_jc');
540 540
 		$avjc = true;
541 541
 	} else {
542 542
 		$avjc = false;
@@ -562,10 +562,10 @@  discard block
 block discarded – undo
562 562
 				}
563 563
 			}
564 564
 			if ($vue == 'saison') {
565
-				return $saison ? _T('date_saison_' . $saison) : '';
565
+				return $saison ? _T('date_saison_'.$saison) : '';
566 566
 			} else {
567 567
 				return $saison ? trim(_T('date_fmt_saison_annee',
568
-					array('saison' => _T('date_saison_' . $saison), 'annee' => $annee))) : '';
568
+					array('saison' => _T('date_saison_'.$saison), 'annee' => $annee))) : '';
569 569
 			}
570 570
 
571 571
 		case 'court':
@@ -614,9 +614,9 @@  discard block
 block discarded – undo
614 614
 			}
615 615
 
616 616
 		case 'nom_mois':
617
-			$param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : '');
617
+			$param = ((isset($options['param']) and $options['param']) ? '_'.$options['param'] : '');
618 618
 			if ($param and $mois) {
619
-				return _T('date_mois_' . $mois . $param);
619
+				return _T('date_mois_'.$mois.$param);
620 620
 			}
621 621
 
622 622
 			return $nommois;
@@ -636,9 +636,9 @@  discard block
 block discarded – undo
636 636
 			}
637 637
 			$nom = mktime(1, 1, 1, $mois, $njour, $annee);
638 638
 			$nom = 1 + date('w', $nom);
639
-			$param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : '');
639
+			$param = ((isset($options['param']) and $options['param']) ? '_'.$options['param'] : '');
640 640
 
641
-			return _T('date_jour_' . $nom . $param);
641
+			return _T('date_jour_'.$nom.$param);
642 642
 
643 643
 		case 'mois_annee':
644 644
 			if ($avjc) {
@@ -1033,8 +1033,8 @@  discard block
 block discarded – undo
1033 1033
 
1034 1034
 	$dtstart = $dtend = $dtabbr = "";
1035 1035
 	if (strpos($forme, 'hcal') !== false) {
1036
-		$dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>";
1037
-		$dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>";
1036
+		$dtstart = "<abbr class='dtstart' title='".date_iso($date_debut)."'>";
1037
+		$dtend = "<abbr class='dtend' title='".date_iso($date_fin)."'>";
1038 1038
 		$dtabbr = "</abbr>";
1039 1039
 	}
1040 1040
 
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
 			}
1079 1079
 		} else {
1080 1080
 			if ($dtabbr && $dtstart) {
1081
-				$s = $dtstart . spip_ucfirst($s) . $dtabbr;
1081
+				$s = $dtstart.spip_ucfirst($s).$dtabbr;
1082 1082
 			} else {
1083 1083
 				$s = spip_ucfirst($s);
1084 1084
 			}
@@ -1101,8 +1101,8 @@  discard block
 block discarded – undo
1101 1101
 				$date_debut = _T('date_fmt_jour_heure', array('jour' => $date_debut, 'heure' => $hd));
1102 1102
 				$date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf));
1103 1103
 			}
1104
-			$date_debut = $dtstart . $date_debut . $dtabbr;
1105
-			$date_fin = $dtend . $date_fin . $dtabbr;
1104
+			$date_debut = $dtstart.$date_debut.$dtabbr;
1105
+			$date_fin = $dtend.$date_fin.$dtabbr;
1106 1106
 
1107 1107
 			$s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin));
1108 1108
 		} else {
@@ -1119,8 +1119,8 @@  discard block
 block discarded – undo
1119 1119
 				$date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf));
1120 1120
 			}
1121 1121
 
1122
-			$date_debut = $dtstart . $date_debut . $dtabbr;
1123
-			$date_fin = $dtend . $date_fin . $dtabbr;
1122
+			$date_debut = $dtstart.$date_debut.$dtabbr;
1123
+			$date_fin = $dtend.$date_fin.$dtabbr;
1124 1124
 			$s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin));
1125 1125
 
1126 1126
 		}
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
 		$d = date("Y-m-d");
1226 1226
 	}
1227 1227
 
1228
-	return substr($d, 0, 4) . substr($d, 5, 2) . substr($d, 8, 2);
1228
+	return substr($d, 0, 4).substr($d, 5, 2).substr($d, 8, 2);
1229 1229
 }
1230 1230
 
1231 1231
 /**
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
 		$d = date("Y-m-d");
1246 1246
 	}
1247 1247
 
1248
-	return substr($d, 0, 4) . substr($d, 5, 2);
1248
+	return substr($d, 0, 4).substr($d, 5, 2);
1249 1249
 }
1250 1250
 
1251 1251
 /**
Please login to merge, or discard this patch.