Completed
Push — master ( d9afd7...afcd40 )
by cam
01:15
created
ecrire/xml/analyser_dtd.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		$grammaire = find_in_path($grammaire);
30 30
 	}
31 31
 
32
-	$file = _DIR_CACHE_XML . preg_replace('/[^\w.]/', '_', $rotlvl) . '.gz';
32
+	$file = _DIR_CACHE_XML.preg_replace('/[^\w.]/', '_', $rotlvl).'.gz';
33 33
 
34 34
 	if (lire_fichier($file, $r)) {
35 35
 		if (!$grammaire) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 				$dtc->peres[$k] = $v;
57 57
 			}
58 58
 
59
-			spip_log("Analyser DTD $avail $grammaire (" . spip_timer('dtd') . ') ' . (is_countable($dtc->macros) ? count($dtc->macros) : 0) . ' macros, ' . (is_countable($dtc->elements) ? count($dtc->elements) : 0) . ' elements, ' . (is_countable($dtc->attributs) ? count($dtc->attributs) : 0) . " listes d'attributs, " . (is_countable($dtc->entites) ? count($dtc->entites) : 0) . ' entites');
59
+			spip_log("Analyser DTD $avail $grammaire (".spip_timer('dtd').') '.(is_countable($dtc->macros) ? count($dtc->macros) : 0).' macros, '.(is_countable($dtc->elements) ? count($dtc->elements) : 0).' elements, '.(is_countable($dtc->attributs) ? count($dtc->attributs) : 0)." listes d'attributs, ".(is_countable($dtc->entites) ? count($dtc->entites) : 0).' entites');
60 60
 			#	$r = $dtc->regles; ksort($r);foreach($r as $l => $v) {$t=array_keys($dtc->attributs[$l]);echo "<b>$l</b> '$v' ", count($t), " attributs: ", join (', ',$t);$t=$dtc->peres[$l];echo "<br />",count($t), " peres: ", @join (', ',$t), "<br />\n";}exit;
61 61
 			ecrire_fichier($file, serialize($dtc), true);
62 62
 		}
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 			}
174 174
 		}
175 175
 		if (!is_string($r)) {
176
-			spip_log("erreur $r dans la DTD  " . substr($dtd, 0, 80) . '.....');
176
+			spip_log("erreur $r dans la DTD  ".substr($dtd, 0, 80).'.....');
177 177
 
178 178
 			return false;
179 179
 		}
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 			($n[0] == 'PUBLIC')
222 222
 			and !tester_url_absolue($n[1])
223 223
 		) {
224
-			$n[1] = substr($grammaire, 0, strrpos($grammaire, '/') + 1) . $n[1];
224
+			$n[1] = substr($grammaire, 0, strrpos($grammaire, '/') + 1).$n[1];
225 225
 		}
226 226
 		analyser_dtd($n[1], $n[0], $dtc);
227 227
 	}
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	}
250 250
 
251 251
 	if ($dtc->macros[$m[1]] == 'INCLUDE') {
252
-		$retour = $r[1] . substr($m[2], strlen($r[0]));
252
+		$retour = $r[1].substr($m[2], strlen($r[0]));
253 253
 	} else {
254 254
 		$retour = substr($m[2], strlen($r[0]));
255 255
 	}
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 		spip_log("redefinition de l'entite $nom");
283 283
 	}
284 284
 	if ($k6) {
285
-		return $k6 . $dtd;
285
+		return $k6.$dtd;
286 286
 	} // cas du synonyme complet
287 287
 	$val = expanserEntite(($k2 ? $k3 : ($k4 ? $k5 : $k6)), $dtc->macros);
288 288
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 	if (preg_match_all("/\s*(\S+)\s+(([(][^)]*[)])|(\S+))\s+([^\s']*)(\s*'[^']*')?/", $val, $r2, PREG_SET_ORDER)) {
391 391
 		foreach ($r2 as $m2) {
392 392
 			$v = preg_match('/^\w+$/', $m2[2]) ? $m2[2]
393
-				: ('/^' . preg_replace('/\s+/', '', $m2[2]) . '$/');
393
+				: ('/^'.preg_replace('/\s+/', '', $m2[2]).'$/');
394 394
 			$m21 = expanserEntite($m2[1], $dtc->macros);
395 395
 			$m25 = expanserEntite($m2[5], $dtc->macros);
396 396
 			$dtc->attributs[$nom][$m21] = [$v, $m25];
Please login to merge, or discard this patch.
Indentation   +335 added lines, -335 removed lines patch added patch discarded remove patch
@@ -11,58 +11,58 @@  discard block
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 include_spip('xml/interfaces');
18 18
 
19 19
 function charger_dtd($grammaire, $avail, $rotlvl) {
20
-	$r = null;
21
-	static $dtd = []; # cache bien utile pour le validateur en boucle
22
-
23
-	if (isset($dtd[$grammaire])) {
24
-		return $dtd[$grammaire];
25
-	}
26
-
27
-	if ($avail == 'SYSTEM') {
28
-		$grammaire = find_in_path($grammaire);
29
-	}
30
-
31
-	$file = _DIR_CACHE_XML . preg_replace('/[^\w.]/', '_', $rotlvl) . '.gz';
32
-
33
-	if (lire_fichier($file, $r)) {
34
-		if (!$grammaire) {
35
-			return [];
36
-		}
37
-		if (($avail == 'SYSTEM') and filemtime($file) < filemtime($grammaire)) {
38
-			$r = false;
39
-		}
40
-	}
41
-
42
-	if ($r) {
43
-		$dtc = unserialize($r);
44
-	} else {
45
-		spip_timer('dtd');
46
-		$dtc = new DTC();
47
-		// L'analyseur retourne un booleen de reussite et modifie $dtc.
48
-		// Retourner vide en cas d'echec
49
-		if (!analyser_dtd($grammaire, $avail, $dtc)) {
50
-			$dtc = [];
51
-		} else {
52
-			// tri final pour presenter les suggestions de corrections
53
-			foreach ($dtc->peres as $k => $v) {
54
-				asort($v);
55
-				$dtc->peres[$k] = $v;
56
-			}
57
-
58
-			spip_log("Analyser DTD $avail $grammaire (" . spip_timer('dtd') . ') ' . (is_countable($dtc->macros) ? count($dtc->macros) : 0) . ' macros, ' . (is_countable($dtc->elements) ? count($dtc->elements) : 0) . ' elements, ' . (is_countable($dtc->attributs) ? count($dtc->attributs) : 0) . " listes d'attributs, " . (is_countable($dtc->entites) ? count($dtc->entites) : 0) . ' entites');
59
-			#	$r = $dtc->regles; ksort($r);foreach($r as $l => $v) {$t=array_keys($dtc->attributs[$l]);echo "<b>$l</b> '$v' ", count($t), " attributs: ", join (', ',$t);$t=$dtc->peres[$l];echo "<br />",count($t), " peres: ", @join (', ',$t), "<br />\n";}exit;
60
-			ecrire_fichier($file, serialize($dtc), true);
61
-		}
62
-	}
63
-	$dtd[$grammaire] = $dtc;
64
-
65
-	return $dtc;
20
+    $r = null;
21
+    static $dtd = []; # cache bien utile pour le validateur en boucle
22
+
23
+    if (isset($dtd[$grammaire])) {
24
+        return $dtd[$grammaire];
25
+    }
26
+
27
+    if ($avail == 'SYSTEM') {
28
+        $grammaire = find_in_path($grammaire);
29
+    }
30
+
31
+    $file = _DIR_CACHE_XML . preg_replace('/[^\w.]/', '_', $rotlvl) . '.gz';
32
+
33
+    if (lire_fichier($file, $r)) {
34
+        if (!$grammaire) {
35
+            return [];
36
+        }
37
+        if (($avail == 'SYSTEM') and filemtime($file) < filemtime($grammaire)) {
38
+            $r = false;
39
+        }
40
+    }
41
+
42
+    if ($r) {
43
+        $dtc = unserialize($r);
44
+    } else {
45
+        spip_timer('dtd');
46
+        $dtc = new DTC();
47
+        // L'analyseur retourne un booleen de reussite et modifie $dtc.
48
+        // Retourner vide en cas d'echec
49
+        if (!analyser_dtd($grammaire, $avail, $dtc)) {
50
+            $dtc = [];
51
+        } else {
52
+            // tri final pour presenter les suggestions de corrections
53
+            foreach ($dtc->peres as $k => $v) {
54
+                asort($v);
55
+                $dtc->peres[$k] = $v;
56
+            }
57
+
58
+            spip_log("Analyser DTD $avail $grammaire (" . spip_timer('dtd') . ') ' . (is_countable($dtc->macros) ? count($dtc->macros) : 0) . ' macros, ' . (is_countable($dtc->elements) ? count($dtc->elements) : 0) . ' elements, ' . (is_countable($dtc->attributs) ? count($dtc->attributs) : 0) . " listes d'attributs, " . (is_countable($dtc->entites) ? count($dtc->entites) : 0) . ' entites');
59
+            #	$r = $dtc->regles; ksort($r);foreach($r as $l => $v) {$t=array_keys($dtc->attributs[$l]);echo "<b>$l</b> '$v' ", count($t), " attributs: ", join (', ',$t);$t=$dtc->peres[$l];echo "<br />",count($t), " peres: ", @join (', ',$t), "<br />\n";}exit;
60
+            ecrire_fichier($file, serialize($dtc), true);
61
+        }
62
+    }
63
+    $dtd[$grammaire] = $dtc;
64
+
65
+    return $dtc;
66 66
 }
67 67
 
68 68
 // Compiler une regle de production en une Regexp qu'on appliquera sur la
@@ -74,153 +74,153 @@  discard block
 block discarded – undo
74 74
 // et parentheser le tout pour que  | + * ? s'applique dessus.
75 75
 
76 76
 function compilerRegle($val) {
77
-	$x = str_replace(
78
-		'()',
79
-		'',
80
-		preg_replace(
81
-			'/\s*,\s*/',
82
-			'',
83
-			preg_replace(
84
-				'/(\w+)\s*/',
85
-				'(?:\1 )',
86
-				preg_replace(
87
-					'/\s*\)/',
88
-					')',
89
-					preg_replace(
90
-						'/\s*([(+*|?])\s*/',
91
-						'\1',
92
-						preg_replace('/\s*#\w+\s*[,|]?\s*/', '', $val)
93
-					)
94
-				)
95
-			)
96
-		)
97
-	);
98
-
99
-	return $x;
77
+    $x = str_replace(
78
+        '()',
79
+        '',
80
+        preg_replace(
81
+            '/\s*,\s*/',
82
+            '',
83
+            preg_replace(
84
+                '/(\w+)\s*/',
85
+                '(?:\1 )',
86
+                preg_replace(
87
+                    '/\s*\)/',
88
+                    ')',
89
+                    preg_replace(
90
+                        '/\s*([(+*|?])\s*/',
91
+                        '\1',
92
+                        preg_replace('/\s*#\w+\s*[,|]?\s*/', '', $val)
93
+                    )
94
+                )
95
+            )
96
+        )
97
+    );
98
+
99
+    return $x;
100 100
 }
101 101
 
102 102
 
103 103
 function analyser_dtd($loc, $avail, &$dtc) {
104
-	// creer le repertoire de cache si ce n'est fait
105
-	// (utile aussi pour le resultat de la compil)
106
-	$file = sous_repertoire(_DIR_CACHE_XML);
107
-	// si DTD locale, ignorer ce repertoire pour le moment
108
-	if ($avail == 'SYSTEM') {
109
-		$file = $loc;
110
-		if (_DIR_RACINE and strncmp($file, _DIR_RACINE, strlen(_DIR_RACINE)) == 0) {
111
-			$file = substr($file, strlen(_DIR_RACINE));
112
-		}
113
-		$file = find_in_path($file);
114
-	} else {
115
-		$file .= preg_replace('/[^\w.]/', '_', $loc);
116
-	}
117
-
118
-	$dtd = '';
119
-	if (@is_readable($file)) {
120
-		lire_fichier($file, $dtd);
121
-	} else {
122
-		if ($avail == 'PUBLIC') {
123
-			include_spip('inc/distant');
124
-			$dtd = recuperer_url($loc);
125
-			$dtd = trim($dtd['page'] ?? '');
126
-			if ($dtd) {
127
-				ecrire_fichier($file, $dtd, true);
128
-			}
129
-		}
130
-	}
131
-
132
-	$dtd = ltrim($dtd);
133
-	if (!$dtd) {
134
-		spip_log("DTD '$loc' ($file) inaccessible");
135
-
136
-		return false;
137
-	} else {
138
-		spip_log("analyse de la DTD $loc ");
139
-	}
140
-
141
-	while ($dtd) {
142
-		if ($dtd[0] != '<') {
143
-			$r = analyser_dtd_lexeme($dtd, $dtc, $loc);
144
-		} elseif ($dtd[1] != '!') {
145
-			$r = analyser_dtd_pi($dtd, $dtc, $loc);
146
-		} elseif ($dtd[2] == '[') {
147
-			$r = analyser_dtd_data($dtd, $dtc, $loc);
148
-		} else {
149
-			switch ($dtd[3]) {
150
-				case '%':
151
-					$r = analyser_dtd_data($dtd, $dtc, $loc);
152
-					break;
153
-				case 'T':
154
-					$r = analyser_dtd_attlist($dtd, $dtc, $loc);
155
-					break;
156
-				case 'L':
157
-					$r = analyser_dtd_element($dtd, $dtc, $loc);
158
-					break;
159
-				case 'N':
160
-					$r = analyser_dtd_entity($dtd, $dtc, $loc);
161
-					break;
162
-				case 'O':
163
-					$r = analyser_dtd_notation($dtd, $dtc, $loc);
164
-					break;
165
-				case '-':
166
-					$r = analyser_dtd_comment($dtd, $dtc, $loc);
167
-					break;
168
-				default:
169
-					$r = -1;
170
-			}
171
-		}
172
-		if (!is_string($r)) {
173
-			spip_log("erreur $r dans la DTD  " . substr($dtd, 0, 80) . '.....');
174
-
175
-			return false;
176
-		}
177
-		$dtd = $r;
178
-	}
179
-
180
-	return true;
104
+    // creer le repertoire de cache si ce n'est fait
105
+    // (utile aussi pour le resultat de la compil)
106
+    $file = sous_repertoire(_DIR_CACHE_XML);
107
+    // si DTD locale, ignorer ce repertoire pour le moment
108
+    if ($avail == 'SYSTEM') {
109
+        $file = $loc;
110
+        if (_DIR_RACINE and strncmp($file, _DIR_RACINE, strlen(_DIR_RACINE)) == 0) {
111
+            $file = substr($file, strlen(_DIR_RACINE));
112
+        }
113
+        $file = find_in_path($file);
114
+    } else {
115
+        $file .= preg_replace('/[^\w.]/', '_', $loc);
116
+    }
117
+
118
+    $dtd = '';
119
+    if (@is_readable($file)) {
120
+        lire_fichier($file, $dtd);
121
+    } else {
122
+        if ($avail == 'PUBLIC') {
123
+            include_spip('inc/distant');
124
+            $dtd = recuperer_url($loc);
125
+            $dtd = trim($dtd['page'] ?? '');
126
+            if ($dtd) {
127
+                ecrire_fichier($file, $dtd, true);
128
+            }
129
+        }
130
+    }
131
+
132
+    $dtd = ltrim($dtd);
133
+    if (!$dtd) {
134
+        spip_log("DTD '$loc' ($file) inaccessible");
135
+
136
+        return false;
137
+    } else {
138
+        spip_log("analyse de la DTD $loc ");
139
+    }
140
+
141
+    while ($dtd) {
142
+        if ($dtd[0] != '<') {
143
+            $r = analyser_dtd_lexeme($dtd, $dtc, $loc);
144
+        } elseif ($dtd[1] != '!') {
145
+            $r = analyser_dtd_pi($dtd, $dtc, $loc);
146
+        } elseif ($dtd[2] == '[') {
147
+            $r = analyser_dtd_data($dtd, $dtc, $loc);
148
+        } else {
149
+            switch ($dtd[3]) {
150
+                case '%':
151
+                    $r = analyser_dtd_data($dtd, $dtc, $loc);
152
+                    break;
153
+                case 'T':
154
+                    $r = analyser_dtd_attlist($dtd, $dtc, $loc);
155
+                    break;
156
+                case 'L':
157
+                    $r = analyser_dtd_element($dtd, $dtc, $loc);
158
+                    break;
159
+                case 'N':
160
+                    $r = analyser_dtd_entity($dtd, $dtc, $loc);
161
+                    break;
162
+                case 'O':
163
+                    $r = analyser_dtd_notation($dtd, $dtc, $loc);
164
+                    break;
165
+                case '-':
166
+                    $r = analyser_dtd_comment($dtd, $dtc, $loc);
167
+                    break;
168
+                default:
169
+                    $r = -1;
170
+            }
171
+        }
172
+        if (!is_string($r)) {
173
+            spip_log("erreur $r dans la DTD  " . substr($dtd, 0, 80) . '.....');
174
+
175
+            return false;
176
+        }
177
+        $dtd = $r;
178
+    }
179
+
180
+    return true;
181 181
 }
182 182
 
183 183
 function analyser_dtd_comment($dtd, &$dtc, $grammaire) {
184
-	// ejecter les commentaires, surtout quand ils contiennent du code.
185
-	// Option /s car sur plusieurs lignes parfois
184
+    // ejecter les commentaires, surtout quand ils contiennent du code.
185
+    // Option /s car sur plusieurs lignes parfois
186 186
 
187
-	if (!preg_match('/^<!--.*?-->\s*(.*)$/s', $dtd, $m)) {
188
-		return -6;
189
-	}
187
+    if (!preg_match('/^<!--.*?-->\s*(.*)$/s', $dtd, $m)) {
188
+        return -6;
189
+    }
190 190
 
191
-	return $m[1];
191
+    return $m[1];
192 192
 }
193 193
 
194 194
 function analyser_dtd_pi($dtd, &$dtc, $grammaire) {
195
-	if (!preg_match('/^<\?.*?>\s*(.*)$/s', $dtd, $m)) {
196
-		return -10;
197
-	}
195
+    if (!preg_match('/^<\?.*?>\s*(.*)$/s', $dtd, $m)) {
196
+        return -10;
197
+    }
198 198
 
199
-	return $m[1];
199
+    return $m[1];
200 200
 }
201 201
 
202 202
 function analyser_dtd_lexeme($dtd, &$dtc, $grammaire) {
203 203
 
204
-	if (!preg_match(_REGEXP_ENTITY_DEF, $dtd, $m)) {
205
-		return -9;
206
-	}
207
-
208
-	[, $s] = $m;
209
-	$n = $dtc->macros[$s];
210
-
211
-	if (is_array($n)) {
212
-		// en cas d'inclusion, l'espace de nom est le meme
213
-		// mais gaffe aux DTD dont l'URL est relative a l'engloblante
214
-		if (
215
-			($n[0] == 'PUBLIC')
216
-			and !tester_url_absolue($n[1])
217
-		) {
218
-			$n[1] = substr($grammaire, 0, strrpos($grammaire, '/') + 1) . $n[1];
219
-		}
220
-		analyser_dtd($n[1], $n[0], $dtc);
221
-	}
222
-
223
-	return ltrim(substr($dtd, strlen($m[0])));
204
+    if (!preg_match(_REGEXP_ENTITY_DEF, $dtd, $m)) {
205
+        return -9;
206
+    }
207
+
208
+    [, $s] = $m;
209
+    $n = $dtc->macros[$s];
210
+
211
+    if (is_array($n)) {
212
+        // en cas d'inclusion, l'espace de nom est le meme
213
+        // mais gaffe aux DTD dont l'URL est relative a l'engloblante
214
+        if (
215
+            ($n[0] == 'PUBLIC')
216
+            and !tester_url_absolue($n[1])
217
+        ) {
218
+            $n[1] = substr($grammaire, 0, strrpos($grammaire, '/') + 1) . $n[1];
219
+        }
220
+        analyser_dtd($n[1], $n[0], $dtc);
221
+    }
222
+
223
+    return ltrim(substr($dtd, strlen($m[0])));
224 224
 }
225 225
 
226 226
 // il faudrait gerer plus proprement les niveaux d'inclusion:
@@ -228,83 +228,83 @@  discard block
 block discarded – undo
228 228
 
229 229
 function analyser_dtd_data($dtd, &$dtc, $grammaire) {
230 230
 
231
-	if (!preg_match(_REGEXP_INCLUDE_USE, $dtd, $m)) {
232
-		return -11;
233
-	}
234
-	if (
235
-		!preg_match(
236
-			'/^((\s*<!(\[\s*%\s*[^;]*;\s*\[([^]<]*<[^>]*>)*[^]<]*\]\]>)|([^]>]*>))*[^]<]*)\]\]>\s*/s',
237
-			$m[2],
238
-			$r
239
-		)
240
-	) {
241
-		return -12;
242
-	}
243
-
244
-	if ($dtc->macros[$m[1]] == 'INCLUDE') {
245
-		$retour = $r[1] . substr($m[2], strlen($r[0]));
246
-	} else {
247
-		$retour = substr($m[2], strlen($r[0]));
248
-	}
249
-
250
-	return $retour;
231
+    if (!preg_match(_REGEXP_INCLUDE_USE, $dtd, $m)) {
232
+        return -11;
233
+    }
234
+    if (
235
+        !preg_match(
236
+            '/^((\s*<!(\[\s*%\s*[^;]*;\s*\[([^]<]*<[^>]*>)*[^]<]*\]\]>)|([^]>]*>))*[^]<]*)\]\]>\s*/s',
237
+            $m[2],
238
+            $r
239
+        )
240
+    ) {
241
+        return -12;
242
+    }
243
+
244
+    if ($dtc->macros[$m[1]] == 'INCLUDE') {
245
+        $retour = $r[1] . substr($m[2], strlen($r[0]));
246
+    } else {
247
+        $retour = substr($m[2], strlen($r[0]));
248
+    }
249
+
250
+    return $retour;
251 251
 }
252 252
 
253 253
 function analyser_dtd_notation($dtd, &$dtc, $grammaire) {
254
-	if (!preg_match('/^<!NOTATION.*?>\s*(.*)$/s', $dtd, $m)) {
255
-		return -8;
256
-	}
257
-	spip_log('analyser_dtd_notation a ecrire');
254
+    if (!preg_match('/^<!NOTATION.*?>\s*(.*)$/s', $dtd, $m)) {
255
+        return -8;
256
+    }
257
+    spip_log('analyser_dtd_notation a ecrire');
258 258
 
259
-	return $m[1];
259
+    return $m[1];
260 260
 }
261 261
 
262 262
 function analyser_dtd_entity($dtd, &$dtc, $grammaire) {
263
-	if (!preg_match(_REGEXP_ENTITY_DECL, $dtd, $m)) {
264
-		return -2;
265
-	}
266
-
267
-	[$t, $term, $nom, $type, $k1, $k2, $k3, $k4, $k5, $k6, $c, $q, $alt, $dtd] = $m;
268
-
269
-	if (isset($dtc->macros[$nom]) and $dtc->macros[$nom]) {
270
-		return $dtd;
271
-	}
272
-	if (isset($dtc->entites[$nom])) {
273
-		spip_log("redefinition de l'entite $nom");
274
-	}
275
-	if ($k6) {
276
-		return $k6 . $dtd;
277
-	} // cas du synonyme complet
278
-	$val = expanserEntite(($k2 ? $k3 : ($k4 ? $k5 : $k6)), $dtc->macros);
279
-
280
-	// cas particulier double evaluation: 'PUBLIC "..." "...."'
281
-	if (preg_match('/(PUBLIC|SYSTEM)\s+"([^"]*)"\s*("([^"]*)")?\s*$/s', $val, $r)) {
282
-		[$t, $type, $val, $q, $alt] = $r;
283
-	}
284
-
285
-	if (!$term) {
286
-		$dtc->entites[$nom] = $val;
287
-	} elseif (!$type) {
288
-		$dtc->macros[$nom] = $val;
289
-	} else {
290
-		if (($type == 'SYSTEM') and !$alt) {
291
-			$alt = $val;
292
-		}
293
-		if (!$alt) {
294
-			$dtc->macros[$nom] = $val;
295
-		} else {
296
-			if (
297
-				($type == 'PUBLIC')
298
-				and (strpos($alt, '/') === false)
299
-			) {
300
-				$alt = preg_replace(',/[^/]+$,', '/', $grammaire)
301
-					. $alt;
302
-			}
303
-			$dtc->macros[$nom] = [$type, $alt];
304
-		}
305
-	}
306
-
307
-	return $dtd;
263
+    if (!preg_match(_REGEXP_ENTITY_DECL, $dtd, $m)) {
264
+        return -2;
265
+    }
266
+
267
+    [$t, $term, $nom, $type, $k1, $k2, $k3, $k4, $k5, $k6, $c, $q, $alt, $dtd] = $m;
268
+
269
+    if (isset($dtc->macros[$nom]) and $dtc->macros[$nom]) {
270
+        return $dtd;
271
+    }
272
+    if (isset($dtc->entites[$nom])) {
273
+        spip_log("redefinition de l'entite $nom");
274
+    }
275
+    if ($k6) {
276
+        return $k6 . $dtd;
277
+    } // cas du synonyme complet
278
+    $val = expanserEntite(($k2 ? $k3 : ($k4 ? $k5 : $k6)), $dtc->macros);
279
+
280
+    // cas particulier double evaluation: 'PUBLIC "..." "...."'
281
+    if (preg_match('/(PUBLIC|SYSTEM)\s+"([^"]*)"\s*("([^"]*)")?\s*$/s', $val, $r)) {
282
+        [$t, $type, $val, $q, $alt] = $r;
283
+    }
284
+
285
+    if (!$term) {
286
+        $dtc->entites[$nom] = $val;
287
+    } elseif (!$type) {
288
+        $dtc->macros[$nom] = $val;
289
+    } else {
290
+        if (($type == 'SYSTEM') and !$alt) {
291
+            $alt = $val;
292
+        }
293
+        if (!$alt) {
294
+            $dtc->macros[$nom] = $val;
295
+        } else {
296
+            if (
297
+                ($type == 'PUBLIC')
298
+                and (strpos($alt, '/') === false)
299
+            ) {
300
+                $alt = preg_replace(',/[^/]+$,', '/', $grammaire)
301
+                    . $alt;
302
+            }
303
+            $dtc->macros[$nom] = [$type, $alt];
304
+        }
305
+    }
306
+
307
+    return $dtd;
308 308
 }
309 309
 
310 310
 // Dresser le tableau des filles potentielles de l'element
@@ -317,76 +317,76 @@  discard block
 block discarded – undo
317 317
 // Fin du controle en finElement
318 318
 
319 319
 function analyser_dtd_element($dtd, &$dtc, $grammaire) {
320
-	if (!preg_match('/^<!ELEMENT\s+([^>\s]+)([^>]*)>\s*(.*)$/s', $dtd, $m)) {
321
-		return -3;
322
-	}
323
-
324
-	[, $nom, $contenu, $dtd] = $m;
325
-	$nom = expanserEntite($nom, $dtc->macros);
326
-
327
-	if (isset($dtc->elements[$nom])) {
328
-		spip_log("redefinition de l'element $nom dans la DTD");
329
-
330
-		return -4;
331
-	}
332
-	$filles = [];
333
-	$contenu = expanserEntite($contenu, $dtc->macros);
334
-	$val = $contenu ? compilerRegle($contenu) : '(?:EMPTY )';
335
-	if ($val == '(?:EMPTY )') {
336
-		$dtc->regles[$nom] = 'EMPTY';
337
-	} elseif ($val == '(?:ANY )') {
338
-		$dtc->regles[$nom] = 'ANY';
339
-	} else {
340
-		$last = substr($val, -1);
341
-		if (
342
-			preg_match('/ \w/', $val)
343
-			or (!empty($last) and strpos('*+?', $last) === false)
344
-		) {
345
-			$dtc->regles[$nom] = "/^$val$/";
346
-		} else {
347
-			$dtc->regles[$nom] = $last;
348
-		}
349
-		$filles = array_values(preg_split('/\W+/', $val, -1, PREG_SPLIT_NO_EMPTY));
350
-
351
-		foreach ($filles as $k) {
352
-			if (!isset($dtc->peres[$k])) {
353
-				$dtc->peres[$k] = [];
354
-			}
355
-			if (!in_array($nom, $dtc->peres[$k])) {
356
-				$dtc->peres[$k][] = $nom;
357
-			}
358
-		}
359
-	}
360
-	$dtc->pcdata[$nom] = (strpos($contenu, '#PCDATA') === false);
361
-	$dtc->elements[$nom] = $filles;
362
-
363
-	return $dtd;
320
+    if (!preg_match('/^<!ELEMENT\s+([^>\s]+)([^>]*)>\s*(.*)$/s', $dtd, $m)) {
321
+        return -3;
322
+    }
323
+
324
+    [, $nom, $contenu, $dtd] = $m;
325
+    $nom = expanserEntite($nom, $dtc->macros);
326
+
327
+    if (isset($dtc->elements[$nom])) {
328
+        spip_log("redefinition de l'element $nom dans la DTD");
329
+
330
+        return -4;
331
+    }
332
+    $filles = [];
333
+    $contenu = expanserEntite($contenu, $dtc->macros);
334
+    $val = $contenu ? compilerRegle($contenu) : '(?:EMPTY )';
335
+    if ($val == '(?:EMPTY )') {
336
+        $dtc->regles[$nom] = 'EMPTY';
337
+    } elseif ($val == '(?:ANY )') {
338
+        $dtc->regles[$nom] = 'ANY';
339
+    } else {
340
+        $last = substr($val, -1);
341
+        if (
342
+            preg_match('/ \w/', $val)
343
+            or (!empty($last) and strpos('*+?', $last) === false)
344
+        ) {
345
+            $dtc->regles[$nom] = "/^$val$/";
346
+        } else {
347
+            $dtc->regles[$nom] = $last;
348
+        }
349
+        $filles = array_values(preg_split('/\W+/', $val, -1, PREG_SPLIT_NO_EMPTY));
350
+
351
+        foreach ($filles as $k) {
352
+            if (!isset($dtc->peres[$k])) {
353
+                $dtc->peres[$k] = [];
354
+            }
355
+            if (!in_array($nom, $dtc->peres[$k])) {
356
+                $dtc->peres[$k][] = $nom;
357
+            }
358
+        }
359
+    }
360
+    $dtc->pcdata[$nom] = (strpos($contenu, '#PCDATA') === false);
361
+    $dtc->elements[$nom] = $filles;
362
+
363
+    return $dtd;
364 364
 }
365 365
 
366 366
 
367 367
 function analyser_dtd_attlist($dtd, &$dtc, $grammaire) {
368
-	if (!preg_match('/^<!ATTLIST\s+(\S+)\s+([^>]*)>\s*(.*)/s', $dtd, $m)) {
369
-		return -5;
370
-	}
371
-
372
-	[, $nom, $val, $dtd] = $m;
373
-	$nom = expanserEntite($nom, $dtc->macros);
374
-	$val = expanserEntite($val, $dtc->macros);
375
-	if (!isset($dtc->attributs[$nom])) {
376
-		$dtc->attributs[$nom] = [];
377
-	}
378
-
379
-	if (preg_match_all("/\s*(\S+)\s+(([(][^)]*[)])|(\S+))\s+([^\s']*)(\s*'[^']*')?/", $val, $r2, PREG_SET_ORDER)) {
380
-		foreach ($r2 as $m2) {
381
-			$v = preg_match('/^\w+$/', $m2[2]) ? $m2[2]
382
-				: ('/^' . preg_replace('/\s+/', '', $m2[2]) . '$/');
383
-			$m21 = expanserEntite($m2[1], $dtc->macros);
384
-			$m25 = expanserEntite($m2[5], $dtc->macros);
385
-			$dtc->attributs[$nom][$m21] = [$v, $m25];
386
-		}
387
-	}
388
-
389
-	return $dtd;
368
+    if (!preg_match('/^<!ATTLIST\s+(\S+)\s+([^>]*)>\s*(.*)/s', $dtd, $m)) {
369
+        return -5;
370
+    }
371
+
372
+    [, $nom, $val, $dtd] = $m;
373
+    $nom = expanserEntite($nom, $dtc->macros);
374
+    $val = expanserEntite($val, $dtc->macros);
375
+    if (!isset($dtc->attributs[$nom])) {
376
+        $dtc->attributs[$nom] = [];
377
+    }
378
+
379
+    if (preg_match_all("/\s*(\S+)\s+(([(][^)]*[)])|(\S+))\s+([^\s']*)(\s*'[^']*')?/", $val, $r2, PREG_SET_ORDER)) {
380
+        foreach ($r2 as $m2) {
381
+            $v = preg_match('/^\w+$/', $m2[2]) ? $m2[2]
382
+                : ('/^' . preg_replace('/\s+/', '', $m2[2]) . '$/');
383
+            $m21 = expanserEntite($m2[1], $dtc->macros);
384
+            $m25 = expanserEntite($m2[5], $dtc->macros);
385
+            $dtc->attributs[$nom][$m21] = [$v, $m25];
386
+        }
387
+    }
388
+
389
+    return $dtd;
390 390
 }
391 391
 
392 392
 
@@ -402,26 +402,26 @@  discard block
 block discarded – undo
402 402
  * @return string|array
403 403
  **/
404 404
 function expanserEntite($val, $macros = []) {
405
-	static $vu = [];
406
-	if (!is_string($val)) {
407
-		return $vu;
408
-	}
409
-
410
-	if (preg_match_all(_REGEXP_ENTITY_USE, $val, $r, PREG_SET_ORDER)) {
411
-		foreach ($r as $m) {
412
-			$ent = $m[1];
413
-			// il peut valoir ""
414
-			if (!isset($macros[$ent])) {
415
-				spip_log("Entite $ent inconnu");
416
-			} else {
417
-				if (!isset($vu[$ent])) {
418
-					$vu[$ent] = 0;
419
-				}
420
-				++$vu[$ent];
421
-				$val = str_replace($m[0], $macros[$ent], $val);
422
-			}
423
-		}
424
-	}
425
-
426
-	return trim(preg_replace('/\s+/', ' ', $val));
405
+    static $vu = [];
406
+    if (!is_string($val)) {
407
+        return $vu;
408
+    }
409
+
410
+    if (preg_match_all(_REGEXP_ENTITY_USE, $val, $r, PREG_SET_ORDER)) {
411
+        foreach ($r as $m) {
412
+            $ent = $m[1];
413
+            // il peut valoir ""
414
+            if (!isset($macros[$ent])) {
415
+                spip_log("Entite $ent inconnu");
416
+            } else {
417
+                if (!isset($vu[$ent])) {
418
+                    $vu[$ent] = 0;
419
+                }
420
+                ++$vu[$ent];
421
+                $val = str_replace($m[0], $macros[$ent], $val);
422
+            }
423
+        }
424
+    }
425
+
426
+    return trim(preg_replace('/\s+/', ' ', $val));
427 427
 }
Please login to merge, or discard this patch.
prive/formulaires/instituer_objet.php 2 patches
Indentation   +108 added lines, -108 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
 include_spip('inc/editer');
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
  * @return array
33 33
  */
34 34
 function lister_statuts_proposes($desc, $publiable = true) {
35
-	if (!isset($desc['statut_textes_instituer'])) {
36
-		return false;
37
-	}
35
+    if (!isset($desc['statut_textes_instituer'])) {
36
+        return false;
37
+    }
38 38
 
39
-	$l = $desc['statut_textes_instituer'];
40
-	if (!$publiable) {
41
-		unset($l['publie']);
42
-		unset($l['refuse']);
43
-	}
39
+    $l = $desc['statut_textes_instituer'];
40
+    if (!$publiable) {
41
+        unset($l['publie']);
42
+        unset($l['refuse']);
43
+    }
44 44
 
45
-	return $l;
45
+    return $l;
46 46
 }
47 47
 
48 48
 /**
@@ -64,54 +64,54 @@  discard block
 block discarded – undo
64 64
  *     Environnement du formulaire ou false si aucun affichage à faire.
65 65
  */
66 66
 function formulaires_instituer_objet_charger_dist($objet, $id_objet, $retour = '', $editable = true) {
67
-	$editable = ($editable ? true : false);
68
-
69
-	$table = table_objet_sql($objet);
70
-	$desc = lister_tables_objets_sql($table);
71
-
72
-	if (!isset($desc['statut_textes_instituer'])) {
73
-		return false;
74
-	}
75
-
76
-	if (!autoriser('modifier', $objet, $id_objet)) {
77
-		$editable = false;
78
-	}
79
-
80
-	// charger le contenu de l'objet
81
-	// dont son champ statut
82
-	$v = formulaires_editer_objet_charger($objet, $id_objet, 0, 0, '', '');
83
-
84
-	$publiable = true;
85
-	$statuts = lister_statuts_proposes($desc);
86
-	// tester si on a le droit de publier, si un statut publie existe
87
-	if (isset($statuts['publie'])) {
88
-		if (!autoriser('instituer', $objet, $id_objet, null, ['statut' => 'publie'])) {
89
-			if ($v['statut'] == 'publie') {
90
-				$editable = false;
91
-			} else {
92
-				$publiable = false;
93
-			}
94
-		}
95
-	}
96
-	$statuts = lister_statuts_proposes($desc, $editable ? $publiable : true);
97
-	if (count($statuts) == 1 and isset($statuts[$v['statut']])) {
98
-		$editable = false;
99
-	}
100
-
101
-	$valeurs = [
102
-		'editable' => $editable,
103
-		'statut' => $v['statut'],
104
-		'_objet' => $objet,
105
-		'_id_objet' => $id_objet,
106
-		'_statuts' => $statuts,
107
-		'_publiable' => $publiable,
108
-		'_label' => $desc['texte_changer_statut'] ?? 'texte_article_statut',
109
-		'_aide' => $desc['aide_changer_statut'] ?? '',
110
-		'_hidden' => "<input type='hidden' name='statut_old' value='" . $v['statut'] . "' />",
111
-	];
112
-
113
-	#if (!count($valeurs['statuts']))
114
-	return $valeurs;
67
+    $editable = ($editable ? true : false);
68
+
69
+    $table = table_objet_sql($objet);
70
+    $desc = lister_tables_objets_sql($table);
71
+
72
+    if (!isset($desc['statut_textes_instituer'])) {
73
+        return false;
74
+    }
75
+
76
+    if (!autoriser('modifier', $objet, $id_objet)) {
77
+        $editable = false;
78
+    }
79
+
80
+    // charger le contenu de l'objet
81
+    // dont son champ statut
82
+    $v = formulaires_editer_objet_charger($objet, $id_objet, 0, 0, '', '');
83
+
84
+    $publiable = true;
85
+    $statuts = lister_statuts_proposes($desc);
86
+    // tester si on a le droit de publier, si un statut publie existe
87
+    if (isset($statuts['publie'])) {
88
+        if (!autoriser('instituer', $objet, $id_objet, null, ['statut' => 'publie'])) {
89
+            if ($v['statut'] == 'publie') {
90
+                $editable = false;
91
+            } else {
92
+                $publiable = false;
93
+            }
94
+        }
95
+    }
96
+    $statuts = lister_statuts_proposes($desc, $editable ? $publiable : true);
97
+    if (count($statuts) == 1 and isset($statuts[$v['statut']])) {
98
+        $editable = false;
99
+    }
100
+
101
+    $valeurs = [
102
+        'editable' => $editable,
103
+        'statut' => $v['statut'],
104
+        '_objet' => $objet,
105
+        '_id_objet' => $id_objet,
106
+        '_statuts' => $statuts,
107
+        '_publiable' => $publiable,
108
+        '_label' => $desc['texte_changer_statut'] ?? 'texte_article_statut',
109
+        '_aide' => $desc['aide_changer_statut'] ?? '',
110
+        '_hidden' => "<input type='hidden' name='statut_old' value='" . $v['statut'] . "' />",
111
+    ];
112
+
113
+    #if (!count($valeurs['statuts']))
114
+    return $valeurs;
115 115
 }
116 116
 
117 117
 /**
@@ -131,35 +131,35 @@  discard block
 block discarded – undo
131 131
  *     Tableau des erreurs
132 132
  */
133 133
 function formulaires_instituer_objet_verifier_dist($objet, $id_objet, $retour = '', $editable = true) {
134
-	$erreurs = [];
135
-	// charger le contenu de l'objet
136
-	// dont son champ statut
137
-	$v = formulaires_editer_objet_charger($objet, $id_objet, 0, 0, '', '');
138
-
139
-	if ($v['statut'] !== _request('statut_old')) {
140
-		$erreurs['statut'] = _T('instituer_erreur_statut_a_change');
141
-	} else {
142
-		$table = table_objet_sql($objet);
143
-		$desc = lister_tables_objets_sql($table);
144
-
145
-		$publiable = true;
146
-		if (
147
-			isset($v['id_rubrique'])
148
-			and !autoriser('publierdans', 'rubrique', $v['id_rubrique'])
149
-		) {
150
-			$publiable = false;
151
-		}
152
-		$l = lister_statuts_proposes($desc, $publiable);
153
-		$statut = _request('statut');
154
-		if (
155
-			!isset($l[$statut])
156
-			or !autoriser('instituer', $objet, $id_objet, '', ['statut' => $statut])
157
-		) {
158
-			$erreurs['statut'] = _T('instituer_erreur_statut_non_autorise');
159
-		}
160
-	}
161
-
162
-	return $erreurs;
134
+    $erreurs = [];
135
+    // charger le contenu de l'objet
136
+    // dont son champ statut
137
+    $v = formulaires_editer_objet_charger($objet, $id_objet, 0, 0, '', '');
138
+
139
+    if ($v['statut'] !== _request('statut_old')) {
140
+        $erreurs['statut'] = _T('instituer_erreur_statut_a_change');
141
+    } else {
142
+        $table = table_objet_sql($objet);
143
+        $desc = lister_tables_objets_sql($table);
144
+
145
+        $publiable = true;
146
+        if (
147
+            isset($v['id_rubrique'])
148
+            and !autoriser('publierdans', 'rubrique', $v['id_rubrique'])
149
+        ) {
150
+            $publiable = false;
151
+        }
152
+        $l = lister_statuts_proposes($desc, $publiable);
153
+        $statut = _request('statut');
154
+        if (
155
+            !isset($l[$statut])
156
+            or !autoriser('instituer', $objet, $id_objet, '', ['statut' => $statut])
157
+        ) {
158
+            $erreurs['statut'] = _T('instituer_erreur_statut_non_autorise');
159
+        }
160
+    }
161
+
162
+    return $erreurs;
163 163
 }
164 164
 
165 165
 /**
@@ -178,25 +178,25 @@  discard block
 block discarded – undo
178 178
  */
179 179
 function formulaires_instituer_objet_traiter_dist($objet, $id_objet, $retour = '', $editable = true) {
180 180
 
181
-	$c = ['statut' => _request('statut')];
182
-	// si on a envoye une 'date_posterieure', l'enregistrer
183
-	// todo dans le HTML
184
-	if ($d = _request('date_posterieure')) {
185
-		$c['date'] = $d;
186
-	}
187
-
188
-
189
-	include_spip('action/editer_objet');
190
-	if ($err = objet_instituer($objet, $id_objet, $c)) {
191
-		$res = ['message_erreur' => $err];
192
-	} else {
193
-		$res = ['message_ok' => _T('info_modification_enregistree')];
194
-		if ($retour) {
195
-			$res['redirect'] = $retour;
196
-		}
197
-		set_request('statut');
198
-		set_request('date_posterieure');
199
-	}
200
-
201
-	return $res;
181
+    $c = ['statut' => _request('statut')];
182
+    // si on a envoye une 'date_posterieure', l'enregistrer
183
+    // todo dans le HTML
184
+    if ($d = _request('date_posterieure')) {
185
+        $c['date'] = $d;
186
+    }
187
+
188
+
189
+    include_spip('action/editer_objet');
190
+    if ($err = objet_instituer($objet, $id_objet, $c)) {
191
+        $res = ['message_erreur' => $err];
192
+    } else {
193
+        $res = ['message_ok' => _T('info_modification_enregistree')];
194
+        if ($retour) {
195
+            $res['redirect'] = $retour;
196
+        }
197
+        set_request('statut');
198
+        set_request('date_posterieure');
199
+    }
200
+
201
+    return $res;
202 202
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 		'_publiable' => $publiable,
108 108
 		'_label' => $desc['texte_changer_statut'] ?? 'texte_article_statut',
109 109
 		'_aide' => $desc['aide_changer_statut'] ?? '',
110
-		'_hidden' => "<input type='hidden' name='statut_old' value='" . $v['statut'] . "' />",
110
+		'_hidden' => "<input type='hidden' name='statut_old' value='".$v['statut']."' />",
111 111
 	];
112 112
 
113 113
 	#if (!count($valeurs['statuts']))
Please login to merge, or discard this patch.
prive/formulaires/editer_liens.php 2 patches
Indentation   +352 added lines, -352 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Formulaires
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 
@@ -36,25 +36,25 @@  discard block
 block discarded – undo
36 36
  *   ($table_source,$objet,$id_objet,$objet_lien)
37 37
  */
38 38
 function determine_source_lien_objet($a, $b, $c) {
39
-	$table_source = $objet_lien = $objet = $id_objet = null;
40
-	// auteurs, article, 23 :
41
-	// associer des auteurs à l'article 23, sur la table pivot spip_auteurs_liens
42
-	if (is_numeric($c) and !is_numeric($b)) {
43
-		$table_source = table_objet($a);
44
-		$objet_lien = objet_type($a);
45
-		$objet = objet_type($b);
46
-		$id_objet = $c;
47
-	}
48
-	// article, 23, auteurs
49
-	// associer des auteurs à l'article 23, sur la table pivot spip_articles_liens
50
-	if (is_numeric($b) and !is_numeric($c)) {
51
-		$table_source = table_objet($c);
52
-		$objet_lien = objet_type($a);
53
-		$objet = objet_type($a);
54
-		$id_objet = $b;
55
-	}
56
-
57
-	return [$table_source, $objet, $id_objet, $objet_lien];
39
+    $table_source = $objet_lien = $objet = $id_objet = null;
40
+    // auteurs, article, 23 :
41
+    // associer des auteurs à l'article 23, sur la table pivot spip_auteurs_liens
42
+    if (is_numeric($c) and !is_numeric($b)) {
43
+        $table_source = table_objet($a);
44
+        $objet_lien = objet_type($a);
45
+        $objet = objet_type($b);
46
+        $id_objet = $c;
47
+    }
48
+    // article, 23, auteurs
49
+    // associer des auteurs à l'article 23, sur la table pivot spip_articles_liens
50
+    if (is_numeric($b) and !is_numeric($c)) {
51
+        $table_source = table_objet($c);
52
+        $objet_lien = objet_type($a);
53
+        $objet = objet_type($a);
54
+        $id_objet = $b;
55
+    }
56
+
57
+    return [$table_source, $objet, $id_objet, $objet_lien];
58 58
 }
59 59
 
60 60
 /**
@@ -80,93 +80,93 @@  discard block
 block discarded – undo
80 80
  */
81 81
 function formulaires_editer_liens_charger_dist($a, $b, $c, $options = []) {
82 82
 
83
-	// compat avec ancienne signature ou le 4eme argument est $editable
84
-	if (!is_array($options)) {
85
-		$options = ['editable' => $options];
86
-	} elseif (!isset($options['editable'])) {
87
-		$options['editable'] = true;
88
-	}
89
-
90
-	$editable = $options['editable'];
91
-
92
-	[$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
93
-	if (!$table_source or !$objet or !$objet_lien or !$id_objet) {
94
-		return false;
95
-	}
96
-
97
-	$objet_source = objet_type($table_source);
98
-	$table_sql_source = table_objet_sql($objet_source);
99
-
100
-	// verifier existence de la table xxx_liens
101
-	include_spip('action/editer_liens');
102
-	if (!objet_associable($objet_lien)) {
103
-		return false;
104
-	}
105
-
106
-	// L'éditabilité :) est définie par un test permanent (par exemple "associermots") ET le 4ème argument
107
-	include_spip('inc/autoriser');
108
-	$editable = ($editable and autoriser('associer' . $table_source, $objet, $id_objet)
109
-		and autoriser('modifier', $objet, $id_objet));
110
-
111
-	if (
112
-		!$editable and !count(objet_trouver_liens(
113
-			[$objet_lien => '*'],
114
-			[($objet_lien == $objet_source ? $objet : $objet_source) => $id_objet]
115
-		))
116
-	) {
117
-		return false;
118
-	}
119
-
120
-	// squelettes de vue et de d'association
121
-	// ils sont différents si des rôles sont définis.
122
-	$skel_vue = $table_source . '_lies';
123
-	$skel_ajout = $table_source . '_associer';
124
-
125
-	// description des roles
126
-	include_spip('inc/roles');
127
-	if ($roles = roles_presents($objet_source, $objet)) {
128
-		// on demande de nouveaux squelettes en conséquence
129
-		$skel_vue = $table_source . '_roles_lies';
130
-		$skel_ajout = $table_source . '_roles_associer';
131
-	}
132
-
133
-	$oups = _request('_oups') ?? '';
134
-	if ($oups) {
135
-		if (unserialize(base64_decode($oups))) {
136
-			// on est bon, rien a faire
137
-		} elseif (unserialize($oups)) {
138
-			// il faut encoder
139
-			$oups = base64_encode($oups);
140
-		} else {
141
-			$oups = '';
142
-		}
143
-	}
144
-	$valeurs = [
145
-		'id' => "$table_source-$objet-$id_objet-$objet_lien", // identifiant unique pour les id du form
146
-		'_vue_liee' => $skel_vue,
147
-		'_vue_ajout' => $skel_ajout,
148
-		'_objet_lien' => $objet_lien,
149
-		'id_lien_ajoute' => _request('id_lien_ajoute'),
150
-		'objet' => $objet,
151
-		'id_objet' => $id_objet,
152
-		'objet_source' => $objet_source,
153
-		'table_source' => $table_source,
154
-		'recherche' => '',
155
-		'visible' => 0,
156
-		'ajouter_lien' => '',
157
-		'supprimer_lien' => '',
158
-		'qualifier_lien' => '',
159
-		'ordonner_lien' => '',
160
-		'desordonner_liens' => '',
161
-		'_roles' => $roles, # description des roles
162
-		'_oups' => $oups,
163
-		'editable' => $editable,
164
-	];
165
-
166
-	// les options non definies dans $valeurs sont passees telles quelles au formulaire html
167
-	$valeurs = array_merge($options, $valeurs);
168
-
169
-	return $valeurs;
83
+    // compat avec ancienne signature ou le 4eme argument est $editable
84
+    if (!is_array($options)) {
85
+        $options = ['editable' => $options];
86
+    } elseif (!isset($options['editable'])) {
87
+        $options['editable'] = true;
88
+    }
89
+
90
+    $editable = $options['editable'];
91
+
92
+    [$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
93
+    if (!$table_source or !$objet or !$objet_lien or !$id_objet) {
94
+        return false;
95
+    }
96
+
97
+    $objet_source = objet_type($table_source);
98
+    $table_sql_source = table_objet_sql($objet_source);
99
+
100
+    // verifier existence de la table xxx_liens
101
+    include_spip('action/editer_liens');
102
+    if (!objet_associable($objet_lien)) {
103
+        return false;
104
+    }
105
+
106
+    // L'éditabilité :) est définie par un test permanent (par exemple "associermots") ET le 4ème argument
107
+    include_spip('inc/autoriser');
108
+    $editable = ($editable and autoriser('associer' . $table_source, $objet, $id_objet)
109
+        and autoriser('modifier', $objet, $id_objet));
110
+
111
+    if (
112
+        !$editable and !count(objet_trouver_liens(
113
+            [$objet_lien => '*'],
114
+            [($objet_lien == $objet_source ? $objet : $objet_source) => $id_objet]
115
+        ))
116
+    ) {
117
+        return false;
118
+    }
119
+
120
+    // squelettes de vue et de d'association
121
+    // ils sont différents si des rôles sont définis.
122
+    $skel_vue = $table_source . '_lies';
123
+    $skel_ajout = $table_source . '_associer';
124
+
125
+    // description des roles
126
+    include_spip('inc/roles');
127
+    if ($roles = roles_presents($objet_source, $objet)) {
128
+        // on demande de nouveaux squelettes en conséquence
129
+        $skel_vue = $table_source . '_roles_lies';
130
+        $skel_ajout = $table_source . '_roles_associer';
131
+    }
132
+
133
+    $oups = _request('_oups') ?? '';
134
+    if ($oups) {
135
+        if (unserialize(base64_decode($oups))) {
136
+            // on est bon, rien a faire
137
+        } elseif (unserialize($oups)) {
138
+            // il faut encoder
139
+            $oups = base64_encode($oups);
140
+        } else {
141
+            $oups = '';
142
+        }
143
+    }
144
+    $valeurs = [
145
+        'id' => "$table_source-$objet-$id_objet-$objet_lien", // identifiant unique pour les id du form
146
+        '_vue_liee' => $skel_vue,
147
+        '_vue_ajout' => $skel_ajout,
148
+        '_objet_lien' => $objet_lien,
149
+        'id_lien_ajoute' => _request('id_lien_ajoute'),
150
+        'objet' => $objet,
151
+        'id_objet' => $id_objet,
152
+        'objet_source' => $objet_source,
153
+        'table_source' => $table_source,
154
+        'recherche' => '',
155
+        'visible' => 0,
156
+        'ajouter_lien' => '',
157
+        'supprimer_lien' => '',
158
+        'qualifier_lien' => '',
159
+        'ordonner_lien' => '',
160
+        'desordonner_liens' => '',
161
+        '_roles' => $roles, # description des roles
162
+        '_oups' => $oups,
163
+        'editable' => $editable,
164
+    ];
165
+
166
+    // les options non definies dans $valeurs sont passees telles quelles au formulaire html
167
+    $valeurs = array_merge($options, $valeurs);
168
+
169
+    return $valeurs;
170 170
 }
171 171
 
172 172
 /**
@@ -210,165 +210,165 @@  discard block
 block discarded – undo
210 210
  * @return array
211 211
  */
212 212
 function formulaires_editer_liens_traiter_dist($a, $b, $c, $options = []) {
213
-	// compat avec ancienne signature ou le 4eme argument est $editable
214
-	if (!is_array($options)) {
215
-		$options = ['editable' => $options];
216
-	} elseif (!isset($options['editable'])) {
217
-		$options['editable'] = true;
218
-	}
219
-
220
-	$editable = $options['editable'];
221
-
222
-	$res = ['editable' => $editable ? true : false];
223
-	[$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
224
-	if (!$table_source or !$objet or !$objet_lien) {
225
-		return $res;
226
-	}
227
-
228
-
229
-	if (_request('tout_voir')) {
230
-		set_request('recherche', '');
231
-	}
232
-
233
-	include_spip('inc/autoriser');
234
-	if (autoriser('modifier', $objet, $id_objet)) {
235
-		// annuler les suppressions du coup d'avant !
236
-		if (
237
-			_request('annuler_oups')
238
-			and $oups = _request('_oups')
239
-			and $oups = base64_decode($oups)
240
-			and $oups = unserialize($oups)
241
-		) {
242
-			if ($oups_objets = charger_fonction("editer_liens_oups_{$table_source}_{$objet}_{$objet_lien}", 'action', true)) {
243
-				$oups_objets($oups);
244
-			} else {
245
-				$objet_source = objet_type($table_source);
246
-				include_spip('action/editer_liens');
247
-				foreach ($oups as $oup) {
248
-					if ($objet_lien == $objet_source) {
249
-						objet_associer([$objet_source => $oup[$objet_source]], [$objet => $oup[$objet]], $oup);
250
-					} else {
251
-						objet_associer([$objet => $oup[$objet]], [$objet_source => $oup[$objet_source]], $oup);
252
-					}
253
-				}
254
-			}
255
-			# oups ne persiste que pour la derniere action, si suppression
256
-			set_request('_oups');
257
-		}
258
-
259
-		$supprimer = _request('supprimer_lien');
260
-		$ajouter = _request('ajouter_lien');
261
-		$ordonner = _request('ordonner_lien');
262
-
263
-		if (_request('desordonner_liens')) {
264
-			include_spip('action/editer_liens');
265
-			objet_qualifier_liens([$objet_lien => '*'], [$objet => $id_objet], ['rang_lien' => 0]);
266
-		}
267
-
268
-		// il est possible de preciser dans une seule variable un remplacement :
269
-		// remplacer_lien[old][new]
270
-		if ($remplacer = _request('remplacer_lien')) {
271
-			foreach ($remplacer as $k => $v) {
272
-				if ($old = lien_verifier_action($k, '')) {
273
-					foreach (is_array($v) ? $v : [$v] as $kn => $vn) {
274
-						if ($new = lien_verifier_action($kn, $vn)) {
275
-							$supprimer[$old] = 'x';
276
-							$ajouter[$new] = '+';
277
-						}
278
-					}
279
-				}
280
-			}
281
-		}
282
-
283
-		if ($supprimer) {
284
-			if (
285
-				$supprimer_objets = charger_fonction(
286
-					"editer_liens_supprimer_{$table_source}_{$objet}_{$objet_lien}",
287
-					'action',
288
-					true
289
-				)
290
-			) {
291
-				$oups = $supprimer_objets($supprimer);
292
-			} else {
293
-				include_spip('action/editer_liens');
294
-				$oups = [];
295
-
296
-				foreach ($supprimer as $k => $v) {
297
-					if ($lien = lien_verifier_action($k, $v)) {
298
-						$lien = explode('-', $lien);
299
-						[$objet_source, $ids, $objet_lie, $idl, $role] = array_pad($lien, 5, null);
300
-						// appliquer une condition sur le rôle si défini ('*' pour tous les roles)
301
-						$cond = (!is_null($role) ? ['role' => $role] : []);
302
-						if ($objet_lien == $objet_source) {
303
-							$oups = array_merge(
304
-								$oups,
305
-								objet_trouver_liens([$objet_source => $ids], [$objet_lie => $idl], $cond)
306
-							);
307
-							objet_dissocier([$objet_source => $ids], [$objet_lie => $idl], $cond);
308
-						} else {
309
-							$oups = array_merge(
310
-								$oups,
311
-								objet_trouver_liens([$objet_lie => $idl], [$objet_source => $ids], $cond)
312
-							);
313
-							objet_dissocier([$objet_lie => $idl], [$objet_source => $ids], $cond);
314
-						}
315
-					}
316
-				}
317
-			}
318
-			set_request('_oups', $oups ? base64_encode(serialize($oups)) : null);
319
-		}
320
-
321
-		if ($ajouter) {
322
-			if (
323
-				$ajouter_objets = charger_fonction("editer_liens_ajouter_{$table_source}_{$objet}_{$objet_lien}", 'action', true)
324
-			) {
325
-				$ajout_ok = $ajouter_objets($ajouter);
326
-			} else {
327
-				$ajout_ok = false;
328
-				include_spip('action/editer_liens');
329
-				foreach ($ajouter as $k => $v) {
330
-					if ($lien = lien_verifier_action($k, $v)) {
331
-						$ajout_ok = true;
332
-						[$objet1, $ids, $objet2, $idl] = explode('-', $lien);
333
-						$qualifs = lien_retrouver_qualif($objet_lien, $lien);
334
-						if ($objet_lien == $objet1) {
335
-							lien_ajouter_liaisons($objet1, $ids, $objet2, $idl, $qualifs);
336
-						} else {
337
-							lien_ajouter_liaisons($objet2, $idl, $objet1, $ids, $qualifs);
338
-						}
339
-						set_request('id_lien_ajoute', $ids);
340
-					}
341
-				}
342
-			}
343
-			# oups ne persiste que pour la derniere action, si suppression
344
-			# une suppression suivie d'un ajout dans le meme hit est un remplacement
345
-			# non annulable !
346
-			if ($ajout_ok) {
347
-				set_request('_oups');
348
-			}
349
-		}
350
-
351
-		if ($ordonner) {
352
-			include_spip('action/editer_liens');
353
-			foreach ($ordonner as $k => $rang_lien) {
354
-				if ($lien = lien_verifier_action($k, '')) {
355
-					[$objet1, $ids, $objet2, $idl] = explode('-', $lien);
356
-					$qualif = ['rang_lien' => $rang_lien];
357
-
358
-					if ($objet_lien == $objet1) {
359
-						objet_qualifier_liens([$objet1 => $ids], [$objet2 => $idl], $qualif);
360
-					} else {
361
-						objet_qualifier_liens([$objet2 => $idl], [$objet1 => $ids], $qualif);
362
-					}
363
-					set_request('id_lien_ajoute', $ids);
364
-					set_request('_oups');
365
-				}
366
-			}
367
-		}
368
-	}
369
-
370
-
371
-	return $res;
213
+    // compat avec ancienne signature ou le 4eme argument est $editable
214
+    if (!is_array($options)) {
215
+        $options = ['editable' => $options];
216
+    } elseif (!isset($options['editable'])) {
217
+        $options['editable'] = true;
218
+    }
219
+
220
+    $editable = $options['editable'];
221
+
222
+    $res = ['editable' => $editable ? true : false];
223
+    [$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
224
+    if (!$table_source or !$objet or !$objet_lien) {
225
+        return $res;
226
+    }
227
+
228
+
229
+    if (_request('tout_voir')) {
230
+        set_request('recherche', '');
231
+    }
232
+
233
+    include_spip('inc/autoriser');
234
+    if (autoriser('modifier', $objet, $id_objet)) {
235
+        // annuler les suppressions du coup d'avant !
236
+        if (
237
+            _request('annuler_oups')
238
+            and $oups = _request('_oups')
239
+            and $oups = base64_decode($oups)
240
+            and $oups = unserialize($oups)
241
+        ) {
242
+            if ($oups_objets = charger_fonction("editer_liens_oups_{$table_source}_{$objet}_{$objet_lien}", 'action', true)) {
243
+                $oups_objets($oups);
244
+            } else {
245
+                $objet_source = objet_type($table_source);
246
+                include_spip('action/editer_liens');
247
+                foreach ($oups as $oup) {
248
+                    if ($objet_lien == $objet_source) {
249
+                        objet_associer([$objet_source => $oup[$objet_source]], [$objet => $oup[$objet]], $oup);
250
+                    } else {
251
+                        objet_associer([$objet => $oup[$objet]], [$objet_source => $oup[$objet_source]], $oup);
252
+                    }
253
+                }
254
+            }
255
+            # oups ne persiste que pour la derniere action, si suppression
256
+            set_request('_oups');
257
+        }
258
+
259
+        $supprimer = _request('supprimer_lien');
260
+        $ajouter = _request('ajouter_lien');
261
+        $ordonner = _request('ordonner_lien');
262
+
263
+        if (_request('desordonner_liens')) {
264
+            include_spip('action/editer_liens');
265
+            objet_qualifier_liens([$objet_lien => '*'], [$objet => $id_objet], ['rang_lien' => 0]);
266
+        }
267
+
268
+        // il est possible de preciser dans une seule variable un remplacement :
269
+        // remplacer_lien[old][new]
270
+        if ($remplacer = _request('remplacer_lien')) {
271
+            foreach ($remplacer as $k => $v) {
272
+                if ($old = lien_verifier_action($k, '')) {
273
+                    foreach (is_array($v) ? $v : [$v] as $kn => $vn) {
274
+                        if ($new = lien_verifier_action($kn, $vn)) {
275
+                            $supprimer[$old] = 'x';
276
+                            $ajouter[$new] = '+';
277
+                        }
278
+                    }
279
+                }
280
+            }
281
+        }
282
+
283
+        if ($supprimer) {
284
+            if (
285
+                $supprimer_objets = charger_fonction(
286
+                    "editer_liens_supprimer_{$table_source}_{$objet}_{$objet_lien}",
287
+                    'action',
288
+                    true
289
+                )
290
+            ) {
291
+                $oups = $supprimer_objets($supprimer);
292
+            } else {
293
+                include_spip('action/editer_liens');
294
+                $oups = [];
295
+
296
+                foreach ($supprimer as $k => $v) {
297
+                    if ($lien = lien_verifier_action($k, $v)) {
298
+                        $lien = explode('-', $lien);
299
+                        [$objet_source, $ids, $objet_lie, $idl, $role] = array_pad($lien, 5, null);
300
+                        // appliquer une condition sur le rôle si défini ('*' pour tous les roles)
301
+                        $cond = (!is_null($role) ? ['role' => $role] : []);
302
+                        if ($objet_lien == $objet_source) {
303
+                            $oups = array_merge(
304
+                                $oups,
305
+                                objet_trouver_liens([$objet_source => $ids], [$objet_lie => $idl], $cond)
306
+                            );
307
+                            objet_dissocier([$objet_source => $ids], [$objet_lie => $idl], $cond);
308
+                        } else {
309
+                            $oups = array_merge(
310
+                                $oups,
311
+                                objet_trouver_liens([$objet_lie => $idl], [$objet_source => $ids], $cond)
312
+                            );
313
+                            objet_dissocier([$objet_lie => $idl], [$objet_source => $ids], $cond);
314
+                        }
315
+                    }
316
+                }
317
+            }
318
+            set_request('_oups', $oups ? base64_encode(serialize($oups)) : null);
319
+        }
320
+
321
+        if ($ajouter) {
322
+            if (
323
+                $ajouter_objets = charger_fonction("editer_liens_ajouter_{$table_source}_{$objet}_{$objet_lien}", 'action', true)
324
+            ) {
325
+                $ajout_ok = $ajouter_objets($ajouter);
326
+            } else {
327
+                $ajout_ok = false;
328
+                include_spip('action/editer_liens');
329
+                foreach ($ajouter as $k => $v) {
330
+                    if ($lien = lien_verifier_action($k, $v)) {
331
+                        $ajout_ok = true;
332
+                        [$objet1, $ids, $objet2, $idl] = explode('-', $lien);
333
+                        $qualifs = lien_retrouver_qualif($objet_lien, $lien);
334
+                        if ($objet_lien == $objet1) {
335
+                            lien_ajouter_liaisons($objet1, $ids, $objet2, $idl, $qualifs);
336
+                        } else {
337
+                            lien_ajouter_liaisons($objet2, $idl, $objet1, $ids, $qualifs);
338
+                        }
339
+                        set_request('id_lien_ajoute', $ids);
340
+                    }
341
+                }
342
+            }
343
+            # oups ne persiste que pour la derniere action, si suppression
344
+            # une suppression suivie d'un ajout dans le meme hit est un remplacement
345
+            # non annulable !
346
+            if ($ajout_ok) {
347
+                set_request('_oups');
348
+            }
349
+        }
350
+
351
+        if ($ordonner) {
352
+            include_spip('action/editer_liens');
353
+            foreach ($ordonner as $k => $rang_lien) {
354
+                if ($lien = lien_verifier_action($k, '')) {
355
+                    [$objet1, $ids, $objet2, $idl] = explode('-', $lien);
356
+                    $qualif = ['rang_lien' => $rang_lien];
357
+
358
+                    if ($objet_lien == $objet1) {
359
+                        objet_qualifier_liens([$objet1 => $ids], [$objet2 => $idl], $qualif);
360
+                    } else {
361
+                        objet_qualifier_liens([$objet2 => $idl], [$objet1 => $ids], $qualif);
362
+                    }
363
+                    set_request('id_lien_ajoute', $ids);
364
+                    set_request('_oups');
365
+                }
366
+            }
367
+        }
368
+    }
369
+
370
+
371
+    return $res;
372 372
 }
373 373
 
374 374
 
@@ -391,24 +391,24 @@  discard block
 block discarded – undo
391 391
  * @return string Action demandée si trouvée, sinon ''
392 392
  */
393 393
 function lien_verifier_action($k, $v) {
394
-	$action = '';
395
-	if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $k)) {
396
-		$action = $k;
397
-	}
398
-	if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $v)) {
399
-		if (is_numeric($k)) {
400
-			$action = $v;
401
-		}
402
-		if (_request($k)) {
403
-			$action = $v;
404
-		}
405
-	}
406
-	// ajout un role null fictif (plus pratique) si pas défini
407
-	if ($action and count(explode('-', $action)) == 4) {
408
-		$action .= '-';
409
-	}
410
-
411
-	return $action;
394
+    $action = '';
395
+    if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $k)) {
396
+        $action = $k;
397
+    }
398
+    if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $v)) {
399
+        if (is_numeric($k)) {
400
+            $action = $v;
401
+        }
402
+        if (_request($k)) {
403
+            $action = $v;
404
+        }
405
+    }
406
+    // ajout un role null fictif (plus pratique) si pas défini
407
+    if ($action and count(explode('-', $action)) == 4) {
408
+        $action .= '-';
409
+    }
410
+
411
+    return $action;
412 412
 }
413 413
 
414 414
 
@@ -424,66 +424,66 @@  discard block
 block discarded – undo
424 424
  *   Liste des qualifs pour chaque lien. Tableau vide s'il n'y en a pas.
425 425
  **/
426 426
 function lien_retrouver_qualif($objet_lien, $lien) {
427
-	// un role est défini dans la liaison
428
-	$defs = explode('-', $lien);
429
-	[$objet1, , $objet2, , $role] = array_pad($defs, 5, null);
430
-	if ($objet_lien == $objet1) {
431
-		$colonne_role = roles_colonne($objet1, $objet2);
432
-	} else {
433
-		$colonne_role = roles_colonne($objet2, $objet1);
434
-	}
435
-
436
-	// cas ou le role est defini en 5e argument de l'action sur le lien (suppression, ajout rapide sans autre attribut)
437
-	if ($role) {
438
-		return [
439
-			// un seul lien avec ce role
440
-			[$colonne_role => $role]
441
-		];
442
-	}
443
-
444
-	// retrouver les rôles postés pour cette liaison, s'il y en a.
445
-	$qualifier_lien = _request('qualifier_lien');
446
-	if (!$qualifier_lien or !is_array($qualifier_lien)) {
447
-		return [];
448
-	}
449
-
450
-	// pas avec l'action complete (incluant le role)
451
-	$qualif = [];
452
-	if (
453
-		(!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien])
454
-		and count($defs) == 5
455
-	) {
456
-		// on tente avec l'action sans le role
457
-		array_pop($defs);
458
-		$lien = implode('-', $defs);
459
-		if (!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien]) {
460
-			$qualif = [];
461
-		}
462
-	}
463
-
464
-	// $qualif de la forme array(role=>array(...),valeur=>array(...),....)
465
-	// on le reforme en array(array(role=>..,valeur=>..,..),array(role=>..,valeur=>..,..),...)
466
-	$qualifs = [];
467
-	while (is_countable($qualif) ? count($qualif) : 0) {
468
-		$q = [];
469
-		foreach ($qualif as $att => $values) {
470
-			if (is_array($values)) {
471
-				$q[$att] = array_shift($qualif[$att]);
472
-				if (!(is_countable($qualif[$att]) ? count($qualif[$att]) : 0)) {
473
-					unset($qualif[$att]);
474
-				}
475
-			} else {
476
-				$q[$att] = $values;
477
-				unset($qualif[$att]);
478
-			}
479
-		}
480
-		// pas de rôle vide
481
-		if (!$colonne_role or !isset($q[$colonne_role]) or $q[$colonne_role]) {
482
-			$qualifs[] = $q;
483
-		}
484
-	}
485
-
486
-	return $qualifs;
427
+    // un role est défini dans la liaison
428
+    $defs = explode('-', $lien);
429
+    [$objet1, , $objet2, , $role] = array_pad($defs, 5, null);
430
+    if ($objet_lien == $objet1) {
431
+        $colonne_role = roles_colonne($objet1, $objet2);
432
+    } else {
433
+        $colonne_role = roles_colonne($objet2, $objet1);
434
+    }
435
+
436
+    // cas ou le role est defini en 5e argument de l'action sur le lien (suppression, ajout rapide sans autre attribut)
437
+    if ($role) {
438
+        return [
439
+            // un seul lien avec ce role
440
+            [$colonne_role => $role]
441
+        ];
442
+    }
443
+
444
+    // retrouver les rôles postés pour cette liaison, s'il y en a.
445
+    $qualifier_lien = _request('qualifier_lien');
446
+    if (!$qualifier_lien or !is_array($qualifier_lien)) {
447
+        return [];
448
+    }
449
+
450
+    // pas avec l'action complete (incluant le role)
451
+    $qualif = [];
452
+    if (
453
+        (!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien])
454
+        and count($defs) == 5
455
+    ) {
456
+        // on tente avec l'action sans le role
457
+        array_pop($defs);
458
+        $lien = implode('-', $defs);
459
+        if (!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien]) {
460
+            $qualif = [];
461
+        }
462
+    }
463
+
464
+    // $qualif de la forme array(role=>array(...),valeur=>array(...),....)
465
+    // on le reforme en array(array(role=>..,valeur=>..,..),array(role=>..,valeur=>..,..),...)
466
+    $qualifs = [];
467
+    while (is_countable($qualif) ? count($qualif) : 0) {
468
+        $q = [];
469
+        foreach ($qualif as $att => $values) {
470
+            if (is_array($values)) {
471
+                $q[$att] = array_shift($qualif[$att]);
472
+                if (!(is_countable($qualif[$att]) ? count($qualif[$att]) : 0)) {
473
+                    unset($qualif[$att]);
474
+                }
475
+            } else {
476
+                $q[$att] = $values;
477
+                unset($qualif[$att]);
478
+            }
479
+        }
480
+        // pas de rôle vide
481
+        if (!$colonne_role or !isset($q[$colonne_role]) or $q[$colonne_role]) {
482
+            $qualifs[] = $q;
483
+        }
484
+    }
485
+
486
+    return $qualifs;
487 487
 }
488 488
 
489 489
 /**
@@ -502,12 +502,12 @@  discard block
 block discarded – undo
502 502
  **/
503 503
 function lien_ajouter_liaisons($objet_source, $ids, $objet_lien, $idl, $qualifs) {
504 504
 
505
-	// retrouver la colonne de roles s'il y en a a lier
506
-	if (is_array($qualifs) and count($qualifs)) {
507
-		foreach ($qualifs as $qualif) {
508
-			objet_associer([$objet_source => $ids], [$objet_lien => $idl], $qualif);
509
-		}
510
-	} else {
511
-		objet_associer([$objet_source => $ids], [$objet_lien => $idl]);
512
-	}
505
+    // retrouver la colonne de roles s'il y en a a lier
506
+    if (is_array($qualifs) and count($qualifs)) {
507
+        foreach ($qualifs as $qualif) {
508
+            objet_associer([$objet_source => $ids], [$objet_lien => $idl], $qualif);
509
+        }
510
+    } else {
511
+        objet_associer([$objet_source => $ids], [$objet_lien => $idl]);
512
+    }
513 513
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
 	// L'éditabilité :) est définie par un test permanent (par exemple "associermots") ET le 4ème argument
107 107
 	include_spip('inc/autoriser');
108
-	$editable = ($editable and autoriser('associer' . $table_source, $objet, $id_objet)
108
+	$editable = ($editable and autoriser('associer'.$table_source, $objet, $id_objet)
109 109
 		and autoriser('modifier', $objet, $id_objet));
110 110
 
111 111
 	if (
@@ -119,15 +119,15 @@  discard block
 block discarded – undo
119 119
 
120 120
 	// squelettes de vue et de d'association
121 121
 	// ils sont différents si des rôles sont définis.
122
-	$skel_vue = $table_source . '_lies';
123
-	$skel_ajout = $table_source . '_associer';
122
+	$skel_vue = $table_source.'_lies';
123
+	$skel_ajout = $table_source.'_associer';
124 124
 
125 125
 	// description des roles
126 126
 	include_spip('inc/roles');
127 127
 	if ($roles = roles_presents($objet_source, $objet)) {
128 128
 		// on demande de nouveaux squelettes en conséquence
129
-		$skel_vue = $table_source . '_roles_lies';
130
-		$skel_ajout = $table_source . '_roles_associer';
129
+		$skel_vue = $table_source.'_roles_lies';
130
+		$skel_ajout = $table_source.'_roles_associer';
131 131
 	}
132 132
 
133 133
 	$oups = _request('_oups') ?? '';
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 function lien_retrouver_qualif($objet_lien, $lien) {
427 427
 	// un role est défini dans la liaison
428 428
 	$defs = explode('-', $lien);
429
-	[$objet1, , $objet2, , $role] = array_pad($defs, 5, null);
429
+	[$objet1,, $objet2,, $role] = array_pad($defs, 5, null);
430 430
 	if ($objet_lien == $objet1) {
431 431
 		$colonne_role = roles_colonne($objet1, $objet2);
432 432
 	} else {
Please login to merge, or discard this patch.
prive/formulaires/dater.php 2 patches
Indentation   +266 added lines, -266 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
 
@@ -45,136 +45,136 @@  discard block
 block discarded – undo
45 45
  **/
46 46
 function formulaires_dater_charger_dist($objet, $id_objet, $retour = '', $options = []) {
47 47
 
48
-	$jour = null;
49
-	$mois = null;
50
-	$annee = null;
51
-	$heure = null;
52
-	$minute = null;
53
-	$objet = objet_type($objet);
54
-	if (!$objet or !intval($id_objet)) {
55
-		return false;
56
-	}
57
-
58
-	if (!is_array($options)) {
59
-		$options = unserialize($options);
60
-	}
61
-
62
-	$_id_objet = id_table_objet($objet);
63
-	$table = table_objet($objet);
64
-	$trouver_table = charger_fonction('trouver_table', 'base');
65
-	$desc = $trouver_table($table);
66
-
67
-	if (!$desc) {
68
-		return false;
69
-	}
70
-
71
-	$champ_date = $desc['date'] ?: 'date';
72
-	if (isset($options['champ_date']) and $options['champ_date']) {
73
-		$champ_date = $options['champ_date'];
74
-	}
75
-	if (!isset($desc['field'][$champ_date])) {
76
-		return false;
77
-	}
78
-
79
-	$valeurs = [
80
-		'objet' => $objet,
81
-		'id_objet' => $id_objet,
82
-		'id' => $id_objet,
83
-	];
84
-
85
-
86
-	$select = "$champ_date as date";
87
-	$champ_date_redac = 'date_redac';
88
-	if (isset($options['champ_date_redac']) and $options['champ_date_redac']) {
89
-		$champ_date_redac = $options['champ_date_redac'];
90
-	}
91
-	if (isset($desc['field'][$champ_date_redac])) {
92
-		$select .= ",$champ_date_redac as date_redac";
93
-	}
94
-	if (isset($desc['field']['statut'])) {
95
-		$select .= ',statut';
96
-	}
97
-
98
-
99
-	$row = sql_fetsel($select, $desc['table'], "$_id_objet=" . intval($id_objet));
100
-	$statut = $row['statut'] ?? 'publie'; // pas de statut => publie
101
-
102
-	$valeurs['editable'] = autoriser('dater', $objet, $id_objet, null, ['statut' => $statut]);
103
-
104
-	$possedeDateRedac = false;
105
-
106
-	if (
107
-		isset($row['date_redac']) and
108
-		$regs = recup_date($row['date_redac'], false)
109
-	) {
110
-		$annee_redac = $regs[0];
111
-		$mois_redac = $regs[1];
112
-		$jour_redac = $regs[2];
113
-		$heure_redac = $regs[3];
114
-		$minute_redac = $regs[4];
115
-		$possedeDateRedac = true;
116
-		// attention : les vrai dates de l'annee 1 sont stockee avec +9000 => 9001
117
-		// mais reviennent ici en annee 1 par recup_date
118
-		// on verifie donc que le intval($row['date_redac']) qui ressort l'annee
119
-		// est bien lui aussi <=1 : dans ce cas c'est une date sql 'nulle' ou presque, selon
120
-		// le gestionnnaire sql utilise (0001-01-01 pour PG par exemple)
121
-		if (intval($row['date_redac']) <= 1 and ($annee_redac <= 1) and ($mois_redac <= 1) and ($jour_redac <= 1)) {
122
-			$possedeDateRedac = false;
123
-		}
124
-	} else {
125
-		$annee_redac = $mois_redac = $jour_redac = $heure_redac = $minute_redac = 0;
126
-	}
127
-
128
-	if ($regs = recup_date($row['date'], false)) {
129
-		$annee = $regs[0];
130
-		$mois = $regs[1];
131
-		$jour = $regs[2];
132
-		$heure = $regs[3];
133
-		$minute = $regs[4];
134
-	}
135
-
136
-	// attention, si la variable s'appelle date ou date_redac, le compilo va
137
-	// la normaliser, ce qu'on ne veut pas ici.
138
-	$valeurs['afficher_date_redac'] = ($possedeDateRedac ? $row['date_redac'] : '');
139
-	$valeurs['date_redac_jour'] = dater_formater_saisie_jour($jour_redac, $mois_redac, $annee_redac);
140
-	$valeurs['date_redac_heure'] = "$heure_redac:$minute_redac";
141
-
142
-	$valeurs['afficher_date'] = $row['date'];
143
-	$valeurs['date_jour'] = dater_formater_saisie_jour($jour, $mois, $annee);
144
-	$valeurs['date_heure'] = "$heure:$minute";
145
-
146
-	$valeurs['sans_redac'] = !$possedeDateRedac;
147
-
148
-	if (isset($options['date_redac'])) {
149
-		$valeurs['_editer_date_anterieure'] = $options['date_redac'];
150
-	} else {
151
-		$valeurs['_editer_date_anterieure'] = ($objet == 'article' and ($GLOBALS['meta']['articles_redac'] != 'non' or $possedeDateRedac));
152
-	}
153
-	$valeurs['_label_date'] = (($statut == 'publie') ?
154
-		_T('texte_date_publication_objet') : _T('texte_date_creation_objet'));
155
-	if (isset($options['label_date']) and $options['label_date']) {
156
-		$valeurs['_label_date'] = $options['label_date'];
157
-	}
158
-	if (isset($options['label_date_redac']) and $options['label_date_redac']) {
159
-		$valeurs['_label_date_redac'] = $options['label_date_redac'];
160
-	}
161
-	if (isset($options['texte_sans_date_redac']) and $options['texte_sans_date_redac']) {
162
-		$valeurs['_texte_sans_date_redac'] = $options['texte_sans_date_redac'];
163
-	}
164
-	if (isset($options['class']) and $options['class']) {
165
-		$valeurs['_class'] = $options['class'];
166
-	}
167
-
168
-	$valeurs['_saisie_en_cours'] = (_request('_saisie_en_cours') !== null or _request('date_jour') !== null);
169
-
170
-	// cas ou l'on ne peut pas dater mais on peut modifier la date de redac anterieure
171
-	// https://core.spip.net/issues/3494
172
-	$valeurs['_editer_date'] = $valeurs['editable'];
173
-	if ($valeurs['_editer_date_anterieure'] and !$valeurs['editable']) {
174
-		$valeurs['editable'] = autoriser('modifier', $objet, $id_objet);
175
-	}
176
-
177
-	return $valeurs;
48
+    $jour = null;
49
+    $mois = null;
50
+    $annee = null;
51
+    $heure = null;
52
+    $minute = null;
53
+    $objet = objet_type($objet);
54
+    if (!$objet or !intval($id_objet)) {
55
+        return false;
56
+    }
57
+
58
+    if (!is_array($options)) {
59
+        $options = unserialize($options);
60
+    }
61
+
62
+    $_id_objet = id_table_objet($objet);
63
+    $table = table_objet($objet);
64
+    $trouver_table = charger_fonction('trouver_table', 'base');
65
+    $desc = $trouver_table($table);
66
+
67
+    if (!$desc) {
68
+        return false;
69
+    }
70
+
71
+    $champ_date = $desc['date'] ?: 'date';
72
+    if (isset($options['champ_date']) and $options['champ_date']) {
73
+        $champ_date = $options['champ_date'];
74
+    }
75
+    if (!isset($desc['field'][$champ_date])) {
76
+        return false;
77
+    }
78
+
79
+    $valeurs = [
80
+        'objet' => $objet,
81
+        'id_objet' => $id_objet,
82
+        'id' => $id_objet,
83
+    ];
84
+
85
+
86
+    $select = "$champ_date as date";
87
+    $champ_date_redac = 'date_redac';
88
+    if (isset($options['champ_date_redac']) and $options['champ_date_redac']) {
89
+        $champ_date_redac = $options['champ_date_redac'];
90
+    }
91
+    if (isset($desc['field'][$champ_date_redac])) {
92
+        $select .= ",$champ_date_redac as date_redac";
93
+    }
94
+    if (isset($desc['field']['statut'])) {
95
+        $select .= ',statut';
96
+    }
97
+
98
+
99
+    $row = sql_fetsel($select, $desc['table'], "$_id_objet=" . intval($id_objet));
100
+    $statut = $row['statut'] ?? 'publie'; // pas de statut => publie
101
+
102
+    $valeurs['editable'] = autoriser('dater', $objet, $id_objet, null, ['statut' => $statut]);
103
+
104
+    $possedeDateRedac = false;
105
+
106
+    if (
107
+        isset($row['date_redac']) and
108
+        $regs = recup_date($row['date_redac'], false)
109
+    ) {
110
+        $annee_redac = $regs[0];
111
+        $mois_redac = $regs[1];
112
+        $jour_redac = $regs[2];
113
+        $heure_redac = $regs[3];
114
+        $minute_redac = $regs[4];
115
+        $possedeDateRedac = true;
116
+        // attention : les vrai dates de l'annee 1 sont stockee avec +9000 => 9001
117
+        // mais reviennent ici en annee 1 par recup_date
118
+        // on verifie donc que le intval($row['date_redac']) qui ressort l'annee
119
+        // est bien lui aussi <=1 : dans ce cas c'est une date sql 'nulle' ou presque, selon
120
+        // le gestionnnaire sql utilise (0001-01-01 pour PG par exemple)
121
+        if (intval($row['date_redac']) <= 1 and ($annee_redac <= 1) and ($mois_redac <= 1) and ($jour_redac <= 1)) {
122
+            $possedeDateRedac = false;
123
+        }
124
+    } else {
125
+        $annee_redac = $mois_redac = $jour_redac = $heure_redac = $minute_redac = 0;
126
+    }
127
+
128
+    if ($regs = recup_date($row['date'], false)) {
129
+        $annee = $regs[0];
130
+        $mois = $regs[1];
131
+        $jour = $regs[2];
132
+        $heure = $regs[3];
133
+        $minute = $regs[4];
134
+    }
135
+
136
+    // attention, si la variable s'appelle date ou date_redac, le compilo va
137
+    // la normaliser, ce qu'on ne veut pas ici.
138
+    $valeurs['afficher_date_redac'] = ($possedeDateRedac ? $row['date_redac'] : '');
139
+    $valeurs['date_redac_jour'] = dater_formater_saisie_jour($jour_redac, $mois_redac, $annee_redac);
140
+    $valeurs['date_redac_heure'] = "$heure_redac:$minute_redac";
141
+
142
+    $valeurs['afficher_date'] = $row['date'];
143
+    $valeurs['date_jour'] = dater_formater_saisie_jour($jour, $mois, $annee);
144
+    $valeurs['date_heure'] = "$heure:$minute";
145
+
146
+    $valeurs['sans_redac'] = !$possedeDateRedac;
147
+
148
+    if (isset($options['date_redac'])) {
149
+        $valeurs['_editer_date_anterieure'] = $options['date_redac'];
150
+    } else {
151
+        $valeurs['_editer_date_anterieure'] = ($objet == 'article' and ($GLOBALS['meta']['articles_redac'] != 'non' or $possedeDateRedac));
152
+    }
153
+    $valeurs['_label_date'] = (($statut == 'publie') ?
154
+        _T('texte_date_publication_objet') : _T('texte_date_creation_objet'));
155
+    if (isset($options['label_date']) and $options['label_date']) {
156
+        $valeurs['_label_date'] = $options['label_date'];
157
+    }
158
+    if (isset($options['label_date_redac']) and $options['label_date_redac']) {
159
+        $valeurs['_label_date_redac'] = $options['label_date_redac'];
160
+    }
161
+    if (isset($options['texte_sans_date_redac']) and $options['texte_sans_date_redac']) {
162
+        $valeurs['_texte_sans_date_redac'] = $options['texte_sans_date_redac'];
163
+    }
164
+    if (isset($options['class']) and $options['class']) {
165
+        $valeurs['_class'] = $options['class'];
166
+    }
167
+
168
+    $valeurs['_saisie_en_cours'] = (_request('_saisie_en_cours') !== null or _request('date_jour') !== null);
169
+
170
+    // cas ou l'on ne peut pas dater mais on peut modifier la date de redac anterieure
171
+    // https://core.spip.net/issues/3494
172
+    $valeurs['_editer_date'] = $valeurs['editable'];
173
+    if ($valeurs['_editer_date_anterieure'] and !$valeurs['editable']) {
174
+        $valeurs['editable'] = autoriser('modifier', $objet, $id_objet);
175
+    }
176
+
177
+    return $valeurs;
178 178
 }
179 179
 
180 180
 /**
@@ -192,20 +192,20 @@  discard block
 block discarded – undo
192 192
  *     Date formatée tel que `02/10/2012`
193 193
  **/
194 194
 function dater_formater_saisie_jour($jour, $mois, $annee, $sep = '/') {
195
-	$annee = str_pad($annee, 4, '0', STR_PAD_LEFT);
196
-	if (intval($jour)) {
197
-		$jour = str_pad($jour, 2, '0', STR_PAD_LEFT);
198
-		$mois = str_pad($mois, 2, '0', STR_PAD_LEFT);
195
+    $annee = str_pad($annee, 4, '0', STR_PAD_LEFT);
196
+    if (intval($jour)) {
197
+        $jour = str_pad($jour, 2, '0', STR_PAD_LEFT);
198
+        $mois = str_pad($mois, 2, '0', STR_PAD_LEFT);
199 199
 
200
-		return "$jour$sep$mois$sep$annee";
201
-	}
202
-	if (intval($mois)) {
203
-		$mois = str_pad($mois, 2, '0', STR_PAD_LEFT);
200
+        return "$jour$sep$mois$sep$annee";
201
+    }
202
+    if (intval($mois)) {
203
+        $mois = str_pad($mois, 2, '0', STR_PAD_LEFT);
204 204
 
205
-		return "$mois$sep$annee";
206
-	}
205
+        return "$mois$sep$annee";
206
+    }
207 207
 
208
-	return $annee;
208
+    return $annee;
209 209
 }
210 210
 
211 211
 /**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
  *     Hash du formulaire
225 225
  **/
226 226
 function formulaires_dater_identifier_dist($objet, $id_objet, $retour = '', $options = []) {
227
-	return serialize([$objet, $id_objet]);
227
+    return serialize([$objet, $id_objet]);
228 228
 }
229 229
 
230 230
 /**
@@ -242,30 +242,30 @@  discard block
 block discarded – undo
242 242
  *     Tableau des erreurs
243 243
  */
244 244
 function formulaires_dater_verifier_dist($objet, $id_objet, $retour = '', $options = []) {
245
-	$erreurs = [];
246
-
247
-	// ouvrir le formulaire en edition ?
248
-	if (_request('_saisie_en_cours')) {
249
-		$erreurs['message_erreur'] = '';
250
-
251
-		return $erreurs;
252
-	}
253
-
254
-	if (_request('changer')) {
255
-		foreach (['date', 'date_redac'] as $k) {
256
-			if ($v = _request($k . '_jour') and !dater_recuperer_date_saisie($v, $k)) {
257
-				$erreurs[$k] = _T('format_date_incorrecte');
258
-			} elseif ($v = _request($k . '_heure') and !dater_recuperer_heure_saisie($v)) {
259
-				$erreurs[$k] = _T('format_heure_incorrecte');
260
-			}
261
-		}
262
-
263
-		if (!_request('date_jour')) {
264
-			$erreurs['date'] = _T('info_obligatoire');
265
-		}
266
-	}
267
-
268
-	return $erreurs;
245
+    $erreurs = [];
246
+
247
+    // ouvrir le formulaire en edition ?
248
+    if (_request('_saisie_en_cours')) {
249
+        $erreurs['message_erreur'] = '';
250
+
251
+        return $erreurs;
252
+    }
253
+
254
+    if (_request('changer')) {
255
+        foreach (['date', 'date_redac'] as $k) {
256
+            if ($v = _request($k . '_jour') and !dater_recuperer_date_saisie($v, $k)) {
257
+                $erreurs[$k] = _T('format_date_incorrecte');
258
+            } elseif ($v = _request($k . '_heure') and !dater_recuperer_heure_saisie($v)) {
259
+                $erreurs[$k] = _T('format_heure_incorrecte');
260
+            }
261
+        }
262
+
263
+        if (!_request('date_jour')) {
264
+            $erreurs['date'] = _T('info_obligatoire');
265
+        }
266
+    }
267
+
268
+    return $erreurs;
269 269
 }
270 270
 
271 271
 /**
@@ -283,79 +283,79 @@  discard block
 block discarded – undo
283 283
  *     Retours des traitements
284 284
  */
285 285
 function formulaires_dater_traiter_dist($objet, $id_objet, $retour = '', $options = []) {
286
-	$res = ['editable' => ' '];
287
-
288
-	if (_request('changer')) {
289
-		$table = table_objet($objet);
290
-		$trouver_table = charger_fonction('trouver_table', 'base');
291
-		$desc = $trouver_table($table);
292
-
293
-		if (!$desc) {
294
-			return ['message_erreur' => _L('erreur')];
295
-		} #impossible en principe
296
-
297
-		$champ_date = $desc['date'] ?: 'date';
298
-		if (isset($options['champ_date']) and $options['champ_date']) {
299
-			$champ_date = $options['champ_date'];
300
-		}
301
-
302
-		$set = [];
303
-
304
-		$charger = charger_fonction('charger', 'formulaires/dater/');
305
-		$v = $charger($objet, $id_objet, $retour, $options);
306
-
307
-		if ($v['_editer_date']) {
308
-			if (!$d = dater_recuperer_date_saisie(_request('date_jour'))) {
309
-				$d = [date('Y'), date('m'), date('d')];
310
-			}
311
-			if (!$h = dater_recuperer_heure_saisie(_request('date_heure'))) {
312
-				$h = [0, 0];
313
-			}
314
-
315
-			$set[$champ_date] = sql_format_date($d[0], $d[1], $d[2], $h[0], $h[1]);
316
-		}
317
-
318
-		$champ_date_redac = 'date_redac';
319
-		if (isset($options['champ_date_redac']) and $options['champ_date_redac']) {
320
-			$champ_date_redac = $options['champ_date_redac'];
321
-		}
322
-		if (isset($desc['field'][$champ_date_redac]) and $v['_editer_date_anterieure']) {
323
-			if (!_request('date_redac_jour') or _request('sans_redac')) {
324
-				$set[$champ_date_redac] = sql_format_date(0, 0, 0, 0, 0, 0);
325
-			} else {
326
-				if (!$d = dater_recuperer_date_saisie(_request('date_redac_jour'), 'date_redac')) {
327
-					$d = [date('Y'), date('m'), date('d')];
328
-				}
329
-				if (!$h = dater_recuperer_heure_saisie(_request('date_redac_heure'))) {
330
-					$h = [0, 0];
331
-				}
332
-				$set[$champ_date_redac] = sql_format_date($d[0], $d[1], $d[2], $h[0], $h[1]);
333
-			}
334
-		}
335
-
336
-		if (count($set)) {
337
-			$publie_avant = objet_test_si_publie($objet, $id_objet);
338
-			include_spip('action/editer_objet');
339
-			objet_modifier($objet, $id_objet, $set);
340
-			$publie_apres = objet_test_si_publie($objet, $id_objet);
341
-			if ($publie_avant !== $publie_apres) {
342
-				// on refuse ajax pour forcer le rechargement de la page ici
343
-				// on refera traiter une 2eme fois, mais c'est sans consequence
344
-				refuser_traiter_formulaire_ajax();
345
-			}
346
-		}
347
-	}
348
-
349
-	if ($retour) {
350
-		$res['redirect'] = $retour;
351
-	}
352
-
353
-	set_request('date_jour');
354
-	set_request('date_redac_jour');
355
-	set_request('date_heure');
356
-	set_request('date_redac_heure');
357
-
358
-	return $res;
286
+    $res = ['editable' => ' '];
287
+
288
+    if (_request('changer')) {
289
+        $table = table_objet($objet);
290
+        $trouver_table = charger_fonction('trouver_table', 'base');
291
+        $desc = $trouver_table($table);
292
+
293
+        if (!$desc) {
294
+            return ['message_erreur' => _L('erreur')];
295
+        } #impossible en principe
296
+
297
+        $champ_date = $desc['date'] ?: 'date';
298
+        if (isset($options['champ_date']) and $options['champ_date']) {
299
+            $champ_date = $options['champ_date'];
300
+        }
301
+
302
+        $set = [];
303
+
304
+        $charger = charger_fonction('charger', 'formulaires/dater/');
305
+        $v = $charger($objet, $id_objet, $retour, $options);
306
+
307
+        if ($v['_editer_date']) {
308
+            if (!$d = dater_recuperer_date_saisie(_request('date_jour'))) {
309
+                $d = [date('Y'), date('m'), date('d')];
310
+            }
311
+            if (!$h = dater_recuperer_heure_saisie(_request('date_heure'))) {
312
+                $h = [0, 0];
313
+            }
314
+
315
+            $set[$champ_date] = sql_format_date($d[0], $d[1], $d[2], $h[0], $h[1]);
316
+        }
317
+
318
+        $champ_date_redac = 'date_redac';
319
+        if (isset($options['champ_date_redac']) and $options['champ_date_redac']) {
320
+            $champ_date_redac = $options['champ_date_redac'];
321
+        }
322
+        if (isset($desc['field'][$champ_date_redac]) and $v['_editer_date_anterieure']) {
323
+            if (!_request('date_redac_jour') or _request('sans_redac')) {
324
+                $set[$champ_date_redac] = sql_format_date(0, 0, 0, 0, 0, 0);
325
+            } else {
326
+                if (!$d = dater_recuperer_date_saisie(_request('date_redac_jour'), 'date_redac')) {
327
+                    $d = [date('Y'), date('m'), date('d')];
328
+                }
329
+                if (!$h = dater_recuperer_heure_saisie(_request('date_redac_heure'))) {
330
+                    $h = [0, 0];
331
+                }
332
+                $set[$champ_date_redac] = sql_format_date($d[0], $d[1], $d[2], $h[0], $h[1]);
333
+            }
334
+        }
335
+
336
+        if (count($set)) {
337
+            $publie_avant = objet_test_si_publie($objet, $id_objet);
338
+            include_spip('action/editer_objet');
339
+            objet_modifier($objet, $id_objet, $set);
340
+            $publie_apres = objet_test_si_publie($objet, $id_objet);
341
+            if ($publie_avant !== $publie_apres) {
342
+                // on refuse ajax pour forcer le rechargement de la page ici
343
+                // on refera traiter une 2eme fois, mais c'est sans consequence
344
+                refuser_traiter_formulaire_ajax();
345
+            }
346
+        }
347
+    }
348
+
349
+    if ($retour) {
350
+        $res['redirect'] = $retour;
351
+    }
352
+
353
+    set_request('date_jour');
354
+    set_request('date_redac_jour');
355
+    set_request('date_heure');
356
+    set_request('date_redac_heure');
357
+
358
+    return $res;
359 359
 }
360 360
 
361 361
 /**
@@ -366,24 +366,24 @@  discard block
 block discarded – undo
366 366
  * @return array|string Chaîne vide si date invalide, tableau (année, mois, jour) sinon.
367 367
  */
368 368
 function dater_recuperer_date_saisie($post, $quoi = 'date') {
369
-	if (!preg_match('#^(?:(?:([0-9]{1,2})[/-])?([0-9]{1,2})[/-])?([0-9]{4}|[0-9]{1,2})#', $post, $regs)) {
370
-		return '';
371
-	}
372
-	if ($quoi == 'date_redac') {
373
-		if ($regs[3] <> '' and $regs[3] < 1001) {
374
-			$regs[3] += 9000;
375
-		}
376
-
377
-		return [$regs[3], $regs[2], $regs[1]];
378
-	} else {
379
-		if (
380
-			checkdate(intval($regs[2]), intval($regs[1]), intval($regs[3]))
381
-			and $t = mktime(0, 0, 0, $regs[2], $regs[1], $regs[3])
382
-		) {
383
-			return [date('Y', $t), date('m', $t), date('d', $t)];
384
-		}
385
-		return '';
386
-	}
369
+    if (!preg_match('#^(?:(?:([0-9]{1,2})[/-])?([0-9]{1,2})[/-])?([0-9]{4}|[0-9]{1,2})#', $post, $regs)) {
370
+        return '';
371
+    }
372
+    if ($quoi == 'date_redac') {
373
+        if ($regs[3] <> '' and $regs[3] < 1001) {
374
+            $regs[3] += 9000;
375
+        }
376
+
377
+        return [$regs[3], $regs[2], $regs[1]];
378
+    } else {
379
+        if (
380
+            checkdate(intval($regs[2]), intval($regs[1]), intval($regs[3]))
381
+            and $t = mktime(0, 0, 0, $regs[2], $regs[1], $regs[3])
382
+        ) {
383
+            return [date('Y', $t), date('m', $t), date('d', $t)];
384
+        }
385
+        return '';
386
+    }
387 387
 }
388 388
 
389 389
 /**
@@ -393,12 +393,12 @@  discard block
 block discarded – undo
393 393
  * @return array
394 394
  */
395 395
 function dater_recuperer_heure_saisie($post) {
396
-	if (!preg_match('#([0-9]{1,2})(?:[h:](?:([0-9]{1,2}))?)?#', $post, $regs)) {
397
-		return '';
398
-	}
399
-	if ($regs[1] > 23 or $regs[2] > 59) {
400
-		return '';
401
-	}
402
-
403
-	return [$regs[1], $regs[2]];
396
+    if (!preg_match('#([0-9]{1,2})(?:[h:](?:([0-9]{1,2}))?)?#', $post, $regs)) {
397
+        return '';
398
+    }
399
+    if ($regs[1] > 23 or $regs[2] > 59) {
400
+        return '';
401
+    }
402
+
403
+    return [$regs[1], $regs[2]];
404 404
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	}
97 97
 
98 98
 
99
-	$row = sql_fetsel($select, $desc['table'], "$_id_objet=" . intval($id_objet));
99
+	$row = sql_fetsel($select, $desc['table'], "$_id_objet=".intval($id_objet));
100 100
 	$statut = $row['statut'] ?? 'publie'; // pas de statut => publie
101 101
 
102 102
 	$valeurs['editable'] = autoriser('dater', $objet, $id_objet, null, ['statut' => $statut]);
@@ -253,9 +253,9 @@  discard block
 block discarded – undo
253 253
 
254 254
 	if (_request('changer')) {
255 255
 		foreach (['date', 'date_redac'] as $k) {
256
-			if ($v = _request($k . '_jour') and !dater_recuperer_date_saisie($v, $k)) {
256
+			if ($v = _request($k.'_jour') and !dater_recuperer_date_saisie($v, $k)) {
257 257
 				$erreurs[$k] = _T('format_date_incorrecte');
258
-			} elseif ($v = _request($k . '_heure') and !dater_recuperer_heure_saisie($v)) {
258
+			} elseif ($v = _request($k.'_heure') and !dater_recuperer_heure_saisie($v)) {
259 259
 				$erreurs[$k] = _T('format_heure_incorrecte');
260 260
 			}
261 261
 		}
Please login to merge, or discard this patch.
ecrire/inc/filtres_selecteur_generique.php 2 patches
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
-	[$type, , $id, , , , ] = array_pad($match, 7, null);
169
+	[$type,, $id,,,,] = array_pad($match, 7, null);
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) : []);
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.
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 = [], $blacklist = []) {
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 = [];
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 = [
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 = [];
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 = [
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 = [];
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, ['racine', 'rubrique']))) {
118
-					$select[] = $id_objet;
119
-				} elseif (!$type and ($id_objet or in_array($objet, ['racine', 'rubrique']))) {
120
-					$select[] = ['objet' => $objet, 'id_objet' => $id_objet];
121
-				}
122
-			}
123
-		}
124
-	}
125
-
126
-	return $select;
102
+    $select = [];
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, ['racine', 'rubrique']))) {
118
+                    $select[] = $id_objet;
119
+                } elseif (!$type and ($id_objet or in_array($objet, ['racine', 'rubrique']))) {
120
+                    $select[] = ['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 = [];
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
-	[$type, , $id, , , , ] = array_pad($match, 7, null);
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_objet_info($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(['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 = [];
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
+    [$type, , $id, , , , ] = array_pad($match, 7, null);
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_objet_info($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(['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 = []) {
208
-	static $has_child = [];
209
-
210
-	if (!isset($has_child[$id_rubrique])) {
211
-		$types = (is_array($types) ? array_filter($types) : []);
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([], count($has), true));
231
-		}
232
-		if (count($fratrie)) {
233
-			$has_child = $has_child + array_combine($fratrie, array_pad([], count($fratrie), false));
234
-		}
235
-	}
236
-
237
-	return $has_child[$id_rubrique] ? ' ' : '';
208
+    static $has_child = [];
209
+
210
+    if (!isset($has_child[$id_rubrique])) {
211
+        $types = (is_array($types) ? array_filter($types) : []);
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([], count($has), true));
231
+        }
232
+        if (count($fratrie)) {
233
+            $has_child = $has_child + array_combine($fratrie, array_pad([], count($fratrie), false));
234
+        }
235
+    }
236
+
237
+    return $has_child[$id_rubrique] ? ' ' : '';
238 238
 }
Please login to merge, or discard this patch.
ecrire/lang/ecrire_en.php 1 patch
Indentation   +836 added lines, -836 removed lines patch added patch discarded remove patch
@@ -4,429 +4,429 @@  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' => 'Enable plugin',
14
-	'affichage' => 'Display',
15
-	'aide_non_disponible' => 'This part of the online help is not yet available in this language.',
16
-	'annuler_recherche' => 'Cancel the search',
17
-	'auteur' => 'Author:',
18
-	'avis_acces_interdit' => 'Access forbidden.',
19
-	'avis_acces_interdit_prive' => 'You are not allowed to access the page <b>@exec@</b>.',
20
-	'avis_article_modifie' => 'Warning: @nom_auteur_modif@ modified this article @date_diff@ minutes ago',
21
-	'avis_aucun_resultat' => 'No results found.',
22
-	'avis_base_inaccessible' => 'Impossible to connect to the database @base@.',
23
-	'avis_chemin_invalide_1' => 'The path you selected',
24
-	'avis_chemin_invalide_2' => 'does not seem to be valid. Please go back to previous page and check the information you provided.',
25
-	'avis_connexion_echec_1' => 'Connection to the SQL server failed.',
26
-	'avis_connexion_echec_2' => 'Go back to the previous page, and check the information you provided.',
27
-	'avis_connexion_echec_3' => '<b>N.B.</b> On many servers, you must <b>request</b> activation of your access to the SQL database before you can use it. If you cannot connect to your database, check that activation has been done.',
28
-	'avis_connexion_erreur_creer_base' => 'The database could not be created.',
29
-	'avis_connexion_erreur_nom_base' => 'The database’s name should only contain letters, digits and hyphens.',
30
-	'avis_connexion_ldap_echec_1' => 'Connection to the LDAP server failed.',
31
-	'avis_connexion_ldap_echec_2' => 'Go back to the previous page, and check the information you provided.',
32
-	'avis_connexion_ldap_echec_3' => 'Alternatively, do not use LDAP support to import users.',
33
-	'avis_deplacement_rubrique' => 'Warning! This section contains @contient_breves@ news item@scb@: if you move it, please check this box to confirm.',
34
-	'avis_erreur_connexion_mysql' => 'SQL connection error',
35
-	'avis_espace_interdit' => '<b>Forbidden area</b> <div>SPIP is already installed.</div>',
36
-	'avis_lecture_noms_bases_1' => 'The installer could not read the names of any databases already installed.',
37
-	'avis_lecture_noms_bases_2' => 'Either no database is available, or the option listing databases was disabled for security reasons (which is the case with various hosting services).',
38
-	'avis_lecture_noms_bases_3' => 'In the second case, a database named after your login might already be available:',
39
-	'avis_non_acces_page' => 'You do not have access to this page.',
40
-	'avis_operation_echec' => 'The operation failed.',
41
-	'avis_operation_impossible' => 'Operation impossible',
42
-	'avis_suppression_base' => 'WARNING: data deletion is irreversible',
12
+    // A
13
+    'activer_plugin' => 'Enable plugin',
14
+    'affichage' => 'Display',
15
+    'aide_non_disponible' => 'This part of the online help is not yet available in this language.',
16
+    'annuler_recherche' => 'Cancel the search',
17
+    'auteur' => 'Author:',
18
+    'avis_acces_interdit' => 'Access forbidden.',
19
+    'avis_acces_interdit_prive' => 'You are not allowed to access the page <b>@exec@</b>.',
20
+    'avis_article_modifie' => 'Warning: @nom_auteur_modif@ modified this article @date_diff@ minutes ago',
21
+    'avis_aucun_resultat' => 'No results found.',
22
+    'avis_base_inaccessible' => 'Impossible to connect to the database @base@.',
23
+    'avis_chemin_invalide_1' => 'The path you selected',
24
+    'avis_chemin_invalide_2' => 'does not seem to be valid. Please go back to previous page and check the information you provided.',
25
+    'avis_connexion_echec_1' => 'Connection to the SQL server failed.',
26
+    'avis_connexion_echec_2' => 'Go back to the previous page, and check the information you provided.',
27
+    'avis_connexion_echec_3' => '<b>N.B.</b> On many servers, you must <b>request</b> activation of your access to the SQL database before you can use it. If you cannot connect to your database, check that activation has been done.',
28
+    'avis_connexion_erreur_creer_base' => 'The database could not be created.',
29
+    'avis_connexion_erreur_nom_base' => 'The database’s name should only contain letters, digits and hyphens.',
30
+    'avis_connexion_ldap_echec_1' => 'Connection to the LDAP server failed.',
31
+    'avis_connexion_ldap_echec_2' => 'Go back to the previous page, and check the information you provided.',
32
+    'avis_connexion_ldap_echec_3' => 'Alternatively, do not use LDAP support to import users.',
33
+    'avis_deplacement_rubrique' => 'Warning! This section contains @contient_breves@ news item@scb@: if you move it, please check this box to confirm.',
34
+    'avis_erreur_connexion_mysql' => 'SQL connection error',
35
+    'avis_espace_interdit' => '<b>Forbidden area</b> <div>SPIP is already installed.</div>',
36
+    'avis_lecture_noms_bases_1' => 'The installer could not read the names of any databases already installed.',
37
+    'avis_lecture_noms_bases_2' => 'Either no database is available, or the option listing databases was disabled for security reasons (which is the case with various hosting services).',
38
+    'avis_lecture_noms_bases_3' => 'In the second case, a database named after your login might already be available:',
39
+    'avis_non_acces_page' => 'You do not have access to this page.',
40
+    'avis_operation_echec' => 'The operation failed.',
41
+    'avis_operation_impossible' => 'Operation impossible',
42
+    'avis_suppression_base' => 'WARNING: data deletion is irreversible',
43 43
 
44
-	// B
45
-	'bouton_acces_ldap' => 'Add LDAP access',
46
-	'bouton_ajouter' => 'Add',
47
-	'bouton_annuler' => 'Cancel',
48
-	'bouton_cache_activer' => 'Re-activate the cache',
49
-	'bouton_cache_desactiver' => 'Disable the cache momentarily',
50
-	'bouton_demande_publication' => 'Request publication of this article',
51
-	'bouton_desactive_tout' => 'Disable all',
52
-	'bouton_desinstaller' => 'Uninstall',
53
-	'bouton_effacer_tout' => 'Delete ALL',
54
-	'bouton_envoyer_message' => 'Message complete: send',
55
-	'bouton_fermer' => 'Close',
56
-	'bouton_mettre_a_jour_base' => 'Update the database',
57
-	'bouton_modifier' => 'Modify',
58
-	'bouton_radio_afficher' => 'Show',
59
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Appear in the list of editors online',
60
-	'bouton_radio_envoi_annonces_adresse' => 'Send announcements to:',
61
-	'bouton_radio_envoi_liste_nouveautes' => 'Send news update list',
62
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Do not appear in the list of editors online',
63
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Do not send any editorial announcements',
64
-	'bouton_redirection' => 'REDIRECT',
65
-	'bouton_reinitialiser_aux_valeurs_par_defaut' => 'Reset to default values',
66
-	'bouton_relancer_inscription' => 'Re-launch registration',
67
-	'bouton_relancer_inscriptions' => 'Re-launch registrations',
68
-	'bouton_relancer_installation' => 'Recommence installation',
69
-	'bouton_reset_password' => 'Create a new password and send by e-mail',
70
-	'bouton_suivant' => 'Next',
71
-	'bouton_tenter_recuperation' => 'Attempt to repair',
72
-	'bouton_test_proxy' => 'Test the proxy',
73
-	'bouton_vider_cache' => 'Empty the cache',
44
+    // B
45
+    'bouton_acces_ldap' => 'Add LDAP access',
46
+    'bouton_ajouter' => 'Add',
47
+    'bouton_annuler' => 'Cancel',
48
+    'bouton_cache_activer' => 'Re-activate the cache',
49
+    'bouton_cache_desactiver' => 'Disable the cache momentarily',
50
+    'bouton_demande_publication' => 'Request publication of this article',
51
+    'bouton_desactive_tout' => 'Disable all',
52
+    'bouton_desinstaller' => 'Uninstall',
53
+    'bouton_effacer_tout' => 'Delete ALL',
54
+    'bouton_envoyer_message' => 'Message complete: send',
55
+    'bouton_fermer' => 'Close',
56
+    'bouton_mettre_a_jour_base' => 'Update the database',
57
+    'bouton_modifier' => 'Modify',
58
+    'bouton_radio_afficher' => 'Show',
59
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Appear in the list of editors online',
60
+    'bouton_radio_envoi_annonces_adresse' => 'Send announcements to:',
61
+    'bouton_radio_envoi_liste_nouveautes' => 'Send news update list',
62
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Do not appear in the list of editors online',
63
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Do not send any editorial announcements',
64
+    'bouton_redirection' => 'REDIRECT',
65
+    'bouton_reinitialiser_aux_valeurs_par_defaut' => 'Reset to default values',
66
+    'bouton_relancer_inscription' => 'Re-launch registration',
67
+    'bouton_relancer_inscriptions' => 'Re-launch registrations',
68
+    'bouton_relancer_installation' => 'Recommence installation',
69
+    'bouton_reset_password' => 'Create a new password and send by e-mail',
70
+    'bouton_suivant' => 'Next',
71
+    'bouton_tenter_recuperation' => 'Attempt to repair',
72
+    'bouton_test_proxy' => 'Test the proxy',
73
+    'bouton_vider_cache' => 'Empty the cache',
74 74
 
75
-	// C
76
-	'cache_modifiable_webmestre' => 'This parameter can be modified by the webmaster.',
77
-	'calendrier_synchro' => 'If you use a calendar application compatible with <b>iCal</b>, you can synchronise it with information from this site.',
78
-	'config_activer_champs' => 'Activate the following fields',
79
-	'config_choix_base_sup' => 'Choose a database on this server',
80
-	'config_erreur_base_sup' => 'SPIP does not have access to the list of databases available',
81
-	'config_info_base_sup' => 'If you need to query other databases using SPIP, whether on this SQL server or elsewhere, use this form to declare them. If you leave any fields empty, connection details to the main database will be used.',
82
-	'config_info_base_sup_disponibles' => 'Additional databases to which queries may be sent:',
83
-	'config_info_enregistree' => 'The new configuration has been saved',
84
-	'config_info_logos' => 'Each element of the site can have its own logo as well as a "mouseover" logo',
85
-	'config_info_logos_utiliser' => 'Use logos',
86
-	'config_info_logos_utiliser_non' => 'Do not use logos',
87
-	'config_info_logos_utiliser_survol' => 'Use "mouseover" logos',
88
-	'config_info_logos_utiliser_survol_non' => 'Do not use "mouseover" logos',
89
-	'config_info_redirection' => 'By activating this option you can create virtual articles, which are simply links to articles published on other sites, not necessarily using SPIP.',
90
-	'config_redirection' => 'Virtual articles',
91
-	'config_titre_base_sup' => 'Declaration of an additional database',
92
-	'config_titre_base_sup_choix' => 'Choose an additional database',
93
-	'connexion_ldap' => 'Connection:',
94
-	'creer_et_associer_un_auteur' => 'Create and associate an author',
75
+    // C
76
+    'cache_modifiable_webmestre' => 'This parameter can be modified by the webmaster.',
77
+    'calendrier_synchro' => 'If you use a calendar application compatible with <b>iCal</b>, you can synchronise it with information from this site.',
78
+    'config_activer_champs' => 'Activate the following fields',
79
+    'config_choix_base_sup' => 'Choose a database on this server',
80
+    'config_erreur_base_sup' => 'SPIP does not have access to the list of databases available',
81
+    'config_info_base_sup' => 'If you need to query other databases using SPIP, whether on this SQL server or elsewhere, use this form to declare them. If you leave any fields empty, connection details to the main database will be used.',
82
+    'config_info_base_sup_disponibles' => 'Additional databases to which queries may be sent:',
83
+    'config_info_enregistree' => 'The new configuration has been saved',
84
+    'config_info_logos' => 'Each element of the site can have its own logo as well as a "mouseover" logo',
85
+    'config_info_logos_utiliser' => 'Use logos',
86
+    'config_info_logos_utiliser_non' => 'Do not use logos',
87
+    'config_info_logos_utiliser_survol' => 'Use "mouseover" logos',
88
+    'config_info_logos_utiliser_survol_non' => 'Do not use "mouseover" logos',
89
+    'config_info_redirection' => 'By activating this option you can create virtual articles, which are simply links to articles published on other sites, not necessarily using SPIP.',
90
+    'config_redirection' => 'Virtual articles',
91
+    'config_titre_base_sup' => 'Declaration of an additional database',
92
+    'config_titre_base_sup_choix' => 'Choose an additional database',
93
+    'connexion_ldap' => 'Connection:',
94
+    'creer_et_associer_un_auteur' => 'Create and associate an author',
95 95
 
96
-	// D
97
-	'date_mot_heures' => 'H',
96
+    // D
97
+    'date_mot_heures' => 'H',
98 98
 
99
-	// E
100
-	'ecran_connexion_couleur_principale' => 'Main colour',
101
-	'ecran_connexion_image_fond' => 'Background image',
102
-	'ecran_connexion_image_fond_explication' => 'Use an image (JPEG format, 1920x1080 pixels)',
103
-	'ecran_connexion_image_revenir_couleur_defaut' => 'Back to the default colour',
104
-	'ecran_connexion_titre' => 'Connection screen',
105
-	'ecran_securite' => '+ safety screen @version@',
106
-	'email' => 'email',
107
-	'email_2' => 'email:',
108
-	'en_savoir_plus' => 'Learn more',
109
-	'entree_adresse_annuaire' => 'Directory address',
110
-	'entree_adresse_email' => 'Your email address',
111
-	'entree_adresse_email_2' => 'E-mail address',
112
-	'entree_base_donnee_1' => 'Database address',
113
-	'entree_base_donnee_2' => '(This address is often your site’s URL, although sometimes it will be "localhost", and sometimes it should be left blank.)',
114
-	'entree_biographie' => 'Brief biography',
115
-	'entree_chemin_acces' => '<b>Enter</b> the path:',
116
-	'entree_cle_pgp' => 'Your PGP key',
117
-	'entree_cle_pgp_2' => 'PGP key',
118
-	'entree_contenu_rubrique' => '(Brief description of the content of this section.)',
119
-	'entree_identifiants_connexion' => 'Your connection identifiers...',
120
-	'entree_identifiants_connexion_2' => 'Connection identifiers',
121
-	'entree_informations_connexion_ldap' => 'Please fill this form with the LDAP connection information provided by your system or network administrator.',
122
-	'entree_infos_perso' => 'Who are you?',
123
-	'entree_infos_perso_2' => 'Who is the author?',
124
-	'entree_interieur_rubrique' => 'In the section:',
125
-	'entree_liens_sites' => '<b>Hyperlink</b> (reference, site to visit etc.)',
126
-	'entree_login' => 'Your login',
127
-	'entree_login_connexion_1' => 'Connection login',
128
-	'entree_login_connexion_2' => '(Sometimes matches your FTP account login and sometimes left empty)',
129
-	'entree_mot_passe' => 'Your password',
130
-	'entree_mot_passe_1' => 'Password',
131
-	'entree_mot_passe_2' => '(Sometimes matches your FTP access password and sometimes left empty)',
132
-	'entree_nom_fichier' => 'Please enter the filename @texte_compresse@:',
133
-	'entree_nom_pseudo' => 'Your name or alias',
134
-	'entree_nom_pseudo_1' => '(Your name or alias)',
135
-	'entree_nom_pseudo_2' => 'Name or alias',
136
-	'entree_nom_site' => 'Website’s name',
137
-	'entree_nom_site_2' => 'Author’s website’s name',
138
-	'entree_nouveau_passe' => 'New password',
139
-	'entree_passe_ldap' => 'Password',
140
-	'entree_port_annuaire' => 'Port number of the directory',
141
-	'entree_signature' => 'Signature',
142
-	'entree_titre_obligatoire' => '<b>Title</b> [Required]<br />',
143
-	'entree_url' => 'Website’s URL',
144
-	'entree_url_2' => 'Website’s URL',
145
-	'erreur_connect_deja_existant' => 'A server by that name already exists',
146
-	'erreur_contenu_suspect' => 'Text escaped',
147
-	'erreur_email_deja_existant' => 'This email address has already been registered.',
148
-	'erreur_nom_connect_incorrect' => 'Server name not allowed',
149
-	'erreur_plugin_attribut_balise_manquant' => 'Missing attribute @attribut@ in tag @balise@',
150
-	'erreur_plugin_desinstalation_echouee' => 'Uninstallation of the plugin failed. However, you may deactivate it.',
151
-	'erreur_plugin_fichier_absent' => 'File missing',
152
-	'erreur_plugin_fichier_def_absent' => 'Definition file missing',
153
-	'erreur_plugin_nom_fonction_interdit' => 'Prohibited function name',
154
-	'erreur_plugin_nom_manquant' => 'Missing plugin name',
155
-	'erreur_plugin_prefix_manquant' => 'Namespace undefined for this plugin',
156
-	'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; missing in the definition file',
157
-	'erreur_plugin_version_manquant' => 'Plugin version missing',
158
-	'erreur_type_fichier' => 'Wrong file type',
99
+    // E
100
+    'ecran_connexion_couleur_principale' => 'Main colour',
101
+    'ecran_connexion_image_fond' => 'Background image',
102
+    'ecran_connexion_image_fond_explication' => 'Use an image (JPEG format, 1920x1080 pixels)',
103
+    'ecran_connexion_image_revenir_couleur_defaut' => 'Back to the default colour',
104
+    'ecran_connexion_titre' => 'Connection screen',
105
+    'ecran_securite' => '+ safety screen @version@',
106
+    'email' => 'email',
107
+    'email_2' => 'email:',
108
+    'en_savoir_plus' => 'Learn more',
109
+    'entree_adresse_annuaire' => 'Directory address',
110
+    'entree_adresse_email' => 'Your email address',
111
+    'entree_adresse_email_2' => 'E-mail address',
112
+    'entree_base_donnee_1' => 'Database address',
113
+    'entree_base_donnee_2' => '(This address is often your site’s URL, although sometimes it will be "localhost", and sometimes it should be left blank.)',
114
+    'entree_biographie' => 'Brief biography',
115
+    'entree_chemin_acces' => '<b>Enter</b> the path:',
116
+    'entree_cle_pgp' => 'Your PGP key',
117
+    'entree_cle_pgp_2' => 'PGP key',
118
+    'entree_contenu_rubrique' => '(Brief description of the content of this section.)',
119
+    'entree_identifiants_connexion' => 'Your connection identifiers...',
120
+    'entree_identifiants_connexion_2' => 'Connection identifiers',
121
+    'entree_informations_connexion_ldap' => 'Please fill this form with the LDAP connection information provided by your system or network administrator.',
122
+    'entree_infos_perso' => 'Who are you?',
123
+    'entree_infos_perso_2' => 'Who is the author?',
124
+    'entree_interieur_rubrique' => 'In the section:',
125
+    'entree_liens_sites' => '<b>Hyperlink</b> (reference, site to visit etc.)',
126
+    'entree_login' => 'Your login',
127
+    'entree_login_connexion_1' => 'Connection login',
128
+    'entree_login_connexion_2' => '(Sometimes matches your FTP account login and sometimes left empty)',
129
+    'entree_mot_passe' => 'Your password',
130
+    'entree_mot_passe_1' => 'Password',
131
+    'entree_mot_passe_2' => '(Sometimes matches your FTP access password and sometimes left empty)',
132
+    'entree_nom_fichier' => 'Please enter the filename @texte_compresse@:',
133
+    'entree_nom_pseudo' => 'Your name or alias',
134
+    'entree_nom_pseudo_1' => '(Your name or alias)',
135
+    'entree_nom_pseudo_2' => 'Name or alias',
136
+    'entree_nom_site' => 'Website’s name',
137
+    'entree_nom_site_2' => 'Author’s website’s name',
138
+    'entree_nouveau_passe' => 'New password',
139
+    'entree_passe_ldap' => 'Password',
140
+    'entree_port_annuaire' => 'Port number of the directory',
141
+    'entree_signature' => 'Signature',
142
+    'entree_titre_obligatoire' => '<b>Title</b> [Required]<br />',
143
+    'entree_url' => 'Website’s URL',
144
+    'entree_url_2' => 'Website’s URL',
145
+    'erreur_connect_deja_existant' => 'A server by that name already exists',
146
+    'erreur_contenu_suspect' => 'Text escaped',
147
+    'erreur_email_deja_existant' => 'This email address has already been registered.',
148
+    'erreur_nom_connect_incorrect' => 'Server name not allowed',
149
+    'erreur_plugin_attribut_balise_manquant' => 'Missing attribute @attribut@ in tag @balise@',
150
+    'erreur_plugin_desinstalation_echouee' => 'Uninstallation of the plugin failed. However, you may deactivate it.',
151
+    'erreur_plugin_fichier_absent' => 'File missing',
152
+    'erreur_plugin_fichier_def_absent' => 'Definition file missing',
153
+    'erreur_plugin_nom_fonction_interdit' => 'Prohibited function name',
154
+    'erreur_plugin_nom_manquant' => 'Missing plugin name',
155
+    'erreur_plugin_prefix_manquant' => 'Namespace undefined for this plugin',
156
+    'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; missing in the definition file',
157
+    'erreur_plugin_version_manquant' => 'Plugin version missing',
158
+    'erreur_type_fichier' => 'Wrong file type',
159 159
 
160
-	// H
161
-	'htaccess_a_simuler' => 'Warning: your HTTP server configuration ignores @htaccess@ files. To ensure good security, you should change the configuration for this. Alternatively, you should make sure that the constants @constantes@ (definable in the file mes_options.php) have as values directories outside @document_root@.',
162
-	'htaccess_inoperant' => 'inoperative htaccess',
160
+    // H
161
+    'htaccess_a_simuler' => 'Warning: your HTTP server configuration ignores @htaccess@ files. To ensure good security, you should change the configuration for this. Alternatively, you should make sure that the constants @constantes@ (definable in the file mes_options.php) have as values directories outside @document_root@.',
162
+    'htaccess_inoperant' => 'inoperative htaccess',
163 163
 
164
-	// I
165
-	'ical_info1' => 'This page offers several tools to be kept  up-to-date with website’s activity.',
166
-	'ical_info2' => 'For more information, do not hesitate to visit <a href="@spipnet@">SPIP’s documentation</a>.',
167
-	'ical_info_calendrier' => 'Two calendars are available. The first is a general, public calendar showing  articles as they are published. The second is personal and contains editorial announcements as well as your latest private messages: it is reserved for you via a personal key that you can modify at any time by renewing your password.',
168
-	'ical_methode_http' => 'Downloading',
169
-	'ical_methode_webcal' => 'Synchronisation (webcal://)',
170
-	'ical_texte_js' => 'A line of javascript allows you to easily display the most recent articles published on this site on any other site belonging to you.',
171
-	'ical_texte_prive' => 'This calendar, which is strictly personal, informs you of the private editorial activity of this site (tasks, personal appointments, articles and news items submitted etc.).',
172
-	'ical_texte_public' => 'This calendar allows you to follow the public activity of this site (newly-published articles and news items).',
173
-	'ical_texte_rss' => 'You can syndicate the latest news from this site in any XML/RSS (Rich Site Summary) reader. This is also the format that allows SPIP to read the latest news published by other sites using a compatible exchange format (syndicated sites).',
174
-	'ical_titre_js' => 'Javascript',
175
-	'ical_titre_mailing' => 'Mailing-list',
176
-	'ical_titre_rss' => 'Syndication files',
177
-	'icone_accueil' => 'Home',
178
-	'icone_activer_cookie' => 'Place a cookie',
179
-	'icone_activite' => 'Feedback',
180
-	'icone_admin_plugin' => 'Manage plugins',
181
-	'icone_administration' => 'Maintenance',
182
-	'icone_afficher_auteurs' => 'Show authors',
183
-	'icone_afficher_visiteurs' => 'Show visitors',
184
-	'icone_arret_discussion' => 'Stop participating in this discussion',
185
-	'icone_calendrier' => 'Calendar',
186
-	'icone_configuration' => 'Configuration',
187
-	'icone_creer_auteur' => 'Create a new author and link him/her to this article',
188
-	'icone_creer_mot_cle' => 'Create a new keyword and link it to this article',
189
-	'icone_creer_rubrique_2' => 'Create a new section',
190
-	'icone_developpement' => 'Development',
191
-	'icone_edition' => 'Edit',
192
-	'icone_ma_langue' => 'My language',
193
-	'icone_mes_infos' => 'My details',
194
-	'icone_mes_preferences' => 'Preferences',
195
-	'icone_modifier_article' => 'Edit this article',
196
-	'icone_modifier_rubrique' => 'Edit this section',
197
-	'icone_publication' => 'Publish',
198
-	'icone_relancer_signataire' => 'Contact the signatory again',
199
-	'icone_retour' => 'Back',
200
-	'icone_retour_article' => 'Back to the article',
201
-	'icone_squelette' => 'Templates',
202
-	'icone_suivi_publication' => 'Publication follow up ',
203
-	'icone_supprimer_cookie' => 'Delete cookie',
204
-	'icone_supprimer_rubrique' => 'Delete this section',
205
-	'icone_supprimer_signature' => 'Delete this signature',
206
-	'icone_valider_signature' => 'Validate this signature',
207
-	'image_administrer_rubrique' => 'You can manage this section',
208
-	'impossible_modifier_login_auteur' => 'Login cannot be changed.',
209
-	'impossible_modifier_pass_auteur' => 'Password cannot be changed.',
210
-	'info_1_article' => '1 article',
211
-	'info_1_auteur' => '1 author',
212
-	'info_1_message' => '1 message',
213
-	'info_1_mot_cle' => '1 keyword',
214
-	'info_1_rubrique' => '1 section',
215
-	'info_1_visiteur' => '1 visitor',
216
-	'info_activer_cookie' => 'You can activate an <b>administration cookie</b>, which lets you switch easily between the public website and the admin area.',
217
-	'info_activer_menu_developpement' => 'Show the Development menu',
218
-	'info_admin_etre_webmestre' => 'Give me web administrator rights',
219
-	'info_admin_je_suis_webmestre' => 'I am a <b>webmaster</b>',
220
-	'info_admin_statuer_webmestre' => 'Give webmaster rights to this administrator ',
221
-	'info_admin_webmestre' => 'This administrator is <b>webmaster</b>',
222
-	'info_administrateur' => 'Administrator',
223
-	'info_administrateur_1' => 'Administrator',
224
-	'info_administrateur_2' => 'of the site (<i>use with caution</i>)',
225
-	'info_administrateur_site_01' => 'If you are a site administrator, please',
226
-	'info_administrateur_site_02' => 'click on this link',
227
-	'info_administrateurs' => 'Administrators',
228
-	'info_administrer_rubrique' => 'You can manage this section',
229
-	'info_adresse' => 'to this address:',
230
-	'info_adresse_desinscription' => 'Unsubscription address:',
231
-	'info_adresse_url' => 'URL of the public site',
232
-	'info_afficher_par_nb' => 'Show ',
233
-	'info_aide_en_ligne' => 'SPIP Online Help',
234
-	'info_ajout_image' => 'When you add images as attached documents to an article,
164
+    // I
165
+    'ical_info1' => 'This page offers several tools to be kept  up-to-date with website’s activity.',
166
+    'ical_info2' => 'For more information, do not hesitate to visit <a href="@spipnet@">SPIP’s documentation</a>.',
167
+    'ical_info_calendrier' => 'Two calendars are available. The first is a general, public calendar showing  articles as they are published. The second is personal and contains editorial announcements as well as your latest private messages: it is reserved for you via a personal key that you can modify at any time by renewing your password.',
168
+    'ical_methode_http' => 'Downloading',
169
+    'ical_methode_webcal' => 'Synchronisation (webcal://)',
170
+    'ical_texte_js' => 'A line of javascript allows you to easily display the most recent articles published on this site on any other site belonging to you.',
171
+    'ical_texte_prive' => 'This calendar, which is strictly personal, informs you of the private editorial activity of this site (tasks, personal appointments, articles and news items submitted etc.).',
172
+    'ical_texte_public' => 'This calendar allows you to follow the public activity of this site (newly-published articles and news items).',
173
+    'ical_texte_rss' => 'You can syndicate the latest news from this site in any XML/RSS (Rich Site Summary) reader. This is also the format that allows SPIP to read the latest news published by other sites using a compatible exchange format (syndicated sites).',
174
+    'ical_titre_js' => 'Javascript',
175
+    'ical_titre_mailing' => 'Mailing-list',
176
+    'ical_titre_rss' => 'Syndication files',
177
+    'icone_accueil' => 'Home',
178
+    'icone_activer_cookie' => 'Place a cookie',
179
+    'icone_activite' => 'Feedback',
180
+    'icone_admin_plugin' => 'Manage plugins',
181
+    'icone_administration' => 'Maintenance',
182
+    'icone_afficher_auteurs' => 'Show authors',
183
+    'icone_afficher_visiteurs' => 'Show visitors',
184
+    'icone_arret_discussion' => 'Stop participating in this discussion',
185
+    'icone_calendrier' => 'Calendar',
186
+    'icone_configuration' => 'Configuration',
187
+    'icone_creer_auteur' => 'Create a new author and link him/her to this article',
188
+    'icone_creer_mot_cle' => 'Create a new keyword and link it to this article',
189
+    'icone_creer_rubrique_2' => 'Create a new section',
190
+    'icone_developpement' => 'Development',
191
+    'icone_edition' => 'Edit',
192
+    'icone_ma_langue' => 'My language',
193
+    'icone_mes_infos' => 'My details',
194
+    'icone_mes_preferences' => 'Preferences',
195
+    'icone_modifier_article' => 'Edit this article',
196
+    'icone_modifier_rubrique' => 'Edit this section',
197
+    'icone_publication' => 'Publish',
198
+    'icone_relancer_signataire' => 'Contact the signatory again',
199
+    'icone_retour' => 'Back',
200
+    'icone_retour_article' => 'Back to the article',
201
+    'icone_squelette' => 'Templates',
202
+    'icone_suivi_publication' => 'Publication follow up ',
203
+    'icone_supprimer_cookie' => 'Delete cookie',
204
+    'icone_supprimer_rubrique' => 'Delete this section',
205
+    'icone_supprimer_signature' => 'Delete this signature',
206
+    'icone_valider_signature' => 'Validate this signature',
207
+    'image_administrer_rubrique' => 'You can manage this section',
208
+    'impossible_modifier_login_auteur' => 'Login cannot be changed.',
209
+    'impossible_modifier_pass_auteur' => 'Password cannot be changed.',
210
+    'info_1_article' => '1 article',
211
+    'info_1_auteur' => '1 author',
212
+    'info_1_message' => '1 message',
213
+    'info_1_mot_cle' => '1 keyword',
214
+    'info_1_rubrique' => '1 section',
215
+    'info_1_visiteur' => '1 visitor',
216
+    'info_activer_cookie' => 'You can activate an <b>administration cookie</b>, which lets you switch easily between the public website and the admin area.',
217
+    'info_activer_menu_developpement' => 'Show the Development menu',
218
+    'info_admin_etre_webmestre' => 'Give me web administrator rights',
219
+    'info_admin_je_suis_webmestre' => 'I am a <b>webmaster</b>',
220
+    'info_admin_statuer_webmestre' => 'Give webmaster rights to this administrator ',
221
+    'info_admin_webmestre' => 'This administrator is <b>webmaster</b>',
222
+    'info_administrateur' => 'Administrator',
223
+    'info_administrateur_1' => 'Administrator',
224
+    'info_administrateur_2' => 'of the site (<i>use with caution</i>)',
225
+    'info_administrateur_site_01' => 'If you are a site administrator, please',
226
+    'info_administrateur_site_02' => 'click on this link',
227
+    'info_administrateurs' => 'Administrators',
228
+    'info_administrer_rubrique' => 'You can manage this section',
229
+    'info_adresse' => 'to this address:',
230
+    'info_adresse_desinscription' => 'Unsubscription address:',
231
+    'info_adresse_url' => 'URL of the public site',
232
+    'info_afficher_par_nb' => 'Show ',
233
+    'info_aide_en_ligne' => 'SPIP Online Help',
234
+    'info_ajout_image' => 'When you add images as attached documents to an article,
235 235
   SPIP can automatically create thumbnails from
236 236
   inserted images. This will allow, for instance, the automated
237 237
   creation of a gallery or portfolio.',
238
-	'info_ajouter_rubrique' => 'Add another section to manage:',
239
-	'info_annonce_nouveautes' => 'Latest news announcements',
240
-	'info_article' => 'article',
241
-	'info_article_2' => 'articles',
242
-	'info_article_a_paraitre' => 'Post-dated articles set for publication',
243
-	'info_articles_02' => 'articles',
244
-	'info_articles_2' => 'Articles',
245
-	'info_articles_auteur' => 'Articles by this author',
246
-	'info_articles_miens' => 'My articles',
247
-	'info_articles_tous' => 'All the articles',
248
-	'info_articles_trouves' => 'Articles found',
249
-	'info_attente_validation' => 'Your articles awaiting validation',
250
-	'info_aucun_article' => 'No articles',
251
-	'info_aucun_auteur' => 'No authors',
252
-	'info_aucun_message' => 'No messages',
253
-	'info_aucun_rubrique' => 'No sections',
254
-	'info_aujourdhui' => 'today:',
255
-	'info_auteur_gere_rubriques' => 'This author manages the following sections:',
256
-	'info_auteur_gere_toutes_rubriques' => 'This author manage <b>all the sections</b>',
257
-	'info_auteur_gere_toutes_rubriques_2' => 'I manage <b>all the sections</b>',
258
-	'info_auteurs' => 'Authors',
259
-	'info_auteurs_par_tri' => 'Authors@partri@',
260
-	'info_auteurs_trouves' => 'Authors found',
261
-	'info_authentification_externe' => 'External authentication',
262
-	'info_avertissement' => 'Warning',
263
-	'info_barre_outils' => 'with its toolbar?',
264
-	'info_base_installee' => 'Your database structure has been installed.',
265
-	'info_bio' => 'Biography',
266
-	'info_cache_desactive' => 'The cache is temporarily disabled',
267
-	'info_chapeau' => 'Introduction',
268
-	'info_chapeau_2' => 'Introduction:',
269
-	'info_chemin_acces_1' => 'Options: <b>Access path in directory</b>',
270
-	'info_chemin_acces_2' => 'You must now configure the access path to the directory information. This information is essential to read the user profiles stored in the directory.',
271
-	'info_chemin_acces_annuaire' => 'Options: <b>Access path in directory</b>',
272
-	'info_choix_base' => 'Third step:',
273
-	'info_classement_1' => ' out of @liste@',
274
-	'info_classement_2' => ' out of @liste@',
275
-	'info_code_acces' => 'Do not forget your own access codes!',
276
-	'info_config_suivi' => 'If this address corresponds to a mailing list, you can indicate the subscription address for this list. This may be a URL (e.g. a webpage enabling subscription online), or an email address with a specific subject (for instance: <tt>@adresse_suivi@?subject=subscribe</tt>):',
277
-	'info_config_suivi_explication' => 'You can subscribe to the mailing-list for this site. You will then receive email announcements concerning articles and news items submitted for publication.',
278
-	'info_confirmer_passe' => 'Confirm new password:',
279
-	'info_conflit_edition_avis_non_sauvegarde' => 'Caution: the following fields have been modified elsewhere. Your changes to these fields have therefore not been saved.',
280
-	'info_conflit_edition_differences' => 'Differences:',
281
-	'info_conflit_edition_version_enregistree' => 'Saved version:',
282
-	'info_conflit_edition_votre_version' => 'Your version:',
283
-	'info_connexion_base' => 'Trying to connect to database',
284
-	'info_connexion_base_donnee' => 'Connection to your database',
285
-	'info_connexion_ldap_ok' => '<b>LDAP connection succeeded.</b><p> You can go to the next step.</p>',
286
-	'info_connexion_mysql' => 'Your SQL connection',
287
-	'info_connexion_ok' => 'Connection succeeded.',
288
-	'info_contact' => 'Contact',
289
-	'info_contenu_articles' => 'Article content',
290
-	'info_contributions' => 'Contributions',
291
-	'info_creation_paragraphe' => 'To create paragraphs, just leave blank lines.',
292
-	'info_creation_rubrique' => 'Before writing any articles,<br /> you must create at least one section.<br />',
293
-	'info_creation_tables' => 'Creating the database tables',
294
-	'info_creer_base' => '<b>Create</b> a new database:',
295
-	'info_dans_rubrique' => 'In section:',
296
-	'info_date_publication_anterieure' => 'Previously published on:',
297
-	'info_date_referencement' => 'THIS SITE REFERENCED ON:',
298
-	'info_derniere_etape' => 'Done!',
299
-	'info_descriptif' => 'Description:',
300
-	'info_desinstaller_plugin' => ' deactivates the plugin and deletes the data',
301
-	'info_discussion_cours' => 'Current discussions',
302
-	'info_ecrire_article' => 'Before writing any articles, you must create at least one section.',
303
-	'info_email_envoi' => 'Sender’s email address (optional)',
304
-	'info_email_envoi_txt' => 'Enter the sender’s email address used for sending emails (by default, the recipient’s address is used as the sender’s address) :',
305
-	'info_email_webmestre' => 'Webmaster’s email address',
306
-	'info_envoi_email_automatique' => 'Automated mailing',
307
-	'info_envoyer_maintenant' => 'Send now',
308
-	'info_etape_suivante' => 'Go to the next step',
309
-	'info_etape_suivante_1' => 'You can move on to the next step.',
310
-	'info_etape_suivante_2' => 'You can move on to the next step.',
311
-	'info_exceptions_proxy' => 'Exceptions for the proxy',
312
-	'info_exportation_base' => 'export database to @archive@',
313
-	'info_facilite_suivi_activite' => 'To simplify monitoring of the site’s editorial;
238
+    'info_ajouter_rubrique' => 'Add another section to manage:',
239
+    'info_annonce_nouveautes' => 'Latest news announcements',
240
+    'info_article' => 'article',
241
+    'info_article_2' => 'articles',
242
+    'info_article_a_paraitre' => 'Post-dated articles set for publication',
243
+    'info_articles_02' => 'articles',
244
+    'info_articles_2' => 'Articles',
245
+    'info_articles_auteur' => 'Articles by this author',
246
+    'info_articles_miens' => 'My articles',
247
+    'info_articles_tous' => 'All the articles',
248
+    'info_articles_trouves' => 'Articles found',
249
+    'info_attente_validation' => 'Your articles awaiting validation',
250
+    'info_aucun_article' => 'No articles',
251
+    'info_aucun_auteur' => 'No authors',
252
+    'info_aucun_message' => 'No messages',
253
+    'info_aucun_rubrique' => 'No sections',
254
+    'info_aujourdhui' => 'today:',
255
+    'info_auteur_gere_rubriques' => 'This author manages the following sections:',
256
+    'info_auteur_gere_toutes_rubriques' => 'This author manage <b>all the sections</b>',
257
+    'info_auteur_gere_toutes_rubriques_2' => 'I manage <b>all the sections</b>',
258
+    'info_auteurs' => 'Authors',
259
+    'info_auteurs_par_tri' => 'Authors@partri@',
260
+    'info_auteurs_trouves' => 'Authors found',
261
+    'info_authentification_externe' => 'External authentication',
262
+    'info_avertissement' => 'Warning',
263
+    'info_barre_outils' => 'with its toolbar?',
264
+    'info_base_installee' => 'Your database structure has been installed.',
265
+    'info_bio' => 'Biography',
266
+    'info_cache_desactive' => 'The cache is temporarily disabled',
267
+    'info_chapeau' => 'Introduction',
268
+    'info_chapeau_2' => 'Introduction:',
269
+    'info_chemin_acces_1' => 'Options: <b>Access path in directory</b>',
270
+    'info_chemin_acces_2' => 'You must now configure the access path to the directory information. This information is essential to read the user profiles stored in the directory.',
271
+    'info_chemin_acces_annuaire' => 'Options: <b>Access path in directory</b>',
272
+    'info_choix_base' => 'Third step:',
273
+    'info_classement_1' => ' out of @liste@',
274
+    'info_classement_2' => ' out of @liste@',
275
+    'info_code_acces' => 'Do not forget your own access codes!',
276
+    'info_config_suivi' => 'If this address corresponds to a mailing list, you can indicate the subscription address for this list. This may be a URL (e.g. a webpage enabling subscription online), or an email address with a specific subject (for instance: <tt>@adresse_suivi@?subject=subscribe</tt>):',
277
+    'info_config_suivi_explication' => 'You can subscribe to the mailing-list for this site. You will then receive email announcements concerning articles and news items submitted for publication.',
278
+    'info_confirmer_passe' => 'Confirm new password:',
279
+    'info_conflit_edition_avis_non_sauvegarde' => 'Caution: the following fields have been modified elsewhere. Your changes to these fields have therefore not been saved.',
280
+    'info_conflit_edition_differences' => 'Differences:',
281
+    'info_conflit_edition_version_enregistree' => 'Saved version:',
282
+    'info_conflit_edition_votre_version' => 'Your version:',
283
+    'info_connexion_base' => 'Trying to connect to database',
284
+    'info_connexion_base_donnee' => 'Connection to your database',
285
+    'info_connexion_ldap_ok' => '<b>LDAP connection succeeded.</b><p> You can go to the next step.</p>',
286
+    'info_connexion_mysql' => 'Your SQL connection',
287
+    'info_connexion_ok' => 'Connection succeeded.',
288
+    'info_contact' => 'Contact',
289
+    'info_contenu_articles' => 'Article content',
290
+    'info_contributions' => 'Contributions',
291
+    'info_creation_paragraphe' => 'To create paragraphs, just leave blank lines.',
292
+    'info_creation_rubrique' => 'Before writing any articles,<br /> you must create at least one section.<br />',
293
+    'info_creation_tables' => 'Creating the database tables',
294
+    'info_creer_base' => '<b>Create</b> a new database:',
295
+    'info_dans_rubrique' => 'In section:',
296
+    'info_date_publication_anterieure' => 'Previously published on:',
297
+    'info_date_referencement' => 'THIS SITE REFERENCED ON:',
298
+    'info_derniere_etape' => 'Done!',
299
+    'info_descriptif' => 'Description:',
300
+    'info_desinstaller_plugin' => ' deactivates the plugin and deletes the data',
301
+    'info_discussion_cours' => 'Current discussions',
302
+    'info_ecrire_article' => 'Before writing any articles, you must create at least one section.',
303
+    'info_email_envoi' => 'Sender’s email address (optional)',
304
+    'info_email_envoi_txt' => 'Enter the sender’s email address used for sending emails (by default, the recipient’s address is used as the sender’s address) :',
305
+    'info_email_webmestre' => 'Webmaster’s email address',
306
+    'info_envoi_email_automatique' => 'Automated mailing',
307
+    'info_envoyer_maintenant' => 'Send now',
308
+    'info_etape_suivante' => 'Go to the next step',
309
+    'info_etape_suivante_1' => 'You can move on to the next step.',
310
+    'info_etape_suivante_2' => 'You can move on to the next step.',
311
+    'info_exceptions_proxy' => 'Exceptions for the proxy',
312
+    'info_exportation_base' => 'export database to @archive@',
313
+    'info_facilite_suivi_activite' => 'To simplify monitoring of the site’s editorial;
314 314
   activities, SPIP can send rmail notifications, e.g. to an editors’ mailing list,
315 315
   of publication requests and article validations.',
316
-	'info_fichiers_authent' => 'Authentication file ".htpasswd"',
317
-	'info_forums_abo_invites' => 'Your site contains forums by subscription; visitors may register for them on the public site.',
318
-	'info_gauche_admin_tech' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
316
+    'info_fichiers_authent' => 'Authentication file ".htpasswd"',
317
+    'info_forums_abo_invites' => 'Your site contains forums by subscription; visitors may register for them on the public site.',
318
+    'info_gauche_admin_tech' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
319 319
 maintenance tasks. Some of them require a specific authentication process
320 320
 via FTP.</p>',
321
-	'info_gauche_admin_vider' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
321
+    'info_gauche_admin_vider' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
322 322
 maintenance tasks. Some of them require a specific authentication process
323 323
 via FTP.</p>',
324
-	'info_gauche_auteurs' => 'All the site authors are listed here.
324
+    'info_gauche_auteurs' => 'All the site authors are listed here.
325 325
  The status of each is indicated by the colour of their icon (administrator = green; editor = yellow).',
326
-	'info_gauche_auteurs_exterieurs' => 'Visiting authors, without any access to the site, are indicated by a blue icon; deleted authors by a grey icon.',
327
-	'info_gauche_messagerie' => 'Internal messaging lets you exchange messages between editors, keep memos (for personal use) or, display announcements on the admin area’s homepage (if you are an administrator).',
328
-	'info_gauche_statistiques_referers' => 'This page displays the list of <i>referrers</i>, i.e. websites containing links to your own site, for yesterday and today. The list is reset every 24 hours.',
329
-	'info_gauche_visiteurs_enregistres' => 'You will find here the visitors registered
326
+    'info_gauche_auteurs_exterieurs' => 'Visiting authors, without any access to the site, are indicated by a blue icon; deleted authors by a grey icon.',
327
+    'info_gauche_messagerie' => 'Internal messaging lets you exchange messages between editors, keep memos (for personal use) or, display announcements on the admin area’s homepage (if you are an administrator).',
328
+    'info_gauche_statistiques_referers' => 'This page displays the list of <i>referrers</i>, i.e. websites containing links to your own site, for yesterday and today. The list is reset every 24 hours.',
329
+    'info_gauche_visiteurs_enregistres' => 'You will find here the visitors registered
330 330
  for the public area of the site (subscription-only forums).',
331
-	'info_generation_miniatures_images' => 'Generation of thumbnail images',
332
-	'info_gerer_trad_objets' => '@objets@: manage translation links',
333
-	'info_hebergeur_desactiver_envoi_email' => 'Some hosts disable automated mail sending
331
+    'info_generation_miniatures_images' => 'Generation of thumbnail images',
332
+    'info_gerer_trad_objets' => '@objets@: manage translation links',
333
+    'info_hebergeur_desactiver_envoi_email' => 'Some hosts disable automated mail sending
334 334
 		on their servers. In this case the following features
335 335
 		of SPIP cannot be implemented.',
336
-	'info_hier' => 'yesterday:',
337
-	'info_identification_publique' => 'Your public identity...',
338
-	'info_image_process' => 'Select the best method to create thumbnails by clicking on the corresponding picture.',
339
-	'info_image_process2' => 'If you can’t see any images, then your server is not configured to use such tools. If you want to use these features, contact your provider’s technical support and ask for the «GD» or «Imagick» extensions to be installed.',
340
-	'info_images_auto' => 'Images calculated automatically',
341
-	'info_informations_personnelles' => 'Personal information',
342
-	'info_inscription' => 'Registered on',
343
-	'info_inscription_automatique' => 'Automatic registration for new editors',
344
-	'info_jeu_caractere' => 'Character set for the site',
345
-	'info_jours' => 'days',
346
-	'info_laisser_champs_vides' => 'leave these fields empty)',
347
-	'info_langues' => 'Site languages',
348
-	'info_ldap_ok' => 'LDAP authentication is installed.',
349
-	'info_lien_hypertexte' => 'Hyperlink:',
350
-	'info_liste_nouveautes_envoyee' => 'The news update list has been sent',
351
-	'info_liste_redacteurs_connectes' => 'List of editors online',
352
-	'info_login_existant' => 'This login already exists.',
353
-	'info_login_trop_court' => 'Login too short.',
354
-	'info_login_trop_court_car_pluriel' => 'Your login must contain at least @nb@ characters.',
355
-	'info_logos' => 'Logos',
356
-	'info_maximum' => 'maximum:',
357
-	'info_meme_rubrique' => 'In this section',
358
-	'info_message_en_redaction' => 'Your draft messages',
359
-	'info_message_technique' => 'Technical message:',
360
-	'info_messagerie_interne' => 'Internal messaging',
361
-	'info_mise_a_niveau_base' => 'SQL database upgrade',
362
-	'info_mise_a_niveau_base_2' => '{{Warning!}} You have installed an {older} SPIP version, prior to the one
336
+    'info_hier' => 'yesterday:',
337
+    'info_identification_publique' => 'Your public identity...',
338
+    'info_image_process' => 'Select the best method to create thumbnails by clicking on the corresponding picture.',
339
+    'info_image_process2' => 'If you can’t see any images, then your server is not configured to use such tools. If you want to use these features, contact your provider’s technical support and ask for the «GD» or «Imagick» extensions to be installed.',
340
+    'info_images_auto' => 'Images calculated automatically',
341
+    'info_informations_personnelles' => 'Personal information',
342
+    'info_inscription' => 'Registered on',
343
+    'info_inscription_automatique' => 'Automatic registration for new editors',
344
+    'info_jeu_caractere' => 'Character set for the site',
345
+    'info_jours' => 'days',
346
+    'info_laisser_champs_vides' => 'leave these fields empty)',
347
+    'info_langues' => 'Site languages',
348
+    'info_ldap_ok' => 'LDAP authentication is installed.',
349
+    'info_lien_hypertexte' => 'Hyperlink:',
350
+    'info_liste_nouveautes_envoyee' => 'The news update list has been sent',
351
+    'info_liste_redacteurs_connectes' => 'List of editors online',
352
+    'info_login_existant' => 'This login already exists.',
353
+    'info_login_trop_court' => 'Login too short.',
354
+    'info_login_trop_court_car_pluriel' => 'Your login must contain at least @nb@ characters.',
355
+    'info_logos' => 'Logos',
356
+    'info_maximum' => 'maximum:',
357
+    'info_meme_rubrique' => 'In this section',
358
+    'info_message_en_redaction' => 'Your draft messages',
359
+    'info_message_technique' => 'Technical message:',
360
+    'info_messagerie_interne' => 'Internal messaging',
361
+    'info_mise_a_niveau_base' => 'SQL database upgrade',
362
+    'info_mise_a_niveau_base_2' => '{{Warning!}} You have installed an {older} SPIP version, prior to the one
363 363
   originally installed on this website: your database is at risk of being corrupted
364 364
   and your site might not work properly anymore.<br />{{Please, re-install
365 365
   SPIP files.}}',
366
-	'info_modification_enregistree' => 'Your changes have been saved',
367
-	'info_modifier_auteur' => 'Edit author details:',
368
-	'info_modifier_rubrique' => 'Edit the section:',
369
-	'info_modifier_titre' => 'Edit: @titre@',
370
-	'info_mon_site_spip' => 'My SPIP site',
371
-	'info_moyenne' => 'average:',
372
-	'info_multi_cet_article' => 'Language for this article:',
373
-	'info_multi_langues_choisies' => 'Please select the languages to be made available to the editors of your site.
366
+    'info_modification_enregistree' => 'Your changes have been saved',
367
+    'info_modifier_auteur' => 'Edit author details:',
368
+    'info_modifier_rubrique' => 'Edit the section:',
369
+    'info_modifier_titre' => 'Edit: @titre@',
370
+    'info_mon_site_spip' => 'My SPIP site',
371
+    'info_moyenne' => 'average:',
372
+    'info_multi_cet_article' => 'Language for this article:',
373
+    'info_multi_langues_choisies' => 'Please select the languages to be made available to the editors of your site.
374 374
   Languages already used on your site (at the top of the list) cannot be disabled.',
375
-	'info_multi_objets' => '@objets@: activate the language menu',
376
-	'info_multi_secteurs' => '... only for root-level sections?',
377
-	'info_nb_articles' => '@nb@ articles',
378
-	'info_nb_auteurs' => '@nb@ authors',
379
-	'info_nb_messages' => '@nb@ messages',
380
-	'info_nb_mots_cles' => '@nb@ keywords',
381
-	'info_nb_rubriques' => '@nb@ sections',
382
-	'info_nb_visiteurs' => '@nb@ visitors',
383
-	'info_nom' => 'Name',
384
-	'info_nom_destinataire' => 'Name of recipient',
385
-	'info_nom_pas_conforme' => 'html tags are not allowed',
386
-	'info_nom_site' => 'Name of your site',
387
-	'info_nombre_articles' => '@nb_articles@ articles,',
388
-	'info_nombre_rubriques' => '@nb_rubriques@ sections,',
389
-	'info_nombre_sites' => '@nb_sites@ sites,',
390
-	'info_non_deplacer' => 'Do not move...',
391
-	'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP can send a site newsletter (list of newly-published articles and news items).
375
+    'info_multi_objets' => '@objets@: activate the language menu',
376
+    'info_multi_secteurs' => '... only for root-level sections?',
377
+    'info_nb_articles' => '@nb@ articles',
378
+    'info_nb_auteurs' => '@nb@ authors',
379
+    'info_nb_messages' => '@nb@ messages',
380
+    'info_nb_mots_cles' => '@nb@ keywords',
381
+    'info_nb_rubriques' => '@nb@ sections',
382
+    'info_nb_visiteurs' => '@nb@ visitors',
383
+    'info_nom' => 'Name',
384
+    'info_nom_destinataire' => 'Name of recipient',
385
+    'info_nom_pas_conforme' => 'html tags are not allowed',
386
+    'info_nom_site' => 'Name of your site',
387
+    'info_nombre_articles' => '@nb_articles@ articles,',
388
+    'info_nombre_rubriques' => '@nb_rubriques@ sections,',
389
+    'info_nombre_sites' => '@nb_sites@ sites,',
390
+    'info_non_deplacer' => 'Do not move...',
391
+    'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP can send a site newsletter (list of newly-published articles and news items).
392 392
   .',
393
-	'info_non_envoi_liste_nouveautes' => 'Do not send newsletter',
394
-	'info_non_modifiable' => 'cannot be modified',
395
-	'info_non_suppression_mot_cle' => 'I do not want to delete this keyword.',
396
-	'info_notes' => 'Footnotes',
397
-	'info_nouvel_article' => 'New article',
398
-	'info_nouvelle_traduction' => 'New translation:',
399
-	'info_numero_article' => 'ARTICLE NUMBER:',
400
-	'info_obligatoire_02' => '(Required)',
401
-	'info_option_accepter_visiteurs' => 'Allow visitor registration via the public site',
402
-	'info_option_ne_pas_accepter_visiteurs' => 'Disable visitor registration',
403
-	'info_options_avancees' => 'ADVANCED OPTIONS',
404
-	'info_ou' => 'or...',
405
-	'info_page_interdite' => 'Forbidden page',
406
-	'info_par_nom' => 'by name',
407
-	'info_par_nombre_article' => 'by number of articles',
408
-	'info_par_statut' => 'by status',
409
-	'info_par_tri' => '’(by @tri@)’',
410
-	'info_passe_trop_court' => 'Password too short.',
411
-	'info_passe_trop_court_car_pluriel' => 'Your password must contain at least @nb@ characters.',
412
-	'info_passes_identiques' => 'The two passwords are not identical.',
413
-	'info_plus_cinq_car' => 'more than 5 characters',
414
-	'info_plus_cinq_car_2' => '(More than 5 characters)',
415
-	'info_plus_trois_car' => '(More than 3 characters)',
416
-	'info_popularite' => 'popularity: @popularite@; visits: @visites@',
417
-	'info_post_scriptum' => 'Postscript',
418
-	'info_post_scriptum_2' => 'Postscript:',
419
-	'info_pour' => 'for',
420
-	'info_preview_texte' => 'It is possible to preview the site’s  various editorial elements with at least the "submitted" status, as well as the"editing in progress" elements of which you are the author. Should this preview mode be restricted to administrators, open to all authors, or disabled completely?',
421
-	'info_procedez_par_etape' => 'please proceed step by step',
422
-	'info_procedure_maj_version' => 'the upgrade procedure must be run to adapt
393
+    'info_non_envoi_liste_nouveautes' => 'Do not send newsletter',
394
+    'info_non_modifiable' => 'cannot be modified',
395
+    'info_non_suppression_mot_cle' => 'I do not want to delete this keyword.',
396
+    'info_notes' => 'Footnotes',
397
+    'info_nouvel_article' => 'New article',
398
+    'info_nouvelle_traduction' => 'New translation:',
399
+    'info_numero_article' => 'ARTICLE NUMBER:',
400
+    'info_obligatoire_02' => '(Required)',
401
+    'info_option_accepter_visiteurs' => 'Allow visitor registration via the public site',
402
+    'info_option_ne_pas_accepter_visiteurs' => 'Disable visitor registration',
403
+    'info_options_avancees' => 'ADVANCED OPTIONS',
404
+    'info_ou' => 'or...',
405
+    'info_page_interdite' => 'Forbidden page',
406
+    'info_par_nom' => 'by name',
407
+    'info_par_nombre_article' => 'by number of articles',
408
+    'info_par_statut' => 'by status',
409
+    'info_par_tri' => '’(by @tri@)’',
410
+    'info_passe_trop_court' => 'Password too short.',
411
+    'info_passe_trop_court_car_pluriel' => 'Your password must contain at least @nb@ characters.',
412
+    'info_passes_identiques' => 'The two passwords are not identical.',
413
+    'info_plus_cinq_car' => 'more than 5 characters',
414
+    'info_plus_cinq_car_2' => '(More than 5 characters)',
415
+    'info_plus_trois_car' => '(More than 3 characters)',
416
+    'info_popularite' => 'popularity: @popularite@; visits: @visites@',
417
+    'info_post_scriptum' => 'Postscript',
418
+    'info_post_scriptum_2' => 'Postscript:',
419
+    'info_pour' => 'for',
420
+    'info_preview_texte' => 'It is possible to preview the site’s  various editorial elements with at least the "submitted" status, as well as the"editing in progress" elements of which you are the author. Should this preview mode be restricted to administrators, open to all authors, or disabled completely?',
421
+    'info_procedez_par_etape' => 'please proceed step by step',
422
+    'info_procedure_maj_version' => 'the upgrade procedure must be run to adapt
423 423
  the database to this new version of SPIP.',
424
-	'info_proxy_ok' => 'Proxy test successful.',
425
-	'info_ps' => 'P.S.',
426
-	'info_publier' => 'publish',
427
-	'info_publies' => 'Your articles published online',
428
-	'info_question_accepter_visiteurs' => 'If your website’s templates allows visitors to register with no access to the admin area, please activate the following option:',
429
-	'info_question_inscription_nouveaux_redacteurs' => 'Do you wish to allow new editors to register
424
+    'info_proxy_ok' => 'Proxy test successful.',
425
+    'info_ps' => 'P.S.',
426
+    'info_publier' => 'publish',
427
+    'info_publies' => 'Your articles published online',
428
+    'info_question_accepter_visiteurs' => 'If your website’s templates allows visitors to register with no access to the admin area, please activate the following option:',
429
+    'info_question_inscription_nouveaux_redacteurs' => 'Do you wish to allow new editors to register
430 430
  from the public website? If you agree with this, visitors will be able to  register
431 431
   using an automatic form, and then access the admin area to
432 432
   write their own articles. <div class="notice">During the registration process, users usually receive an automatic email
@@ -434,403 +434,403 @@  discard block
 block discarded – undo
434 434
   service providers disallow sending emails from their
435 435
   servers: in that case, automated registration is not
436 436
   possible.</div>',
437
-	'info_qui_edite' => '@nom_auteur_modif@ worked on the contents @date_diff@ minutes ago',
438
-	'info_racine_site' => 'Site root',
439
-	'info_recharger_page' => 'Please wait a few moments, then reload this page.',
440
-	'info_recherche_auteur_zero' => 'No results for "@cherche_auteur@".',
441
-	'info_recommencer' => 'Please try again.',
442
-	'info_redacteur_1' => 'Editor',
443
-	'info_redacteur_2' => 'with access to the admin area (<i>recommended</i>)',
444
-	'info_redacteurs' => 'Editors',
445
-	'info_redaction_en_cours' => 'EDITING IN PROGRESS',
446
-	'info_redirection' => 'Redirection',
447
-	'info_redirection_activee' => 'Redirection is enabled.',
448
-	'info_redirection_boucle' => 'You are trying to redirect the article toward itself. ',
449
-	'info_redirection_desactivee' => 'Redirection is deleted.',
450
-	'info_refuses' => 'Your rejected articles ',
451
-	'info_reglage_ldap' => 'Options: <b>Adjusting LDAP import</b>',
452
-	'info_renvoi_article' => '<b>Redirection.</b> This article redirects to:',
453
-	'info_reserve_admin' => 'Only administrators can modify this address.',
454
-	'info_restreindre_rubrique' => 'Restrict management to section:',
455
-	'info_resultat_recherche' => 'Search results:',
456
-	'info_rubriques' => 'Sections',
457
-	'info_rubriques_02' => 'sections',
458
-	'info_rubriques_trouvees' => 'Sections found',
459
-	'info_sans_titre' => 'Untitled',
460
-	'info_selection_chemin_acces' => '<b>Select</b> the access path in the directory:',
461
-	'info_signatures' => 'signatures',
462
-	'info_site' => 'Site',
463
-	'info_site_2' => 'site:',
464
-	'info_site_min' => 'site',
465
-	'info_site_reference_2' => 'Referenced site',
466
-	'info_site_web' => 'Web site:',
467
-	'info_sites' => 'sites',
468
-	'info_sites_lies_mot' => 'Referenced sites with this keyword',
469
-	'info_sites_proxy' => 'Using a proxy',
470
-	'info_sites_trouves' => 'Sites found',
471
-	'info_sous_titre' => 'Subtitle:',
472
-	'info_statut_administrateur' => 'Administrator',
473
-	'info_statut_auteur' => 'This author’s status:',
474
-	'info_statut_auteur_2' => 'I am',
475
-	'info_statut_auteur_a_confirmer' => 'Registration to be confirmed',
476
-	'info_statut_auteur_autre' => 'Other status:',
477
-	'info_statut_redacteur' => 'Editor',
478
-	'info_statut_utilisateurs_1' => 'Default status for imported users',
479
-	'info_statut_utilisateurs_2' => 'Choose the status to be attributed to persons present in the LDAP directory when they connect for the first time. You can modify this value for each individual author later on.',
480
-	'info_suivi_activite' => 'Follow editorial activity',
481
-	'info_surtitre' => 'Top title:',
482
-	'info_syndication_integrale_1' => 'Your site provides syndication files (see "<a href="@url@">@titre@</a>").',
483
-	'info_syndication_integrale_2' => 'Do you wish to send whole articles or only a summary of a few hundred characters?',
484
-	'info_table_prefix' => 'It is possible to change the prefix of the names of the database tables. (you need to do this if you are installing several sites in the same database). The prefix must be written in unaccented, lower-case letters without any spaces.',
485
-	'info_taille_maximale_images' => 'SPIP will test for the maximum image size (in millions of pixels) which it can process.<br /> Images bigger than this will not be reduced.',
486
-	'info_taille_maximale_vignette' => 'Maximum size for vignettes generated by the system:',
487
-	'info_terminer_installation' => 'You can now finish the standard installation process.',
488
-	'info_texte' => 'Text',
489
-	'info_texte_explicatif' => 'Explanation',
490
-	'info_texte_long' => '(The text is long: it will appear in several parts which will be reassembled after validation.)',
491
-	'info_texte_message' => 'Text of your message:',
492
-	'info_texte_message_02' => 'Message text',
493
-	'info_titre' => 'Title:',
494
-	'info_total' => 'total:',
495
-	'info_tous_articles_en_redaction' => 'All articles in progress',
496
-	'info_tous_articles_presents' => 'All articles published in this section',
497
-	'info_tous_articles_refuses' => 'All refused articles',
498
-	'info_tous_les' => 'every:',
499
-	'info_tout_site' => 'The entire site',
500
-	'info_tout_site2' => 'The article has not been translated into this language.',
501
-	'info_tout_site3' => 'The article has been translated into this language, but changes have since been made to the reference article. The translation needs updating.',
502
-	'info_tout_site4' => 'The article has been translated into this language, and the translation is up-to-date.',
503
-	'info_tout_site5' => 'Original article.',
504
-	'info_tout_site6' => '<b>Warning:</b> only original articles are displayed.
437
+    'info_qui_edite' => '@nom_auteur_modif@ worked on the contents @date_diff@ minutes ago',
438
+    'info_racine_site' => 'Site root',
439
+    'info_recharger_page' => 'Please wait a few moments, then reload this page.',
440
+    'info_recherche_auteur_zero' => 'No results for "@cherche_auteur@".',
441
+    'info_recommencer' => 'Please try again.',
442
+    'info_redacteur_1' => 'Editor',
443
+    'info_redacteur_2' => 'with access to the admin area (<i>recommended</i>)',
444
+    'info_redacteurs' => 'Editors',
445
+    'info_redaction_en_cours' => 'EDITING IN PROGRESS',
446
+    'info_redirection' => 'Redirection',
447
+    'info_redirection_activee' => 'Redirection is enabled.',
448
+    'info_redirection_boucle' => 'You are trying to redirect the article toward itself. ',
449
+    'info_redirection_desactivee' => 'Redirection is deleted.',
450
+    'info_refuses' => 'Your rejected articles ',
451
+    'info_reglage_ldap' => 'Options: <b>Adjusting LDAP import</b>',
452
+    'info_renvoi_article' => '<b>Redirection.</b> This article redirects to:',
453
+    'info_reserve_admin' => 'Only administrators can modify this address.',
454
+    'info_restreindre_rubrique' => 'Restrict management to section:',
455
+    'info_resultat_recherche' => 'Search results:',
456
+    'info_rubriques' => 'Sections',
457
+    'info_rubriques_02' => 'sections',
458
+    'info_rubriques_trouvees' => 'Sections found',
459
+    'info_sans_titre' => 'Untitled',
460
+    'info_selection_chemin_acces' => '<b>Select</b> the access path in the directory:',
461
+    'info_signatures' => 'signatures',
462
+    'info_site' => 'Site',
463
+    'info_site_2' => 'site:',
464
+    'info_site_min' => 'site',
465
+    'info_site_reference_2' => 'Referenced site',
466
+    'info_site_web' => 'Web site:',
467
+    'info_sites' => 'sites',
468
+    'info_sites_lies_mot' => 'Referenced sites with this keyword',
469
+    'info_sites_proxy' => 'Using a proxy',
470
+    'info_sites_trouves' => 'Sites found',
471
+    'info_sous_titre' => 'Subtitle:',
472
+    'info_statut_administrateur' => 'Administrator',
473
+    'info_statut_auteur' => 'This author’s status:',
474
+    'info_statut_auteur_2' => 'I am',
475
+    'info_statut_auteur_a_confirmer' => 'Registration to be confirmed',
476
+    'info_statut_auteur_autre' => 'Other status:',
477
+    'info_statut_redacteur' => 'Editor',
478
+    'info_statut_utilisateurs_1' => 'Default status for imported users',
479
+    'info_statut_utilisateurs_2' => 'Choose the status to be attributed to persons present in the LDAP directory when they connect for the first time. You can modify this value for each individual author later on.',
480
+    'info_suivi_activite' => 'Follow editorial activity',
481
+    'info_surtitre' => 'Top title:',
482
+    'info_syndication_integrale_1' => 'Your site provides syndication files (see "<a href="@url@">@titre@</a>").',
483
+    'info_syndication_integrale_2' => 'Do you wish to send whole articles or only a summary of a few hundred characters?',
484
+    'info_table_prefix' => 'It is possible to change the prefix of the names of the database tables. (you need to do this if you are installing several sites in the same database). The prefix must be written in unaccented, lower-case letters without any spaces.',
485
+    'info_taille_maximale_images' => 'SPIP will test for the maximum image size (in millions of pixels) which it can process.<br /> Images bigger than this will not be reduced.',
486
+    'info_taille_maximale_vignette' => 'Maximum size for vignettes generated by the system:',
487
+    'info_terminer_installation' => 'You can now finish the standard installation process.',
488
+    'info_texte' => 'Text',
489
+    'info_texte_explicatif' => 'Explanation',
490
+    'info_texte_long' => '(The text is long: it will appear in several parts which will be reassembled after validation.)',
491
+    'info_texte_message' => 'Text of your message:',
492
+    'info_texte_message_02' => 'Message text',
493
+    'info_titre' => 'Title:',
494
+    'info_total' => 'total:',
495
+    'info_tous_articles_en_redaction' => 'All articles in progress',
496
+    'info_tous_articles_presents' => 'All articles published in this section',
497
+    'info_tous_articles_refuses' => 'All refused articles',
498
+    'info_tous_les' => 'every:',
499
+    'info_tout_site' => 'The entire site',
500
+    'info_tout_site2' => 'The article has not been translated into this language.',
501
+    'info_tout_site3' => 'The article has been translated into this language, but changes have since been made to the reference article. The translation needs updating.',
502
+    'info_tout_site4' => 'The article has been translated into this language, and the translation is up-to-date.',
503
+    'info_tout_site5' => 'Original article.',
504
+    'info_tout_site6' => '<b>Warning:</b> only original articles are displayed.
505 505
 Translations are linked to the original,
506 506
 and their status is colour-coded:',
507
-	'info_traductions' => 'Translations',
508
-	'info_travail_colaboratif' => 'Collaborative work on articles',
509
-	'info_un_article' => 'an article,',
510
-	'info_un_site' => 'a site,',
511
-	'info_une_rubrique' => 'a section,',
512
-	'info_une_rubrique_02' => '1 section',
513
-	'info_url' => 'URL:',
514
-	'info_url_proxy' => 'Proxy URL',
515
-	'info_url_proxy_pas_conforme' => 'Proxy’s URL not valid.',
516
-	'info_url_site_pas_conforme' => 'the website URL is invalid.',
517
-	'info_url_test_proxy' => 'Test URL',
518
-	'info_urlref' => 'Hyperlink:',
519
-	'info_utilisation_spip' => 'SPIP is now ready for use',
520
-	'info_visites_par_mois' => 'Monthly display:',
521
-	'info_visiteur_1' => 'Visitor',
522
-	'info_visiteur_2' => 'to the public site',
523
-	'info_visiteurs' => 'Visitors',
524
-	'info_visiteurs_02' => 'Public site visitors',
525
-	'info_webmestre_forces' => 'The web administrators are currently defined in <tt>@file_options@</tt>.',
526
-	'install_adresse_base_hebergeur' => 'Database address attributed by the hosting provider',
527
-	'install_connect_ok' => 'The new database has been declared using the server name @connect@.',
528
-	'install_echec_annonce' => 'This installation will probably fail, or damage your site.',
529
-	'install_extension_mbstring' => 'SPIP does not work with:',
530
-	'install_extension_php_obligatoire' => 'SPIP requires the php extension:',
531
-	'install_login_base_hebergeur' => 'Login attributed by the service provider',
532
-	'install_nom_base_hebergeur' => 'Database name attributed by the service provider:',
533
-	'install_pas_table' => 'The database has no tables',
534
-	'install_pass_base_hebergeur' => 'Password attributed by your hosting service ',
535
-	'install_php_version' => 'This version of PHP @version@ is too old (minimum = @minimum@)',
536
-	'install_select_langue' => 'Select a language, then click on "next" to start installation.',
537
-	'install_select_type_db' => 'Indicate the type of database:',
538
-	'install_select_type_mysql' => 'MySQL',
539
-	'install_select_type_pg' => 'PostgreSQL',
540
-	'install_select_type_sqlite2' => 'SQLite 2',
541
-	'install_select_type_sqlite3' => 'SQLite 3',
542
-	'install_serveur_hebergeur' => 'Database server attributed by the hosting provider',
543
-	'install_table_prefix_hebergeur' => 'Table prefix attributed by your hosting provider:',
544
-	'install_tables_base' => 'Tables in the database',
545
-	'install_types_db_connus' => 'SPIP can use <b>MySQL</b> (the most common) and <b>SQLite</b>.',
546
-	'install_types_db_connus_avertissement' => 'The support of <b>PostgreSQL</b is actually proposed as experimental',
547
-	'instituer_erreur_statut_a_change' => 'The status has already been modified',
548
-	'instituer_erreur_statut_non_autorise' => 'You cannot select this status',
549
-	'intem_redacteur' => 'editor',
550
-	'intitule_licence' => 'Licence',
551
-	'item_accepter_inscriptions' => 'Allow registration',
552
-	'item_activer_messages_avertissement' => 'Activate warning messages',
553
-	'item_administrateur_2' => 'administrator',
554
-	'item_afficher_calendrier' => 'Display in calendar',
555
-	'item_autoriser_syndication_integrale' => 'Include entire articles in syndication feeds',
556
-	'item_choix_administrateurs' => 'administrators',
557
-	'item_choix_generation_miniature' => 'Generate thumbnails automatically.',
558
-	'item_choix_non_generation_miniature' => 'Do not generate thumbnails.',
559
-	'item_choix_redacteurs' => 'editors',
560
-	'item_choix_visiteurs' => 'visitors to the public site',
561
-	'item_creer_fichiers_authent' => 'Create .htpasswd files',
562
-	'item_login' => 'Login',
563
-	'item_messagerie_agenda' => 'Activate messaging system and calendars',
564
-	'item_mots_cles_association_articles' => 'articles',
565
-	'item_mots_cles_association_rubriques' => 'sections',
566
-	'item_mots_cles_association_sites' => 'referenced or syndicated sites.',
567
-	'item_non' => 'No',
568
-	'item_non_accepter_inscriptions' => 'Disable registration',
569
-	'item_non_activer_messages_avertissement' => 'No warning messages',
570
-	'item_non_afficher_calendrier' => 'Do not show in calendar',
571
-	'item_non_autoriser_syndication_integrale' => 'Only send a summary',
572
-	'item_non_creer_fichiers_authent' => 'Do not create these files',
573
-	'item_non_messagerie_agenda' => 'Disable the messaging system and calendars',
574
-	'item_non_publier_articles' => 'Do not publish articles before their specified publication date.',
575
-	'item_nouvel_auteur' => 'New author',
576
-	'item_nouvelle_rubrique' => 'New section',
577
-	'item_oui' => 'Yes',
578
-	'item_publier_articles' => 'Publish articles, irrespective of publication date.',
579
-	'item_reponse_article' => 'Reply to the article',
580
-	'item_visiteur' => 'visitor',
507
+    'info_traductions' => 'Translations',
508
+    'info_travail_colaboratif' => 'Collaborative work on articles',
509
+    'info_un_article' => 'an article,',
510
+    'info_un_site' => 'a site,',
511
+    'info_une_rubrique' => 'a section,',
512
+    'info_une_rubrique_02' => '1 section',
513
+    'info_url' => 'URL:',
514
+    'info_url_proxy' => 'Proxy URL',
515
+    'info_url_proxy_pas_conforme' => 'Proxy’s URL not valid.',
516
+    'info_url_site_pas_conforme' => 'the website URL is invalid.',
517
+    'info_url_test_proxy' => 'Test URL',
518
+    'info_urlref' => 'Hyperlink:',
519
+    'info_utilisation_spip' => 'SPIP is now ready for use',
520
+    'info_visites_par_mois' => 'Monthly display:',
521
+    'info_visiteur_1' => 'Visitor',
522
+    'info_visiteur_2' => 'to the public site',
523
+    'info_visiteurs' => 'Visitors',
524
+    'info_visiteurs_02' => 'Public site visitors',
525
+    'info_webmestre_forces' => 'The web administrators are currently defined in <tt>@file_options@</tt>.',
526
+    'install_adresse_base_hebergeur' => 'Database address attributed by the hosting provider',
527
+    'install_connect_ok' => 'The new database has been declared using the server name @connect@.',
528
+    'install_echec_annonce' => 'This installation will probably fail, or damage your site.',
529
+    'install_extension_mbstring' => 'SPIP does not work with:',
530
+    'install_extension_php_obligatoire' => 'SPIP requires the php extension:',
531
+    'install_login_base_hebergeur' => 'Login attributed by the service provider',
532
+    'install_nom_base_hebergeur' => 'Database name attributed by the service provider:',
533
+    'install_pas_table' => 'The database has no tables',
534
+    'install_pass_base_hebergeur' => 'Password attributed by your hosting service ',
535
+    'install_php_version' => 'This version of PHP @version@ is too old (minimum = @minimum@)',
536
+    'install_select_langue' => 'Select a language, then click on "next" to start installation.',
537
+    'install_select_type_db' => 'Indicate the type of database:',
538
+    'install_select_type_mysql' => 'MySQL',
539
+    'install_select_type_pg' => 'PostgreSQL',
540
+    'install_select_type_sqlite2' => 'SQLite 2',
541
+    'install_select_type_sqlite3' => 'SQLite 3',
542
+    'install_serveur_hebergeur' => 'Database server attributed by the hosting provider',
543
+    'install_table_prefix_hebergeur' => 'Table prefix attributed by your hosting provider:',
544
+    'install_tables_base' => 'Tables in the database',
545
+    'install_types_db_connus' => 'SPIP can use <b>MySQL</b> (the most common) and <b>SQLite</b>.',
546
+    'install_types_db_connus_avertissement' => 'The support of <b>PostgreSQL</b is actually proposed as experimental',
547
+    'instituer_erreur_statut_a_change' => 'The status has already been modified',
548
+    'instituer_erreur_statut_non_autorise' => 'You cannot select this status',
549
+    'intem_redacteur' => 'editor',
550
+    'intitule_licence' => 'Licence',
551
+    'item_accepter_inscriptions' => 'Allow registration',
552
+    'item_activer_messages_avertissement' => 'Activate warning messages',
553
+    'item_administrateur_2' => 'administrator',
554
+    'item_afficher_calendrier' => 'Display in calendar',
555
+    'item_autoriser_syndication_integrale' => 'Include entire articles in syndication feeds',
556
+    'item_choix_administrateurs' => 'administrators',
557
+    'item_choix_generation_miniature' => 'Generate thumbnails automatically.',
558
+    'item_choix_non_generation_miniature' => 'Do not generate thumbnails.',
559
+    'item_choix_redacteurs' => 'editors',
560
+    'item_choix_visiteurs' => 'visitors to the public site',
561
+    'item_creer_fichiers_authent' => 'Create .htpasswd files',
562
+    'item_login' => 'Login',
563
+    'item_messagerie_agenda' => 'Activate messaging system and calendars',
564
+    'item_mots_cles_association_articles' => 'articles',
565
+    'item_mots_cles_association_rubriques' => 'sections',
566
+    'item_mots_cles_association_sites' => 'referenced or syndicated sites.',
567
+    'item_non' => 'No',
568
+    'item_non_accepter_inscriptions' => 'Disable registration',
569
+    'item_non_activer_messages_avertissement' => 'No warning messages',
570
+    'item_non_afficher_calendrier' => 'Do not show in calendar',
571
+    'item_non_autoriser_syndication_integrale' => 'Only send a summary',
572
+    'item_non_creer_fichiers_authent' => 'Do not create these files',
573
+    'item_non_messagerie_agenda' => 'Disable the messaging system and calendars',
574
+    'item_non_publier_articles' => 'Do not publish articles before their specified publication date.',
575
+    'item_nouvel_auteur' => 'New author',
576
+    'item_nouvelle_rubrique' => 'New section',
577
+    'item_oui' => 'Yes',
578
+    'item_publier_articles' => 'Publish articles, irrespective of publication date.',
579
+    'item_reponse_article' => 'Reply to the article',
580
+    'item_visiteur' => 'visitor',
581 581
 
582
-	// J
583
-	'jour_non_connu_nc' => 'unknown',
582
+    // J
583
+    'jour_non_connu_nc' => 'unknown',
584 584
 
585
-	// L
586
-	'label_bando_outils' => 'Toolbar',
587
-	'label_bando_outils_afficher' => 'Show the tools',
588
-	'label_bando_outils_masquer' => 'Hide the tools',
589
-	'label_choix_langue' => 'Choose your language',
590
-	'label_nom_fichier_connect' => 'Indicate the name for this server',
591
-	'label_slogan_site' => 'Website slogan',
592
-	'label_taille_ecran' => 'Screen width',
593
-	'label_texte_et_icones_navigation' => 'Navigation menu',
594
-	'label_texte_et_icones_page' => 'Page display',
595
-	'ldap_correspondance' => 'inherit field @champ@',
596
-	'ldap_correspondance_1' => 'Inherit LDAP fields',
597
-	'ldap_correspondance_2' => 'For each of these SPIP fields, enter the name of the corresponding LDAP field. Leave blank if you don’t want it filled, separate with spaces or commas to try several LDAP fields.',
598
-	'lien_ajouter_auteur' => 'Add this author',
599
-	'lien_ajouter_une_rubrique' => 'Add this section',
600
-	'lien_email' => 'email',
601
-	'lien_nom_site' => 'SITE NAME:',
602
-	'lien_rapide_contenu' => 'Go to the content',
603
-	'lien_rapide_navigation' => 'Go to the navigation',
604
-	'lien_rapide_recherche' => 'Go to the search',
605
-	'lien_retirer_auteur' => 'Remove author',
606
-	'lien_retirer_rubrique' => 'Remove the section',
607
-	'lien_retirer_tous_auteurs' => 'Remove all authors',
608
-	'lien_retirer_toutes_rubriques' => 'Remove all sections',
609
-	'lien_site' => 'site',
610
-	'lien_tout_decocher' => 'Uncheck all',
611
-	'lien_tout_deplier' => 'Expand all',
612
-	'lien_tout_replier' => 'Collapse all',
613
-	'lien_tout_supprimer' => 'Delete all',
614
-	'lien_trier_nom' => 'Sort by name',
615
-	'lien_trier_nombre_articles' => 'Sort by total articles',
616
-	'lien_trier_statut' => 'Sort by status',
617
-	'lien_voir_en_ligne' => 'VIEW ONLINE:',
618
-	'logo_article' => 'Article’s logo',
619
-	'logo_auteur' => 'Author’s logo',
620
-	'logo_rubrique' => 'Section’s logo',
621
-	'logo_site' => 'Website’s logo',
622
-	'logo_standard_rubrique' => 'Default sections’ logo',
623
-	'logo_survol' => 'Mouseover logo',
585
+    // L
586
+    'label_bando_outils' => 'Toolbar',
587
+    'label_bando_outils_afficher' => 'Show the tools',
588
+    'label_bando_outils_masquer' => 'Hide the tools',
589
+    'label_choix_langue' => 'Choose your language',
590
+    'label_nom_fichier_connect' => 'Indicate the name for this server',
591
+    'label_slogan_site' => 'Website slogan',
592
+    'label_taille_ecran' => 'Screen width',
593
+    'label_texte_et_icones_navigation' => 'Navigation menu',
594
+    'label_texte_et_icones_page' => 'Page display',
595
+    'ldap_correspondance' => 'inherit field @champ@',
596
+    'ldap_correspondance_1' => 'Inherit LDAP fields',
597
+    'ldap_correspondance_2' => 'For each of these SPIP fields, enter the name of the corresponding LDAP field. Leave blank if you don’t want it filled, separate with spaces or commas to try several LDAP fields.',
598
+    'lien_ajouter_auteur' => 'Add this author',
599
+    'lien_ajouter_une_rubrique' => 'Add this section',
600
+    'lien_email' => 'email',
601
+    'lien_nom_site' => 'SITE NAME:',
602
+    'lien_rapide_contenu' => 'Go to the content',
603
+    'lien_rapide_navigation' => 'Go to the navigation',
604
+    'lien_rapide_recherche' => 'Go to the search',
605
+    'lien_retirer_auteur' => 'Remove author',
606
+    'lien_retirer_rubrique' => 'Remove the section',
607
+    'lien_retirer_tous_auteurs' => 'Remove all authors',
608
+    'lien_retirer_toutes_rubriques' => 'Remove all sections',
609
+    'lien_site' => 'site',
610
+    'lien_tout_decocher' => 'Uncheck all',
611
+    'lien_tout_deplier' => 'Expand all',
612
+    'lien_tout_replier' => 'Collapse all',
613
+    'lien_tout_supprimer' => 'Delete all',
614
+    'lien_trier_nom' => 'Sort by name',
615
+    'lien_trier_nombre_articles' => 'Sort by total articles',
616
+    'lien_trier_statut' => 'Sort by status',
617
+    'lien_voir_en_ligne' => 'VIEW ONLINE:',
618
+    'logo_article' => 'Article’s logo',
619
+    'logo_auteur' => 'Author’s logo',
620
+    'logo_rubrique' => 'Section’s logo',
621
+    'logo_site' => 'Website’s logo',
622
+    'logo_standard_rubrique' => 'Default sections’ logo',
623
+    'logo_survol' => 'Mouseover logo',
624 624
 
625
-	// M
626
-	'menu_aide_installation_choix_base' => 'Choosing your database',
627
-	'module_fichier_langue' => 'Language file',
628
-	'module_raccourci' => 'Shortcut',
629
-	'module_texte_affiche' => 'Displayed text',
630
-	'module_texte_explicatif' => 'You can insert thse shortcuts in your website templates. They will be automatically translated into any languages for which a language file exists.',
631
-	'module_texte_traduction' => 'The language file « @module@ » is available in:',
632
-	'mois_non_connu' => 'unknown',
625
+    // M
626
+    'menu_aide_installation_choix_base' => 'Choosing your database',
627
+    'module_fichier_langue' => 'Language file',
628
+    'module_raccourci' => 'Shortcut',
629
+    'module_texte_affiche' => 'Displayed text',
630
+    'module_texte_explicatif' => 'You can insert thse shortcuts in your website templates. They will be automatically translated into any languages for which a language file exists.',
631
+    'module_texte_traduction' => 'The language file « @module@ » is available in:',
632
+    'mois_non_connu' => 'unknown',
633 633
 
634
-	// N
635
-	'nouvelle_version_spip' => 'SPIP upgrade @version@ is available',
636
-	'nouvelle_version_spip_majeure' => 'A new SPIP version @version@ is available',
634
+    // N
635
+    'nouvelle_version_spip' => 'SPIP upgrade @version@ is available',
636
+    'nouvelle_version_spip_majeure' => 'A new SPIP version @version@ is available',
637 637
 
638
-	// O
639
-	'onglet_contenu' => 'Contents',
640
-	'onglet_declarer_une_autre_base' => 'Declare another database',
641
-	'onglet_discuter' => 'Discuss',
642
-	'onglet_interactivite' => 'Interactivity',
643
-	'onglet_proprietes' => 'Properties',
644
-	'onglet_repartition_actuelle' => 'now',
645
-	'onglet_sous_rubriques' => 'Subsections',
638
+    // O
639
+    'onglet_contenu' => 'Contents',
640
+    'onglet_declarer_une_autre_base' => 'Declare another database',
641
+    'onglet_discuter' => 'Discuss',
642
+    'onglet_interactivite' => 'Interactivity',
643
+    'onglet_proprietes' => 'Properties',
644
+    'onglet_repartition_actuelle' => 'now',
645
+    'onglet_sous_rubriques' => 'Subsections',
646 646
 
647
-	// P
648
-	'page_pas_proxy' => 'This page must not go through the proxy',
649
-	'pas_de_proxy_pour' => 'If necessary, indicate to which machines or domains this proxy should not apply (for example: @exemple@)',
650
-	'phpinfo' => 'PHP configuration',
651
-	'plugin_charge_paquet' => 'Loading the archive file @name@',
652
-	'plugin_charger' => 'Download',
653
-	'plugin_erreur_charger' => 'error: @zip@ cannot be loaded',
654
-	'plugin_erreur_droit1' => 'Cannot write to directory <code>@dest@</code>.',
655
-	'plugin_erreur_droit2' => 'Please check write permissions for this directory (and create the directory if necessary). Alternatively, install the files by FTP.',
656
-	'plugin_erreur_zip' => 'pclzip failure: error @status@',
657
-	'plugin_etat_developpement' => 'under development',
658
-	'plugin_etat_experimental' => 'experimental',
659
-	'plugin_etat_stable' => 'stable',
660
-	'plugin_etat_test' => 'being tested',
661
-	'plugin_impossible_activer' => 'Impossible to activate the plugin @plugin@',
662
-	'plugin_info_automatique1' => 'If you wish to allow automatic plugin installation, please:',
663
-	'plugin_info_automatique1_lib' => 'If you want to let this library to be installed automatically, please:',
664
-	'plugin_info_automatique2' => 'Create a directory <code>@rep@</code> ;',
665
-	'plugin_info_automatique3' => 'Check that the server has the proper permissions to write to this directory.',
666
-	'plugin_info_automatique_creer' => 'to create at the root of the website.',
667
-	'plugin_info_automatique_exemples' => 'examples:',
668
-	'plugin_info_automatique_ftp' => 'You may install plugins by FTP in the  <tt>@rep@</tt> directory',
669
-	'plugin_info_automatique_lib' => 'Some plugins need to be able to load files into the <code>lib/</code> directory. This directory should be created at the website root.',
670
-	'plugin_info_automatique_liste' => 'Your plugin lists:',
671
-	'plugin_info_automatique_liste_officielle' => 'official plugins',
672
-	'plugin_info_automatique_liste_update' => 'Update lists',
673
-	'plugin_info_automatique_ou' => 'or...',
674
-	'plugin_info_automatique_select' => 'Select a plugin below: SPIP will load it and will install it in the <code>@rep@</code> directory. If the plugin already exists, it will be updated.',
675
-	'plugin_info_credit' => 'Credits',
676
-	'plugin_info_erreur_xml' => 'Incorrect declaration of the plugin',
677
-	'plugin_info_install_ok' => 'Installation successful',
678
-	'plugin_info_necessite' => 'Requires:',
679
-	'plugin_info_non_compatible_spip' => 'This plugin is incompatible with this version of SPIP',
680
-	'plugin_info_plugins_dist_1' => 'The following plugins are loaded and activated in the @plugins_dist@ directory.',
681
-	'plugin_info_plugins_dist_2' => 'They cannot be disabled.',
682
-	'plugin_info_telecharger' => 'load from @url@ and install to @rep@',
683
-	'plugin_info_upgrade_ok' => 'Successful update',
684
-	'plugin_librairies_installees' => 'Libraries installed',
685
-	'plugin_necessite_extension_php' => 'Requires the PHP extension @plugin@ version @version@.',
686
-	'plugin_necessite_extension_php_sans_version' => 'Requires the PHP extension @plugin@',
687
-	'plugin_necessite_lib' => 'This plugin requires the library @lib@',
688
-	'plugin_necessite_php' => 'Requires @plugin@ version @version@.',
689
-	'plugin_necessite_plugin' => 'Version @version@ of the plugin @plugin@ is required.',
690
-	'plugin_necessite_plugin_sans_version' => 'Requires the plugin @plugin@',
691
-	'plugin_necessite_spip' => 'SPIP version @version@ or newer is required.',
692
-	'plugin_source' => 'source: ',
693
-	'plugin_titre_automatique' => 'Automatic installation',
694
-	'plugin_titre_automatique_ajouter' => 'Add plugins',
695
-	'plugin_titre_installation' => '@plugin@ plugin installation',
696
-	'plugin_titre_modifier' => 'My plugins',
697
-	'plugin_utilise_extension_php' => 'The version of the PHP extension @plugin@ must be @version@.',
698
-	'plugin_utilise_php' => '@plugin@ version must be @version@.',
699
-	'plugin_utilise_plugin' => 'The version of the plugin @plugin@ must be @version@.',
700
-	'plugin_zip_active' => 'Continue in order to activate',
701
-	'plugin_zip_adresse' => 'To load a zipped plugin file, or a list of plugins, enter the path below.',
702
-	'plugin_zip_adresse_champ' => 'Path of the plugin or list ',
703
-	'plugin_zip_content' => 'It contains the following files(@taille@),<br />ready to be installed in the <code>@rep@</code> directory',
704
-	'plugin_zip_installe_finie' => 'The file @zip@ has been unpacked and installed.',
705
-	'plugin_zip_installe_rep_finie' => 'The file @zip@ has been unpacked and installed in the @rep@ directory',
706
-	'plugin_zip_installer' => 'You may now install it.',
707
-	'plugin_zip_telecharge' => 'The file @zip@ has been loaded',
708
-	'plugins_actif_aucun' => 'No plugins active.',
709
-	'plugins_actif_un' => 'One plugin active',
710
-	'plugins_actifs' => '@count@ active plugins.',
711
-	'plugins_actifs_liste' => 'Enabled',
712
-	'plugins_compte' => '@count@ plugins',
713
-	'plugins_disponible_un' => 'One plugin available',
714
-	'plugins_disponibles' => '@count@ plugins available.',
715
-	'plugins_erreur' => 'Error in the plugins: @plugins@',
716
-	'plugins_liste' => 'List of plugins',
717
-	'plugins_liste_dist' => 'Locked plugins',
718
-	'plugins_recents' => 'Recent plugins',
719
-	'plugins_tous_liste' => 'All',
720
-	'plugins_vue_hierarchie' => 'Hierarchy',
721
-	'plugins_vue_liste' => 'List',
722
-	'protocole_ldap' => 'Protocol version:',
647
+    // P
648
+    'page_pas_proxy' => 'This page must not go through the proxy',
649
+    'pas_de_proxy_pour' => 'If necessary, indicate to which machines or domains this proxy should not apply (for example: @exemple@)',
650
+    'phpinfo' => 'PHP configuration',
651
+    'plugin_charge_paquet' => 'Loading the archive file @name@',
652
+    'plugin_charger' => 'Download',
653
+    'plugin_erreur_charger' => 'error: @zip@ cannot be loaded',
654
+    'plugin_erreur_droit1' => 'Cannot write to directory <code>@dest@</code>.',
655
+    'plugin_erreur_droit2' => 'Please check write permissions for this directory (and create the directory if necessary). Alternatively, install the files by FTP.',
656
+    'plugin_erreur_zip' => 'pclzip failure: error @status@',
657
+    'plugin_etat_developpement' => 'under development',
658
+    'plugin_etat_experimental' => 'experimental',
659
+    'plugin_etat_stable' => 'stable',
660
+    'plugin_etat_test' => 'being tested',
661
+    'plugin_impossible_activer' => 'Impossible to activate the plugin @plugin@',
662
+    'plugin_info_automatique1' => 'If you wish to allow automatic plugin installation, please:',
663
+    'plugin_info_automatique1_lib' => 'If you want to let this library to be installed automatically, please:',
664
+    'plugin_info_automatique2' => 'Create a directory <code>@rep@</code> ;',
665
+    'plugin_info_automatique3' => 'Check that the server has the proper permissions to write to this directory.',
666
+    'plugin_info_automatique_creer' => 'to create at the root of the website.',
667
+    'plugin_info_automatique_exemples' => 'examples:',
668
+    'plugin_info_automatique_ftp' => 'You may install plugins by FTP in the  <tt>@rep@</tt> directory',
669
+    'plugin_info_automatique_lib' => 'Some plugins need to be able to load files into the <code>lib/</code> directory. This directory should be created at the website root.',
670
+    'plugin_info_automatique_liste' => 'Your plugin lists:',
671
+    'plugin_info_automatique_liste_officielle' => 'official plugins',
672
+    'plugin_info_automatique_liste_update' => 'Update lists',
673
+    'plugin_info_automatique_ou' => 'or...',
674
+    'plugin_info_automatique_select' => 'Select a plugin below: SPIP will load it and will install it in the <code>@rep@</code> directory. If the plugin already exists, it will be updated.',
675
+    'plugin_info_credit' => 'Credits',
676
+    'plugin_info_erreur_xml' => 'Incorrect declaration of the plugin',
677
+    'plugin_info_install_ok' => 'Installation successful',
678
+    'plugin_info_necessite' => 'Requires:',
679
+    'plugin_info_non_compatible_spip' => 'This plugin is incompatible with this version of SPIP',
680
+    'plugin_info_plugins_dist_1' => 'The following plugins are loaded and activated in the @plugins_dist@ directory.',
681
+    'plugin_info_plugins_dist_2' => 'They cannot be disabled.',
682
+    'plugin_info_telecharger' => 'load from @url@ and install to @rep@',
683
+    'plugin_info_upgrade_ok' => 'Successful update',
684
+    'plugin_librairies_installees' => 'Libraries installed',
685
+    'plugin_necessite_extension_php' => 'Requires the PHP extension @plugin@ version @version@.',
686
+    'plugin_necessite_extension_php_sans_version' => 'Requires the PHP extension @plugin@',
687
+    'plugin_necessite_lib' => 'This plugin requires the library @lib@',
688
+    'plugin_necessite_php' => 'Requires @plugin@ version @version@.',
689
+    'plugin_necessite_plugin' => 'Version @version@ of the plugin @plugin@ is required.',
690
+    'plugin_necessite_plugin_sans_version' => 'Requires the plugin @plugin@',
691
+    'plugin_necessite_spip' => 'SPIP version @version@ or newer is required.',
692
+    'plugin_source' => 'source: ',
693
+    'plugin_titre_automatique' => 'Automatic installation',
694
+    'plugin_titre_automatique_ajouter' => 'Add plugins',
695
+    'plugin_titre_installation' => '@plugin@ plugin installation',
696
+    'plugin_titre_modifier' => 'My plugins',
697
+    'plugin_utilise_extension_php' => 'The version of the PHP extension @plugin@ must be @version@.',
698
+    'plugin_utilise_php' => '@plugin@ version must be @version@.',
699
+    'plugin_utilise_plugin' => 'The version of the plugin @plugin@ must be @version@.',
700
+    'plugin_zip_active' => 'Continue in order to activate',
701
+    'plugin_zip_adresse' => 'To load a zipped plugin file, or a list of plugins, enter the path below.',
702
+    'plugin_zip_adresse_champ' => 'Path of the plugin or list ',
703
+    'plugin_zip_content' => 'It contains the following files(@taille@),<br />ready to be installed in the <code>@rep@</code> directory',
704
+    'plugin_zip_installe_finie' => 'The file @zip@ has been unpacked and installed.',
705
+    'plugin_zip_installe_rep_finie' => 'The file @zip@ has been unpacked and installed in the @rep@ directory',
706
+    'plugin_zip_installer' => 'You may now install it.',
707
+    'plugin_zip_telecharge' => 'The file @zip@ has been loaded',
708
+    'plugins_actif_aucun' => 'No plugins active.',
709
+    'plugins_actif_un' => 'One plugin active',
710
+    'plugins_actifs' => '@count@ active plugins.',
711
+    'plugins_actifs_liste' => 'Enabled',
712
+    'plugins_compte' => '@count@ plugins',
713
+    'plugins_disponible_un' => 'One plugin available',
714
+    'plugins_disponibles' => '@count@ plugins available.',
715
+    'plugins_erreur' => 'Error in the plugins: @plugins@',
716
+    'plugins_liste' => 'List of plugins',
717
+    'plugins_liste_dist' => 'Locked plugins',
718
+    'plugins_recents' => 'Recent plugins',
719
+    'plugins_tous_liste' => 'All',
720
+    'plugins_vue_hierarchie' => 'Hierarchy',
721
+    'plugins_vue_liste' => 'List',
722
+    'protocole_ldap' => 'Protocol version:',
723 723
 
724
-	// Q
725
-	'queue_executer_maintenant' => 'Run now',
726
-	'queue_info_purger' => 'You can delete all pending tasks and reset the list with periodic tasks',
727
-	'queue_nb_jobs_in_queue' => '@nb@ pending tasks',
728
-	'queue_next_job_in_nb_sec' => 'Next task in @nb@ s',
729
-	'queue_no_job_in_queue' => 'No pending tasks',
730
-	'queue_one_job_in_queue' => '1 pending task',
731
-	'queue_priorite_tache' => 'priority',
732
-	'queue_purger_queue' => 'Reset the tasks queue',
733
-	'queue_titre' => 'Background tasks',
724
+    // Q
725
+    'queue_executer_maintenant' => 'Run now',
726
+    'queue_info_purger' => 'You can delete all pending tasks and reset the list with periodic tasks',
727
+    'queue_nb_jobs_in_queue' => '@nb@ pending tasks',
728
+    'queue_next_job_in_nb_sec' => 'Next task in @nb@ s',
729
+    'queue_no_job_in_queue' => 'No pending tasks',
730
+    'queue_one_job_in_queue' => '1 pending task',
731
+    'queue_priorite_tache' => 'priority',
732
+    'queue_purger_queue' => 'Reset the tasks queue',
733
+    'queue_titre' => 'Background tasks',
734 734
 
735
-	// R
736
-	'repertoire_plugins' => 'Directory:',
737
-	'required' => '(Required)',
735
+    // R
736
+    'repertoire_plugins' => 'Directory:',
737
+    'required' => '(Required)',
738 738
 
739
-	// S
740
-	'sans_heure' => 'time not specified',
741
-	'statut_admin_restreint' => 'restricted admin',
742
-	'statut_webmestre' => 'webmaster',
739
+    // S
740
+    'sans_heure' => 'time not specified',
741
+    'statut_admin_restreint' => 'restricted admin',
742
+    'statut_webmestre' => 'webmaster',
743 743
 
744
-	// T
745
-	'tache_cron_asap' => 'CRON task @function@ (ASAP)',
746
-	'tache_cron_secondes' => 'CRON task @function@ (every @nb@ s)',
747
-	'taille_cache_image' => 'The images calculated automatically by SPIP (thumbnails, titles transformed into graphics, mathematical formulae in TeX format, etc.) take up a total of @taille@ in the @dir@ directory.',
748
-	'taille_cache_infinie' => 'This site does not have any fixed limit for the size of the cache.',
749
-	'taille_cache_maxi' => 'SPIP will try to limit the size of the cache directory to approximately <b>@octets@</b>.',
750
-	'taille_cache_moins_de' => 'The cache size is less than @octets@.',
751
-	'taille_cache_octets' => 'The size of the cache is currently around @octets@.',
752
-	'taille_cache_vide' => 'The cache is empty.',
753
-	'taille_repertoire_cache' => 'Current cache size ',
754
-	'text_article_propose_publication' => 'Article submitted for publication.',
755
-	'texte_acces_ldap_anonyme_1' => 'Some LDAP servers do not allow anonymous access. In this case you must indicate an initial access identifier for future directory searches. However, in most cases the following fields can be left empty.',
756
-	'texte_admin_effacer_01' => 'This command deletes <i>all</i> content in the database,
744
+    // T
745
+    'tache_cron_asap' => 'CRON task @function@ (ASAP)',
746
+    'tache_cron_secondes' => 'CRON task @function@ (every @nb@ s)',
747
+    'taille_cache_image' => 'The images calculated automatically by SPIP (thumbnails, titles transformed into graphics, mathematical formulae in TeX format, etc.) take up a total of @taille@ in the @dir@ directory.',
748
+    'taille_cache_infinie' => 'This site does not have any fixed limit for the size of the cache.',
749
+    'taille_cache_maxi' => 'SPIP will try to limit the size of the cache directory to approximately <b>@octets@</b>.',
750
+    'taille_cache_moins_de' => 'The cache size is less than @octets@.',
751
+    'taille_cache_octets' => 'The size of the cache is currently around @octets@.',
752
+    'taille_cache_vide' => 'The cache is empty.',
753
+    'taille_repertoire_cache' => 'Current cache size ',
754
+    'text_article_propose_publication' => 'Article submitted for publication.',
755
+    'texte_acces_ldap_anonyme_1' => 'Some LDAP servers do not allow anonymous access. In this case you must indicate an initial access identifier for future directory searches. However, in most cases the following fields can be left empty.',
756
+    'texte_admin_effacer_01' => 'This command deletes <i>all</i> content in the database,
757 757
 including <i>all</i> the access parameters for editors and administrators. After using it, you must
758 758
 reinstall SPIP, create a new database and a new administrator account.',
759
-	'texte_adresse_annuaire_1' => '(If your directory is installed on the same machine as your website, it is probably «localhost».)',
760
-	'texte_ajout_auteur' => 'The following author was added to the article:',
761
-	'texte_annuaire_ldap_1' => 'If you have access to a LDAP directory server, you can use it to import users automatically into SPIP.',
762
-	'texte_article_statut' => 'Article status:',
763
-	'texte_article_virtuel' => 'Virtual article',
764
-	'texte_article_virtuel_reference' => '<b>Virtual article:</b> an article on your SPIP website which redirects to another URL. To remove redirection, delete the URL.',
765
-	'texte_aucun_resultat_auteur' => 'No results for "@cherche_auteur@".',
766
-	'texte_auteur_messagerie' => 'This site can update the list of editors online in real time, which allows you to be contacted by other users. You can opt not to appear in this list (you are then "invisible" to other users).',
767
-	'texte_auteurs' => 'THE AUTHORS',
768
-	'texte_choix_base_1' => 'Select your database:',
769
-	'texte_choix_base_2' => 'The SQL server contains several databases.',
770
-	'texte_choix_base_3' => '<b>Select</b> below the one attributed by your hosting provider:',
771
-	'texte_choix_table_prefix' => 'Prefix for tables:',
772
-	'texte_compte_element' => '@count@ element',
773
-	'texte_compte_elements' => '@count@ elements',
774
-	'texte_conflit_edition_correction' => 'Please compare differences between the two versions. You can also copy your changes and start over.',
775
-	'texte_connexion_mysql' => 'Consult the information provided by your hosting service. It should contain the connection codes for the SQL server.',
776
-	'texte_contenu_article' => '(Brief description of the article.)',
777
-	'texte_contenu_articles' => 'Depending on the layout chosen for your site, you can decide
759
+    'texte_adresse_annuaire_1' => '(If your directory is installed on the same machine as your website, it is probably «localhost».)',
760
+    'texte_ajout_auteur' => 'The following author was added to the article:',
761
+    'texte_annuaire_ldap_1' => 'If you have access to a LDAP directory server, you can use it to import users automatically into SPIP.',
762
+    'texte_article_statut' => 'Article status:',
763
+    'texte_article_virtuel' => 'Virtual article',
764
+    'texte_article_virtuel_reference' => '<b>Virtual article:</b> an article on your SPIP website which redirects to another URL. To remove redirection, delete the URL.',
765
+    'texte_aucun_resultat_auteur' => 'No results for "@cherche_auteur@".',
766
+    'texte_auteur_messagerie' => 'This site can update the list of editors online in real time, which allows you to be contacted by other users. You can opt not to appear in this list (you are then "invisible" to other users).',
767
+    'texte_auteurs' => 'THE AUTHORS',
768
+    'texte_choix_base_1' => 'Select your database:',
769
+    'texte_choix_base_2' => 'The SQL server contains several databases.',
770
+    'texte_choix_base_3' => '<b>Select</b> below the one attributed by your hosting provider:',
771
+    'texte_choix_table_prefix' => 'Prefix for tables:',
772
+    'texte_compte_element' => '@count@ element',
773
+    'texte_compte_elements' => '@count@ elements',
774
+    'texte_conflit_edition_correction' => 'Please compare differences between the two versions. You can also copy your changes and start over.',
775
+    'texte_connexion_mysql' => 'Consult the information provided by your hosting service. It should contain the connection codes for the SQL server.',
776
+    'texte_contenu_article' => '(Brief description of the article.)',
777
+    'texte_contenu_articles' => 'Depending on the layout chosen for your site, you can decide
778 778
   that some article options are not to be used.
779 779
   Use the following list to choose which options should be available.',
780
-	'texte_crash_base' => 'If your database
780
+    'texte_crash_base' => 'If your database
781 781
    crashed, you can try to repair it
782 782
    automatically.',
783
-	'texte_creer_rubrique' => 'Before writing any articles,<br /> you must create a section.',
784
-	'texte_date_creation_article' => 'ARTICLE CREATION DATE:',
785
-	'texte_date_creation_objet' => 'Creation date:', # on ajoute le ":"
786
-	'texte_date_publication_anterieure' => 'Date first published:',
787
-	'texte_date_publication_anterieure_nonaffichee' => 'Hide previous publication date.',
788
-	'texte_date_publication_article' => 'PUBLISHED ON:',
789
-	'texte_date_publication_objet' => 'Published on:',
790
-	'texte_definir_comme_traduction_rubrique' => 'This section is a translation of section number:',
791
-	'texte_descriptif_rapide' => 'Brief description',
792
-	'texte_effacer_base' => 'Delete the SPIP database',
793
-	'texte_effacer_statistiques' => 'Delete the statistics',
794
-	'texte_en_cours_validation' => 'The following articles and news have been submitted for evaluation.',
795
-	'texte_enrichir_mise_a_jour' => 'You can enrich the layout of your text by using "typographical shortcuts".',
796
-	'texte_fichier_authent' => '<b>Should SPIP create the special files <tt>.htpasswd</tt>
783
+    'texte_creer_rubrique' => 'Before writing any articles,<br /> you must create a section.',
784
+    'texte_date_creation_article' => 'ARTICLE CREATION DATE:',
785
+    'texte_date_creation_objet' => 'Creation date:', # on ajoute le ":"
786
+    'texte_date_publication_anterieure' => 'Date first published:',
787
+    'texte_date_publication_anterieure_nonaffichee' => 'Hide previous publication date.',
788
+    'texte_date_publication_article' => 'PUBLISHED ON:',
789
+    'texte_date_publication_objet' => 'Published on:',
790
+    'texte_definir_comme_traduction_rubrique' => 'This section is a translation of section number:',
791
+    'texte_descriptif_rapide' => 'Brief description',
792
+    'texte_effacer_base' => 'Delete the SPIP database',
793
+    'texte_effacer_statistiques' => 'Delete the statistics',
794
+    'texte_en_cours_validation' => 'The following articles and news have been submitted for evaluation.',
795
+    'texte_enrichir_mise_a_jour' => 'You can enrich the layout of your text by using "typographical shortcuts".',
796
+    'texte_fichier_authent' => '<b>Should SPIP create the special files <tt>.htpasswd</tt>
797 797
   and <tt>.htpasswd-admin</tt> in the directory @dossier@?</b>
798 798
 <p>These files can be used to restrict access to authors and administrators to other parts of your site (for instance, external statistical programme).</p><p>If you have no need of such files, you can keep this option with its default value (no file creation).</p>',
799
-	'texte_informations_personnelles_1' => 'The system will now  create your personal account for this site.',
800
-	'texte_informations_personnelles_2' => '(Note: if it is a reinstallation, if your former access is still working, you can',
801
-	'texte_introductif_article' => '(Introductory text for the article.)',
802
-	'texte_jeu_caractere' => 'We advise using the universal alphabet (<tt>utf-8</tt>) on your site. This will make it possible to display text in any language. All modern browsers are fully comptabile with this character set.',
803
-	'texte_jeu_caractere_3' => 'Your site currently uses this character set:',
804
-	'texte_jeu_caractere_4' => 'If that does not correspond to your current data (this may occur after restoring your database from a backup), or if <em>you are setting up this site</em> and wish to use a different character set, please indicate the character set here:',
805
-	'texte_login_ldap_1' => '(Keep empty for anonymous access or enter complete path, for instance «<tt>uid=smith, ou=users, dc=my-domain, dc=com</tt>».)',
806
-	'texte_login_precaution' => 'Warning! This is the login which you are currently using.
799
+    'texte_informations_personnelles_1' => 'The system will now  create your personal account for this site.',
800
+    'texte_informations_personnelles_2' => '(Note: if it is a reinstallation, if your former access is still working, you can',
801
+    'texte_introductif_article' => '(Introductory text for the article.)',
802
+    'texte_jeu_caractere' => 'We advise using the universal alphabet (<tt>utf-8</tt>) on your site. This will make it possible to display text in any language. All modern browsers are fully comptabile with this character set.',
803
+    'texte_jeu_caractere_3' => 'Your site currently uses this character set:',
804
+    'texte_jeu_caractere_4' => 'If that does not correspond to your current data (this may occur after restoring your database from a backup), or if <em>you are setting up this site</em> and wish to use a different character set, please indicate the character set here:',
805
+    'texte_login_ldap_1' => '(Keep empty for anonymous access or enter complete path, for instance «<tt>uid=smith, ou=users, dc=my-domain, dc=com</tt>».)',
806
+    'texte_login_precaution' => 'Warning! This is the login which you are currently using.
807 807
  Use this form with caution...',
808
-	'texte_messagerie_agenda' => 'A messaging system lets website’s authors communicate directly into the admin area. It is linked to a calendar.',
809
-	'texte_mise_a_niveau_base_1' => 'You have just updated SPIP files.
808
+    'texte_messagerie_agenda' => 'A messaging system lets website’s authors communicate directly into the admin area. It is linked to a calendar.',
809
+    'texte_mise_a_niveau_base_1' => 'You have just updated SPIP files.
810 810
  Now you must upgrade the site
811 811
  database.',
812
-	'texte_modifier_article' => 'Edit this article:',
813
-	'texte_multilinguisme' => 'If you want to manage objects in several languages​​, with complex navigation, you can add a language selection menu to these objects, depending on the organization of your site.',
814
-	'texte_multilinguisme_trad' => 'You can also enable a system for managing links between the various translations of certain objects.',
815
-	'texte_non_compresse' => '<i>uncompressed</i> (your server does not support this feature)',
816
-	'texte_nouvelle_version_spip_1' => 'You have just installed a new version of SPIP.',
817
-	'texte_nouvelle_version_spip_2' => 'This new version requires a more thorough update than usual. If you are the webmaster of this site, please delete the file @connect@ and restart installation in order to update your database connection parameters. <p>(PS.: if you have forgotten your connection parameters, take a look at the file @connect@ before deleting it!)</p>',
818
-	'texte_operation_echec' => 'Go back to the previous page, select another database or create a new one. Verify the information provided by your hosting service.',
819
-	'texte_plus_trois_car' => 'more than 3 characters',
820
-	'texte_plusieurs_articles' => 'Several authors were found for "@cherche_auteur@":',
821
-	'texte_port_annuaire' => '(Default value is generally suitable.)',
822
-	'texte_presente_plugin' => 'This page shows the plugins available on this site. Activate the plugins you require by ticking the corresponding box.',
823
-	'texte_proposer_publication' => 'When your article is finished,<br /> you can submit it for publication.',
824
-	'texte_proxy' => 'In some cases (e.g. intranet, protected network), it is necessary to use an <i>HTTP proxy</i> to reach external sites (SPIP documentation, syndicated sites, etc.). If this is the case, enter its address in the form @proxy_en_cours@. In most cases you can leave this box empty.',
825
-	'texte_publication_articles_post_dates' => 'Which behaviour should SPIP adopt for articles whose
812
+    'texte_modifier_article' => 'Edit this article:',
813
+    'texte_multilinguisme' => 'If you want to manage objects in several languages​​, with complex navigation, you can add a language selection menu to these objects, depending on the organization of your site.',
814
+    'texte_multilinguisme_trad' => 'You can also enable a system for managing links between the various translations of certain objects.',
815
+    'texte_non_compresse' => '<i>uncompressed</i> (your server does not support this feature)',
816
+    'texte_nouvelle_version_spip_1' => 'You have just installed a new version of SPIP.',
817
+    'texte_nouvelle_version_spip_2' => 'This new version requires a more thorough update than usual. If you are the webmaster of this site, please delete the file @connect@ and restart installation in order to update your database connection parameters. <p>(PS.: if you have forgotten your connection parameters, take a look at the file @connect@ before deleting it!)</p>',
818
+    'texte_operation_echec' => 'Go back to the previous page, select another database or create a new one. Verify the information provided by your hosting service.',
819
+    'texte_plus_trois_car' => 'more than 3 characters',
820
+    'texte_plusieurs_articles' => 'Several authors were found for "@cherche_auteur@":',
821
+    'texte_port_annuaire' => '(Default value is generally suitable.)',
822
+    'texte_presente_plugin' => 'This page shows the plugins available on this site. Activate the plugins you require by ticking the corresponding box.',
823
+    'texte_proposer_publication' => 'When your article is finished,<br /> you can submit it for publication.',
824
+    'texte_proxy' => 'In some cases (e.g. intranet, protected network), it is necessary to use an <i>HTTP proxy</i> to reach external sites (SPIP documentation, syndicated sites, etc.). If this is the case, enter its address in the form @proxy_en_cours@. In most cases you can leave this box empty.',
825
+    'texte_publication_articles_post_dates' => 'Which behaviour should SPIP adopt for articles whose
826 826
   publication date has been set in
827 827
   the future?',
828
-	'texte_rappel_selection_champs' => '[Remember to select this field correctly.]',
829
-	'texte_recalcul_page' => 'If you want
828
+    'texte_rappel_selection_champs' => '[Remember to select this field correctly.]',
829
+    'texte_recalcul_page' => 'If you want
830 830
 to re-process a single page, it is easier to view that page from the public site and click "Re-process this page".',
831
-	'texte_recuperer_base' => 'Repair the database',
832
-	'texte_reference_mais_redirige' => 'article referenced in your SPIP site, but redirected to another URL.',
833
-	'texte_requetes_echouent' => '<b>When some SQL queries fail
831
+    'texte_recuperer_base' => 'Repair the database',
832
+    'texte_reference_mais_redirige' => 'article referenced in your SPIP site, but redirected to another URL.',
833
+    'texte_requetes_echouent' => '<b>When some SQL queries fail
834 834
   systematically, without apparent reason, it is possible
835 835
   that the database itself
836 836
   is the culprit.</b><p>
@@ -841,87 +841,87 @@  discard block
 block discarded – undo
841 841
   clues as to where the problem lies.</p><p>
842 842
   If the problem persists, contact your 
843 843
   service provider.</p>',
844
-	'texte_selection_langue_principale' => 'You can choose the website’s "primary language". This does not mean that you can only write articles in that language, but it will be used to determine
844
+    'texte_selection_langue_principale' => 'You can choose the website’s "primary language". This does not mean that you can only write articles in that language, but it will be used to determine
845 845
 
846 846
 <ul><li> the default date/time format on the public website,</li>
847 847
 <li> the nature of the typographical engine which will be used by SPIP for rendering text,</li>
848 848
 <li> the language in use in public website’s forms,</li>
849 849
 <li> the default language in use in the admin area.</li></ul>',
850
-	'texte_sous_titre' => 'Subtitle',
851
-	'texte_statistiques_visites' => '(dark bars = Sunday, dark curve: average visits)',
852
-	'texte_statut_attente_validation' => 'awaiting validation',
853
-	'texte_statut_publies' => 'published online',
854
-	'texte_statut_refuses' => 'rejected',
855
-	'texte_suppression_fichiers' => 'Use this command to purge all the files
850
+    'texte_sous_titre' => 'Subtitle',
851
+    'texte_statistiques_visites' => '(dark bars = Sunday, dark curve: average visits)',
852
+    'texte_statut_attente_validation' => 'awaiting validation',
853
+    'texte_statut_publies' => 'published online',
854
+    'texte_statut_refuses' => 'rejected',
855
+    'texte_suppression_fichiers' => 'Use this command to purge all the files
856 856
 in the SPIP cache. This will force recalculation of every page on the site, useful after
857 857
 significant modifications to the site’s graphics or structure.',
858
-	'texte_sur_titre' => 'Lead-in title',
859
-	'texte_table_ok' => ': this table is OK.',
860
-	'texte_tentative_recuperation' => 'Attempting to repair',
861
-	'texte_tenter_reparation' => 'Attempt to repair the database',
862
-	'texte_test_proxy' => 'To test this proxy, enter the address of a website
858
+    'texte_sur_titre' => 'Lead-in title',
859
+    'texte_table_ok' => ': this table is OK.',
860
+    'texte_tentative_recuperation' => 'Attempting to repair',
861
+    'texte_tenter_reparation' => 'Attempt to repair the database',
862
+    'texte_test_proxy' => 'To test this proxy, enter the address of a website
863 863
     for verification.',
864
-	'texte_titre_02' => 'Subject:',
865
-	'texte_titre_obligatoire' => '<b>Title</b> [Required]',
866
-	'texte_travail_article' => '@nom_auteur_modif@ edited this article @date_diff@ minutes ago',
867
-	'texte_travail_collaboratif' => 'If several editors often work on the same article, the system can mark recently "opened" articles in order to avoid multiple simultaneous editing.
864
+    'texte_titre_02' => 'Subject:',
865
+    'texte_titre_obligatoire' => '<b>Title</b> [Required]',
866
+    'texte_travail_article' => '@nom_auteur_modif@ edited this article @date_diff@ minutes ago',
867
+    'texte_travail_collaboratif' => 'If several editors often work on the same article, the system can mark recently "opened" articles in order to avoid multiple simultaneous editing.
868 868
   This option is disabled by default to avoid displaying unnecessary warning
869 869
   messages.',
870
-	'texte_vide' => 'empty',
871
-	'texte_vider_cache' => 'Empty the cache',
872
-	'titre_admin_tech' => 'Technical maintenance',
873
-	'titre_admin_vider' => 'Technical maintenance',
874
-	'titre_ajouter_un_auteur' => 'Add an author',
875
-	'titre_ajouter_un_mot' => 'Add a keyword',
876
-	'titre_cadre_afficher_article' => 'Show the articles:',
877
-	'titre_cadre_afficher_traductions' => 'Display the translation status for these languages:',
878
-	'titre_cadre_ajouter_auteur' => 'ADD AN AUTHOR:',
879
-	'titre_cadre_interieur_rubrique' => 'In section',
880
-	'titre_cadre_numero_auteur' => 'AUTHOR NUMBER',
881
-	'titre_cadre_numero_objet' => '@objet@ NUMBER:',
882
-	'titre_cadre_signature_obligatoire' => '<b>Signature</b> [Required]<br />',
883
-	'titre_config_contenu_notifications' => 'Notifications',
884
-	'titre_config_contenu_prive' => 'In the admin area',
885
-	'titre_config_contenu_public' => 'On the public site',
886
-	'titre_config_fonctions' => 'Site configuration',
887
-	'titre_config_langage' => 'Configure the language',
888
-	'titre_configuration' => 'Site configuration',
889
-	'titre_configurer_preferences' => 'Configure your preferences',
890
-	'titre_configurer_preferences_menus' => 'Settings of your menus preferences',
891
-	'titre_conflit_edition' => 'Conflict while editing',
892
-	'titre_connexion_ldap' => 'Options: <b>Your LDAP connection</b>',
893
-	'titre_groupe_mots' => 'KEYWORD GROUP:',
894
-	'titre_identite_site' => 'Site identity',
895
-	'titre_langue_article' => 'Article language',
896
-	'titre_langue_rubrique' => 'Section language',
897
-	'titre_langue_trad_article' => 'ARTICLE LANGUAGE AND TRANSLATIONS',
898
-	'titre_les_articles' => 'ARTICLES',
899
-	'titre_messagerie_agenda' => 'Messaging system and calendar',
900
-	'titre_naviguer_dans_le_site' => 'Browse the site...',
901
-	'titre_nouvelle_rubrique' => 'New section',
902
-	'titre_numero_rubrique' => 'SECTION NUMBER:',
903
-	'titre_page_articles_edit' => 'Modify: @titre@',
904
-	'titre_page_articles_page' => 'Articles',
905
-	'titre_page_articles_tous' => 'The entire site',
906
-	'titre_page_calendrier' => 'Calendar @nom_mois@ @annee@',
907
-	'titre_page_config_contenu' => 'Site configuration',
908
-	'titre_page_delete_all' => 'total and irreversible deletion',
909
-	'titre_page_recherche' => 'Search results @recherche@',
910
-	'titre_page_statistiques_referers' => 'Statistics (incoming links)',
911
-	'titre_page_upgrade' => 'SPIP upgrade',
912
-	'titre_preference_menus_favoris' => 'Favourites menu',
913
-	'titre_publication_articles_post_dates' => 'Publication of post dated articles',
914
-	'titre_reparation' => 'Repair',
915
-	'titre_suivi_petition' => 'Petitions follow-up',
916
-	'tls_ldap' => 'Transport Layer Security :',
917
-	'trad_article_traduction' => 'All the versions of this article:',
918
-	'trad_delier' => 'Stop linking to these translations',
919
-	'trad_lier' => 'This article is a translation of article number:',
920
-	'trad_new' => 'Write a new translation',
870
+    'texte_vide' => 'empty',
871
+    'texte_vider_cache' => 'Empty the cache',
872
+    'titre_admin_tech' => 'Technical maintenance',
873
+    'titre_admin_vider' => 'Technical maintenance',
874
+    'titre_ajouter_un_auteur' => 'Add an author',
875
+    'titre_ajouter_un_mot' => 'Add a keyword',
876
+    'titre_cadre_afficher_article' => 'Show the articles:',
877
+    'titre_cadre_afficher_traductions' => 'Display the translation status for these languages:',
878
+    'titre_cadre_ajouter_auteur' => 'ADD AN AUTHOR:',
879
+    'titre_cadre_interieur_rubrique' => 'In section',
880
+    'titre_cadre_numero_auteur' => 'AUTHOR NUMBER',
881
+    'titre_cadre_numero_objet' => '@objet@ NUMBER:',
882
+    'titre_cadre_signature_obligatoire' => '<b>Signature</b> [Required]<br />',
883
+    'titre_config_contenu_notifications' => 'Notifications',
884
+    'titre_config_contenu_prive' => 'In the admin area',
885
+    'titre_config_contenu_public' => 'On the public site',
886
+    'titre_config_fonctions' => 'Site configuration',
887
+    'titre_config_langage' => 'Configure the language',
888
+    'titre_configuration' => 'Site configuration',
889
+    'titre_configurer_preferences' => 'Configure your preferences',
890
+    'titre_configurer_preferences_menus' => 'Settings of your menus preferences',
891
+    'titre_conflit_edition' => 'Conflict while editing',
892
+    'titre_connexion_ldap' => 'Options: <b>Your LDAP connection</b>',
893
+    'titre_groupe_mots' => 'KEYWORD GROUP:',
894
+    'titre_identite_site' => 'Site identity',
895
+    'titre_langue_article' => 'Article language',
896
+    'titre_langue_rubrique' => 'Section language',
897
+    'titre_langue_trad_article' => 'ARTICLE LANGUAGE AND TRANSLATIONS',
898
+    'titre_les_articles' => 'ARTICLES',
899
+    'titre_messagerie_agenda' => 'Messaging system and calendar',
900
+    'titre_naviguer_dans_le_site' => 'Browse the site...',
901
+    'titre_nouvelle_rubrique' => 'New section',
902
+    'titre_numero_rubrique' => 'SECTION NUMBER:',
903
+    'titre_page_articles_edit' => 'Modify: @titre@',
904
+    'titre_page_articles_page' => 'Articles',
905
+    'titre_page_articles_tous' => 'The entire site',
906
+    'titre_page_calendrier' => 'Calendar @nom_mois@ @annee@',
907
+    'titre_page_config_contenu' => 'Site configuration',
908
+    'titre_page_delete_all' => 'total and irreversible deletion',
909
+    'titre_page_recherche' => 'Search results @recherche@',
910
+    'titre_page_statistiques_referers' => 'Statistics (incoming links)',
911
+    'titre_page_upgrade' => 'SPIP upgrade',
912
+    'titre_preference_menus_favoris' => 'Favourites menu',
913
+    'titre_publication_articles_post_dates' => 'Publication of post dated articles',
914
+    'titre_reparation' => 'Repair',
915
+    'titre_suivi_petition' => 'Petitions follow-up',
916
+    'tls_ldap' => 'Transport Layer Security :',
917
+    'trad_article_traduction' => 'All the versions of this article:',
918
+    'trad_delier' => 'Stop linking to these translations',
919
+    'trad_lier' => 'This article is a translation of article number:',
920
+    'trad_new' => 'Write a new translation',
921 921
 
922
-	// U
923
-	'utf8_convert_erreur_orig' => 'Error: the character set @charset@ is not supported.',
922
+    // U
923
+    'utf8_convert_erreur_orig' => 'Error: the character set @charset@ is not supported.',
924 924
 
925
-	// V
926
-	'version' => 'Version:'
925
+    // V
926
+    'version' => 'Version:'
927 927
 );
Please login to merge, or discard this patch.
ecrire/action/inscrire_auteur.php 2 patches
Indentation   +207 added lines, -207 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Inscription
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 
@@ -39,70 +39,70 @@  discard block
 block discarded – undo
39 39
  * @return array|string
40 40
  */
41 41
 function action_inscrire_auteur_dist($statut, $mail_complet, $nom, $options = []) {
42
-	if (!is_array($options)) {
43
-		$options = ['id' => $options];
44
-	}
45
-
46
-	if (function_exists('test_inscription')) {
47
-		$f = 'test_inscription';
48
-	} else {
49
-		$f = 'test_inscription_dist';
50
-	}
51
-	$desc = $f($statut, $mail_complet, $nom, $options);
52
-
53
-	// erreur ?
54
-	if (!is_array($desc)) {
55
-		return _T($desc);
56
-	}
57
-
58
-	include_spip('base/abstract_sql');
59
-	$res = sql_select('statut, id_auteur, login, email, nom', 'spip_auteurs', 'email=' . sql_quote($desc['email']));
60
-	// erreur ?
61
-	if (!$res) {
62
-		return _T('titre_probleme_technique');
63
-	}
64
-
65
-	$row = sql_fetch($res);
66
-	sql_free($res);
67
-	if ($row) {
68
-		if (isset($options['force_nouveau']) and $options['force_nouveau'] == true) {
69
-			$desc['id_auteur'] = $row['id_auteur'];
70
-			$desc = inscription_nouveau($desc);
71
-		} else {
72
-			$desc = $row;
73
-		}
74
-	} else // s'il n'existe pas deja, creer les identifiants
75
-	{
76
-		$desc = inscription_nouveau($desc);
77
-	}
78
-
79
-	// erreur ?
80
-	if (!is_array($desc)) {
81
-		return $desc;
82
-	}
83
-
84
-
85
-	// generer le mot de passe (ou le refaire si compte inutilise)
86
-	$desc['pass'] = creer_pass_pour_auteur($desc['id_auteur']);
87
-
88
-	// attribuer un jeton pour confirmation par clic sur un lien
89
-	$desc['jeton'] = auteur_attribuer_jeton($desc['id_auteur']);
90
-
91
-	// charger de suite cette fonction, pour ses utilitaires
92
-	$envoyer_inscription = charger_fonction('envoyer_inscription', '');
93
-	[$sujet, $msg, $from, $head] = $envoyer_inscription($desc, $nom, $statut, $options);
94
-
95
-	$notifications = charger_fonction('notifications', 'inc');
96
-	notifications_envoyer_mails($mail_complet, $msg, $sujet, $from, $head);
97
-
98
-	// Notifications
99
-	$notifications(
100
-		'inscription',
101
-		$desc['id_auteur'],
102
-		['nom' => $desc['nom'], 'email' => $desc['email']]
103
-	);
104
-
105
-	return $desc;
42
+    if (!is_array($options)) {
43
+        $options = ['id' => $options];
44
+    }
45
+
46
+    if (function_exists('test_inscription')) {
47
+        $f = 'test_inscription';
48
+    } else {
49
+        $f = 'test_inscription_dist';
50
+    }
51
+    $desc = $f($statut, $mail_complet, $nom, $options);
52
+
53
+    // erreur ?
54
+    if (!is_array($desc)) {
55
+        return _T($desc);
56
+    }
57
+
58
+    include_spip('base/abstract_sql');
59
+    $res = sql_select('statut, id_auteur, login, email, nom', 'spip_auteurs', 'email=' . sql_quote($desc['email']));
60
+    // erreur ?
61
+    if (!$res) {
62
+        return _T('titre_probleme_technique');
63
+    }
64
+
65
+    $row = sql_fetch($res);
66
+    sql_free($res);
67
+    if ($row) {
68
+        if (isset($options['force_nouveau']) and $options['force_nouveau'] == true) {
69
+            $desc['id_auteur'] = $row['id_auteur'];
70
+            $desc = inscription_nouveau($desc);
71
+        } else {
72
+            $desc = $row;
73
+        }
74
+    } else // s'il n'existe pas deja, creer les identifiants
75
+    {
76
+        $desc = inscription_nouveau($desc);
77
+    }
78
+
79
+    // erreur ?
80
+    if (!is_array($desc)) {
81
+        return $desc;
82
+    }
83
+
84
+
85
+    // generer le mot de passe (ou le refaire si compte inutilise)
86
+    $desc['pass'] = creer_pass_pour_auteur($desc['id_auteur']);
87
+
88
+    // attribuer un jeton pour confirmation par clic sur un lien
89
+    $desc['jeton'] = auteur_attribuer_jeton($desc['id_auteur']);
90
+
91
+    // charger de suite cette fonction, pour ses utilitaires
92
+    $envoyer_inscription = charger_fonction('envoyer_inscription', '');
93
+    [$sujet, $msg, $from, $head] = $envoyer_inscription($desc, $nom, $statut, $options);
94
+
95
+    $notifications = charger_fonction('notifications', 'inc');
96
+    notifications_envoyer_mails($mail_complet, $msg, $sujet, $from, $head);
97
+
98
+    // Notifications
99
+    $notifications(
100
+        'inscription',
101
+        $desc['id_auteur'],
102
+        ['nom' => $desc['nom'], 'email' => $desc['email']]
103
+    );
104
+
105
+    return $desc;
106 106
 }
107 107
 
108 108
 
@@ -125,23 +125,23 @@  discard block
 block discarded – undo
125 125
  *
126 126
  */
127 127
 function test_inscription_dist($statut, $mail, $nom, $options) {
128
-	include_spip('inc/filtres');
129
-	if (!$r = email_valide($mail)) {
130
-		return 'info_email_invalide';
131
-	}
132
-	$nom = trim(corriger_caracteres($nom));
133
-	$res = ['email' => $r, 'nom' => $nom, 'prefs' => $statut];
134
-	if (isset($options['login'])) {
135
-		$login = trim(corriger_caracteres($options['login']));
136
-		if ((strlen($login) >= _LOGIN_TROP_COURT) and (strlen($nom) <= 64)) {
137
-			$res['login'] = $login;
138
-		}
139
-	}
140
-	if (!isset($res['login']) and ((strlen($nom) < _LOGIN_TROP_COURT) or (strlen($nom) > 64))) {
141
-		return 'ecrire:info_login_trop_court';
142
-	}
143
-
144
-	return $res;
128
+    include_spip('inc/filtres');
129
+    if (!$r = email_valide($mail)) {
130
+        return 'info_email_invalide';
131
+    }
132
+    $nom = trim(corriger_caracteres($nom));
133
+    $res = ['email' => $r, 'nom' => $nom, 'prefs' => $statut];
134
+    if (isset($options['login'])) {
135
+        $login = trim(corriger_caracteres($options['login']));
136
+        if ((strlen($login) >= _LOGIN_TROP_COURT) and (strlen($nom) <= 64)) {
137
+            $res['login'] = $login;
138
+        }
139
+    }
140
+    if (!isset($res['login']) and ((strlen($nom) < _LOGIN_TROP_COURT) or (strlen($nom) > 64))) {
141
+        return 'ecrire:info_login_trop_court';
142
+    }
143
+
144
+    return $res;
145 145
 }
146 146
 
147 147
 
@@ -154,33 +154,33 @@  discard block
 block discarded – undo
154 154
  * @return mixed|string
155 155
  */
156 156
 function inscription_nouveau($desc) {
157
-	if (!isset($desc['login']) or !strlen($desc['login'])) {
158
-		$desc['login'] = test_login($desc['nom'], $desc['email']);
159
-	}
157
+    if (!isset($desc['login']) or !strlen($desc['login'])) {
158
+        $desc['login'] = test_login($desc['nom'], $desc['email']);
159
+    }
160 160
 
161
-	$desc['statut'] = 'nouveau';
162
-	include_spip('action/editer_auteur');
163
-	if (isset($desc['id_auteur'])) {
164
-		$id_auteur = $desc['id_auteur'];
165
-	} else {
166
-		$id_auteur = auteur_inserer();
167
-	}
161
+    $desc['statut'] = 'nouveau';
162
+    include_spip('action/editer_auteur');
163
+    if (isset($desc['id_auteur'])) {
164
+        $id_auteur = $desc['id_auteur'];
165
+    } else {
166
+        $id_auteur = auteur_inserer();
167
+    }
168 168
 
169
-	if (!$id_auteur) {
170
-		return _T('titre_probleme_technique');
171
-	}
169
+    if (!$id_auteur) {
170
+        return _T('titre_probleme_technique');
171
+    }
172 172
 
173
-	$desc['lang'] = $GLOBALS['spip_lang'];
173
+    $desc['lang'] = $GLOBALS['spip_lang'];
174 174
 
175
-	include_spip('inc/autoriser');
176
-	// lever l'autorisation pour pouvoir modifier le statut
177
-	autoriser_exception('modifier', 'auteur', $id_auteur);
178
-	auteur_modifier($id_auteur, $desc);
179
-	autoriser_exception('modifier', 'auteur', $id_auteur, false);
175
+    include_spip('inc/autoriser');
176
+    // lever l'autorisation pour pouvoir modifier le statut
177
+    autoriser_exception('modifier', 'auteur', $id_auteur);
178
+    auteur_modifier($id_auteur, $desc);
179
+    autoriser_exception('modifier', 'auteur', $id_auteur, false);
180 180
 
181
-	$desc['id_auteur'] = $id_auteur;
181
+    $desc['id_auteur'] = $id_auteur;
182 182
 
183
-	return $desc;
183
+    return $desc;
184 184
 }
185 185
 
186 186
 
@@ -192,29 +192,29 @@  discard block
 block discarded – undo
192 192
  * @return string
193 193
  */
194 194
 function test_login($nom, $mail) {
195
-	include_spip('inc/charsets');
196
-	$nom = strtolower(translitteration($nom));
197
-	$login_base = preg_replace('/[^\w\d_]/', '_', $nom);
198
-
199
-	// il faut eviter que le login soit vraiment trop court
200
-	if (strlen($login_base) < 3) {
201
-		$mail = strtolower(translitteration(preg_replace('/@.*/', '', $mail)));
202
-		$login_base = preg_replace('/[^\w\d]/', '_', $mail);
203
-	}
204
-	if (strlen($login_base) < 3) {
205
-		$login_base = 'user';
206
-	}
207
-
208
-	$login = $login_base;
209
-
210
-	for ($i = 1;; $i++) {
211
-		if (!sql_countsel('spip_auteurs', "login='$login'")) {
212
-			return $login;
213
-		}
214
-		$login = $login_base . $i;
215
-	}
216
-
217
-	return $login;
195
+    include_spip('inc/charsets');
196
+    $nom = strtolower(translitteration($nom));
197
+    $login_base = preg_replace('/[^\w\d_]/', '_', $nom);
198
+
199
+    // il faut eviter que le login soit vraiment trop court
200
+    if (strlen($login_base) < 3) {
201
+        $mail = strtolower(translitteration(preg_replace('/@.*/', '', $mail)));
202
+        $login_base = preg_replace('/[^\w\d]/', '_', $mail);
203
+    }
204
+    if (strlen($login_base) < 3) {
205
+        $login_base = 'user';
206
+    }
207
+
208
+    $login = $login_base;
209
+
210
+    for ($i = 1;; $i++) {
211
+        if (!sql_countsel('spip_auteurs', "login='$login'")) {
212
+            return $login;
213
+        }
214
+        $login = $login_base . $i;
215
+    }
216
+
217
+    return $login;
218 218
 }
219 219
 
220 220
 
@@ -232,26 +232,26 @@  discard block
 block discarded – undo
232 232
  */
233 233
 function envoyer_inscription_dist($desc, $nom, $mode, $options = []) {
234 234
 
235
-	$contexte = array_merge($desc, $options);
236
-	$contexte['nom'] = $nom;
237
-	$contexte['mode'] = $mode;
238
-	$contexte['url_confirm'] = generer_url_action('confirmer_inscription', '', true, true);
239
-	$contexte['url_confirm'] = parametre_url($contexte['url_confirm'], 'email', $desc['email']);
240
-	$contexte['url_confirm'] = parametre_url($contexte['url_confirm'], 'jeton', $desc['jeton']);
241
-	// S'il y a l'option redirect, on l'ajoute directement ici
242
-	if (isset($options['redirect'])) {
243
-		$contexte['url_confirm'] = parametre_url($contexte['url_confirm'], 'redirect', $options['redirect']);
244
-	}
245
-
246
-	$modele_mail = 'modeles/mail_inscription';
247
-	if (isset($options['modele_mail']) and $options['modele_mail']) {
248
-		$modele_mail = $options['modele_mail'];
249
-	}
250
-	$message = recuperer_fond($modele_mail, $contexte);
251
-	$from = ($options['from'] ?? null);
252
-	$head = null;
253
-
254
-	return ['', $message, $from, $head];
235
+    $contexte = array_merge($desc, $options);
236
+    $contexte['nom'] = $nom;
237
+    $contexte['mode'] = $mode;
238
+    $contexte['url_confirm'] = generer_url_action('confirmer_inscription', '', true, true);
239
+    $contexte['url_confirm'] = parametre_url($contexte['url_confirm'], 'email', $desc['email']);
240
+    $contexte['url_confirm'] = parametre_url($contexte['url_confirm'], 'jeton', $desc['jeton']);
241
+    // S'il y a l'option redirect, on l'ajoute directement ici
242
+    if (isset($options['redirect'])) {
243
+        $contexte['url_confirm'] = parametre_url($contexte['url_confirm'], 'redirect', $options['redirect']);
244
+    }
245
+
246
+    $modele_mail = 'modeles/mail_inscription';
247
+    if (isset($options['modele_mail']) and $options['modele_mail']) {
248
+        $modele_mail = $options['modele_mail'];
249
+    }
250
+    $message = recuperer_fond($modele_mail, $contexte);
251
+    $from = ($options['from'] ?? null);
252
+    $head = null;
253
+
254
+    return ['', $message, $from, $head];
255 255
 }
256 256
 
257 257
 
@@ -262,12 +262,12 @@  discard block
 block discarded – undo
262 262
  * @return string
263 263
  */
264 264
 function creer_pass_pour_auteur($id_auteur) {
265
-	include_spip('inc/acces');
266
-	$pass = creer_pass_aleatoire(max(_PASS_LONGUEUR_MINI, 16), $id_auteur);
267
-	include_spip('action/editer_auteur');
268
-	auteur_instituer($id_auteur, ['pass' => $pass]);
265
+    include_spip('inc/acces');
266
+    $pass = creer_pass_aleatoire(max(_PASS_LONGUEUR_MINI, 16), $id_auteur);
267
+    include_spip('action/editer_auteur');
268
+    auteur_instituer($id_auteur, ['pass' => $pass]);
269 269
 
270
-	return $pass;
270
+    return $pass;
271 271
 }
272 272
 
273 273
 /**
@@ -280,17 +280,17 @@  discard block
 block discarded – undo
280 280
  * @return string
281 281
  */
282 282
 function tester_statut_inscription($statut_tmp, $id) {
283
-	include_spip('inc/autoriser');
284
-	if ($statut_tmp) {
285
-		return autoriser('inscrireauteur', $statut_tmp, $id) ? $statut_tmp : '';
286
-	} elseif (
287
-		autoriser('inscrireauteur', $statut_tmp = '1comite', $id)
288
-		or autoriser('inscrireauteur', $statut_tmp = '6forum', $id)
289
-	) {
290
-		return $statut_tmp;
291
-	}
292
-
293
-	return '';
283
+    include_spip('inc/autoriser');
284
+    if ($statut_tmp) {
285
+        return autoriser('inscrireauteur', $statut_tmp, $id) ? $statut_tmp : '';
286
+    } elseif (
287
+        autoriser('inscrireauteur', $statut_tmp = '1comite', $id)
288
+        or autoriser('inscrireauteur', $statut_tmp = '6forum', $id)
289
+    ) {
290
+        return $statut_tmp;
291
+    }
292
+
293
+    return '';
294 294
 }
295 295
 
296 296
 
@@ -304,35 +304,35 @@  discard block
 block discarded – undo
304 304
  * @return array
305 305
  */
306 306
 function confirmer_statut_inscription($auteur) {
307
-	// securite
308
-	if ($auteur['statut'] != 'nouveau') {
309
-		return $auteur;
310
-	}
311
-
312
-	$s = $auteur['prefs'];
313
-	// securite, au cas ou prefs aurait ete corrompu (ou deja ecrase par un tableau serialize)
314
-	if (!preg_match(',^\w+$,', $s)) {
315
-		$s = '6forum';
316
-	}
317
-	include_spip('inc/autoriser');
318
-	if (!autoriser('inscrireauteur', $s)) {
319
-		return $auteur;
320
-	}
321
-
322
-	include_spip('inc/autoriser');
323
-	// accorder l'autorisation de modif du statut auteur
324
-	autoriser_exception('modifier', 'auteur', $auteur['id_auteur']);
325
-	include_spip('action/editer_auteur');
326
-	// changer le statut
327
-	auteur_modifier($auteur['id_auteur'], ['statut' => $s]);
328
-	unset($_COOKIE['spip_session']); // forcer la maj de la session
329
-	// lever l'autorisation de modif du statut auteur
330
-	autoriser_exception('modifier', 'auteur', $auteur['id_auteur'], false);
331
-
332
-	// mettre a jour le statut
333
-	$auteur['statut'] = $s;
334
-
335
-	return $auteur;
307
+    // securite
308
+    if ($auteur['statut'] != 'nouveau') {
309
+        return $auteur;
310
+    }
311
+
312
+    $s = $auteur['prefs'];
313
+    // securite, au cas ou prefs aurait ete corrompu (ou deja ecrase par un tableau serialize)
314
+    if (!preg_match(',^\w+$,', $s)) {
315
+        $s = '6forum';
316
+    }
317
+    include_spip('inc/autoriser');
318
+    if (!autoriser('inscrireauteur', $s)) {
319
+        return $auteur;
320
+    }
321
+
322
+    include_spip('inc/autoriser');
323
+    // accorder l'autorisation de modif du statut auteur
324
+    autoriser_exception('modifier', 'auteur', $auteur['id_auteur']);
325
+    include_spip('action/editer_auteur');
326
+    // changer le statut
327
+    auteur_modifier($auteur['id_auteur'], ['statut' => $s]);
328
+    unset($_COOKIE['spip_session']); // forcer la maj de la session
329
+    // lever l'autorisation de modif du statut auteur
330
+    autoriser_exception('modifier', 'auteur', $auteur['id_auteur'], false);
331
+
332
+    // mettre a jour le statut
333
+    $auteur['statut'] = $s;
334
+
335
+    return $auteur;
336 336
 }
337 337
 
338 338
 
@@ -344,14 +344,14 @@  discard block
 block discarded – undo
344 344
  * @return string
345 345
  */
346 346
 function auteur_attribuer_jeton($id_auteur) {
347
-	include_spip('inc/acces');
348
-	// s'assurer de l'unicite du jeton pour le couple (email,cookie)
349
-	do {
350
-		$jeton = creer_uniqid();
351
-		sql_updateq('spip_auteurs', ['cookie_oubli' => $jeton], 'id_auteur=' . intval($id_auteur));
352
-	} while (sql_countsel('spip_auteurs', 'cookie_oubli=' . sql_quote($jeton)) > 1);
353
-
354
-	return $jeton;
347
+    include_spip('inc/acces');
348
+    // s'assurer de l'unicite du jeton pour le couple (email,cookie)
349
+    do {
350
+        $jeton = creer_uniqid();
351
+        sql_updateq('spip_auteurs', ['cookie_oubli' => $jeton], 'id_auteur=' . intval($id_auteur));
352
+    } while (sql_countsel('spip_auteurs', 'cookie_oubli=' . sql_quote($jeton)) > 1);
353
+
354
+    return $jeton;
355 355
 }
356 356
 
357 357
 /**
@@ -361,15 +361,15 @@  discard block
 block discarded – undo
361 361
  * @return array|bool
362 362
  */
363 363
 function auteur_verifier_jeton($jeton) {
364
-	// refuser un jeton corrompu
365
-	if (preg_match(',[^0-9a-f.],i', $jeton)) {
366
-		return false;
367
-	}
364
+    // refuser un jeton corrompu
365
+    if (preg_match(',[^0-9a-f.],i', $jeton)) {
366
+        return false;
367
+    }
368 368
 
369
-	// on peut tomber sur un jeton compose uniquement de chiffres, il faut forcer le $type pour sql_quote pour eviter de planter
370
-	$desc = sql_fetsel('*', 'spip_auteurs', 'cookie_oubli=' . sql_quote($jeton, '', 'string'));
369
+    // on peut tomber sur un jeton compose uniquement de chiffres, il faut forcer le $type pour sql_quote pour eviter de planter
370
+    $desc = sql_fetsel('*', 'spip_auteurs', 'cookie_oubli=' . sql_quote($jeton, '', 'string'));
371 371
 
372
-	return $desc;
372
+    return $desc;
373 373
 }
374 374
 
375 375
 /**
@@ -379,5 +379,5 @@  discard block
 block discarded – undo
379 379
  * @return bool
380 380
  */
381 381
 function auteur_effacer_jeton($id_auteur) {
382
-	return sql_updateq('spip_auteurs', ['cookie_oubli' => ''], 'id_auteur=' . intval($id_auteur));
382
+    return sql_updateq('spip_auteurs', ['cookie_oubli' => ''], 'id_auteur=' . intval($id_auteur));
383 383
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	include_spip('base/abstract_sql');
59
-	$res = sql_select('statut, id_auteur, login, email, nom', 'spip_auteurs', 'email=' . sql_quote($desc['email']));
59
+	$res = sql_select('statut, id_auteur, login, email, nom', 'spip_auteurs', 'email='.sql_quote($desc['email']));
60 60
 	// erreur ?
61 61
 	if (!$res) {
62 62
 		return _T('titre_probleme_technique');
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
 
208 208
 	$login = $login_base;
209 209
 
210
-	for ($i = 1;; $i++) {
210
+	for ($i = 1; ; $i++) {
211 211
 		if (!sql_countsel('spip_auteurs', "login='$login'")) {
212 212
 			return $login;
213 213
 		}
214
-		$login = $login_base . $i;
214
+		$login = $login_base.$i;
215 215
 	}
216 216
 
217 217
 	return $login;
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
 	// s'assurer de l'unicite du jeton pour le couple (email,cookie)
349 349
 	do {
350 350
 		$jeton = creer_uniqid();
351
-		sql_updateq('spip_auteurs', ['cookie_oubli' => $jeton], 'id_auteur=' . intval($id_auteur));
352
-	} while (sql_countsel('spip_auteurs', 'cookie_oubli=' . sql_quote($jeton)) > 1);
351
+		sql_updateq('spip_auteurs', ['cookie_oubli' => $jeton], 'id_auteur='.intval($id_auteur));
352
+	} while (sql_countsel('spip_auteurs', 'cookie_oubli='.sql_quote($jeton)) > 1);
353 353
 
354 354
 	return $jeton;
355 355
 }
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 	}
368 368
 
369 369
 	// on peut tomber sur un jeton compose uniquement de chiffres, il faut forcer le $type pour sql_quote pour eviter de planter
370
-	$desc = sql_fetsel('*', 'spip_auteurs', 'cookie_oubli=' . sql_quote($jeton, '', 'string'));
370
+	$desc = sql_fetsel('*', 'spip_auteurs', 'cookie_oubli='.sql_quote($jeton, '', 'string'));
371 371
 
372 372
 	return $desc;
373 373
 }
@@ -379,5 +379,5 @@  discard block
 block discarded – undo
379 379
  * @return bool
380 380
  */
381 381
 function auteur_effacer_jeton($id_auteur) {
382
-	return sql_updateq('spip_auteurs', ['cookie_oubli' => ''], 'id_auteur=' . intval($id_auteur));
382
+	return sql_updateq('spip_auteurs', ['cookie_oubli' => ''], 'id_auteur='.intval($id_auteur));
383 383
 }
Please login to merge, or discard this patch.
ecrire/notifications/instituerarticle.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -11,53 +11,53 @@
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 // Fonction appelee par divers pipelines
18 18
 function notifications_instituerarticle_dist($quoi, $id_article, $options) {
19 19
 
20
-	// ne devrait jamais se produire
21
-	if ($options['statut'] == $options['statut_ancien']) {
22
-		spip_log('statut inchange', 'notifications');
23
-
24
-		return;
25
-	}
26
-
27
-	include_spip('inc/texte');
28
-
29
-	$modele = '';
30
-	if ($options['statut'] == 'publie') {
31
-		if (
32
-			$GLOBALS['meta']['post_dates'] == 'non'
33
-			and strtotime($options['date']) > time()
34
-		) {
35
-			$modele = 'notifications/article_valide';
36
-		} else {
37
-			$modele = 'notifications/article_publie';
38
-		}
39
-	}
40
-
41
-	if ($options['statut'] == 'prop' and $options['statut_ancien'] != 'publie') {
42
-		$modele = 'notifications/article_propose';
43
-	}
44
-
45
-	if ($modele) {
46
-		$destinataires = [];
47
-		if ($GLOBALS['meta']['suivi_edito'] == 'oui') {
48
-			$destinataires = explode(',', $GLOBALS['meta']['adresse_suivi']);
49
-		}
50
-
51
-
52
-		$destinataires = pipeline(
53
-			'notifications_destinataires',
54
-			[
55
-				'args' => ['quoi' => $quoi, 'id' => $id_article, 'options' => $options],
56
-				'data' => $destinataires
57
-			]
58
-		);
59
-
60
-		$texte = email_notification_article($id_article, $modele);
61
-		notifications_envoyer_mails($destinataires, $texte);
62
-	}
20
+    // ne devrait jamais se produire
21
+    if ($options['statut'] == $options['statut_ancien']) {
22
+        spip_log('statut inchange', 'notifications');
23
+
24
+        return;
25
+    }
26
+
27
+    include_spip('inc/texte');
28
+
29
+    $modele = '';
30
+    if ($options['statut'] == 'publie') {
31
+        if (
32
+            $GLOBALS['meta']['post_dates'] == 'non'
33
+            and strtotime($options['date']) > time()
34
+        ) {
35
+            $modele = 'notifications/article_valide';
36
+        } else {
37
+            $modele = 'notifications/article_publie';
38
+        }
39
+    }
40
+
41
+    if ($options['statut'] == 'prop' and $options['statut_ancien'] != 'publie') {
42
+        $modele = 'notifications/article_propose';
43
+    }
44
+
45
+    if ($modele) {
46
+        $destinataires = [];
47
+        if ($GLOBALS['meta']['suivi_edito'] == 'oui') {
48
+            $destinataires = explode(',', $GLOBALS['meta']['adresse_suivi']);
49
+        }
50
+
51
+
52
+        $destinataires = pipeline(
53
+            'notifications_destinataires',
54
+            [
55
+                'args' => ['quoi' => $quoi, 'id' => $id_article, 'options' => $options],
56
+                'data' => $destinataires
57
+            ]
58
+        );
59
+
60
+        $texte = email_notification_article($id_article, $modele);
61
+        notifications_envoyer_mails($destinataires, $texte);
62
+    }
63 63
 }
Please login to merge, or discard this patch.
ecrire/req/sqlite3.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
 
22 22
 
23 23
 function req_sqlite3_dist($addr, $port, $login, $pass, $db = '', $prefixe = '') {
24
-	return req_sqlite_dist($addr, $port, $login, $pass, $db, $prefixe, $sqlite_version = 3);
24
+    return req_sqlite_dist($addr, $port, $login, $pass, $db, $prefixe, $sqlite_version = 3);
25 25
 }
26 26
 
27 27
 
28 28
 function spip_sqlite3_constantes() {
29
-	if (!defined('SPIP_SQLITE3_ASSOC')) {
30
-		define('SPIP_SQLITE3_ASSOC', PDO::FETCH_ASSOC);
31
-		define('SPIP_SQLITE3_NUM', PDO::FETCH_NUM);
32
-		define('SPIP_SQLITE3_BOTH', PDO::FETCH_BOTH);
33
-	}
29
+    if (!defined('SPIP_SQLITE3_ASSOC')) {
30
+        define('SPIP_SQLITE3_ASSOC', PDO::FETCH_ASSOC);
31
+        define('SPIP_SQLITE3_NUM', PDO::FETCH_NUM);
32
+        define('SPIP_SQLITE3_BOTH', PDO::FETCH_BOTH);
33
+    }
34 34
 }
35 35
 
36 36
 function spip_versions_sqlite3() {
37
-	return _sqlite_charger_version(3) ? 3 : false;
37
+    return _sqlite_charger_version(3) ? 3 : false;
38 38
 }
Please login to merge, or discard this patch.