Completed
Push — master ( 0528ed...3f7b24 )
by cam
01:54
created
ecrire/public/styliser_par_z.php 1 patch
Indentation   +305 added lines, -305 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @package SPIP\Core\Public\Styliser
19 19
  **/
20 20
 if (!defined('_ECRIRE_INC_VERSION')) {
21
-	return;
21
+    return;
22 22
 }
23 23
 
24 24
 /**
@@ -28,190 +28,190 @@  discard block
 block discarded – undo
28 28
  * @return array Données modifiées du pipeline
29 29
  */
30 30
 function public_styliser_par_z_dist($flux) {
31
-	static $prefix_path = null;
32
-	static $prefix_length;
33
-	static $z_blocs;
34
-	static $apl_constant;
35
-	static $page;
36
-	static $disponible = [];
37
-	static $echafauder;
38
-	static $prepend = '';
39
-
40
-	if (!isset($prefix_path)) {
41
-		$z_blocs = z_blocs(test_espace_prive());
42
-		if (test_espace_prive()) {
43
-			$prefix_path = 'prive/squelettes/';
44
-			$prefix_length = strlen($prefix_path);
45
-			$apl_constant = '_ECRIRE_AJAX_PARALLEL_LOAD';
46
-			$page = 'exec';
47
-			$echafauder = charger_fonction('echafauder', 'prive', true);
48
-			define('_ZCORE_EXCLURE_PATH', '');
49
-		} else {
50
-			$prefix_path = '';
51
-			$prefix_length = 0;
52
-			$apl_constant = '_Z_AJAX_PARALLEL_LOAD';
53
-			$page = _SPIP_PAGE;
54
-			$echafauder = charger_fonction('echafauder', 'public', true);
55
-			define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist' . (defined('_DIR_PLUGIN_DIST') ? '|\b' . rtrim(
56
-				(string) _DIR_PLUGIN_DIST,
57
-				'/'
58
-			) : ''));
59
-		}
60
-		$prepend = (defined('_Z_PREPEND_PATH') ? _Z_PREPEND_PATH : '');
61
-	}
62
-	$z_contenu = reset($z_blocs); // contenu par defaut
63
-
64
-	$fond = $flux['args']['fond'];
65
-
66
-	if ($prepend || strncmp((string) $fond, (string) $prefix_path, $prefix_length) == 0) {
67
-		$fond = substr((string) $fond, $prefix_length);
68
-		$squelette = $flux['data'];
69
-		$ext = $flux['args']['ext'];
70
-		// Ajax Parallel loading : ne pas calculer le bloc, mais renvoyer un js qui le loadera en ajax
71
-		if (
72
-			defined('_Z_AJAX_PARALLEL_LOAD_OK')
73
-			&& ($dir = explode('/', $fond))
74
-			&& count($dir) == 2 // pas un sous repertoire
75
-			&& ($dir = reset($dir))
76
-			&& in_array($dir, $z_blocs) // verifier deja qu'on est dans un bloc Z
77
-			&& defined($apl_constant)
78
-			&& in_array($dir, explode(',', (string) constant($apl_constant))) // et dans un demande en APL
79
-			&& ($pipe = z_trouver_bloc($prefix_path . $prepend, $dir, 'z_apl', $ext)) // et qui contient le squelette APL
80
-		) {
81
-			$flux['data'] = $pipe;
82
-
83
-			return $flux;
84
-		}
85
-
86
-		// surcharger aussi les squelettes venant de squelettes-dist/
87
-		if ($squelette && !z_fond_valide($squelette)) {
88
-			$squelette = '';
89
-			$echafauder = '';
90
-		}
91
-		if ($prepend) {
92
-			$squelette = substr((string) find_in_path($prefix_path . $prepend . "$fond.$ext"), 0, -strlen(".$ext"));
93
-			if ($squelette) {
94
-				$flux['data'] = $squelette;
95
-			}
96
-		}
97
-
98
-		// gerer les squelettes non trouves
99
-		// -> router vers les /dist.html
100
-		// ou scaffolding ou page automatique les contenus
101
-		if (!$squelette) {
102
-			// si on est sur un ?page=XX non trouve
103
-			if (
104
-				isset($flux['args']['contexte'][$page]) && $flux['args']['contexte'][$page] == $fond
105
-				|| isset($flux['args']['contexte']['type-page']) && $flux['args']['contexte']['type-page'] == $fond
106
-				|| $fond == 'sommaire' && (!isset($flux['args']['contexte'][$page]) || !$flux['args']['contexte'][$page])
107
-			) {
108
-				// si on est sur un ?page=XX non trouve
109
-				// se brancher sur contenu/xx si il existe
110
-				// ou si c'est un objet spip, associe a une table, utiliser le fond homonyme
111
-				if (!isset($disponible[$fond])) {
112
-					$disponible[$fond] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $fond, $ext, (bool) $echafauder);
113
-				}
114
-
115
-				if ($disponible[$fond]) {
116
-					$flux['data'] = substr((string) find_in_path($prefix_path . "page.$ext"), 0, -strlen(".$ext"));
117
-				}
118
-			}
119
-
120
-			// echafaudage :
121
-			// si c'est un fond de contenu d'un objet en base
122
-			// generer un fond automatique a la volee pour les webmestres
123
-			elseif (strncmp($fond, "$z_contenu/", strlen((string) $z_contenu) + 1) == 0) {
124
-				$type = substr($fond, strlen((string) $z_contenu) + 1);
125
-				if ($type == 'page' && isset($flux['args']['contexte'][$page])) {
126
-					$type = $flux['args']['contexte'][$page];
127
-				}
128
-				if (!isset($disponible[$type])) {
129
-					$disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, (bool) $echafauder);
130
-				}
131
-				if (is_string($disponible[$type])) {
132
-					$flux['data'] = $disponible[$type];
133
-				} elseif (
134
-					$echafauder
135
-					&& include_spip('inc/autoriser')
136
-					&& isset($GLOBALS['visiteur_session']['statut'])
137
-					&& autoriser('echafauder', $type)
138
-					&& ($is = $disponible[$type])
139
-					&& is_array($is)
140
-				) {
141
-					$flux['data'] = $echafauder($type, $is[0], $is[1], $is[2], $ext);
142
-				} else {
143
-					$flux['data'] = ($disponible['404'] = z_contenu_disponible(
144
-						$prefix_path . $prepend,
145
-						$z_contenu,
146
-						'404',
147
-						$ext,
148
-						(bool) $echafauder
149
-					));
150
-				}
151
-			}
152
-
153
-			// sinon, si on demande un fond non trouve dans un des autres blocs
154
-			// et si il y a bien un contenu correspondant ou echafaudable
155
-			// se rabbatre sur le dist.html du bloc concerne
156
-			else {
157
-				if (
158
-					($dir = explode('/', $fond))
159
-					&& ($dir = reset($dir))
160
-					&& $dir !== $z_contenu
161
-					&& in_array($dir, $z_blocs)
162
-				) {
163
-					$type = substr($fond, strlen("$dir/"));
164
-					if ($type == 'page' && isset($flux['args']['contexte'][$page])) {
165
-						$type = $flux['args']['contexte'][$page];
166
-					}
167
-					if ($type !== 'page' && !isset($disponible[$type])) {
168
-						$disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, (bool) $echafauder);
169
-					}
170
-					if ($type == 'page' || $disponible[$type]) {
171
-						$flux['data'] = z_trouver_bloc($prefix_path . $prepend, $dir, 'dist', $ext);
172
-					}
173
-				}
174
-			}
175
-			$squelette = $flux['data'];
176
-		}
177
-
178
-		// layout specifiques par type et compositions :
179
-		// body-article.html
180
-		// body-sommaire.html
181
-		// pour des raisons de perfo, les declinaisons doivent etre dans le
182
-		// meme dossier que body.html
183
-		$f = null;
184
-		if ($fond == 'body' && str_ends_with((string) $squelette, $fond)) {
185
-			if (
186
-				isset($flux['args']['contexte']['type-page'])
187
-				&& (
188
-					isset($flux['args']['contexte']['composition']) && file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page'] . '-' . $flux['args']['contexte']['composition']) . ".$ext")
189
-					|| file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page']) . ".$ext")
190
-				)
191
-			) {
192
-				$flux['data'] = $f;
193
-			}
194
-		} elseif (
195
-			$fond == 'structure'
196
-			&& z_sanitize_var_zajax()
197
-			&& ($f = find_in_path($prefix_path . $prepend . 'ajax' . ".$ext"))
198
-		) {
199
-			$flux['data'] = substr((string) $f, 0, -strlen(".$ext"));
200
-		} elseif (
201
-			// chercher le fond correspondant a la composition
202
-			isset($flux['args']['contexte']['composition'])
203
-			&& (basename($fond) == 'page' || $squelette && str_ends_with((string) $squelette, $fond))
204
-			&& ($dir = substr($fond, $prefix_length))
205
-			&& ($dir = explode('/', $dir))
206
-			&& ($dir = reset($dir))
207
-			&& in_array($dir, $z_blocs)
208
-			&& ($f = find_in_path($prefix_path . $prepend . $fond . '-' . $flux['args']['contexte']['composition'] . ".$ext"))
209
-		) {
210
-			$flux['data'] = substr((string) $f, 0, -strlen(".$ext"));
211
-		}
212
-	}
213
-
214
-	return $flux;
31
+    static $prefix_path = null;
32
+    static $prefix_length;
33
+    static $z_blocs;
34
+    static $apl_constant;
35
+    static $page;
36
+    static $disponible = [];
37
+    static $echafauder;
38
+    static $prepend = '';
39
+
40
+    if (!isset($prefix_path)) {
41
+        $z_blocs = z_blocs(test_espace_prive());
42
+        if (test_espace_prive()) {
43
+            $prefix_path = 'prive/squelettes/';
44
+            $prefix_length = strlen($prefix_path);
45
+            $apl_constant = '_ECRIRE_AJAX_PARALLEL_LOAD';
46
+            $page = 'exec';
47
+            $echafauder = charger_fonction('echafauder', 'prive', true);
48
+            define('_ZCORE_EXCLURE_PATH', '');
49
+        } else {
50
+            $prefix_path = '';
51
+            $prefix_length = 0;
52
+            $apl_constant = '_Z_AJAX_PARALLEL_LOAD';
53
+            $page = _SPIP_PAGE;
54
+            $echafauder = charger_fonction('echafauder', 'public', true);
55
+            define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist' . (defined('_DIR_PLUGIN_DIST') ? '|\b' . rtrim(
56
+                (string) _DIR_PLUGIN_DIST,
57
+                '/'
58
+            ) : ''));
59
+        }
60
+        $prepend = (defined('_Z_PREPEND_PATH') ? _Z_PREPEND_PATH : '');
61
+    }
62
+    $z_contenu = reset($z_blocs); // contenu par defaut
63
+
64
+    $fond = $flux['args']['fond'];
65
+
66
+    if ($prepend || strncmp((string) $fond, (string) $prefix_path, $prefix_length) == 0) {
67
+        $fond = substr((string) $fond, $prefix_length);
68
+        $squelette = $flux['data'];
69
+        $ext = $flux['args']['ext'];
70
+        // Ajax Parallel loading : ne pas calculer le bloc, mais renvoyer un js qui le loadera en ajax
71
+        if (
72
+            defined('_Z_AJAX_PARALLEL_LOAD_OK')
73
+            && ($dir = explode('/', $fond))
74
+            && count($dir) == 2 // pas un sous repertoire
75
+            && ($dir = reset($dir))
76
+            && in_array($dir, $z_blocs) // verifier deja qu'on est dans un bloc Z
77
+            && defined($apl_constant)
78
+            && in_array($dir, explode(',', (string) constant($apl_constant))) // et dans un demande en APL
79
+            && ($pipe = z_trouver_bloc($prefix_path . $prepend, $dir, 'z_apl', $ext)) // et qui contient le squelette APL
80
+        ) {
81
+            $flux['data'] = $pipe;
82
+
83
+            return $flux;
84
+        }
85
+
86
+        // surcharger aussi les squelettes venant de squelettes-dist/
87
+        if ($squelette && !z_fond_valide($squelette)) {
88
+            $squelette = '';
89
+            $echafauder = '';
90
+        }
91
+        if ($prepend) {
92
+            $squelette = substr((string) find_in_path($prefix_path . $prepend . "$fond.$ext"), 0, -strlen(".$ext"));
93
+            if ($squelette) {
94
+                $flux['data'] = $squelette;
95
+            }
96
+        }
97
+
98
+        // gerer les squelettes non trouves
99
+        // -> router vers les /dist.html
100
+        // ou scaffolding ou page automatique les contenus
101
+        if (!$squelette) {
102
+            // si on est sur un ?page=XX non trouve
103
+            if (
104
+                isset($flux['args']['contexte'][$page]) && $flux['args']['contexte'][$page] == $fond
105
+                || isset($flux['args']['contexte']['type-page']) && $flux['args']['contexte']['type-page'] == $fond
106
+                || $fond == 'sommaire' && (!isset($flux['args']['contexte'][$page]) || !$flux['args']['contexte'][$page])
107
+            ) {
108
+                // si on est sur un ?page=XX non trouve
109
+                // se brancher sur contenu/xx si il existe
110
+                // ou si c'est un objet spip, associe a une table, utiliser le fond homonyme
111
+                if (!isset($disponible[$fond])) {
112
+                    $disponible[$fond] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $fond, $ext, (bool) $echafauder);
113
+                }
114
+
115
+                if ($disponible[$fond]) {
116
+                    $flux['data'] = substr((string) find_in_path($prefix_path . "page.$ext"), 0, -strlen(".$ext"));
117
+                }
118
+            }
119
+
120
+            // echafaudage :
121
+            // si c'est un fond de contenu d'un objet en base
122
+            // generer un fond automatique a la volee pour les webmestres
123
+            elseif (strncmp($fond, "$z_contenu/", strlen((string) $z_contenu) + 1) == 0) {
124
+                $type = substr($fond, strlen((string) $z_contenu) + 1);
125
+                if ($type == 'page' && isset($flux['args']['contexte'][$page])) {
126
+                    $type = $flux['args']['contexte'][$page];
127
+                }
128
+                if (!isset($disponible[$type])) {
129
+                    $disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, (bool) $echafauder);
130
+                }
131
+                if (is_string($disponible[$type])) {
132
+                    $flux['data'] = $disponible[$type];
133
+                } elseif (
134
+                    $echafauder
135
+                    && include_spip('inc/autoriser')
136
+                    && isset($GLOBALS['visiteur_session']['statut'])
137
+                    && autoriser('echafauder', $type)
138
+                    && ($is = $disponible[$type])
139
+                    && is_array($is)
140
+                ) {
141
+                    $flux['data'] = $echafauder($type, $is[0], $is[1], $is[2], $ext);
142
+                } else {
143
+                    $flux['data'] = ($disponible['404'] = z_contenu_disponible(
144
+                        $prefix_path . $prepend,
145
+                        $z_contenu,
146
+                        '404',
147
+                        $ext,
148
+                        (bool) $echafauder
149
+                    ));
150
+                }
151
+            }
152
+
153
+            // sinon, si on demande un fond non trouve dans un des autres blocs
154
+            // et si il y a bien un contenu correspondant ou echafaudable
155
+            // se rabbatre sur le dist.html du bloc concerne
156
+            else {
157
+                if (
158
+                    ($dir = explode('/', $fond))
159
+                    && ($dir = reset($dir))
160
+                    && $dir !== $z_contenu
161
+                    && in_array($dir, $z_blocs)
162
+                ) {
163
+                    $type = substr($fond, strlen("$dir/"));
164
+                    if ($type == 'page' && isset($flux['args']['contexte'][$page])) {
165
+                        $type = $flux['args']['contexte'][$page];
166
+                    }
167
+                    if ($type !== 'page' && !isset($disponible[$type])) {
168
+                        $disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, (bool) $echafauder);
169
+                    }
170
+                    if ($type == 'page' || $disponible[$type]) {
171
+                        $flux['data'] = z_trouver_bloc($prefix_path . $prepend, $dir, 'dist', $ext);
172
+                    }
173
+                }
174
+            }
175
+            $squelette = $flux['data'];
176
+        }
177
+
178
+        // layout specifiques par type et compositions :
179
+        // body-article.html
180
+        // body-sommaire.html
181
+        // pour des raisons de perfo, les declinaisons doivent etre dans le
182
+        // meme dossier que body.html
183
+        $f = null;
184
+        if ($fond == 'body' && str_ends_with((string) $squelette, $fond)) {
185
+            if (
186
+                isset($flux['args']['contexte']['type-page'])
187
+                && (
188
+                    isset($flux['args']['contexte']['composition']) && file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page'] . '-' . $flux['args']['contexte']['composition']) . ".$ext")
189
+                    || file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page']) . ".$ext")
190
+                )
191
+            ) {
192
+                $flux['data'] = $f;
193
+            }
194
+        } elseif (
195
+            $fond == 'structure'
196
+            && z_sanitize_var_zajax()
197
+            && ($f = find_in_path($prefix_path . $prepend . 'ajax' . ".$ext"))
198
+        ) {
199
+            $flux['data'] = substr((string) $f, 0, -strlen(".$ext"));
200
+        } elseif (
201
+            // chercher le fond correspondant a la composition
202
+            isset($flux['args']['contexte']['composition'])
203
+            && (basename($fond) == 'page' || $squelette && str_ends_with((string) $squelette, $fond))
204
+            && ($dir = substr($fond, $prefix_length))
205
+            && ($dir = explode('/', $dir))
206
+            && ($dir = reset($dir))
207
+            && in_array($dir, $z_blocs)
208
+            && ($f = find_in_path($prefix_path . $prepend . $fond . '-' . $flux['args']['contexte']['composition'] . ".$ext"))
209
+        ) {
210
+            $flux['data'] = substr((string) $f, 0, -strlen(".$ext"));
211
+        }
212
+    }
213
+
214
+    return $flux;
215 215
 }
216 216
 
217 217
 /**
@@ -221,18 +221,18 @@  discard block
 block discarded – undo
221 221
  * @return array
222 222
  */
223 223
 function z_blocs($espace_prive = false) {
224
-	if ($espace_prive) {
225
-		return ($GLOBALS['z_blocs_ecrire'] ?? [
226
-			'contenu',
227
-			'navigation',
228
-			'extra',
229
-			'head',
230
-			'hierarchie',
231
-			'top'
232
-		]);
233
-	}
234
-
235
-	return ($GLOBALS['z_blocs'] ?? ['contenu']);
224
+    if ($espace_prive) {
225
+        return ($GLOBALS['z_blocs_ecrire'] ?? [
226
+            'contenu',
227
+            'navigation',
228
+            'extra',
229
+            'head',
230
+            'hierarchie',
231
+            'top'
232
+        ]);
233
+    }
234
+
235
+    return ($GLOBALS['z_blocs'] ?? ['contenu']);
236 236
 }
237 237
 
238 238
 /**
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
  * @return mixed
248 248
  */
249 249
 function z_contenu_disponible($prefix_path, $z_contenu, $type, $ext, $echafauder = true) {
250
-	if ($d = z_trouver_bloc($prefix_path, $z_contenu, $type, $ext)) {
251
-		return $d;
252
-	}
250
+    if ($d = z_trouver_bloc($prefix_path, $z_contenu, $type, $ext)) {
251
+        return $d;
252
+    }
253 253
 
254
-	return $echafauder ? z_echafaudable($type) : false;
254
+    return $echafauder ? z_echafaudable($type) : false;
255 255
 }
256 256
 
257 257
 /**
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
  *   `true` si on peut l'utiliser, `false` sinon.
266 266
  **/
267 267
 function z_fond_valide($squelette) {
268
-	return !_ZCORE_EXCLURE_PATH || !preg_match(',(' . _ZCORE_EXCLURE_PATH . ')/,', $squelette);
268
+    return !_ZCORE_EXCLURE_PATH || !preg_match(',(' . _ZCORE_EXCLURE_PATH . ')/,', $squelette);
269 269
 }
270 270
 
271 271
 /**
@@ -283,14 +283,14 @@  discard block
 block discarded – undo
283 283
  * @return string
284 284
  */
285 285
 function z_trouver_bloc($prefix_path, $bloc, $fond, $ext) {
286
-	if (
287
-		defined('_ZCORE_BLOC_PREFIX_SKEL') && ($f = find_in_path("$prefix_path$bloc/$bloc.$fond.$ext")) && z_fond_valide($f)
288
-		|| ($f = find_in_path("$prefix_path$bloc/$fond.$ext")) && z_fond_valide($f)
289
-	) {
290
-		return substr((string) $f, 0, -strlen(".$ext"));
291
-	}
292
-
293
-	return '';
286
+    if (
287
+        defined('_ZCORE_BLOC_PREFIX_SKEL') && ($f = find_in_path("$prefix_path$bloc/$bloc.$fond.$ext")) && z_fond_valide($f)
288
+        || ($f = find_in_path("$prefix_path$bloc/$fond.$ext")) && z_fond_valide($f)
289
+    ) {
290
+        return substr((string) $f, 0, -strlen(".$ext"));
291
+    }
292
+
293
+    return '';
294 294
 }
295 295
 
296 296
 /**
@@ -302,52 +302,52 @@  discard block
 block discarded – undo
302 302
  * @return bool
303 303
  */
304 304
 function z_echafaudable($type) {
305
-	static $pages = null;
306
-	static $echafaudable = [];
307
-	if (isset($echafaudable[$type])) {
308
-		return $echafaudable[$type];
309
-	}
310
-	if (preg_match(',[^\w],', $type)) {
311
-		return $echafaudable[$type] = false;
312
-	}
313
-
314
-	if (test_espace_prive()) {
315
-		if (!function_exists('trouver_objet_exec')) {
316
-			include_spip('inc/pipelines_ecrire');
317
-		}
318
-		if ($e = trouver_objet_exec($type)) {
319
-			return $echafaudable[$type] = [$e['table'], $e['table_objet_sql'], $e];
320
-		} else {
321
-			// peut etre c'est un exec=types qui liste tous les objets "type"
322
-			if (
323
-				($t = objet_type($type, false)) !== $type
324
-				&& ($e = trouver_objet_exec($t))
325
-			) {
326
-				return $echafaudable[$type] = [$e['table'], $e['table_objet_sql'], $t];
327
-			}
328
-		}
329
-	} else {
330
-		if (is_null($pages)) {
331
-			$pages = [];
332
-			$liste = lister_tables_objets_sql();
333
-			foreach ($liste as $t => $d) {
334
-				if ($d['page']) {
335
-					$pages[$d['page']] = [$d['table_objet'], $t];
336
-				}
337
-			}
338
-		}
339
-		if (!isset($pages[$type])) {
340
-			return $echafaudable[$type] = false;
341
-		}
342
-		if ((is_countable($pages[$type]) ? count($pages[$type]) : 0) == 2) {
343
-			$trouver_table = charger_fonction('trouver_table', 'base');
344
-			$pages[$type][] = $trouver_table(reset($pages[$type]));
345
-		}
346
-
347
-		return $echafaudable[$type] = $pages[$type];
348
-	}
349
-
350
-	return $echafaudable[$type] = false;
305
+    static $pages = null;
306
+    static $echafaudable = [];
307
+    if (isset($echafaudable[$type])) {
308
+        return $echafaudable[$type];
309
+    }
310
+    if (preg_match(',[^\w],', $type)) {
311
+        return $echafaudable[$type] = false;
312
+    }
313
+
314
+    if (test_espace_prive()) {
315
+        if (!function_exists('trouver_objet_exec')) {
316
+            include_spip('inc/pipelines_ecrire');
317
+        }
318
+        if ($e = trouver_objet_exec($type)) {
319
+            return $echafaudable[$type] = [$e['table'], $e['table_objet_sql'], $e];
320
+        } else {
321
+            // peut etre c'est un exec=types qui liste tous les objets "type"
322
+            if (
323
+                ($t = objet_type($type, false)) !== $type
324
+                && ($e = trouver_objet_exec($t))
325
+            ) {
326
+                return $echafaudable[$type] = [$e['table'], $e['table_objet_sql'], $t];
327
+            }
328
+        }
329
+    } else {
330
+        if (is_null($pages)) {
331
+            $pages = [];
332
+            $liste = lister_tables_objets_sql();
333
+            foreach ($liste as $t => $d) {
334
+                if ($d['page']) {
335
+                    $pages[$d['page']] = [$d['table_objet'], $t];
336
+                }
337
+            }
338
+        }
339
+        if (!isset($pages[$type])) {
340
+            return $echafaudable[$type] = false;
341
+        }
342
+        if ((is_countable($pages[$type]) ? count($pages[$type]) : 0) == 2) {
343
+            $trouver_table = charger_fonction('trouver_table', 'base');
344
+            $pages[$type][] = $trouver_table(reset($pages[$type]));
345
+        }
346
+
347
+        return $echafaudable[$type] = $pages[$type];
348
+    }
349
+
350
+    return $echafaudable[$type] = false;
351 351
 }
352 352
 
353 353
 
@@ -364,42 +364,42 @@  discard block
 block discarded – undo
364 364
  * @return string
365 365
  */
366 366
 function prive_echafauder_dist($exec, $table, $table_sql, $desc_exec, $ext) {
367
-	$scaffold = '';
368
-
369
-	// page objet ou objet_edit
370
-	if (is_array($desc_exec)) {
371
-		$type = $desc_exec['type'];
372
-		$primary = $desc_exec['id_table_objet'];
373
-
374
-		if ($desc_exec['edition'] === false) {
375
-			$fond = 'objet';
376
-		} else {
377
-			$trouver_table = charger_fonction('trouver_table', 'base');
378
-			$desc = $trouver_table($table_sql);
379
-			$fond = isset($desc['field']['id_rubrique']) ? 'objet_edit' : 'objet_edit.sans_rubrique';
380
-		}
381
-		$dir = z_blocs(test_espace_prive());
382
-		$dir = reset($dir);
383
-		$scaffold = "<INCLURE{fond=prive/echafaudage/$dir/" . $fond . ',objet=' . $type . ',id_objet=#' . strtoupper((string) $primary) . ',env}>';
384
-	} // page objets
385
-	elseif (($type = $desc_exec) && !str_contains($type, '/')) {
386
-		$dir = z_blocs(test_espace_prive());
387
-		$dir = reset($dir);
388
-		$scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=" . $type . ',env} />';
389
-	}
390
-	// morceau d'objet : on fournit le fond de sibstitution dans $desc_exec
391
-	// et objet et tire de $table
392
-	elseif ($fond = $desc_exec) {
393
-		$dir = md5(dirname($fond));
394
-		$scaffold = "<INCLURE{fond=$fond,objet=" . objet_type($table) . ',env} />';
395
-	}
396
-
397
-	$base_dir = sous_repertoire(_DIR_CACHE, 'scaffold', false);
398
-	$base_dir = sous_repertoire($base_dir, $dir, false);
399
-	$f = $base_dir . "$exec";
400
-	ecrire_fichier("$f.$ext", $scaffold);
401
-
402
-	return $f;
367
+    $scaffold = '';
368
+
369
+    // page objet ou objet_edit
370
+    if (is_array($desc_exec)) {
371
+        $type = $desc_exec['type'];
372
+        $primary = $desc_exec['id_table_objet'];
373
+
374
+        if ($desc_exec['edition'] === false) {
375
+            $fond = 'objet';
376
+        } else {
377
+            $trouver_table = charger_fonction('trouver_table', 'base');
378
+            $desc = $trouver_table($table_sql);
379
+            $fond = isset($desc['field']['id_rubrique']) ? 'objet_edit' : 'objet_edit.sans_rubrique';
380
+        }
381
+        $dir = z_blocs(test_espace_prive());
382
+        $dir = reset($dir);
383
+        $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/" . $fond . ',objet=' . $type . ',id_objet=#' . strtoupper((string) $primary) . ',env}>';
384
+    } // page objets
385
+    elseif (($type = $desc_exec) && !str_contains($type, '/')) {
386
+        $dir = z_blocs(test_espace_prive());
387
+        $dir = reset($dir);
388
+        $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=" . $type . ',env} />';
389
+    }
390
+    // morceau d'objet : on fournit le fond de sibstitution dans $desc_exec
391
+    // et objet et tire de $table
392
+    elseif ($fond = $desc_exec) {
393
+        $dir = md5(dirname($fond));
394
+        $scaffold = "<INCLURE{fond=$fond,objet=" . objet_type($table) . ',env} />';
395
+    }
396
+
397
+    $base_dir = sous_repertoire(_DIR_CACHE, 'scaffold', false);
398
+    $base_dir = sous_repertoire($base_dir, $dir, false);
399
+    $f = $base_dir . "$exec";
400
+    ecrire_fichier("$f.$ext", $scaffold);
401
+
402
+    return $f;
403 403
 }
404 404
 
405 405
 /**
@@ -408,17 +408,17 @@  discard block
 block discarded – undo
408 408
  * @return bool|string
409 409
  */
410 410
 function z_sanitize_var_zajax() {
411
-	$z_ajax = _request('var_zajax');
412
-	if (!$z_ajax) {
413
-		return false;
414
-	}
415
-	if (
416
-		!($z_blocs = z_blocs(test_espace_prive()))
417
-		|| !in_array($z_ajax, $z_blocs)
418
-	) {
419
-		set_request('var_zajax'); // enlever cette demande incongrue
420
-		$z_ajax = false;
421
-	}
422
-
423
-	return $z_ajax;
411
+    $z_ajax = _request('var_zajax');
412
+    if (!$z_ajax) {
413
+        return false;
414
+    }
415
+    if (
416
+        !($z_blocs = z_blocs(test_espace_prive()))
417
+        || !in_array($z_ajax, $z_blocs)
418
+    ) {
419
+        set_request('var_zajax'); // enlever cette demande incongrue
420
+        $z_ajax = false;
421
+    }
422
+
423
+    return $z_ajax;
424 424
 }
Please login to merge, or discard this patch.
ecrire/public/criteres.php 1 patch
Indentation   +1711 added lines, -1711 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  **/
21 21
 
22 22
 if (!defined('_ECRIRE_INC_VERSION')) {
23
-	return;
23
+    return;
24 24
 }
25 25
 
26 26
 /**
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
  **/
47 47
 function critere_racine_dist($idb, &$boucles, $crit) {
48 48
 
49
-	$not = $crit->not;
50
-	$boucle = &$boucles[$idb];
51
-	$id_parent = $GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'] ?? 'id_parent';
49
+    $not = $crit->not;
50
+    $boucle = &$boucles[$idb];
51
+    $id_parent = $GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'] ?? 'id_parent';
52 52
 
53
-	$c = ["'='", "'$boucle->id_table." . "$id_parent'", 0];
54
-	$boucle->where[] = ($crit->not ? ["'NOT'", $c] : $c);
53
+    $c = ["'='", "'$boucle->id_table." . "$id_parent'", 0];
54
+    $boucle->where[] = ($crit->not ? ["'NOT'", $c] : $c);
55 55
 }
56 56
 
57 57
 
@@ -68,15 +68,15 @@  discard block
 block discarded – undo
68 68
  * @return void|array
69 69
  **/
70 70
 function critere_exclus_dist($idb, &$boucles, $crit) {
71
-	$not = $crit->not;
72
-	$boucle = &$boucles[$idb];
73
-	$id = $boucle->primary;
74
-
75
-	if ($not || !$id) {
76
-		return ['zbug_critere_inconnu', ['critere' => $not . $crit->op]];
77
-	}
78
-	$arg = kwote(calculer_argument_precedent($idb, $id, $boucles));
79
-	$boucle->where[] = ["'!='", "'$boucle->id_table." . "$id'", $arg];
71
+    $not = $crit->not;
72
+    $boucle = &$boucles[$idb];
73
+    $id = $boucle->primary;
74
+
75
+    if ($not || !$id) {
76
+        return ['zbug_critere_inconnu', ['critere' => $not . $crit->op]];
77
+    }
78
+    $arg = kwote(calculer_argument_precedent($idb, $id, $boucles));
79
+    $boucle->where[] = ["'!='", "'$boucle->id_table." . "$id'", $arg];
80 80
 }
81 81
 
82 82
 
@@ -96,73 +96,73 @@  discard block
 block discarded – undo
96 96
  * @return void|array
97 97
  **/
98 98
 function critere_doublons_dist($idb, &$boucles, $crit) {
99
-	$boucle = &$boucles[$idb];
100
-	$primary = $boucle->primary;
101
-
102
-	// la table nécessite une clé primaire, non composée
103
-	if (!$primary || strpos((string) $primary, ',')) {
104
-		return ['zbug_doublon_sur_table_sans_cle_primaire'];
105
-	}
106
-
107
-	$not = ($crit->not ? '' : 'NOT');
108
-
109
-	// le doublon s'applique sur un type de boucle (article)
110
-	$nom = "'" . $boucle->type_requete . "'";
111
-
112
-	// compléter le nom avec un nom précisé {doublons nom}
113
-	// on obtient $nom = "'article' . 'nom'"
114
-	if (isset($crit->param[0])) {
115
-		$nom .= '.' . calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
116
-	}
117
-
118
-	// code qui déclarera l'index du stockage de nos doublons (pour éviter une notice PHP)
119
-	$init_comment = "\n\n\t// Initialise le(s) critère(s) doublons\n";
120
-	$init_code = "\tif (!isset(\$doublons[\$d = $nom])) { \$doublons[\$d] = ''; }\n";
121
-
122
-	// on crée un sql_in avec la clé primaire de la table
123
-	// et la collection des doublons déjà emmagasinés dans le tableau
124
-	// $doublons et son index, ici $nom
125
-
126
-	// debut du code "sql_in('articles.id_article', "
127
-	$debut_in = "sql_in('" . $boucle->id_table . '.' . $primary . "', ";
128
-	// lecture des données du doublon "$doublons[$doublon_index[] = "
129
-	// Attention : boucle->doublons désigne une variable qu'on affecte
130
-	$debut_doub = '$doublons[' . ($not ? $boucle->doublons . '[]= ' : (''));
131
-
132
-	// le debut complet du code des doublons
133
-	$debut_doub = $debut_in . $debut_doub;
134
-
135
-	// nom du doublon "('article' . 'nom')]"
136
-	$fin_doub = "($nom)]";
137
-
138
-	// si on trouve un autre critère doublon,
139
-	// on fusionne pour avoir un seul IN, et on s'en va !
140
-	foreach ($boucle->where as $k => $w) {
141
-		if (str_starts_with((string) $w[0], $debut_doub)) {
142
-			// fusionner le sql_in (du where)
143
-			$boucle->where[$k][0] = $debut_doub . $fin_doub . ' . ' . substr((string) $w[0], strlen($debut_in));
144
-			// fusionner l'initialisation (du hash) pour faire plus joli
145
-			$x = strpos((string) $boucle->hash, $init_comment);
146
-			$len = strlen($init_comment);
147
-			$boucle->hash =
148
-				substr((string) $boucle->hash, 0, $x + $len) . $init_code . substr((string) $boucle->hash, $x + $len);
149
-
150
-			return;
151
-		}
152
-	}
153
-
154
-	// mettre l'ensemble dans un tableau pour que ce ne soit pas vu comme une constante
155
-	$boucle->where[] = [$debut_doub . $fin_doub . ", '" . $not . "')"];
156
-
157
-	// déclarer le doublon s'il n'existe pas encore
158
-	$boucle->hash .= $init_comment . $init_code;
159
-
160
-
161
-	# la ligne suivante avait l'intention d'eviter une collecte deja faite
162
-	# mais elle fait planter une boucle a 2 critere doublons:
163
-	# {!doublons A}{doublons B}
164
-	# (de http://article.gmane.org/gmane.comp.web.spip.devel/31034)
165
-	#	if ($crit->not) $boucle->doublons = "";
99
+    $boucle = &$boucles[$idb];
100
+    $primary = $boucle->primary;
101
+
102
+    // la table nécessite une clé primaire, non composée
103
+    if (!$primary || strpos((string) $primary, ',')) {
104
+        return ['zbug_doublon_sur_table_sans_cle_primaire'];
105
+    }
106
+
107
+    $not = ($crit->not ? '' : 'NOT');
108
+
109
+    // le doublon s'applique sur un type de boucle (article)
110
+    $nom = "'" . $boucle->type_requete . "'";
111
+
112
+    // compléter le nom avec un nom précisé {doublons nom}
113
+    // on obtient $nom = "'article' . 'nom'"
114
+    if (isset($crit->param[0])) {
115
+        $nom .= '.' . calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
116
+    }
117
+
118
+    // code qui déclarera l'index du stockage de nos doublons (pour éviter une notice PHP)
119
+    $init_comment = "\n\n\t// Initialise le(s) critère(s) doublons\n";
120
+    $init_code = "\tif (!isset(\$doublons[\$d = $nom])) { \$doublons[\$d] = ''; }\n";
121
+
122
+    // on crée un sql_in avec la clé primaire de la table
123
+    // et la collection des doublons déjà emmagasinés dans le tableau
124
+    // $doublons et son index, ici $nom
125
+
126
+    // debut du code "sql_in('articles.id_article', "
127
+    $debut_in = "sql_in('" . $boucle->id_table . '.' . $primary . "', ";
128
+    // lecture des données du doublon "$doublons[$doublon_index[] = "
129
+    // Attention : boucle->doublons désigne une variable qu'on affecte
130
+    $debut_doub = '$doublons[' . ($not ? $boucle->doublons . '[]= ' : (''));
131
+
132
+    // le debut complet du code des doublons
133
+    $debut_doub = $debut_in . $debut_doub;
134
+
135
+    // nom du doublon "('article' . 'nom')]"
136
+    $fin_doub = "($nom)]";
137
+
138
+    // si on trouve un autre critère doublon,
139
+    // on fusionne pour avoir un seul IN, et on s'en va !
140
+    foreach ($boucle->where as $k => $w) {
141
+        if (str_starts_with((string) $w[0], $debut_doub)) {
142
+            // fusionner le sql_in (du where)
143
+            $boucle->where[$k][0] = $debut_doub . $fin_doub . ' . ' . substr((string) $w[0], strlen($debut_in));
144
+            // fusionner l'initialisation (du hash) pour faire plus joli
145
+            $x = strpos((string) $boucle->hash, $init_comment);
146
+            $len = strlen($init_comment);
147
+            $boucle->hash =
148
+                substr((string) $boucle->hash, 0, $x + $len) . $init_code . substr((string) $boucle->hash, $x + $len);
149
+
150
+            return;
151
+        }
152
+    }
153
+
154
+    // mettre l'ensemble dans un tableau pour que ce ne soit pas vu comme une constante
155
+    $boucle->where[] = [$debut_doub . $fin_doub . ", '" . $not . "')"];
156
+
157
+    // déclarer le doublon s'il n'existe pas encore
158
+    $boucle->hash .= $init_comment . $init_code;
159
+
160
+
161
+    # la ligne suivante avait l'intention d'eviter une collecte deja faite
162
+    # mais elle fait planter une boucle a 2 critere doublons:
163
+    # {!doublons A}{doublons B}
164
+    # (de http://article.gmane.org/gmane.comp.web.spip.devel/31034)
165
+    #	if ($crit->not) $boucle->doublons = "";
166 166
 }
167 167
 
168 168
 
@@ -183,14 +183,14 @@  discard block
 block discarded – undo
183 183
  * @return void
184 184
  **/
185 185
 function critere_lang_select_dist($idb, &$boucles, $crit) {
186
-	if (!isset($crit->param[1][0]) || !($param = $crit->param[1][0]->texte)) {
187
-		$param = 'oui';
188
-	}
189
-	if ($crit->not) {
190
-		$param = ($param == 'oui') ? 'non' : 'oui';
191
-	}
192
-	$boucle = &$boucles[$idb];
193
-	$boucle->lang_select = $param;
186
+    if (!isset($crit->param[1][0]) || !($param = $crit->param[1][0]->texte)) {
187
+        $param = 'oui';
188
+    }
189
+    if ($crit->not) {
190
+        $param = ($param == 'oui') ? 'non' : 'oui';
191
+    }
192
+    $boucle = &$boucles[$idb];
193
+    $boucle->lang_select = $param;
194 194
 }
195 195
 
196 196
 
@@ -212,15 +212,15 @@  discard block
 block discarded – undo
212 212
  * @return void
213 213
  **/
214 214
 function critere_debut_dist($idb, &$boucles, $crit) {
215
-	[$un, $deux] = $crit->param;
216
-	$un = $un[0]->texte;
217
-	$deux = $deux[0]->texte;
218
-	if ($deux) {
219
-		$boucles[$idb]->limit =
220
-			'intval($Pile[0]["debut' . $un . '"]) . ",' . $deux . '"';
221
-	} else {
222
-		calculer_critere_DEFAUT_dist($idb, $boucles, $crit);
223
-	}
215
+    [$un, $deux] = $crit->param;
216
+    $un = $un[0]->texte;
217
+    $deux = $deux[0]->texte;
218
+    if ($deux) {
219
+        $boucles[$idb]->limit =
220
+            'intval($Pile[0]["debut' . $un . '"]) . ",' . $deux . '"';
221
+    } else {
222
+        calculer_critere_DEFAUT_dist($idb, $boucles, $crit);
223
+    }
224 224
 }
225 225
 
226 226
 
@@ -254,59 +254,59 @@  discard block
 block discarded – undo
254 254
  **/
255 255
 function critere_pagination_dist($idb, &$boucles, $crit) {
256 256
 
257
-	$boucle = &$boucles[$idb];
258
-	// definition de la taille de la page
259
-	$pas = isset($crit->param[0][0])
260
-		? calculer_liste([$crit->param[0][0]], $idb, $boucles, $boucle->id_parent)
261
-		: "''";
262
-
263
-	if (!preg_match(_CODE_QUOTE, (string) $pas, $r)) {
264
-		$pas = "((\$a = intval($pas)) ? \$a : 10)";
265
-	} else {
266
-		$r = (int) $r[2];
267
-		$pas = (string) ($r ?: 10);
268
-	}
269
-
270
-	// Calcul du nommage de la pagination si il existe.
271
-	// La nouvelle syntaxe {pagination 20, nom} est prise en compte et privilégiée mais on reste
272
-	// compatible avec l'ancienne car certains cas fonctionnent correctement
273
-	$type = "'$idb'";
274
-	// Calcul d'un nommage spécifique de la pagination si précisé.
275
-	// Syntaxe {pagination 20, nom}
276
-	if (isset($crit->param[0][1])) {
277
-		$type = calculer_liste([$crit->param[0][1]], $idb, $boucles, $boucle->id_parent);
278
-	} // Ancienne syntaxe {pagination 20 nom} pour compatibilité
279
-	elseif (isset($crit->param[1][0])) {
280
-		$type = calculer_liste([$crit->param[1][0]], $idb, $boucles, $boucle->id_parent);
281
-	}
282
-
283
-	$debut = ($type[0] !== "'") ? "'debut'.$type" : ("'debut" . substr((string) $type, 1));
284
-	$boucle->modificateur['debut_nom'] = $type;
285
-	$partie =
286
-		// tester si le numero de page demande est de la forme '@yyy'
287
-		'isset($Pile[0][' . $debut . ']) ? $Pile[0][' . $debut . '] : _request(' . $debut . ");\n"
288
-		. "\tif (\$debut_boucle && \$debut_boucle[0] === '@') {\n"
289
-		. "\t\t" . '$debut_boucle = $Pile[0][' . $debut . '] = quete_debut_pagination(\'' . $boucle->primary . '\',$Pile[0][\'@' . $boucle->primary . '\'] = substr($debut_boucle,1),' . $pas . ',$iter);' . "\n"
290
-		. "\t\t" . '$iter->seek(0);' . "\n"
291
-		. "\t}\n"
292
-		. "\t" . '$debut_boucle = intval($debut_boucle)';
293
-
294
-	$boucle->hash .= '
257
+    $boucle = &$boucles[$idb];
258
+    // definition de la taille de la page
259
+    $pas = isset($crit->param[0][0])
260
+        ? calculer_liste([$crit->param[0][0]], $idb, $boucles, $boucle->id_parent)
261
+        : "''";
262
+
263
+    if (!preg_match(_CODE_QUOTE, (string) $pas, $r)) {
264
+        $pas = "((\$a = intval($pas)) ? \$a : 10)";
265
+    } else {
266
+        $r = (int) $r[2];
267
+        $pas = (string) ($r ?: 10);
268
+    }
269
+
270
+    // Calcul du nommage de la pagination si il existe.
271
+    // La nouvelle syntaxe {pagination 20, nom} est prise en compte et privilégiée mais on reste
272
+    // compatible avec l'ancienne car certains cas fonctionnent correctement
273
+    $type = "'$idb'";
274
+    // Calcul d'un nommage spécifique de la pagination si précisé.
275
+    // Syntaxe {pagination 20, nom}
276
+    if (isset($crit->param[0][1])) {
277
+        $type = calculer_liste([$crit->param[0][1]], $idb, $boucles, $boucle->id_parent);
278
+    } // Ancienne syntaxe {pagination 20 nom} pour compatibilité
279
+    elseif (isset($crit->param[1][0])) {
280
+        $type = calculer_liste([$crit->param[1][0]], $idb, $boucles, $boucle->id_parent);
281
+    }
282
+
283
+    $debut = ($type[0] !== "'") ? "'debut'.$type" : ("'debut" . substr((string) $type, 1));
284
+    $boucle->modificateur['debut_nom'] = $type;
285
+    $partie =
286
+        // tester si le numero de page demande est de la forme '@yyy'
287
+        'isset($Pile[0][' . $debut . ']) ? $Pile[0][' . $debut . '] : _request(' . $debut . ");\n"
288
+        . "\tif (\$debut_boucle && \$debut_boucle[0] === '@') {\n"
289
+        . "\t\t" . '$debut_boucle = $Pile[0][' . $debut . '] = quete_debut_pagination(\'' . $boucle->primary . '\',$Pile[0][\'@' . $boucle->primary . '\'] = substr($debut_boucle,1),' . $pas . ',$iter);' . "\n"
290
+        . "\t\t" . '$iter->seek(0);' . "\n"
291
+        . "\t}\n"
292
+        . "\t" . '$debut_boucle = intval($debut_boucle)';
293
+
294
+    $boucle->hash .= '
295 295
 	$command[\'pagination\'] = array((isset($Pile[0][' . $debut . ']) ? $Pile[0][' . $debut . '] : null), ' . $pas . ');';
296 296
 
297
-	$boucle->total_parties = $pas;
298
-	calculer_parties($boucles, $idb, $partie, 'p+');
299
-	// ajouter la cle primaire dans le select pour pouvoir gerer la pagination referencee par @id
300
-	// sauf si pas de primaire, ou si primaire composee
301
-	// dans ce cas, on ne sait pas gerer une pagination indirecte
302
-	$t = $boucle->id_table . '.' . $boucle->primary;
303
-	if (
304
-		$boucle->primary
305
-		&& !preg_match('/[,\s]/', (string) $boucle->primary)
306
-		&& !in_array($t, $boucle->select)
307
-	) {
308
-		$boucle->select[] = $t;
309
-	}
297
+    $boucle->total_parties = $pas;
298
+    calculer_parties($boucles, $idb, $partie, 'p+');
299
+    // ajouter la cle primaire dans le select pour pouvoir gerer la pagination referencee par @id
300
+    // sauf si pas de primaire, ou si primaire composee
301
+    // dans ce cas, on ne sait pas gerer une pagination indirecte
302
+    $t = $boucle->id_table . '.' . $boucle->primary;
303
+    if (
304
+        $boucle->primary
305
+        && !preg_match('/[,\s]/', (string) $boucle->primary)
306
+        && !in_array($t, $boucle->select)
307
+    ) {
308
+        $boucle->select[] = $t;
309
+    }
310 310
 }
311 311
 
312 312
 
@@ -328,24 +328,24 @@  discard block
 block discarded – undo
328 328
  **/
329 329
 function critere_recherche_dist($idb, &$boucles, $crit) {
330 330
 
331
-	$boucle = &$boucles[$idb];
331
+    $boucle = &$boucles[$idb];
332 332
 
333
-	if (!$boucle->primary || strpos((string) $boucle->primary, ',')) {
334
-		erreur_squelette(_T('zbug_critere_sur_table_sans_cle_primaire', ['critere' => 'recherche']), $boucle);
333
+    if (!$boucle->primary || strpos((string) $boucle->primary, ',')) {
334
+        erreur_squelette(_T('zbug_critere_sur_table_sans_cle_primaire', ['critere' => 'recherche']), $boucle);
335 335
 
336
-		return;
337
-	}
336
+        return;
337
+    }
338 338
 
339
-	if (isset($crit->param[0])) {
340
-		$quoi = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
341
-	} else {
342
-		$quoi = '(isset($Pile[0]["recherche"])?$Pile[0]["recherche"]:(isset($GLOBALS["recherche"])?$GLOBALS["recherche"]:""))';
343
-	}
339
+    if (isset($crit->param[0])) {
340
+        $quoi = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
341
+    } else {
342
+        $quoi = '(isset($Pile[0]["recherche"])?$Pile[0]["recherche"]:(isset($GLOBALS["recherche"])?$GLOBALS["recherche"]:""))';
343
+    }
344 344
 
345
-	$_modificateur = var_export($boucle->modificateur, true);
346
-	$boucle->hash .= '
345
+    $_modificateur = var_export($boucle->modificateur, true);
346
+    $boucle->hash .= '
347 347
 	// RECHERCHE'
348
-		. ($crit->cond ? '
348
+        . ($crit->cond ? '
349 349
 	if (!strlen(' . $quoi . ')){
350 350
 		list($rech_select, $rech_where) = array("0 as points","");
351 351
 	} else' : '') . '
@@ -356,21 +356,21 @@  discard block
 block discarded – undo
356 356
 	';
357 357
 
358 358
 
359
-	$t = $boucle->id_table . '.' . $boucle->primary;
360
-	if (!in_array($t, $boucles[$idb]->select)) {
361
-		$boucle->select[] = $t;
362
-	} # pour postgres, neuneu ici
363
-	// jointure uniquement sur le serveur principal
364
-	// (on ne peut joindre une table d'un serveur distant avec la table des resultats du serveur principal)
365
-	if (!$boucle->sql_serveur) {
366
-		$boucle->join['resultats'] = ["'" . $boucle->id_table . "'", "'id'", "'" . $boucle->primary . "'"];
367
-		$boucle->from['resultats'] = 'spip_resultats';
368
-	}
369
-	$boucle->select[] = '$rech_select';
370
-	//$boucle->where[]= "\$rech_where?'resultats.id=".$boucle->id_table.".".$boucle->primary."':''";
371
-
372
-	// et la recherche trouve
373
-	$boucle->where[] = '$rech_where?$rech_where:\'\'';
359
+    $t = $boucle->id_table . '.' . $boucle->primary;
360
+    if (!in_array($t, $boucles[$idb]->select)) {
361
+        $boucle->select[] = $t;
362
+    } # pour postgres, neuneu ici
363
+    // jointure uniquement sur le serveur principal
364
+    // (on ne peut joindre une table d'un serveur distant avec la table des resultats du serveur principal)
365
+    if (!$boucle->sql_serveur) {
366
+        $boucle->join['resultats'] = ["'" . $boucle->id_table . "'", "'id'", "'" . $boucle->primary . "'"];
367
+        $boucle->from['resultats'] = 'spip_resultats';
368
+    }
369
+    $boucle->select[] = '$rech_select';
370
+    //$boucle->where[]= "\$rech_where?'resultats.id=".$boucle->id_table.".".$boucle->primary."':''";
371
+
372
+    // et la recherche trouve
373
+    $boucle->where[] = '$rech_where?$rech_where:\'\'';
374 374
 }
375 375
 
376 376
 /**
@@ -387,25 +387,25 @@  discard block
 block discarded – undo
387 387
  * @return void
388 388
  **/
389 389
 function critere_traduction_dist($idb, &$boucles, $crit) {
390
-	$boucle = &$boucles[$idb];
391
-	$prim = $boucle->primary;
392
-	$table = $boucle->id_table;
393
-	$arg = kwote(calculer_argument_precedent($idb, 'id_trad', $boucles));
394
-	$dprim = kwote(calculer_argument_precedent($idb, $prim, $boucles));
395
-	$boucle->where[] =
396
-		[
397
-			"'OR'",
398
-			[
399
-				"'AND'",
400
-				["'='", "'$table.id_trad'", 0],
401
-				["'='", "'$table.$prim'", $dprim]
402
-			],
403
-			[
404
-				"'AND'",
405
-				["'>'", "'$table.id_trad'", 0],
406
-				["'='", "'$table.id_trad'", $arg]
407
-			]
408
-		];
390
+    $boucle = &$boucles[$idb];
391
+    $prim = $boucle->primary;
392
+    $table = $boucle->id_table;
393
+    $arg = kwote(calculer_argument_precedent($idb, 'id_trad', $boucles));
394
+    $dprim = kwote(calculer_argument_precedent($idb, $prim, $boucles));
395
+    $boucle->where[] =
396
+        [
397
+            "'OR'",
398
+            [
399
+                "'AND'",
400
+                ["'='", "'$table.id_trad'", 0],
401
+                ["'='", "'$table.$prim'", $dprim]
402
+            ],
403
+            [
404
+                "'AND'",
405
+                ["'>'", "'$table.id_trad'", 0],
406
+                ["'='", "'$table.id_trad'", $arg]
407
+            ]
408
+        ];
409 409
 }
410 410
 
411 411
 
@@ -423,17 +423,17 @@  discard block
 block discarded – undo
423 423
  * @return void
424 424
  **/
425 425
 function critere_origine_traduction_dist($idb, &$boucles, $crit) {
426
-	$boucle = &$boucles[$idb];
427
-	$prim = $boucle->primary;
428
-	$table = $boucle->id_table;
429
-
430
-	$c =
431
-		[
432
-			"'OR'",
433
-			["'='", "'$table." . "id_trad'", "'$table.$prim'"],
434
-			["'='", "'$table.id_trad'", "'0'"]
435
-		];
436
-	$boucle->where[] = ($crit->not ? ["'NOT'", $c] : $c);
426
+    $boucle = &$boucles[$idb];
427
+    $prim = $boucle->primary;
428
+    $table = $boucle->id_table;
429
+
430
+    $c =
431
+        [
432
+            "'OR'",
433
+            ["'='", "'$table." . "id_trad'", "'$table.$prim'"],
434
+            ["'='", "'$table.id_trad'", "'0'"]
435
+        ];
436
+    $boucle->where[] = ($crit->not ? ["'NOT'", $c] : $c);
437 437
 }
438 438
 
439 439
 
@@ -450,17 +450,17 @@  discard block
 block discarded – undo
450 450
  **/
451 451
 function critere_meme_parent_dist($idb, &$boucles, $crit) {
452 452
 
453
-	$boucle = &$boucles[$idb];
454
-	$arg = kwote(calculer_argument_precedent($idb, 'id_parent', $boucles));
455
-	$id_parent = $GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'] ?? 'id_parent';
456
-	$mparent = $boucle->id_table . '.' . $id_parent;
457
-
458
-	if ($boucle->type_requete == 'rubriques' || isset($GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'])) {
459
-		$boucle->where[] = ["'='", "'$mparent'", $arg];
460
-	} // le cas FORUMS est gere dans le plugin forum, dans la fonction critere_FORUMS_meme_parent_dist()
461
-	else {
462
-		return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ' . $boucle->type_requete]];
463
-	}
453
+    $boucle = &$boucles[$idb];
454
+    $arg = kwote(calculer_argument_precedent($idb, 'id_parent', $boucles));
455
+    $id_parent = $GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'] ?? 'id_parent';
456
+    $mparent = $boucle->id_table . '.' . $id_parent;
457
+
458
+    if ($boucle->type_requete == 'rubriques' || isset($GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'])) {
459
+        $boucle->where[] = ["'='", "'$mparent'", $arg];
460
+    } // le cas FORUMS est gere dans le plugin forum, dans la fonction critere_FORUMS_meme_parent_dist()
461
+    else {
462
+        return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ' . $boucle->type_requete]];
463
+    }
464 464
 }
465 465
 
466 466
 
@@ -491,38 +491,38 @@  discard block
 block discarded – undo
491 491
  **/
492 492
 function critere_branche_dist($idb, &$boucles, $crit) {
493 493
 
494
-	$not = $crit->not;
495
-	$boucle = &$boucles[$idb];
496
-	// prendre en priorite un identifiant en parametre {branche XX}
497
-	if (isset($crit->param[0])) {
498
-		$arg = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
499
-		// sinon on le prend chez une boucle parente
500
-	} else {
501
-		$arg = kwote(calculer_argument_precedent($idb, 'id_rubrique', $boucles), $boucle->sql_serveur, 'int NOT NULL');
502
-	}
503
-
504
-	//Trouver une jointure
505
-	$champ = 'id_rubrique';
506
-	$desc = $boucle->show;
507
-	//Seulement si necessaire
508
-	if (!array_key_exists($champ, $desc['field'])) {
509
-		$cle = trouver_jointure_champ($champ, $boucle);
510
-		$trouver_table = charger_fonction('trouver_table', 'base');
511
-		$desc = $trouver_table($boucle->from[$cle]);
512
-		if (count(trouver_champs_decomposes($champ, $desc)) > 1) {
513
-			$decompose = decompose_champ_id_objet($champ);
514
-			$champ = array_shift($decompose);
515
-			$boucle->where[] = ["'='", _q($cle . '.' . reset($decompose)), '"' . sql_quote(end($decompose)) . '"'];
516
-		}
517
-	} else {
518
-		$cle = $boucle->id_table;
519
-	}
520
-
521
-	$c = "sql_in('$cle" . ".$champ', calcul_branche_in($arg)"
522
-		. ($not ? ", 'NOT'" : '') . ')';
523
-	$boucle->where[] = $crit->cond
524
-		? "($arg ? $c : " . ($not ? "'0=1'" : "'1=1'") . ')'
525
-		: $c;
494
+    $not = $crit->not;
495
+    $boucle = &$boucles[$idb];
496
+    // prendre en priorite un identifiant en parametre {branche XX}
497
+    if (isset($crit->param[0])) {
498
+        $arg = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
499
+        // sinon on le prend chez une boucle parente
500
+    } else {
501
+        $arg = kwote(calculer_argument_precedent($idb, 'id_rubrique', $boucles), $boucle->sql_serveur, 'int NOT NULL');
502
+    }
503
+
504
+    //Trouver une jointure
505
+    $champ = 'id_rubrique';
506
+    $desc = $boucle->show;
507
+    //Seulement si necessaire
508
+    if (!array_key_exists($champ, $desc['field'])) {
509
+        $cle = trouver_jointure_champ($champ, $boucle);
510
+        $trouver_table = charger_fonction('trouver_table', 'base');
511
+        $desc = $trouver_table($boucle->from[$cle]);
512
+        if (count(trouver_champs_decomposes($champ, $desc)) > 1) {
513
+            $decompose = decompose_champ_id_objet($champ);
514
+            $champ = array_shift($decompose);
515
+            $boucle->where[] = ["'='", _q($cle . '.' . reset($decompose)), '"' . sql_quote(end($decompose)) . '"'];
516
+        }
517
+    } else {
518
+        $cle = $boucle->id_table;
519
+    }
520
+
521
+    $c = "sql_in('$cle" . ".$champ', calcul_branche_in($arg)"
522
+        . ($not ? ", 'NOT'" : '') . ')';
523
+    $boucle->where[] = $crit->cond
524
+        ? "($arg ? $c : " . ($not ? "'0=1'" : "'1=1'") . ')'
525
+        : $c;
526 526
 }
527 527
 
528 528
 /**
@@ -538,15 +538,15 @@  discard block
 block discarded – undo
538 538
  **/
539 539
 function critere_logo_dist($idb, &$boucles, $crit) {
540 540
 
541
-	$boucle = &$boucles[$idb];
542
-	$not = ($crit->not ? 'NOT' : '');
543
-	$serveur = $boucle->sql_serveur;
541
+    $boucle = &$boucles[$idb];
542
+    $not = ($crit->not ? 'NOT' : '');
543
+    $serveur = $boucle->sql_serveur;
544 544
 
545
-	$c = "sql_in('" .
546
-		$boucle->id_table . '.' . $boucle->primary
547
-		. "', lister_objets_avec_logos('" . $boucle->primary . "'), '$not', '$serveur')";
545
+    $c = "sql_in('" .
546
+        $boucle->id_table . '.' . $boucle->primary
547
+        . "', lister_objets_avec_logos('" . $boucle->primary . "'), '$not', '$serveur')";
548 548
 
549
-	$boucle->where[] = $c;
549
+    $boucle->where[] = $c;
550 550
 }
551 551
 
552 552
 /**
@@ -569,31 +569,31 @@  discard block
 block discarded – undo
569 569
  * @return void|array
570 570
  */
571 571
 function critere_groupby_dist($idb, &$boucles, $crit) {
572
-	if ($t = isset($crit->param[0])) {
573
-		$t = $crit->param[0];
574
-		if ($t[0]->type == 'texte') {
575
-			$t = $t[0]->texte;
576
-			if (preg_match('/^(.*)\.(.*)$/', (string) $t, $r)) {
577
-				$t = table_objet_sql($r[1]);
578
-				$t = array_search($t, $boucles[$idb]->from);
579
-				if ($t) {
580
-					$t .= '.' . $r[2];
581
-				}
582
-			}
583
-		} else {
584
-			$t = '".'
585
-				. calculer_critere_arg_dynamique($idb, $boucles, $t)
586
-				. '."';
587
-		}
588
-	}
589
-	if ($t) {
590
-		$boucles[$idb]->group[] = $t;
591
-		if (!in_array($t, $boucles[$idb]->select)) {
592
-			$boucles[$idb]->select[] = $t;
593
-		}
594
-	} else {
595
-		return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ?']];
596
-	}
572
+    if ($t = isset($crit->param[0])) {
573
+        $t = $crit->param[0];
574
+        if ($t[0]->type == 'texte') {
575
+            $t = $t[0]->texte;
576
+            if (preg_match('/^(.*)\.(.*)$/', (string) $t, $r)) {
577
+                $t = table_objet_sql($r[1]);
578
+                $t = array_search($t, $boucles[$idb]->from);
579
+                if ($t) {
580
+                    $t .= '.' . $r[2];
581
+                }
582
+            }
583
+        } else {
584
+            $t = '".'
585
+                . calculer_critere_arg_dynamique($idb, $boucles, $t)
586
+                . '."';
587
+        }
588
+    }
589
+    if ($t) {
590
+        $boucles[$idb]->group[] = $t;
591
+        if (!in_array($t, $boucles[$idb]->select)) {
592
+            $boucles[$idb]->select[] = $t;
593
+        }
594
+    } else {
595
+        return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ?']];
596
+    }
597 597
 }
598 598
 
599 599
 /**
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
  * @return void
617 617
  */
618 618
 function critere_groupby_supprimer_dist($idb, &$boucles, $crit): void {
619
-	$boucles[$idb]->group = [];
619
+    $boucles[$idb]->group = [];
620 620
 }
621 621
 
622 622
 /**
@@ -630,8 +630,8 @@  discard block
 block discarded – undo
630 630
  * @return void|array
631 631
  */
632 632
 function critere_fusion_dist(...$args) {
633
-	trigger_deprecation('spip', '5.0', 'Using "%s" criteria is deprecated, use "%s" criteria instead', 'fusion', 'groupby');
634
-	return critere_groupby_dist(...$args);
633
+    trigger_deprecation('spip', '5.0', 'Using "%s" criteria is deprecated, use "%s" criteria instead', 'fusion', 'groupby');
634
+    return critere_groupby_dist(...$args);
635 635
 }
636 636
 
637 637
 /**
@@ -644,8 +644,8 @@  discard block
 block discarded – undo
644 644
  * @param Critere $crit Paramètres du critère dans cette boucle
645 645
  */
646 646
 function critere_fusion_supprimer_dist(...$args): void {
647
-	trigger_deprecation('spip', '5.0', 'Using "%s" criteria is deprecated, use "%s" criteria instead', 'fusion_supprimer', 'groupby_supprimer');
648
-	critere_groupby_supprimer_dist(...$args);
647
+    trigger_deprecation('spip', '5.0', 'Using "%s" criteria is deprecated, use "%s" criteria instead', 'fusion_supprimer', 'groupby_supprimer');
648
+    critere_groupby_supprimer_dist(...$args);
649 649
 }
650 650
 
651 651
 /**
@@ -683,26 +683,26 @@  discard block
 block discarded – undo
683 683
  * @return void|array
684 684
  */
685 685
 function critere_collate_dist($idb, &$boucles, $crit) {
686
-	if (isset($crit->param[0])) {
687
-		$_coll = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
688
-		$boucle = $boucles[$idb];
689
-		$boucle->modificateur['collate'] = "($_coll ?' COLLATE '.$_coll:'')";
690
-		$n = is_countable($boucle->order) ? count($boucle->order) : 0;
691
-		if ($n && (!str_contains((string) $boucle->order[$n - 1], 'COLLATE'))) {
692
-			// l'instruction COLLATE doit être placée avant ASC ou DESC
693
-			// notamment lors de l'utilisation `{!par xxx}{collate yyy}`
694
-			if (
695
-				(false !== $i = strpos((string) $boucle->order[$n - 1], 'ASC'))
696
-				|| (false !== $i = strpos((string) $boucle->order[$n - 1], 'DESC'))
697
-			) {
698
-				$boucle->order[$n - 1] = substr_replace((string) $boucle->order[$n - 1], "' . " . $boucle->modificateur['collate'] . " . ' ", $i, 0);
699
-			} else {
700
-				$boucle->order[$n - 1] .= ' . ' . $boucle->modificateur['collate'];
701
-			}
702
-		}
703
-	} else {
704
-		return (['zbug_critere_inconnu', ['critere' => $crit->op . ' ' . (is_countable($boucles[$idb]->order) ? count($boucles[$idb]->order) : 0)]]);
705
-	}
686
+    if (isset($crit->param[0])) {
687
+        $_coll = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
688
+        $boucle = $boucles[$idb];
689
+        $boucle->modificateur['collate'] = "($_coll ?' COLLATE '.$_coll:'')";
690
+        $n = is_countable($boucle->order) ? count($boucle->order) : 0;
691
+        if ($n && (!str_contains((string) $boucle->order[$n - 1], 'COLLATE'))) {
692
+            // l'instruction COLLATE doit être placée avant ASC ou DESC
693
+            // notamment lors de l'utilisation `{!par xxx}{collate yyy}`
694
+            if (
695
+                (false !== $i = strpos((string) $boucle->order[$n - 1], 'ASC'))
696
+                || (false !== $i = strpos((string) $boucle->order[$n - 1], 'DESC'))
697
+            ) {
698
+                $boucle->order[$n - 1] = substr_replace((string) $boucle->order[$n - 1], "' . " . $boucle->modificateur['collate'] . " . ' ", $i, 0);
699
+            } else {
700
+                $boucle->order[$n - 1] .= ' . ' . $boucle->modificateur['collate'];
701
+            }
702
+        }
703
+    } else {
704
+        return (['zbug_critere_inconnu', ['critere' => $crit->op . ' ' . (is_countable($boucles[$idb]->order) ? count($boucles[$idb]->order) : 0)]]);
705
+    }
706 706
 }
707 707
 
708 708
 /**
@@ -717,26 +717,26 @@  discard block
 block discarded – undo
717 717
  * @return void|array
718 718
  */
719 719
 function critere_collecte_dist(...$args) {
720
-	trigger_deprecation('spip', '5.0', 'Using "%s" criteria is deprecated, use "%s" criteria instead', 'collecte', 'collate');
721
-	return critere_collate_dist(...$args);
720
+    trigger_deprecation('spip', '5.0', 'Using "%s" criteria is deprecated, use "%s" criteria instead', 'collecte', 'collate');
721
+    return critere_collate_dist(...$args);
722 722
 }
723 723
 
724 724
 function calculer_critere_arg_dynamique($idb, &$boucles, $crit, $suffix = '') {
725
-	$boucle = $boucles[$idb];
726
-	$alt = "('" . $boucle->id_table . '.\' . $x' . $suffix . ')';
727
-	$var = '$champs_' . $idb;
728
-	$desc = (str_contains((string) $boucle->in, (string) "static $var ="));
729
-	if (!$desc) {
730
-		$desc = $boucle->show['field'];
731
-		$desc = implode(',', array_map('_q', array_keys($desc)));
732
-		$boucles[$idb]->in .= "\n\tstatic $var = array(" . $desc . ');';
733
-	}
734
-	if ($desc) {
735
-		$alt = "(in_array(\$x, $var)  ? $alt :(\$x$suffix))";
736
-	}
737
-	$arg = calculer_liste($crit, $idb, $boucles, $boucle->id_parent);
738
-
739
-	return "((\$x = preg_replace(\"/\\W/\",'', $arg)) ? $alt : '')";
725
+    $boucle = $boucles[$idb];
726
+    $alt = "('" . $boucle->id_table . '.\' . $x' . $suffix . ')';
727
+    $var = '$champs_' . $idb;
728
+    $desc = (str_contains((string) $boucle->in, (string) "static $var ="));
729
+    if (!$desc) {
730
+        $desc = $boucle->show['field'];
731
+        $desc = implode(',', array_map('_q', array_keys($desc)));
732
+        $boucles[$idb]->in .= "\n\tstatic $var = array(" . $desc . ');';
733
+    }
734
+    if ($desc) {
735
+        $alt = "(in_array(\$x, $var)  ? $alt :(\$x$suffix))";
736
+    }
737
+    $arg = calculer_liste($crit, $idb, $boucles, $boucle->id_parent);
738
+
739
+    return "((\$x = preg_replace(\"/\\W/\",'', $arg)) ? $alt : '')";
740 740
 }
741 741
 
742 742
 /**
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
  * @param Critere $crit Paramètres du critère dans cette boucle
776 776
  */
777 777
 function critere_par_dist($idb, &$boucles, $crit) {
778
-	return critere_parinverse($idb, $boucles, $crit);
778
+    return critere_parinverse($idb, $boucles, $crit);
779 779
 }
780 780
 
781 781
 /**
@@ -797,91 +797,91 @@  discard block
 block discarded – undo
797 797
  * @param Critere $crit Paramètres du critère dans cette boucle
798 798
  */
799 799
 function critere_parinverse($idb, &$boucles, $crit) {
800
-	$boucle = &$boucles[$idb];
801
-
802
-	$sens = $collecte = '';
803
-	if ($crit->not) {
804
-		$sens = " . ' DESC'";
805
-	}
806
-	if (isset($boucle->modificateur['collate'])) {
807
-		$collecte = ' . ' . $boucle->modificateur['collate'];
808
-	}
809
-
810
-	// Pour chaque paramètre du critère
811
-	foreach ($crit->param as $tri) {
812
-		$order = $fct = '';
813
-		// tris specifiés dynamiquement {par #ENV{tri}}
814
-		if ($tri[0]->type != 'texte') {
815
-			// calculer le order dynamique qui verifie les champs
816
-			$order = calculer_critere_arg_dynamique($idb, $boucles, $tri, $sens);
817
-			// ajouter 'hasard' comme possibilité de tri dynamique
818
-			calculer_critere_par_hasard($idb, $boucles, $crit);
819
-		}
820
-		// tris textuels {par titre}
821
-		else {
822
-			$par = array_shift($tri);
823
-			$par = $par->texte;
824
-
825
-			// tris de la forme {par expression champ} tel que {par num titre} ou {par multi titre}
826
-			if (preg_match(',^(\w+)[\s]+(.*)$,', (string) $par, $m)) {
827
-				$expression = trim($m[1]);
828
-				$champ = trim($m[2]);
829
-				if (function_exists($f = 'calculer_critere_par_expression_' . $expression)) {
830
-					$order = $f($idb, $boucles, $crit, $tri, $champ);
831
-				} else {
832
-					return ['zbug_critere_inconnu', ['critere' => $crit->op . " $par"]];
833
-				}
834
-
835
-			// tris de la forme {par champ} ou {par FONCTION(champ)}
836
-			} elseif ($boucle->type_requete == 'DATA' || preg_match(',^' . CHAMP_SQL_PLUS_FONC . '$,is', (string) $par, $match)) {
837
-				// {par FONCTION(champ)}
838
-				if (isset($match) && count($match) > 2) {
839
-					$par = substr($match[2], 1, -1);
840
-					$fct = $match[1];
841
-				}
842
-				// quelques cas spécifiques {par hasard}, {par date}
843
-				if ($par == 'hasard') {
844
-					$order = calculer_critere_par_hasard($idb, $boucles, $crit);
845
-				} elseif ($par == 'date' && !empty($boucle->show['date'])) {
846
-					$order = "'" . $boucle->id_table . '.' . $boucle->show['date'] . "'";
847
-				} else {
848
-					// cas général {par champ}, {par table.champ}, ...
849
-					$order = calculer_critere_par_champ($idb, $boucles, $crit, $par);
850
-				}
851
-			}
852
-
853
-			// on ne sait pas traiter…
854
-			else {
855
-				return ['zbug_critere_inconnu', ['critere' => $crit->op . " $par"]];
856
-			}
857
-
858
-			// En cas d'erreur de squelette retournée par une fonction
859
-			if (is_array($order)) {
860
-				return $order;
861
-			}
862
-		}
863
-
864
-		if (preg_match('/^\'([^"]*)\'$/', (string) $order, $m)) {
865
-			$t = $m[1];
866
-			if (strpos($t, '.') && !in_array($t, $boucle->select)) {
867
-				$boucle->select[] = $t;
868
-			}
869
-		} else {
870
-			$sens = '';
871
-		}
872
-
873
-		if ($fct) {
874
-			$order = preg_match("/^\s*'(.*)'\s*$/", (string) $order, $r)
875
-				? "'$fct(" . $r[1] . ")'"
876
-				: "'$fct(' . $order . ')'";
877
-		}
878
-		$t = $order . $collecte . $sens;
879
-		if (preg_match("/^(.*)'\s*\.\s*'([^']*')$/", $t, $r)) {
880
-			$t = $r[1] . $r[2];
881
-		}
882
-
883
-		$boucle->order[] = $t;
884
-	}
800
+    $boucle = &$boucles[$idb];
801
+
802
+    $sens = $collecte = '';
803
+    if ($crit->not) {
804
+        $sens = " . ' DESC'";
805
+    }
806
+    if (isset($boucle->modificateur['collate'])) {
807
+        $collecte = ' . ' . $boucle->modificateur['collate'];
808
+    }
809
+
810
+    // Pour chaque paramètre du critère
811
+    foreach ($crit->param as $tri) {
812
+        $order = $fct = '';
813
+        // tris specifiés dynamiquement {par #ENV{tri}}
814
+        if ($tri[0]->type != 'texte') {
815
+            // calculer le order dynamique qui verifie les champs
816
+            $order = calculer_critere_arg_dynamique($idb, $boucles, $tri, $sens);
817
+            // ajouter 'hasard' comme possibilité de tri dynamique
818
+            calculer_critere_par_hasard($idb, $boucles, $crit);
819
+        }
820
+        // tris textuels {par titre}
821
+        else {
822
+            $par = array_shift($tri);
823
+            $par = $par->texte;
824
+
825
+            // tris de la forme {par expression champ} tel que {par num titre} ou {par multi titre}
826
+            if (preg_match(',^(\w+)[\s]+(.*)$,', (string) $par, $m)) {
827
+                $expression = trim($m[1]);
828
+                $champ = trim($m[2]);
829
+                if (function_exists($f = 'calculer_critere_par_expression_' . $expression)) {
830
+                    $order = $f($idb, $boucles, $crit, $tri, $champ);
831
+                } else {
832
+                    return ['zbug_critere_inconnu', ['critere' => $crit->op . " $par"]];
833
+                }
834
+
835
+            // tris de la forme {par champ} ou {par FONCTION(champ)}
836
+            } elseif ($boucle->type_requete == 'DATA' || preg_match(',^' . CHAMP_SQL_PLUS_FONC . '$,is', (string) $par, $match)) {
837
+                // {par FONCTION(champ)}
838
+                if (isset($match) && count($match) > 2) {
839
+                    $par = substr($match[2], 1, -1);
840
+                    $fct = $match[1];
841
+                }
842
+                // quelques cas spécifiques {par hasard}, {par date}
843
+                if ($par == 'hasard') {
844
+                    $order = calculer_critere_par_hasard($idb, $boucles, $crit);
845
+                } elseif ($par == 'date' && !empty($boucle->show['date'])) {
846
+                    $order = "'" . $boucle->id_table . '.' . $boucle->show['date'] . "'";
847
+                } else {
848
+                    // cas général {par champ}, {par table.champ}, ...
849
+                    $order = calculer_critere_par_champ($idb, $boucles, $crit, $par);
850
+                }
851
+            }
852
+
853
+            // on ne sait pas traiter…
854
+            else {
855
+                return ['zbug_critere_inconnu', ['critere' => $crit->op . " $par"]];
856
+            }
857
+
858
+            // En cas d'erreur de squelette retournée par une fonction
859
+            if (is_array($order)) {
860
+                return $order;
861
+            }
862
+        }
863
+
864
+        if (preg_match('/^\'([^"]*)\'$/', (string) $order, $m)) {
865
+            $t = $m[1];
866
+            if (strpos($t, '.') && !in_array($t, $boucle->select)) {
867
+                $boucle->select[] = $t;
868
+            }
869
+        } else {
870
+            $sens = '';
871
+        }
872
+
873
+        if ($fct) {
874
+            $order = preg_match("/^\s*'(.*)'\s*$/", (string) $order, $r)
875
+                ? "'$fct(" . $r[1] . ")'"
876
+                : "'$fct(' . $order . ')'";
877
+        }
878
+        $t = $order . $collecte . $sens;
879
+        if (preg_match("/^(.*)'\s*\.\s*'([^']*')$/", $t, $r)) {
880
+            $t = $r[1] . $r[2];
881
+        }
882
+
883
+        $boucle->order[] = $t;
884
+    }
885 885
 }
886 886
 
887 887
 /**
@@ -895,13 +895,13 @@  discard block
 block discarded – undo
895 895
  * @return string Clause pour le Order by
896 896
  */
897 897
 function calculer_critere_par_hasard($idb, &$boucles, $crit) {
898
-	$boucle = &$boucles[$idb];
899
-	// Si ce n'est fait, ajouter un champ 'hasard' dans le select
900
-	$parha = 'rand() AS hasard';
901
-	if (!in_array($parha, $boucle->select)) {
902
-		$boucle->select[] = $parha;
903
-	}
904
-	return "'hasard'";
898
+    $boucle = &$boucles[$idb];
899
+    // Si ce n'est fait, ajouter un champ 'hasard' dans le select
900
+    $parha = 'rand() AS hasard';
901
+    if (!in_array($parha, $boucle->select)) {
902
+        $boucle->select[] = $parha;
903
+    }
904
+    return "'hasard'";
905 905
 }
906 906
 
907 907
 /**
@@ -925,22 +925,22 @@  discard block
 block discarded – undo
925 925
  * @return string|array Clause pour le Order by (array si erreur)
926 926
  */
927 927
 function calculer_critere_par_expression_num($idb, &$boucles, $crit, $tri, $champ) {
928
-	$_champ = calculer_critere_par_champ($idb, $boucles, $crit, $champ, true);
929
-	if (is_array($_champ)) {
930
-		return ['zbug_critere_inconnu', ['critere' => $crit->op . " num $champ"]];
931
-	}
932
-	$boucle = &$boucles[$idb];
933
-	$texte = '0+' . $_champ;
934
-	$suite = calculer_liste($tri, $idb, $boucles, $boucle->id_parent);
935
-	if ($suite !== "''") {
936
-		$texte = "\" . ((\$x = $suite) ? ('$texte' . \$x) : '0')" . ' . "';
937
-	}
938
-	$asnum = 'num' . ($boucle->order ? count($boucle->order) : '');
939
-	$boucle->select[] = $texte . " AS $asnum";
940
-
941
-	$orderassinum = calculer_critere_par_expression_sinum($idb, $boucles, $crit, $tri, $champ);
942
-	$orderassinum = trim($orderassinum, "'");
943
-	return "'$orderassinum, $asnum'";
928
+    $_champ = calculer_critere_par_champ($idb, $boucles, $crit, $champ, true);
929
+    if (is_array($_champ)) {
930
+        return ['zbug_critere_inconnu', ['critere' => $crit->op . " num $champ"]];
931
+    }
932
+    $boucle = &$boucles[$idb];
933
+    $texte = '0+' . $_champ;
934
+    $suite = calculer_liste($tri, $idb, $boucles, $boucle->id_parent);
935
+    if ($suite !== "''") {
936
+        $texte = "\" . ((\$x = $suite) ? ('$texte' . \$x) : '0')" . ' . "';
937
+    }
938
+    $asnum = 'num' . ($boucle->order ? count($boucle->order) : '');
939
+    $boucle->select[] = $texte . " AS $asnum";
940
+
941
+    $orderassinum = calculer_critere_par_expression_sinum($idb, $boucles, $crit, $tri, $champ);
942
+    $orderassinum = trim($orderassinum, "'");
943
+    return "'$orderassinum, $asnum'";
944 944
 }
945 945
 
946 946
 /**
@@ -961,34 +961,34 @@  discard block
 block discarded – undo
961 961
  * @return string|array Clause pour le Order by (array si erreur)
962 962
  */
963 963
 function calculer_critere_par_expression_sinum($idb, &$boucles, $crit, $tri, $champ) {
964
-	$_champ = calculer_critere_par_champ($idb, $boucles, $crit, $champ, true);
965
-	if (is_array($_champ)) {
966
-		return ['zbug_critere_inconnu', ['critere' => $crit->op . " sinum $champ"]];
967
-	}
968
-	$boucle = &$boucles[$idb];
969
-	$texte = '0+' . $_champ;
970
-	$suite = calculer_liste($tri, $idb, $boucles, $boucle->id_parent);
971
-	if ($suite !== "''") {
972
-		$texte = "\" . ((\$x = $suite) ? ('$texte' . \$x) : '0')" . ' . "';
973
-	}
974
-
975
-	$as = false;
976
-	$select = "CASE ( $texte ) WHEN 0 THEN 1 ELSE 0 END AS ";
977
-	foreach ($boucle->select as $s) {
978
-		if (str_starts_with((string) $s, $select)) {
979
-			$as = trim(substr((string) $s, strlen($select)));
980
-			if (!preg_match(',\W,', $as)) {
981
-				break;
982
-			}
983
-			$as = false;
984
-		}
985
-	}
986
-
987
-	if (!$as) {
988
-		$as = 'sinum' . ($boucle->order ? count($boucle->order) : '');
989
-		$boucle->select[] = $select . $as;
990
-	}
991
-	return "'$as'";
964
+    $_champ = calculer_critere_par_champ($idb, $boucles, $crit, $champ, true);
965
+    if (is_array($_champ)) {
966
+        return ['zbug_critere_inconnu', ['critere' => $crit->op . " sinum $champ"]];
967
+    }
968
+    $boucle = &$boucles[$idb];
969
+    $texte = '0+' . $_champ;
970
+    $suite = calculer_liste($tri, $idb, $boucles, $boucle->id_parent);
971
+    if ($suite !== "''") {
972
+        $texte = "\" . ((\$x = $suite) ? ('$texte' . \$x) : '0')" . ' . "';
973
+    }
974
+
975
+    $as = false;
976
+    $select = "CASE ( $texte ) WHEN 0 THEN 1 ELSE 0 END AS ";
977
+    foreach ($boucle->select as $s) {
978
+        if (str_starts_with((string) $s, $select)) {
979
+            $as = trim(substr((string) $s, strlen($select)));
980
+            if (!preg_match(',\W,', $as)) {
981
+                break;
982
+            }
983
+            $as = false;
984
+        }
985
+    }
986
+
987
+    if (!$as) {
988
+        $as = 'sinum' . ($boucle->order ? count($boucle->order) : '');
989
+        $boucle->select[] = $select . $as;
990
+    }
991
+    return "'$as'";
992 992
 }
993 993
 
994 994
 
@@ -1008,13 +1008,13 @@  discard block
 block discarded – undo
1008 1008
  * @return string|array Clause pour le Order by (array si erreur)
1009 1009
  */
1010 1010
 function calculer_critere_par_expression_multi($idb, &$boucles, $crit, $tri, $champ) {
1011
-	$_champ = calculer_critere_par_champ($idb, $boucles, $crit, $champ, true);
1012
-	if (is_array($_champ)) {
1013
-		return ['zbug_critere_inconnu', ['critere' => $crit->op . " multi $champ"]];
1014
-	}
1015
-	$boucle = &$boucles[$idb];
1016
-	$boucle->select[] = "\".sql_multi('" . $_champ . "', \$GLOBALS['spip_lang']).\"";
1017
-	return "'multi'";
1011
+    $_champ = calculer_critere_par_champ($idb, $boucles, $crit, $champ, true);
1012
+    if (is_array($_champ)) {
1013
+        return ['zbug_critere_inconnu', ['critere' => $crit->op . " multi $champ"]];
1014
+    }
1015
+    $boucle = &$boucles[$idb];
1016
+    $boucle->select[] = "\".sql_multi('" . $_champ . "', \$GLOBALS['spip_lang']).\"";
1017
+    return "'multi'";
1018 1018
 }
1019 1019
 
1020 1020
 /**
@@ -1033,56 +1033,56 @@  discard block
 block discarded – undo
1033 1033
  * @return array|string
1034 1034
  */
1035 1035
 function calculer_critere_par_champ($idb, &$boucles, $crit, $par, $raw = false) {
1036
-	$boucle = &$boucles[$idb];
1037
-	$desc = $boucle->show;
1038
-
1039
-	// le champ existe dans la table, pas de souci (le plus commun)
1040
-	if (isset($desc['field'][$par])) {
1041
-		$par = $boucle->id_table . '.' . $par;
1042
-	}
1043
-	// le champ est peut être une jointure
1044
-	else {
1045
-		$table = $table_alias = false; // toutes les tables de jointure possibles
1046
-		$champ = $par;
1047
-
1048
-		// le champ demandé est une exception de jointure {par titre_mot}
1049
-		if (isset($GLOBALS['exceptions_des_jointures'][$par])) {
1050
-			[$table, $champ] = $GLOBALS['exceptions_des_jointures'][$par];
1051
-		} // la table de jointure est explicitement indiquée {par truc.muche}
1052
-		elseif (preg_match('/^([^,]*)\.(.*)$/', $par, $r)) {
1053
-			[, $table, $champ] = $r;
1054
-			$table_alias = $table; // c'est peut-être un alias de table {par L1.titre}
1055
-			$table = table_objet_sql($table);
1056
-		}
1057
-
1058
-		// Si on connait la table d'arrivée, on la demande donc explicitement
1059
-		// Sinon on cherche le champ dans les tables possibles de jointures
1060
-		// Si la table est déjà dans le from, on la réutilise.
1061
-		if ($infos = chercher_champ_dans_tables($champ, $boucle->from, $boucle->sql_serveur, $table)) {
1062
-			$par = $infos['alias'] . '.' . $champ;
1063
-		} elseif (
1064
-			$boucle->jointures_explicites
1065
-			&& ($alias = trouver_jointure_champ($champ, $boucle, explode(' ', (string) $boucle->jointures_explicites), false, $table))
1066
-		) {
1067
-			$par = $alias . '.' . $champ;
1068
-		} elseif ($alias = trouver_jointure_champ($champ, $boucle, $boucle->jointures, false, $table)) {
1069
-			$par = $alias . '.' . $champ;
1070
-		// en spécifiant directement l'alias {par L2.titre} (situation hasardeuse tout de même)
1071
-		} elseif (
1072
-			$table_alias
1073
-			&& isset($boucle->from[$table_alias])
1074
-			&& ($infos = chercher_champ_dans_tables($champ, $boucle->from, $boucle->sql_serveur, $boucle->from[$table_alias]))
1075
-		) {
1076
-			$par = $infos['alias'] . '.' . $champ;
1077
-		} elseif ($table) {
1078
-			// On avait table + champ, mais on ne les a pas trouvés
1079
-			return ['zbug_critere_inconnu', ['critere' => $crit->op . " $par"]];
1080
-		} else {
1081
-			// Sinon tant pis, ca doit etre un champ synthetise (cf points)
1082
-		}
1083
-	}
1084
-
1085
-	return $raw ? $par : "'$par'";
1036
+    $boucle = &$boucles[$idb];
1037
+    $desc = $boucle->show;
1038
+
1039
+    // le champ existe dans la table, pas de souci (le plus commun)
1040
+    if (isset($desc['field'][$par])) {
1041
+        $par = $boucle->id_table . '.' . $par;
1042
+    }
1043
+    // le champ est peut être une jointure
1044
+    else {
1045
+        $table = $table_alias = false; // toutes les tables de jointure possibles
1046
+        $champ = $par;
1047
+
1048
+        // le champ demandé est une exception de jointure {par titre_mot}
1049
+        if (isset($GLOBALS['exceptions_des_jointures'][$par])) {
1050
+            [$table, $champ] = $GLOBALS['exceptions_des_jointures'][$par];
1051
+        } // la table de jointure est explicitement indiquée {par truc.muche}
1052
+        elseif (preg_match('/^([^,]*)\.(.*)$/', $par, $r)) {
1053
+            [, $table, $champ] = $r;
1054
+            $table_alias = $table; // c'est peut-être un alias de table {par L1.titre}
1055
+            $table = table_objet_sql($table);
1056
+        }
1057
+
1058
+        // Si on connait la table d'arrivée, on la demande donc explicitement
1059
+        // Sinon on cherche le champ dans les tables possibles de jointures
1060
+        // Si la table est déjà dans le from, on la réutilise.
1061
+        if ($infos = chercher_champ_dans_tables($champ, $boucle->from, $boucle->sql_serveur, $table)) {
1062
+            $par = $infos['alias'] . '.' . $champ;
1063
+        } elseif (
1064
+            $boucle->jointures_explicites
1065
+            && ($alias = trouver_jointure_champ($champ, $boucle, explode(' ', (string) $boucle->jointures_explicites), false, $table))
1066
+        ) {
1067
+            $par = $alias . '.' . $champ;
1068
+        } elseif ($alias = trouver_jointure_champ($champ, $boucle, $boucle->jointures, false, $table)) {
1069
+            $par = $alias . '.' . $champ;
1070
+        // en spécifiant directement l'alias {par L2.titre} (situation hasardeuse tout de même)
1071
+        } elseif (
1072
+            $table_alias
1073
+            && isset($boucle->from[$table_alias])
1074
+            && ($infos = chercher_champ_dans_tables($champ, $boucle->from, $boucle->sql_serveur, $boucle->from[$table_alias]))
1075
+        ) {
1076
+            $par = $infos['alias'] . '.' . $champ;
1077
+        } elseif ($table) {
1078
+            // On avait table + champ, mais on ne les a pas trouvés
1079
+            return ['zbug_critere_inconnu', ['critere' => $crit->op . " $par"]];
1080
+        } else {
1081
+            // Sinon tant pis, ca doit etre un champ synthetise (cf points)
1082
+        }
1083
+    }
1084
+
1085
+    return $raw ? $par : "'$par'";
1086 1086
 }
1087 1087
 
1088 1088
 /**
@@ -1107,33 +1107,33 @@  discard block
 block discarded – undo
1107 1107
  */
1108 1108
 function critere_inverse_dist($idb, &$boucles, $crit) {
1109 1109
 
1110
-	$boucle = &$boucles[$idb];
1111
-	// Classement par ordre inverse
1112
-	if ($crit->not) {
1113
-		critere_parinverse($idb, $boucles, $crit);
1114
-	} else {
1115
-		$order = "' DESC'";
1116
-		// Classement par ordre inverse fonction eventuelle de #ENV{...}
1117
-		if (isset($crit->param[0])) {
1118
-			$critere = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
1119
-			$order = "(($critere)?' DESC':'')";
1120
-		}
1121
-
1122
-		$n = is_countable($boucle->order) ? count($boucle->order) : 0;
1123
-		if (!$n) {
1124
-			if (isset($boucle->default_order[0])) {
1125
-				$boucle->default_order[0] .= ' . " DESC"';
1126
-			} else {
1127
-				$boucle->default_order[] = ' DESC';
1128
-			}
1129
-		} else {
1130
-			$t = $boucle->order[$n - 1] . " . $order";
1131
-			if (preg_match("/^(.*)'\s*\.\s*'([^']*')$/", $t, $r)) {
1132
-				$t = $r[1] . $r[2];
1133
-			}
1134
-			$boucle->order[$n - 1] = $t;
1135
-		}
1136
-	}
1110
+    $boucle = &$boucles[$idb];
1111
+    // Classement par ordre inverse
1112
+    if ($crit->not) {
1113
+        critere_parinverse($idb, $boucles, $crit);
1114
+    } else {
1115
+        $order = "' DESC'";
1116
+        // Classement par ordre inverse fonction eventuelle de #ENV{...}
1117
+        if (isset($crit->param[0])) {
1118
+            $critere = calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent);
1119
+            $order = "(($critere)?' DESC':'')";
1120
+        }
1121
+
1122
+        $n = is_countable($boucle->order) ? count($boucle->order) : 0;
1123
+        if (!$n) {
1124
+            if (isset($boucle->default_order[0])) {
1125
+                $boucle->default_order[0] .= ' . " DESC"';
1126
+            } else {
1127
+                $boucle->default_order[] = ' DESC';
1128
+            }
1129
+        } else {
1130
+            $t = $boucle->order[$n - 1] . " . $order";
1131
+            if (preg_match("/^(.*)'\s*\.\s*'([^']*')$/", $t, $r)) {
1132
+                $t = $r[1] . $r[2];
1133
+            }
1134
+            $boucle->order[$n - 1] = $t;
1135
+        }
1136
+    }
1137 1137
 }
1138 1138
 
1139 1139
 /**
@@ -1145,139 +1145,139 @@  discard block
 block discarded – undo
1145 1145
  * @return void|array
1146 1146
  */
1147 1147
 function critere_par_ordre_liste_dist($idb, &$boucles, $crit) {
1148
-	$boucle = &$boucles[$idb];
1148
+    $boucle = &$boucles[$idb];
1149 1149
 
1150
-	$sens = $collecte = '';
1151
-	if ($crit->not) {
1152
-		$sens = " . ' DESC'";
1153
-	}
1150
+    $sens = $collecte = '';
1151
+    if ($crit->not) {
1152
+        $sens = " . ' DESC'";
1153
+    }
1154 1154
 
1155
-	$crit2 = clone $crit;
1156
-	$crit2->not = false;
1157
-	$crit2->param = [reset($crit->param)];
1158
-	$res = critere_parinverse($idb, $boucles, $crit2);
1155
+    $crit2 = clone $crit;
1156
+    $crit2->not = false;
1157
+    $crit2->param = [reset($crit->param)];
1158
+    $res = critere_parinverse($idb, $boucles, $crit2);
1159 1159
 
1160
-	// erreur ?
1161
-	if (is_array($res)) {
1162
-		return $res;
1163
-	}
1160
+    // erreur ?
1161
+    if (is_array($res)) {
1162
+        return $res;
1163
+    }
1164 1164
 
1165
-	$_order = array_pop($boucle->order);
1165
+    $_order = array_pop($boucle->order);
1166 1166
 
1167
-	$_liste = calculer_liste($crit->param[1], [], $boucles, $boucles[$idb]->id_parent);
1167
+    $_liste = calculer_liste($crit->param[1], [], $boucles, $boucles[$idb]->id_parent);
1168 1168
 
1169
-	$order = "'-FIELD(' . $_order . ',' . ((\$zl=formate_liste_critere_par_ordre_liste(array_reverse($_liste),'" . $boucle->sql_serveur . "')) ? \$zl : '0').')'$sens";
1170
-	$boucle->order[] = $order;
1169
+    $order = "'-FIELD(' . $_order . ',' . ((\$zl=formate_liste_critere_par_ordre_liste(array_reverse($_liste),'" . $boucle->sql_serveur . "')) ? \$zl : '0').')'$sens";
1170
+    $boucle->order[] = $order;
1171 1171
 }
1172 1172
 
1173 1173
 
1174 1174
 function critere_agenda_dist($idb, &$boucles, $crit) {
1175
-	$params = $crit->param;
1176
-
1177
-	if ((is_countable($params) ? count($params) : 0) < 1) {
1178
-		return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ?']];
1179
-	}
1180
-
1181
-	$boucle = &$boucles[$idb];
1182
-	$parent = $boucle->id_parent;
1183
-	$fields = $boucle->show['field'];
1184
-
1185
-	$date = array_shift($params);
1186
-	$type = array_shift($params);
1187
-
1188
-	// la valeur $type doit etre connue a la compilation
1189
-	// donc etre forcement reduite a un litteral unique dans le source
1190
-	$type = is_object($type[0]) ? $type[0]->texte : null;
1191
-
1192
-	// La valeur date doit designer un champ de la table SQL.
1193
-	// Si c'est un litteral unique dans le source, verifier a la compil,
1194
-	// sinon synthetiser le test de verif pour execution ulterieure
1195
-	// On prendra arbitrairement le premier champ si test negatif.
1196
-	if ((is_countable($date) ? count($date) : 0) == 1 && $date[0]->type == 'texte') {
1197
-		$date = $date[0]->texte;
1198
-		if (!isset($fields[$date])) {
1199
-			return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ' . $date]];
1200
-		}
1201
-	} else {
1202
-		$a = calculer_liste($date, $idb, $boucles, $parent);
1203
-		$noms = array_keys($fields);
1204
-		$defaut = $noms[0];
1205
-		$noms = implode(' ', $noms);
1206
-		# bien laisser 2 espaces avant $nom pour que strpos<>0
1207
-		$cond = "(\$a=strval($a))AND\nstrpos(\"  $noms \",\" \$a \")";
1208
-		$date = "'.(($cond)\n?\$a:\"$defaut\").'";
1209
-	}
1210
-	$annee = $params ? array_shift($params) : '';
1211
-	$annee = "\n" . 'sprintf("%04d", ($x = ' .
1212
-		calculer_liste($annee, $idb, $boucles, $parent) .
1213
-		') ? $x : date("Y"))';
1214
-
1215
-	$mois = $params ? array_shift($params) : '';
1216
-	$mois = "\n" . 'sprintf("%02d", ($x = ' .
1217
-		calculer_liste($mois, $idb, $boucles, $parent) .
1218
-		') ? $x : date("m"))';
1219
-
1220
-	$jour = $params ? array_shift($params) : '';
1221
-	$jour = "\n" . 'sprintf("%02d", ($x = ' .
1222
-		calculer_liste($jour, $idb, $boucles, $parent) .
1223
-		') ? $x : date("d"))';
1224
-
1225
-	$annee2 = $params ? array_shift($params) : '';
1226
-	$annee2 = "\n" . 'sprintf("%04d", ($x = ' .
1227
-		calculer_liste($annee2, $idb, $boucles, $parent) .
1228
-		') ? $x : date("Y"))';
1229
-
1230
-	$mois2 = $params ? array_shift($params) : '';
1231
-	$mois2 = "\n" . 'sprintf("%02d", ($x = ' .
1232
-		calculer_liste($mois2, $idb, $boucles, $parent) .
1233
-		') ? $x : date("m"))';
1234
-
1235
-	$jour2 = $params ? array_shift($params) : '';
1236
-	$jour2 = "\n" . 'sprintf("%02d", ($x = ' .
1237
-		calculer_liste($jour2, $idb, $boucles, $parent) .
1238
-		') ? $x : date("d"))';
1239
-
1240
-	$date = $boucle->id_table . ".$date";
1241
-
1242
-	$quote_end = ",'" . $boucle->sql_serveur . "','text'";
1243
-	if ($type == 'jour') {
1244
-		$boucle->where[] = [
1245
-			"'='",
1246
-			"'DATE_FORMAT($date, \'%Y%m%d\')'",
1247
-			("sql_quote($annee . $mois . $jour$quote_end)")
1248
-		];
1249
-	} elseif ($type == 'mois') {
1250
-		$boucle->where[] = [
1251
-			"'='",
1252
-			"'DATE_FORMAT($date, \'%Y%m\')'",
1253
-			("sql_quote($annee . $mois$quote_end)")
1254
-		];
1255
-	} elseif ($type == 'semaine') {
1256
-		$boucle->where[] = [
1257
-			"'AND'",
1258
-			[
1259
-				"'>='",
1260
-				"'DATE_FORMAT($date, \'%Y%m%d\')'",
1261
-				("date_debut_semaine($annee, $mois, $jour)")
1262
-			],
1263
-			[
1264
-				"'<='",
1265
-				"'DATE_FORMAT($date, \'%Y%m%d\')'",
1266
-				("date_fin_semaine($annee, $mois, $jour)")
1267
-			]
1268
-		];
1269
-	} elseif ((is_countable($crit->param) ? count($crit->param) : 0) > 2) {
1270
-		$boucle->where[] = [
1271
-			"'AND'",
1272
-			[
1273
-				"'>='",
1274
-				"'DATE_FORMAT($date, \'%Y%m%d\')'",
1275
-				("sql_quote($annee . $mois . $jour$quote_end)")
1276
-			],
1277
-			["'<='", "'DATE_FORMAT($date, \'%Y%m%d\')'", ("sql_quote($annee2 . $mois2 . $jour2$quote_end)")]
1278
-		];
1279
-	}
1280
-	// sinon on prend tout
1175
+    $params = $crit->param;
1176
+
1177
+    if ((is_countable($params) ? count($params) : 0) < 1) {
1178
+        return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ?']];
1179
+    }
1180
+
1181
+    $boucle = &$boucles[$idb];
1182
+    $parent = $boucle->id_parent;
1183
+    $fields = $boucle->show['field'];
1184
+
1185
+    $date = array_shift($params);
1186
+    $type = array_shift($params);
1187
+
1188
+    // la valeur $type doit etre connue a la compilation
1189
+    // donc etre forcement reduite a un litteral unique dans le source
1190
+    $type = is_object($type[0]) ? $type[0]->texte : null;
1191
+
1192
+    // La valeur date doit designer un champ de la table SQL.
1193
+    // Si c'est un litteral unique dans le source, verifier a la compil,
1194
+    // sinon synthetiser le test de verif pour execution ulterieure
1195
+    // On prendra arbitrairement le premier champ si test negatif.
1196
+    if ((is_countable($date) ? count($date) : 0) == 1 && $date[0]->type == 'texte') {
1197
+        $date = $date[0]->texte;
1198
+        if (!isset($fields[$date])) {
1199
+            return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ' . $date]];
1200
+        }
1201
+    } else {
1202
+        $a = calculer_liste($date, $idb, $boucles, $parent);
1203
+        $noms = array_keys($fields);
1204
+        $defaut = $noms[0];
1205
+        $noms = implode(' ', $noms);
1206
+        # bien laisser 2 espaces avant $nom pour que strpos<>0
1207
+        $cond = "(\$a=strval($a))AND\nstrpos(\"  $noms \",\" \$a \")";
1208
+        $date = "'.(($cond)\n?\$a:\"$defaut\").'";
1209
+    }
1210
+    $annee = $params ? array_shift($params) : '';
1211
+    $annee = "\n" . 'sprintf("%04d", ($x = ' .
1212
+        calculer_liste($annee, $idb, $boucles, $parent) .
1213
+        ') ? $x : date("Y"))';
1214
+
1215
+    $mois = $params ? array_shift($params) : '';
1216
+    $mois = "\n" . 'sprintf("%02d", ($x = ' .
1217
+        calculer_liste($mois, $idb, $boucles, $parent) .
1218
+        ') ? $x : date("m"))';
1219
+
1220
+    $jour = $params ? array_shift($params) : '';
1221
+    $jour = "\n" . 'sprintf("%02d", ($x = ' .
1222
+        calculer_liste($jour, $idb, $boucles, $parent) .
1223
+        ') ? $x : date("d"))';
1224
+
1225
+    $annee2 = $params ? array_shift($params) : '';
1226
+    $annee2 = "\n" . 'sprintf("%04d", ($x = ' .
1227
+        calculer_liste($annee2, $idb, $boucles, $parent) .
1228
+        ') ? $x : date("Y"))';
1229
+
1230
+    $mois2 = $params ? array_shift($params) : '';
1231
+    $mois2 = "\n" . 'sprintf("%02d", ($x = ' .
1232
+        calculer_liste($mois2, $idb, $boucles, $parent) .
1233
+        ') ? $x : date("m"))';
1234
+
1235
+    $jour2 = $params ? array_shift($params) : '';
1236
+    $jour2 = "\n" . 'sprintf("%02d", ($x = ' .
1237
+        calculer_liste($jour2, $idb, $boucles, $parent) .
1238
+        ') ? $x : date("d"))';
1239
+
1240
+    $date = $boucle->id_table . ".$date";
1241
+
1242
+    $quote_end = ",'" . $boucle->sql_serveur . "','text'";
1243
+    if ($type == 'jour') {
1244
+        $boucle->where[] = [
1245
+            "'='",
1246
+            "'DATE_FORMAT($date, \'%Y%m%d\')'",
1247
+            ("sql_quote($annee . $mois . $jour$quote_end)")
1248
+        ];
1249
+    } elseif ($type == 'mois') {
1250
+        $boucle->where[] = [
1251
+            "'='",
1252
+            "'DATE_FORMAT($date, \'%Y%m\')'",
1253
+            ("sql_quote($annee . $mois$quote_end)")
1254
+        ];
1255
+    } elseif ($type == 'semaine') {
1256
+        $boucle->where[] = [
1257
+            "'AND'",
1258
+            [
1259
+                "'>='",
1260
+                "'DATE_FORMAT($date, \'%Y%m%d\')'",
1261
+                ("date_debut_semaine($annee, $mois, $jour)")
1262
+            ],
1263
+            [
1264
+                "'<='",
1265
+                "'DATE_FORMAT($date, \'%Y%m%d\')'",
1266
+                ("date_fin_semaine($annee, $mois, $jour)")
1267
+            ]
1268
+        ];
1269
+    } elseif ((is_countable($crit->param) ? count($crit->param) : 0) > 2) {
1270
+        $boucle->where[] = [
1271
+            "'AND'",
1272
+            [
1273
+                "'>='",
1274
+                "'DATE_FORMAT($date, \'%Y%m%d\')'",
1275
+                ("sql_quote($annee . $mois . $jour$quote_end)")
1276
+            ],
1277
+            ["'<='", "'DATE_FORMAT($date, \'%Y%m%d\')'", ("sql_quote($annee2 . $mois2 . $jour2$quote_end)")]
1278
+        ];
1279
+    }
1280
+    // sinon on prend tout
1281 1281
 }
1282 1282
 
1283 1283
 
@@ -1302,33 +1302,33 @@  discard block
 block discarded – undo
1302 1302
  * @return void
1303 1303
  **/
1304 1304
 function calculer_critere_parties($idb, &$boucles, $crit) {
1305
-	$boucle = &$boucles[$idb];
1306
-	$a1 = $crit->param[0];
1307
-	$a2 = $crit->param[1];
1308
-	$op = $crit->op;
1309
-
1310
-	[$a11, $a12] = calculer_critere_parties_aux($idb, $boucles, $a1);
1311
-	[$a21, $a22] = calculer_critere_parties_aux($idb, $boucles, $a2);
1312
-
1313
-	if (($op == ',') && (is_numeric($a11) && (is_numeric($a21)))) {
1314
-		$boucle->limit = $a11 . ',' . $a21;
1315
-	} else {
1316
-		// 3 dans {1/3}, {2,3} ou {1,n-3}
1317
-		$boucle->total_parties = ($a21 != 'n') ? $a21 : $a22;
1318
-		// 2 dans {2/3}, {2,5}, {n-2,1}
1319
-		$partie = ($a11 != 'n') ? $a11 : $a12;
1320
-		$mode = (($op == '/') ? '/' :
1321
-			(($a11 == 'n') ? '-' : '+') . (($a21 == 'n') ? '-' : '+'));
1322
-		// cas simple {0,#ENV{truc}} compilons le en LIMIT :
1323
-		if ($a11 !== 'n' && $a21 !== 'n' && $mode == '++' && $op == ',') {
1324
-			$boucle->limit =
1325
-				(is_numeric($a11) ? "'$a11'" : $a11)
1326
-				. ".','."
1327
-				. (is_numeric($a21) ? "'$a21'" : $a21);
1328
-		} else {
1329
-			calculer_parties($boucles, $idb, $partie, $mode);
1330
-		}
1331
-	}
1305
+    $boucle = &$boucles[$idb];
1306
+    $a1 = $crit->param[0];
1307
+    $a2 = $crit->param[1];
1308
+    $op = $crit->op;
1309
+
1310
+    [$a11, $a12] = calculer_critere_parties_aux($idb, $boucles, $a1);
1311
+    [$a21, $a22] = calculer_critere_parties_aux($idb, $boucles, $a2);
1312
+
1313
+    if (($op == ',') && (is_numeric($a11) && (is_numeric($a21)))) {
1314
+        $boucle->limit = $a11 . ',' . $a21;
1315
+    } else {
1316
+        // 3 dans {1/3}, {2,3} ou {1,n-3}
1317
+        $boucle->total_parties = ($a21 != 'n') ? $a21 : $a22;
1318
+        // 2 dans {2/3}, {2,5}, {n-2,1}
1319
+        $partie = ($a11 != 'n') ? $a11 : $a12;
1320
+        $mode = (($op == '/') ? '/' :
1321
+            (($a11 == 'n') ? '-' : '+') . (($a21 == 'n') ? '-' : '+'));
1322
+        // cas simple {0,#ENV{truc}} compilons le en LIMIT :
1323
+        if ($a11 !== 'n' && $a21 !== 'n' && $mode == '++' && $op == ',') {
1324
+            $boucle->limit =
1325
+                (is_numeric($a11) ? "'$a11'" : $a11)
1326
+                . ".','."
1327
+                . (is_numeric($a21) ? "'$a21'" : $a21);
1328
+        } else {
1329
+            calculer_parties($boucles, $idb, $partie, $mode);
1330
+        }
1331
+    }
1332 1332
 }
1333 1333
 
1334 1334
 /**
@@ -1356,63 +1356,63 @@  discard block
 block discarded – undo
1356 1356
  * @return void
1357 1357
  **/
1358 1358
 function calculer_parties(&$boucles, $id_boucle, $debut, $mode) {
1359
-	$total_parties = $boucles[$id_boucle]->total_parties;
1360
-
1361
-	preg_match(',([+-/p])([+-/])?,', $mode, $regs);
1362
-	[, $op1, $op2] = array_pad($regs, 3, null);
1363
-	$nombre_boucle = "\$Numrows['$id_boucle']['total']";
1364
-	// {1/3}
1365
-	if ($op1 == '/') {
1366
-		$pmoins1 = is_numeric($debut) ? ($debut - 1) : "($debut-1)";
1367
-		$totpos = is_numeric($total_parties) ? ($total_parties) :
1368
-			"($total_parties ? $total_parties : 1)";
1369
-		$fin = "ceil(($nombre_boucle * $debut )/$totpos) - 1";
1370
-		$debut = $pmoins1 ? "ceil(($nombre_boucle * $pmoins1)/$totpos);" : 0;
1371
-	} else {
1372
-		// cas {n-1,x}
1373
-		if ($op1 == '-') {
1374
-			$debut = "$nombre_boucle - $debut;";
1375
-		}
1376
-
1377
-		// cas {x,n-1}
1378
-		if ($op2 == '-') {
1379
-			$fin = '$debut_boucle + ' . $nombre_boucle . ' - '
1380
-				. (is_numeric($total_parties) ? ($total_parties + 1) :
1381
-					($total_parties . ' - 1'));
1382
-		} else {
1383
-			// {x,1} ou {pagination}
1384
-			$fin = '$debut_boucle'
1385
-				. (is_numeric($total_parties) ?
1386
-					(($total_parties == 1) ? '' : (' + ' . ($total_parties - 1))) :
1387
-					('+' . $total_parties . ' - 1'));
1388
-		}
1389
-
1390
-		// {pagination}, gerer le debut_xx=-1 pour tout voir
1391
-		if ($op1 == 'p') {
1392
-			$debut .= ";\n	\$debut_boucle = ((\$tout=(\$debut_boucle == -1))?0:(\$debut_boucle))";
1393
-			$debut .= ";\n	\$debut_boucle = max(0,min(\$debut_boucle,floor(($nombre_boucle-1)/($total_parties))*($total_parties)))";
1394
-			$fin = "(\$tout ? $nombre_boucle : $fin)";
1395
-		}
1396
-	}
1397
-
1398
-	// Notes :
1399
-	// $debut_boucle et $fin_boucle sont les indices SQL du premier
1400
-	// et du dernier demandes dans la boucle : 0 pour le premier,
1401
-	// n-1 pour le dernier ; donc total_boucle = 1 + debut - fin
1402
-	// Utiliser min pour rabattre $fin_boucle sur total_boucle.
1403
-
1404
-	$boucles[$id_boucle]->mode_partie = "\n\t"
1405
-		. '$debut_boucle = ' . $debut . ";\n	"
1406
-		. "\$debut_boucle = intval(\$debut_boucle);\n	"
1407
-		. '$fin_boucle = min(' . $fin . ", \$Numrows['$id_boucle']['total'] - 1);\n	"
1408
-		. '$Numrows[\'' . $id_boucle . "']['grand_total'] = \$Numrows['$id_boucle']['total'];\n	"
1409
-		. '$Numrows[\'' . $id_boucle . '\']["total"] = max(0,$fin_boucle - $debut_boucle + 1);'
1410
-		. "\n\tif (\$debut_boucle>0"
1411
-		. " AND \$debut_boucle < \$Numrows['$id_boucle']['grand_total']"
1412
-		. " AND \$iter->seek(\$debut_boucle,'continue'))"
1413
-		. "\n\t\t\$Numrows['$id_boucle']['compteur_boucle'] = \$debut_boucle;\n\t";
1414
-
1415
-	$boucles[$id_boucle]->partie = "
1359
+    $total_parties = $boucles[$id_boucle]->total_parties;
1360
+
1361
+    preg_match(',([+-/p])([+-/])?,', $mode, $regs);
1362
+    [, $op1, $op2] = array_pad($regs, 3, null);
1363
+    $nombre_boucle = "\$Numrows['$id_boucle']['total']";
1364
+    // {1/3}
1365
+    if ($op1 == '/') {
1366
+        $pmoins1 = is_numeric($debut) ? ($debut - 1) : "($debut-1)";
1367
+        $totpos = is_numeric($total_parties) ? ($total_parties) :
1368
+            "($total_parties ? $total_parties : 1)";
1369
+        $fin = "ceil(($nombre_boucle * $debut )/$totpos) - 1";
1370
+        $debut = $pmoins1 ? "ceil(($nombre_boucle * $pmoins1)/$totpos);" : 0;
1371
+    } else {
1372
+        // cas {n-1,x}
1373
+        if ($op1 == '-') {
1374
+            $debut = "$nombre_boucle - $debut;";
1375
+        }
1376
+
1377
+        // cas {x,n-1}
1378
+        if ($op2 == '-') {
1379
+            $fin = '$debut_boucle + ' . $nombre_boucle . ' - '
1380
+                . (is_numeric($total_parties) ? ($total_parties + 1) :
1381
+                    ($total_parties . ' - 1'));
1382
+        } else {
1383
+            // {x,1} ou {pagination}
1384
+            $fin = '$debut_boucle'
1385
+                . (is_numeric($total_parties) ?
1386
+                    (($total_parties == 1) ? '' : (' + ' . ($total_parties - 1))) :
1387
+                    ('+' . $total_parties . ' - 1'));
1388
+        }
1389
+
1390
+        // {pagination}, gerer le debut_xx=-1 pour tout voir
1391
+        if ($op1 == 'p') {
1392
+            $debut .= ";\n	\$debut_boucle = ((\$tout=(\$debut_boucle == -1))?0:(\$debut_boucle))";
1393
+            $debut .= ";\n	\$debut_boucle = max(0,min(\$debut_boucle,floor(($nombre_boucle-1)/($total_parties))*($total_parties)))";
1394
+            $fin = "(\$tout ? $nombre_boucle : $fin)";
1395
+        }
1396
+    }
1397
+
1398
+    // Notes :
1399
+    // $debut_boucle et $fin_boucle sont les indices SQL du premier
1400
+    // et du dernier demandes dans la boucle : 0 pour le premier,
1401
+    // n-1 pour le dernier ; donc total_boucle = 1 + debut - fin
1402
+    // Utiliser min pour rabattre $fin_boucle sur total_boucle.
1403
+
1404
+    $boucles[$id_boucle]->mode_partie = "\n\t"
1405
+        . '$debut_boucle = ' . $debut . ";\n	"
1406
+        . "\$debut_boucle = intval(\$debut_boucle);\n	"
1407
+        . '$fin_boucle = min(' . $fin . ", \$Numrows['$id_boucle']['total'] - 1);\n	"
1408
+        . '$Numrows[\'' . $id_boucle . "']['grand_total'] = \$Numrows['$id_boucle']['total'];\n	"
1409
+        . '$Numrows[\'' . $id_boucle . '\']["total"] = max(0,$fin_boucle - $debut_boucle + 1);'
1410
+        . "\n\tif (\$debut_boucle>0"
1411
+        . " AND \$debut_boucle < \$Numrows['$id_boucle']['grand_total']"
1412
+        . " AND \$iter->seek(\$debut_boucle,'continue'))"
1413
+        . "\n\t\t\$Numrows['$id_boucle']['compteur_boucle'] = \$debut_boucle;\n\t";
1414
+
1415
+    $boucles[$id_boucle]->partie = "
1416 1416
 		if (\$Numrows['$id_boucle']['compteur_boucle'] <= \$debut_boucle) continue;
1417 1417
 		if (\$Numrows['$id_boucle']['compteur_boucle']-1 > \$fin_boucle) break;";
1418 1418
 }
@@ -1429,26 +1429,26 @@  discard block
 block discarded – undo
1429 1429
  * @return array          Valeur de l'élément (peut être une expression PHP), Nombre soustrait
1430 1430
  **/
1431 1431
 function calculer_critere_parties_aux($idb, &$boucles, $param) {
1432
-	if ($param[0]->type != 'texte') {
1433
-		$a1 = calculer_liste([$param[0]], $idb, $boucles, $boucles[$idb]->id_parent);
1434
-		if (isset($param[1]->texte)) {
1435
-			preg_match(',^\s*(-(\d+))?\s*$,', (string) $param[1]->texte, $m);
1436
-
1437
-			return ["intval($a1)", ((isset($m[2]) && $m[2]) ? $m[2] : 0)];
1438
-		} else {
1439
-			return ["intval($a1)", 0];
1440
-		}
1441
-	} else {
1442
-		preg_match(',^\s*((\d+)|n)\s*(-\s*(\d+)?\s*)?$,', (string) $param[0]->texte, $m);
1443
-		$a1 = $m[1];
1444
-		if (empty($m[3])) {
1445
-			return [$a1, 0];
1446
-		} elseif (!empty($m[4])) {
1447
-			return [$a1, $m[4]];
1448
-		} else {
1449
-			return [$a1, calculer_liste([$param[1]], $idb, $boucles, $boucles[$idb]->id_parent)];
1450
-		}
1451
-	}
1432
+    if ($param[0]->type != 'texte') {
1433
+        $a1 = calculer_liste([$param[0]], $idb, $boucles, $boucles[$idb]->id_parent);
1434
+        if (isset($param[1]->texte)) {
1435
+            preg_match(',^\s*(-(\d+))?\s*$,', (string) $param[1]->texte, $m);
1436
+
1437
+            return ["intval($a1)", ((isset($m[2]) && $m[2]) ? $m[2] : 0)];
1438
+        } else {
1439
+            return ["intval($a1)", 0];
1440
+        }
1441
+    } else {
1442
+        preg_match(',^\s*((\d+)|n)\s*(-\s*(\d+)?\s*)?$,', (string) $param[0]->texte, $m);
1443
+        $a1 = $m[1];
1444
+        if (empty($m[3])) {
1445
+            return [$a1, 0];
1446
+        } elseif (!empty($m[4])) {
1447
+            return [$a1, $m[4]];
1448
+        } else {
1449
+            return [$a1, calculer_liste([$param[1]], $idb, $boucles, $boucles[$idb]->id_parent)];
1450
+        }
1451
+    }
1452 1452
 }
1453 1453
 
1454 1454
 
@@ -1475,46 +1475,46 @@  discard block
 block discarded – undo
1475 1475
  *     array : Erreur sur un des critères
1476 1476
  **/
1477 1477
 function calculer_criteres($idb, &$boucles) {
1478
-	$msg = '';
1479
-	$boucle = $boucles[$idb];
1480
-	$table = strtoupper((string) $boucle->type_requete);
1481
-	$serveur = strtolower((string) $boucle->sql_serveur);
1482
-
1483
-	$defaut = charger_fonction('DEFAUT', 'calculer_critere');
1484
-	// s'il y avait une erreur de syntaxe, propager cette info
1485
-	if (!is_array($boucle->criteres)) {
1486
-		return [];
1487
-	}
1488
-
1489
-	foreach ($boucle->criteres as $crit) {
1490
-		$critere = $crit->op;
1491
-		// critere personnalise ?
1492
-		if (
1493
-			(!$serveur
1494
-				|| !function_exists($f = 'critere_' . $serveur . '_' . $table . '_' . $critere)
1495
-				&& !function_exists($f .= '_dist')
1496
-				&& !function_exists($f = 'critere_' . $serveur . '_' . $critere)
1497
-				&& !function_exists($f .= '_dist')
1498
-			)
1499
-			&& !function_exists($f = 'critere_' . $table . '_' . $critere)
1500
-			&& !function_exists($f .= '_dist')
1501
-			&& !function_exists($f = 'critere_' . $critere)
1502
-			&& !function_exists($f .= '_dist')
1503
-		) {
1504
-			// fonction critere standard
1505
-			$f = $defaut;
1506
-		}
1507
-		// compile le critere
1508
-		$res = $f($idb, $boucles, $crit);
1509
-
1510
-		// Gestion centralisee des erreurs pour pouvoir propager
1511
-		if (is_array($res)) {
1512
-			$msg = $res;
1513
-			erreur_squelette($msg, $boucle);
1514
-		}
1515
-	}
1516
-
1517
-	return $msg;
1478
+    $msg = '';
1479
+    $boucle = $boucles[$idb];
1480
+    $table = strtoupper((string) $boucle->type_requete);
1481
+    $serveur = strtolower((string) $boucle->sql_serveur);
1482
+
1483
+    $defaut = charger_fonction('DEFAUT', 'calculer_critere');
1484
+    // s'il y avait une erreur de syntaxe, propager cette info
1485
+    if (!is_array($boucle->criteres)) {
1486
+        return [];
1487
+    }
1488
+
1489
+    foreach ($boucle->criteres as $crit) {
1490
+        $critere = $crit->op;
1491
+        // critere personnalise ?
1492
+        if (
1493
+            (!$serveur
1494
+                || !function_exists($f = 'critere_' . $serveur . '_' . $table . '_' . $critere)
1495
+                && !function_exists($f .= '_dist')
1496
+                && !function_exists($f = 'critere_' . $serveur . '_' . $critere)
1497
+                && !function_exists($f .= '_dist')
1498
+            )
1499
+            && !function_exists($f = 'critere_' . $table . '_' . $critere)
1500
+            && !function_exists($f .= '_dist')
1501
+            && !function_exists($f = 'critere_' . $critere)
1502
+            && !function_exists($f .= '_dist')
1503
+        ) {
1504
+            // fonction critere standard
1505
+            $f = $defaut;
1506
+        }
1507
+        // compile le critere
1508
+        $res = $f($idb, $boucles, $crit);
1509
+
1510
+        // Gestion centralisee des erreurs pour pouvoir propager
1511
+        if (is_array($res)) {
1512
+            $msg = $res;
1513
+            erreur_squelette($msg, $boucle);
1514
+        }
1515
+    }
1516
+
1517
+    return $msg;
1518 1518
 }
1519 1519
 
1520 1520
 /**
@@ -1529,11 +1529,11 @@  discard block
 block discarded – undo
1529 1529
  * @return string         Code compilé rééchappé
1530 1530
  */
1531 1531
 function kwote($lisp, $serveur = '', $type = '') {
1532
-	if (preg_match(_CODE_QUOTE, $lisp, $r)) {
1533
-		return $r[1] . '"' . sql_quote(str_replace(["\\'", '\\\\'], ["'", '\\'], $r[2]), $serveur, $type) . '"';
1534
-	} else {
1535
-		return "sql_quote($lisp, '$serveur', '" . str_replace("'", "\\'", $type) . "')";
1536
-	}
1532
+    if (preg_match(_CODE_QUOTE, $lisp, $r)) {
1533
+        return $r[1] . '"' . sql_quote(str_replace(["\\'", '\\\\'], ["'", '\\'], $r[2]), $serveur, $type) . '"';
1534
+    } else {
1535
+        return "sql_quote($lisp, '$serveur', '" . str_replace("'", "\\'", $type) . "')";
1536
+    }
1537 1537
 }
1538 1538
 
1539 1539
 
@@ -1552,81 +1552,81 @@  discard block
 block discarded – undo
1552 1552
  * @return void|array
1553 1553
  **/
1554 1554
 function critere_IN_dist($idb, &$boucles, $crit) {
1555
-	$r = calculer_critere_infixe($idb, $boucles, $crit);
1556
-	if (!$r) {
1557
-		return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ?']];
1558
-	}
1559
-	[$arg, $op, $val, $col, $where_complement] = $r;
1560
-
1561
-	$in = critere_IN_cas($idb, $boucles, $crit->not ? 'NOT' : ($crit->exclus ? 'exclus' : ''), $arg, $op, $val, $col);
1562
-
1563
-	//	inserer la condition; exemple: {id_mot ?IN (66, 62, 64)}
1564
-	$where = $in;
1565
-	if ($crit->cond) {
1566
-		$pred = calculer_argument_precedent($idb, $col, $boucles);
1567
-		$where = ["'?'", $pred, $where, "''"];
1568
-		if ($where_complement) { // condition annexe du type "AND (objet='article')"
1569
-		$where_complement = ["'?'", $pred, $where_complement, "''"];
1570
-		}
1571
-	}
1572
-	if ($crit->exclus) {
1573
-		if (!preg_match(',^L\d+[.],', (string) $arg)) {
1574
-			$where = ["'NOT'", $where];
1575
-		} else // un not sur un critere de jointure se traduit comme un NOT IN avec une sous requete
1576
-			// c'est une sous requete identique a la requete principale sous la forme (SELF,$select,$where) avec $select et $where qui surchargent
1577
-		{
1578
-			$where = [
1579
-				"'NOT'",
1580
-				[
1581
-					"'IN'",
1582
-					"'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'",
1583
-					["'SELF'", "'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'", $where]
1584
-				]
1585
-			];
1586
-		}
1587
-	}
1588
-
1589
-	$boucles[$idb]->where[] = $where;
1590
-	if ($where_complement) { // condition annexe du type "AND (objet='article')"
1591
-	$boucles[$idb]->where[] = $where_complement;
1592
-	}
1555
+    $r = calculer_critere_infixe($idb, $boucles, $crit);
1556
+    if (!$r) {
1557
+        return ['zbug_critere_inconnu', ['critere' => $crit->op . ' ?']];
1558
+    }
1559
+    [$arg, $op, $val, $col, $where_complement] = $r;
1560
+
1561
+    $in = critere_IN_cas($idb, $boucles, $crit->not ? 'NOT' : ($crit->exclus ? 'exclus' : ''), $arg, $op, $val, $col);
1562
+
1563
+    //	inserer la condition; exemple: {id_mot ?IN (66, 62, 64)}
1564
+    $where = $in;
1565
+    if ($crit->cond) {
1566
+        $pred = calculer_argument_precedent($idb, $col, $boucles);
1567
+        $where = ["'?'", $pred, $where, "''"];
1568
+        if ($where_complement) { // condition annexe du type "AND (objet='article')"
1569
+        $where_complement = ["'?'", $pred, $where_complement, "''"];
1570
+        }
1571
+    }
1572
+    if ($crit->exclus) {
1573
+        if (!preg_match(',^L\d+[.],', (string) $arg)) {
1574
+            $where = ["'NOT'", $where];
1575
+        } else // un not sur un critere de jointure se traduit comme un NOT IN avec une sous requete
1576
+            // c'est une sous requete identique a la requete principale sous la forme (SELF,$select,$where) avec $select et $where qui surchargent
1577
+        {
1578
+            $where = [
1579
+                "'NOT'",
1580
+                [
1581
+                    "'IN'",
1582
+                    "'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'",
1583
+                    ["'SELF'", "'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'", $where]
1584
+                ]
1585
+            ];
1586
+        }
1587
+    }
1588
+
1589
+    $boucles[$idb]->where[] = $where;
1590
+    if ($where_complement) { // condition annexe du type "AND (objet='article')"
1591
+    $boucles[$idb]->where[] = $where_complement;
1592
+    }
1593 1593
 }
1594 1594
 
1595 1595
 function critere_IN_cas($idb, &$boucles, $crit2, $arg, $op, $val, $col) {
1596
-	static $num = [];
1597
-	$descr = $boucles[$idb]->descr;
1598
-	$cpt = &$num[$descr['nom']][$descr['gram']][$idb];
1599
-
1600
-	$var = '$in' . $cpt++;
1601
-	$x = "\n\t$var = array();";
1602
-	foreach ($val as $k => $v) {
1603
-		if (preg_match(",^(\n//.*\n)?'(.*)'$,", (string) $v, $r)) {
1604
-			// optimiser le traitement des constantes
1605
-			if (is_numeric($r[2])) {
1606
-				$x .= "\n\t$var" . "[]= $r[2];";
1607
-			} else {
1608
-				$x .= "\n\t$var" . '[]= ' . sql_quote($r[2]) . ';';
1609
-			}
1610
-		} else {
1611
-			// Pour permettre de passer des tableaux de valeurs
1612
-			// on repere l'utilisation brute de #ENV**{X},
1613
-			// c'est-a-dire sa  traduction en ($PILE[0][X]).
1614
-			// et on deballe mais en rajoutant l'anti XSS
1615
-			$x .= "\n\tif (!(is_array(\$a = ($v))))\n\t\t$var" . "[]= \$a;\n\telse $var = array_merge($var, \$a);";
1616
-		}
1617
-	}
1618
-
1619
-	$boucles[$idb]->in .= $x;
1620
-
1621
-	// inserer le tri par defaut selon les ordres du IN ...
1622
-	// avec une ecriture de type FIELD qui degrade les performances (du meme ordre qu'un regexp)
1623
-	// et que l'on limite donc strictement aux cas necessaires :
1624
-	// si ce n'est pas un !IN, et si il n'y a pas d'autre order dans la boucle
1625
-	if (!$crit2) {
1626
-		$boucles[$idb]->default_order[] = "((!\$zqv=sql_quote($var) OR \$zqv===\"''\") ? 0 : ('FIELD($arg,' . \$zqv . ')'))";
1627
-	}
1628
-
1629
-	return "sql_in('$arg', $var" . ($crit2 == 'NOT' ? ",'NOT'" : '') . ')';
1596
+    static $num = [];
1597
+    $descr = $boucles[$idb]->descr;
1598
+    $cpt = &$num[$descr['nom']][$descr['gram']][$idb];
1599
+
1600
+    $var = '$in' . $cpt++;
1601
+    $x = "\n\t$var = array();";
1602
+    foreach ($val as $k => $v) {
1603
+        if (preg_match(",^(\n//.*\n)?'(.*)'$,", (string) $v, $r)) {
1604
+            // optimiser le traitement des constantes
1605
+            if (is_numeric($r[2])) {
1606
+                $x .= "\n\t$var" . "[]= $r[2];";
1607
+            } else {
1608
+                $x .= "\n\t$var" . '[]= ' . sql_quote($r[2]) . ';';
1609
+            }
1610
+        } else {
1611
+            // Pour permettre de passer des tableaux de valeurs
1612
+            // on repere l'utilisation brute de #ENV**{X},
1613
+            // c'est-a-dire sa  traduction en ($PILE[0][X]).
1614
+            // et on deballe mais en rajoutant l'anti XSS
1615
+            $x .= "\n\tif (!(is_array(\$a = ($v))))\n\t\t$var" . "[]= \$a;\n\telse $var = array_merge($var, \$a);";
1616
+        }
1617
+    }
1618
+
1619
+    $boucles[$idb]->in .= $x;
1620
+
1621
+    // inserer le tri par defaut selon les ordres du IN ...
1622
+    // avec une ecriture de type FIELD qui degrade les performances (du meme ordre qu'un regexp)
1623
+    // et que l'on limite donc strictement aux cas necessaires :
1624
+    // si ce n'est pas un !IN, et si il n'y a pas d'autre order dans la boucle
1625
+    if (!$crit2) {
1626
+        $boucles[$idb]->default_order[] = "((!\$zqv=sql_quote($var) OR \$zqv===\"''\") ? 0 : ('FIELD($arg,' . \$zqv . ')'))";
1627
+    }
1628
+
1629
+    return "sql_in('$arg', $var" . ($crit2 == 'NOT' ? ",'NOT'" : '') . ')';
1630 1630
 }
1631 1631
 
1632 1632
 /**
@@ -1642,22 +1642,22 @@  discard block
 block discarded – undo
1642 1642
  * @return void
1643 1643
  */
1644 1644
 function critere_where_dist($idb, &$boucles, $crit) {
1645
-	$boucle = &$boucles[$idb];
1646
-	if (isset($crit->param[0])) {
1647
-		$_where = calculer_liste($crit->param[0], $idb, $boucles, $boucle->id_parent);
1648
-	} else {
1649
-		$_where = "spip_sanitize_from_request(\$Pile[0]['where'] ?? null, 'where', 'vide')";
1650
-	}
1651
-
1652
-	if ($crit->cond) {
1653
-		$_where = "$_where ?: ''";
1654
-	}
1655
-
1656
-	if ($crit->not) {
1657
-		$_where = "['NOT', $_where]";
1658
-	}
1659
-
1660
-	$boucle->where[] = $_where;
1645
+    $boucle = &$boucles[$idb];
1646
+    if (isset($crit->param[0])) {
1647
+        $_where = calculer_liste($crit->param[0], $idb, $boucles, $boucle->id_parent);
1648
+    } else {
1649
+        $_where = "spip_sanitize_from_request(\$Pile[0]['where'] ?? null, 'where', 'vide')";
1650
+    }
1651
+
1652
+    if ($crit->cond) {
1653
+        $_where = "$_where ?: ''";
1654
+    }
1655
+
1656
+    if ($crit->not) {
1657
+        $_where = "['NOT', $_where]";
1658
+    }
1659
+
1660
+    $boucle->where[] = $_where;
1661 1661
 }
1662 1662
 
1663 1663
 /**
@@ -1673,22 +1673,22 @@  discard block
 block discarded – undo
1673 1673
  * @return void
1674 1674
  */
1675 1675
 function critere_having_dist($idb, &$boucles, $crit) {
1676
-	$boucle = &$boucles[$idb];
1677
-	if (isset($crit->param[0])) {
1678
-		$_having = calculer_liste($crit->param[0], $idb, $boucles, $boucle->id_parent);
1679
-	} else {
1680
-		$_having = "spip_sanitize_from_request(\$Pile[0]['having'] ?? null, 'having', 'vide')";
1681
-	}
1682
-
1683
-	if ($crit->cond) {
1684
-		$_having = "$_having ?: ''";
1685
-	}
1686
-
1687
-	if ($crit->not) {
1688
-		$_having = "['NOT', $_having]";
1689
-	}
1690
-
1691
-	$boucle->having[] = $_having;
1676
+    $boucle = &$boucles[$idb];
1677
+    if (isset($crit->param[0])) {
1678
+        $_having = calculer_liste($crit->param[0], $idb, $boucles, $boucle->id_parent);
1679
+    } else {
1680
+        $_having = "spip_sanitize_from_request(\$Pile[0]['having'] ?? null, 'having', 'vide')";
1681
+    }
1682
+
1683
+    if ($crit->cond) {
1684
+        $_having = "$_having ?: ''";
1685
+    }
1686
+
1687
+    if ($crit->not) {
1688
+        $_having = "['NOT', $_having]";
1689
+    }
1690
+
1691
+    $boucle->having[] = $_having;
1692 1692
 }
1693 1693
 
1694 1694
 /**
@@ -1716,31 +1716,31 @@  discard block
 block discarded – undo
1716 1716
  * @return void
1717 1717
  */
1718 1718
 function critere_id__dist($idb, &$boucles, $crit) {
1719
-	/** @var Boucle $boucle */
1720
-	$boucle = $boucles[$idb];
1721
-
1722
-	$champs = lister_champs_id_conditionnel(
1723
-		$boucle->show['table'],
1724
-		$boucle->show,
1725
-		$boucle->sql_serveur
1726
-	);
1727
-
1728
-	// ne pas tenir compte des critères identiques déjà présents.
1729
-	if (!empty($boucle->modificateur['criteres'])) {
1730
-		$champs = array_diff($champs, array_keys($boucle->modificateur['criteres']));
1731
-	}
1732
-	// nous aider en mode debug.
1733
-	$boucle->debug[] = 'id_ : ' . implode(', ', $champs);
1734
-	$boucle->modificateur['id_'] = $champs;
1735
-
1736
-	// créer un critère {id_xxx?} de chaque champ retenu
1737
-	foreach ($champs as $champ) {
1738
-		$critere_id_table = new Critere();
1739
-		$critere_id_table->op = $champ;
1740
-		$critere_id_table->cond = true;
1741
-		$critere_id_table->ligne = $crit->ligne;
1742
-		calculer_critere_DEFAUT_dist($idb, $boucles, $critere_id_table);
1743
-	}
1719
+    /** @var Boucle $boucle */
1720
+    $boucle = $boucles[$idb];
1721
+
1722
+    $champs = lister_champs_id_conditionnel(
1723
+        $boucle->show['table'],
1724
+        $boucle->show,
1725
+        $boucle->sql_serveur
1726
+    );
1727
+
1728
+    // ne pas tenir compte des critères identiques déjà présents.
1729
+    if (!empty($boucle->modificateur['criteres'])) {
1730
+        $champs = array_diff($champs, array_keys($boucle->modificateur['criteres']));
1731
+    }
1732
+    // nous aider en mode debug.
1733
+    $boucle->debug[] = 'id_ : ' . implode(', ', $champs);
1734
+    $boucle->modificateur['id_'] = $champs;
1735
+
1736
+    // créer un critère {id_xxx?} de chaque champ retenu
1737
+    foreach ($champs as $champ) {
1738
+        $critere_id_table = new Critere();
1739
+        $critere_id_table->op = $champ;
1740
+        $critere_id_table->cond = true;
1741
+        $critere_id_table->ligne = $crit->ligne;
1742
+        calculer_critere_DEFAUT_dist($idb, $boucles, $critere_id_table);
1743
+    }
1744 1744
 }
1745 1745
 
1746 1746
 /**
@@ -1760,74 +1760,74 @@  discard block
 block discarded – undo
1760 1760
  * @return array Liste de nom de champs (tel que id_article, id_mot, id_parent ...)
1761 1761
  */
1762 1762
 function lister_champs_id_conditionnel($table, $desc = null, $serveur = '') {
1763
-	// calculer la description de la table
1764
-	if (!is_array($desc)) {
1765
-		$desc = description_table($table, $serveur);
1766
-	}
1767
-	if (!$desc) {
1768
-		return [];
1769
-	}
1770
-
1771
-	// Les champs id_xx de la table demandée
1772
-	$champs = array_filter(
1773
-		array_keys($desc['field']),
1774
-		fn($champ) => str_starts_with($champ, 'id_') || $champ == 'objet'
1775
-	);
1776
-
1777
-	// Si le champ id_rubrique appartient à la liste et si id_secteur n'est pas inclus on le rajoute.
1778
-	if (
1779
-		in_array('id_rubrique', $champs)
1780
-		&& !in_array('id_secteur', $champs)
1781
-	) {
1782
-		$champs[] = 'id_secteur';
1783
-	}
1784
-
1785
-	// On ne fera pas mieux pour les tables d’un autre serveur
1786
-	if ($serveur) {
1787
-		return $champs;
1788
-	}
1789
-
1790
-	$primary = false;
1791
-	$associable = false;
1792
-	include_spip('action/editer_liens');
1793
-
1794
-	if (isset($desc['type'])) {
1795
-		$primary = id_table_objet($desc['type']);
1796
-		$associable = objet_associable($desc['type']);
1797
-	}
1798
-	if (isset($desc['field']['id_objet']) && isset($desc['field']['objet'])) {
1799
-		$associable = true;
1800
-	}
1801
-
1802
-	// liste de toutes les tables principales, sauf la notre
1803
-	$tables = lister_tables_objets_sql();
1804
-	unset($tables[$table]);
1805
-
1806
-	foreach ($tables as $_table => $_desc) {
1807
-		if (
1808
-			$associable
1809
-			|| $primary && array_key_exists($primary, $_desc['field'])
1810
-			|| objet_associable($_desc['type'])
1811
-		) {
1812
-			$champs[] = id_table_objet($_table);
1813
-		}
1814
-	}
1815
-	$champs = array_values(array_unique($champs));
1816
-
1817
-	// Exclusions de certains id
1818
-	$exclusions = pipeline(
1819
-		'exclure_id_conditionnel',
1820
-		[
1821
-			'args' => [
1822
-				'table' => $table,
1823
-				'id_table_objet' => $primary,
1824
-				'associable' => $associable,
1825
-			],
1826
-			'data' => [],
1827
-		]
1828
-	);
1829
-
1830
-	return array_diff($champs, $exclusions);
1763
+    // calculer la description de la table
1764
+    if (!is_array($desc)) {
1765
+        $desc = description_table($table, $serveur);
1766
+    }
1767
+    if (!$desc) {
1768
+        return [];
1769
+    }
1770
+
1771
+    // Les champs id_xx de la table demandée
1772
+    $champs = array_filter(
1773
+        array_keys($desc['field']),
1774
+        fn($champ) => str_starts_with($champ, 'id_') || $champ == 'objet'
1775
+    );
1776
+
1777
+    // Si le champ id_rubrique appartient à la liste et si id_secteur n'est pas inclus on le rajoute.
1778
+    if (
1779
+        in_array('id_rubrique', $champs)
1780
+        && !in_array('id_secteur', $champs)
1781
+    ) {
1782
+        $champs[] = 'id_secteur';
1783
+    }
1784
+
1785
+    // On ne fera pas mieux pour les tables d’un autre serveur
1786
+    if ($serveur) {
1787
+        return $champs;
1788
+    }
1789
+
1790
+    $primary = false;
1791
+    $associable = false;
1792
+    include_spip('action/editer_liens');
1793
+
1794
+    if (isset($desc['type'])) {
1795
+        $primary = id_table_objet($desc['type']);
1796
+        $associable = objet_associable($desc['type']);
1797
+    }
1798
+    if (isset($desc['field']['id_objet']) && isset($desc['field']['objet'])) {
1799
+        $associable = true;
1800
+    }
1801
+
1802
+    // liste de toutes les tables principales, sauf la notre
1803
+    $tables = lister_tables_objets_sql();
1804
+    unset($tables[$table]);
1805
+
1806
+    foreach ($tables as $_table => $_desc) {
1807
+        if (
1808
+            $associable
1809
+            || $primary && array_key_exists($primary, $_desc['field'])
1810
+            || objet_associable($_desc['type'])
1811
+        ) {
1812
+            $champs[] = id_table_objet($_table);
1813
+        }
1814
+    }
1815
+    $champs = array_values(array_unique($champs));
1816
+
1817
+    // Exclusions de certains id
1818
+    $exclusions = pipeline(
1819
+        'exclure_id_conditionnel',
1820
+        [
1821
+            'args' => [
1822
+                'table' => $table,
1823
+                'id_table_objet' => $primary,
1824
+                'associable' => $associable,
1825
+            ],
1826
+            'data' => [],
1827
+        ]
1828
+    );
1829
+
1830
+    return array_diff($champs, $exclusions);
1831 1831
 }
1832 1832
 
1833 1833
 /**
@@ -1882,31 +1882,31 @@  discard block
 block discarded – undo
1882 1882
  * @return void
1883 1883
  */
1884 1884
 function critere_tri_dist($idb, &$boucles, $crit) {
1885
-	$boucle = &$boucles[$idb];
1886
-
1887
-	// definition du champ par defaut
1888
-	$_champ_defaut = isset($crit->param[0][0])
1889
-		? calculer_liste([$crit->param[0][0]], $idb, $boucles, $boucle->id_parent)
1890
-		: "''";
1891
-	$_liste_sens_defaut = isset($crit->param[1][0])
1892
-		? calculer_liste([$crit->param[1][0]], $idb, $boucles, $boucle->id_parent)
1893
-		: '1';
1894
-	$_variable = isset($crit->param[2][0])
1895
-		? calculer_liste([$crit->param[2][0]], $idb, $boucles, $boucle->id_parent)
1896
-		: "'$idb'";
1897
-
1898
-	$_tri = "((\$t=(isset(\$Pile[0]['tri'.$_variable]))?\$Pile[0]['tri'.$_variable]:((strncmp($_variable,'session',7)==0 AND session_get('tri'.$_variable))?session_get('tri'.$_variable):$_champ_defaut))?tri_protege_champ(\$t):'')";
1899
-
1900
-	$_sens_defaut = "(is_array(\$s=$_liste_sens_defaut)?(isset(\$s[\$st=$_tri])?\$s[\$st]:reset(\$s)):\$s)";
1901
-	$_sens = "((intval(\$t=(isset(\$Pile[0]['sens'.$_variable]))?\$Pile[0]['sens'.$_variable]:((strncmp($_variable,'session',7)==0 AND session_get('sens'.$_variable))?session_get('sens'.$_variable):$_sens_defaut))==-1 OR \$t=='inverse')?-1:1)";
1902
-
1903
-	$boucle->modificateur['tri_champ'] = $_tri;
1904
-	$boucle->modificateur['tri_sens'] = $_sens;
1905
-	$boucle->modificateur['tri_liste_sens_defaut'] = $_liste_sens_defaut;
1906
-	$boucle->modificateur['tri_nom'] = $_variable;
1907
-	// faut il inserer un test sur l'existence de $tri parmi les champs de la table ?
1908
-	// evite des erreurs sql, mais peut empecher des tri sur jointure ...
1909
-	$boucle->hash .= "
1885
+    $boucle = &$boucles[$idb];
1886
+
1887
+    // definition du champ par defaut
1888
+    $_champ_defaut = isset($crit->param[0][0])
1889
+        ? calculer_liste([$crit->param[0][0]], $idb, $boucles, $boucle->id_parent)
1890
+        : "''";
1891
+    $_liste_sens_defaut = isset($crit->param[1][0])
1892
+        ? calculer_liste([$crit->param[1][0]], $idb, $boucles, $boucle->id_parent)
1893
+        : '1';
1894
+    $_variable = isset($crit->param[2][0])
1895
+        ? calculer_liste([$crit->param[2][0]], $idb, $boucles, $boucle->id_parent)
1896
+        : "'$idb'";
1897
+
1898
+    $_tri = "((\$t=(isset(\$Pile[0]['tri'.$_variable]))?\$Pile[0]['tri'.$_variable]:((strncmp($_variable,'session',7)==0 AND session_get('tri'.$_variable))?session_get('tri'.$_variable):$_champ_defaut))?tri_protege_champ(\$t):'')";
1899
+
1900
+    $_sens_defaut = "(is_array(\$s=$_liste_sens_defaut)?(isset(\$s[\$st=$_tri])?\$s[\$st]:reset(\$s)):\$s)";
1901
+    $_sens = "((intval(\$t=(isset(\$Pile[0]['sens'.$_variable]))?\$Pile[0]['sens'.$_variable]:((strncmp($_variable,'session',7)==0 AND session_get('sens'.$_variable))?session_get('sens'.$_variable):$_sens_defaut))==-1 OR \$t=='inverse')?-1:1)";
1902
+
1903
+    $boucle->modificateur['tri_champ'] = $_tri;
1904
+    $boucle->modificateur['tri_sens'] = $_sens;
1905
+    $boucle->modificateur['tri_liste_sens_defaut'] = $_liste_sens_defaut;
1906
+    $boucle->modificateur['tri_nom'] = $_variable;
1907
+    // faut il inserer un test sur l'existence de $tri parmi les champs de la table ?
1908
+    // evite des erreurs sql, mais peut empecher des tri sur jointure ...
1909
+    $boucle->hash .= "
1910 1910
 	\$senstri = '';
1911 1911
 	\$tri = $_tri;
1912 1912
 	if (\$tri){
@@ -1914,8 +1914,8 @@  discard block
 block discarded – undo
1914 1914
 		\$senstri = (\$senstri<0)?' DESC':'';
1915 1915
 	};
1916 1916
 	";
1917
-	$boucle->select[] = '".tri_champ_select($tri)."';
1918
-	$boucle->order[] = "tri_champ_order(\$tri,\$command['from'],\$senstri)";
1917
+    $boucle->select[] = '".tri_champ_select($tri)."';
1918
+    $boucle->order[] = "tri_champ_order(\$tri,\$command['from'],\$senstri)";
1919 1919
 }
1920 1920
 
1921 1921
 # criteres de comparaison
@@ -1932,21 +1932,21 @@  discard block
 block discarded – undo
1932 1932
  * @return void|array
1933 1933
  **/
1934 1934
 function calculer_critere_DEFAUT_dist($idb, &$boucles, $crit) {
1935
-	// double cas particulier {0,1} et {1/2} repere a l'analyse lexicale
1936
-	if ($crit->op == ',' || $crit->op == '/') {
1937
-		calculer_critere_parties($idb, $boucles, $crit);
1938
-		return;
1939
-	}
1940
-
1941
-	$r = calculer_critere_infixe($idb, $boucles, $crit);
1942
-	if (!$r) {
1943
-		#	// on produit une erreur seulement si le critere n'a pas de '?'
1944
-		#	if (!$crit->cond) {
1945
-		return ['zbug_critere_inconnu', ['critere' => $crit->op]];
1946
-		#	}
1947
-	} else {
1948
-		calculer_critere_DEFAUT_args($idb, $boucles, $crit, $r);
1949
-	}
1935
+    // double cas particulier {0,1} et {1/2} repere a l'analyse lexicale
1936
+    if ($crit->op == ',' || $crit->op == '/') {
1937
+        calculer_critere_parties($idb, $boucles, $crit);
1938
+        return;
1939
+    }
1940
+
1941
+    $r = calculer_critere_infixe($idb, $boucles, $crit);
1942
+    if (!$r) {
1943
+        #	// on produit une erreur seulement si le critere n'a pas de '?'
1944
+        #	if (!$crit->cond) {
1945
+        return ['zbug_critere_inconnu', ['critere' => $crit->op]];
1946
+        #	}
1947
+    } else {
1948
+        calculer_critere_DEFAUT_args($idb, $boucles, $crit, $r);
1949
+    }
1950 1950
 }
1951 1951
 
1952 1952
 
@@ -1966,60 +1966,60 @@  discard block
 block discarded – undo
1966 1966
  * @return void
1967 1967
  **/
1968 1968
 function calculer_critere_DEFAUT_args($idb, &$boucles, $crit, $args) {
1969
-	[$arg, $op, $val, $col, $where_complement] = $args;
1970
-
1971
-	$where = ["'$op'", "'$arg'", $val[0]];
1972
-
1973
-	// inserer la negation (cf !...)
1974
-
1975
-	if ($crit->not) {
1976
-		$where = ["'NOT'", $where];
1977
-	}
1978
-	if ($crit->exclus) {
1979
-		if (!preg_match(',^L\d+[.],', (string) $arg)) {
1980
-			$where = ["'NOT'", $where];
1981
-		} else {
1982
-			// un not sur un critere de jointure se traduit comme un NOT IN avec une sous requete
1983
-			// c'est une sous requete identique a la requete principale sous la forme (SELF,$select,$where) avec $select et $where qui surchargent
1984
-			$where = [
1985
-				"'NOT'",
1986
-				[
1987
-					"'IN'",
1988
-					"'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'",
1989
-					["'SELF'", "'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'", $where]
1990
-				]
1991
-			];
1992
-		}
1993
-	}
1994
-
1995
-	// inserer la condition (cf {lang?})
1996
-	// traiter a part la date, elle est mise d'office par SPIP,
1997
-	if ($crit->cond) {
1998
-		$pred = calculer_argument_precedent($idb, $col, $boucles);
1999
-		if (($col === 'date' || $col === 'date_redac') && $pred === "\$Pile[0]['" . $col . "']") {
2000
-			$pred = "(\$Pile[0]['{$col}_default']?'':$pred)";
2001
-		}
2002
-
2003
-		if ($op === '=' && !$crit->not) {
2004
-			$where = [
2005
-				"'?'",
2006
-				"(is_array($pred))",
2007
-				critere_IN_cas($idb, $boucles, 'COND', $arg, $op, [$pred], $col),
2008
-				$where
2009
-			];
2010
-		}
2011
-		$where = ["'?'", "!is_whereable($pred)", "''", $where];
2012
-		if ($where_complement) {
2013
-			// condition annexe du type "AND (objet='article')"
2014
-			$where_complement = ["'?'", "!is_whereable($pred)", "''", $where_complement];
2015
-		}
2016
-	}
2017
-
2018
-	$boucles[$idb]->where[] = $where;
2019
-	if ($where_complement) {
2020
-		// condition annexe du type "AND (objet='article')"
2021
-		$boucles[$idb]->where[] = $where_complement;
2022
-	}
1969
+    [$arg, $op, $val, $col, $where_complement] = $args;
1970
+
1971
+    $where = ["'$op'", "'$arg'", $val[0]];
1972
+
1973
+    // inserer la negation (cf !...)
1974
+
1975
+    if ($crit->not) {
1976
+        $where = ["'NOT'", $where];
1977
+    }
1978
+    if ($crit->exclus) {
1979
+        if (!preg_match(',^L\d+[.],', (string) $arg)) {
1980
+            $where = ["'NOT'", $where];
1981
+        } else {
1982
+            // un not sur un critere de jointure se traduit comme un NOT IN avec une sous requete
1983
+            // c'est une sous requete identique a la requete principale sous la forme (SELF,$select,$where) avec $select et $where qui surchargent
1984
+            $where = [
1985
+                "'NOT'",
1986
+                [
1987
+                    "'IN'",
1988
+                    "'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'",
1989
+                    ["'SELF'", "'" . $boucles[$idb]->id_table . '.' . $boucles[$idb]->primary . "'", $where]
1990
+                ]
1991
+            ];
1992
+        }
1993
+    }
1994
+
1995
+    // inserer la condition (cf {lang?})
1996
+    // traiter a part la date, elle est mise d'office par SPIP,
1997
+    if ($crit->cond) {
1998
+        $pred = calculer_argument_precedent($idb, $col, $boucles);
1999
+        if (($col === 'date' || $col === 'date_redac') && $pred === "\$Pile[0]['" . $col . "']") {
2000
+            $pred = "(\$Pile[0]['{$col}_default']?'':$pred)";
2001
+        }
2002
+
2003
+        if ($op === '=' && !$crit->not) {
2004
+            $where = [
2005
+                "'?'",
2006
+                "(is_array($pred))",
2007
+                critere_IN_cas($idb, $boucles, 'COND', $arg, $op, [$pred], $col),
2008
+                $where
2009
+            ];
2010
+        }
2011
+        $where = ["'?'", "!is_whereable($pred)", "''", $where];
2012
+        if ($where_complement) {
2013
+            // condition annexe du type "AND (objet='article')"
2014
+            $where_complement = ["'?'", "!is_whereable($pred)", "''", $where_complement];
2015
+        }
2016
+    }
2017
+
2018
+    $boucles[$idb]->where[] = $where;
2019
+    if ($where_complement) {
2020
+        // condition annexe du type "AND (objet='article')"
2021
+        $boucles[$idb]->where[] = $where_complement;
2022
+    }
2023 2023
 }
2024 2024
 
2025 2025
 
@@ -2060,160 +2060,160 @@  discard block
 block discarded – undo
2060 2060
  **/
2061 2061
 function calculer_critere_infixe($idb, &$boucles, $crit) {
2062 2062
 
2063
-	$boucle = &$boucles[$idb];
2064
-	$type = $boucle->type_requete;
2065
-	$table = $boucle->id_table;
2066
-	$desc = $boucle->show;
2067
-	$col_vraie = null;
2068
-
2069
-	[$fct, $col, $op, $val, $args_sql] =
2070
-		calculer_critere_infixe_ops($idb, $boucles, $crit);
2071
-
2072
-	$col_alias = $col;
2073
-	$where_complement = false;
2074
-
2075
-	// Cas particulier : id_enfant => utiliser la colonne id_objet
2076
-	if ($col == 'id_enfant') {
2077
-		$col = $boucle->primary;
2078
-	}
2079
-
2080
-	// Cas particulier : id_parent => verifier les exceptions de tables
2081
-	if (
2082
-		in_array($col, ['id_parent', 'id_secteur'])
2083
-		&& isset($GLOBALS['exceptions_des_tables'][$table][$col]) || isset($GLOBALS['exceptions_des_tables'][$table][$col]) && is_string($GLOBALS['exceptions_des_tables'][$table][$col])
2084
-	) {
2085
-		$col = $GLOBALS['exceptions_des_tables'][$table][$col];
2086
-	} // et possibilite de gerer un critere secteur sur des tables de plugins (ie forums)
2087
-	else {
2088
-		if ($col == 'id_secteur' && ($critere_secteur = charger_fonction("critere_secteur_$type", 'public', true))) {
2089
-			$table = $critere_secteur($idb, $boucles, $val, $crit);
2090
-		}
2091
-
2092
-		// cas id_article=xx qui se mappe en id_objet=xx AND objet=article
2093
-		// sauf si exception declaree : sauter cette etape
2094
-		else {
2095
-			if (
2096
-				!isset($GLOBALS['exceptions_des_jointures'][table_objet_sql($table)][$col])
2097
-				&& !isset($GLOBALS['exceptions_des_jointures'][$col])
2098
-				&& count(trouver_champs_decomposes($col, $desc)) > 1
2099
-			) {
2100
-				$e = decompose_champ_id_objet($col);
2101
-				$col = array_shift($e);
2102
-				$where_complement = primary_doublee($e, $table);
2103
-			} // Cas particulier : expressions de date
2104
-			else {
2105
-				if ($c = calculer_critere_infixe_date($idb, $boucles, $col)) {
2106
-					[$col, $col_vraie] = $c;
2107
-					$table = '';
2108
-				} // table explicitée {mots.titre}
2109
-				else {
2110
-					if (preg_match('/^(.*)\.(.*)$/', (string) $col, $r)) {
2111
-						[, $table, $col] = $r;
2112
-						$col_alias = $col;
2113
-
2114
-						$trouver_table = charger_fonction('trouver_table', 'base');
2115
-						if (
2116
-							($desc = $trouver_table($table, $boucle->sql_serveur))
2117
-							&& isset($desc['field'][$col])
2118
-							&& ($cle = array_search($desc['table'], $boucle->from))
2119
-						) {
2120
-							$table = $cle;
2121
-						} else {
2122
-							$table = trouver_jointure_champ($col, $boucle, [$table], ($crit->cond || $op != '='));
2123
-						}
2124
-						#$table = calculer_critere_externe_init($boucle, array($table), $col, $desc, ($crit->cond OR $op!='='), true);
2125
-						if (!$table) {
2126
-							return '';
2127
-						}
2128
-					}
2129
-					// si le champ n'est pas trouvé dans la table,
2130
-					// on cherche si une jointure peut l'obtenir
2131
-					elseif (@!array_key_exists($col, $desc['field'])) {
2132
-						// Champ joker * des iterateurs DATA qui accepte tout
2133
-						if (@array_key_exists('*', $desc['field'])) {
2134
-							$desc['field'][$col_vraie ?: $col] = ''; // on veut pas de cast INT par defaut car le type peut etre n'importe quoi dans les boucles DATA
2135
-						}
2136
-						else {
2137
-							$r = calculer_critere_infixe_externe($boucle, $crit, $op, $desc, $col, $col_alias, $table);
2138
-							if (!$r) {
2139
-								return '';
2140
-							}
2141
-							[$col, $col_alias, $table, $where_complement, $desc] = $r;
2142
-						}
2143
-					}
2144
-				}
2145
-			}
2146
-		}
2147
-	}
2148
-
2149
-	$col_vraie = ($col_vraie ?: $col);
2150
-	// Dans tous les cas,
2151
-	// virer les guillemets eventuels autour d'un int (qui sont refuses par certains SQL)
2152
-	// et passer dans sql_quote avec le type si connu
2153
-	// et int sinon si la valeur est numerique
2154
-	// sinon introduire le vrai type du champ si connu dans le sql_quote (ou int NOT NULL sinon)
2155
-	// Ne pas utiliser intval, PHP tronquant les Bigint de SQL
2156
-	if ($op == '=' || in_array($op, $GLOBALS['table_criteres_infixes'])) {
2157
-		$type_cast_quote = ($desc['field'][$col_vraie] ?? 'int NOT NULL');
2158
-		// defaire le quote des int et les passer dans sql_quote avec le bon type de champ si on le connait, int sinon
2159
-		// prendre en compte le debug ou la valeur arrive avec un commentaire PHP en debut
2160
-		if (preg_match(",^\\A(\s*//.*?$\s*)?\"'(-?\d+)'\"\\z,ms", (string) $val[0], $r)) {
2161
-			$val[0] = $r[1] . '"' . sql_quote($r[2], $boucle->sql_serveur, $type_cast_quote) . '"';
2162
-		}
2163
-		// sinon expliciter les
2164
-		// sql_quote(truc) en sql_quote(truc,'',type)
2165
-		// sql_quote(truc,serveur) en sql_quote(truc,serveur,type)
2166
-		// sql_quote(truc,serveur,'') en sql_quote(truc,serveur,type)
2167
-		// sans toucher aux
2168
-		// sql_quote(truc,'','varchar(10) DEFAULT \'oui\' COLLATE NOCASE')
2169
-		// sql_quote(truc,'','varchar')
2170
-		elseif (
2171
-			preg_match('/\Asql_quote[(](.*?)(,[^)]*?)?(,[^)]*(?:\(\d+\)[^)]*)?)?[)]\s*\z/ms', (string) $val[0], $r)
2172
-			&& (!isset($r[3]) || !$r[3] || !trim($r[3], ", '"))
2173
-		) {
2174
-			$r = $r[1]
2175
-				. ((isset($r[2]) && $r[2]) ? $r[2] : ",''")
2176
-				. ",'" . addslashes((string) $type_cast_quote) . "'";
2177
-			$val[0] = "sql_quote($r)";
2178
-		}
2179
-		elseif (
2180
-			str_contains((string) $val[0], '@@defaultcast@@')
2181
-			&& preg_match("/'@@defaultcast@@'\s*\)\s*\z/ms", (string) $val[0], $r)
2182
-		) {
2183
-			$val[0] = substr((string) $val[0], 0, -strlen($r[0])) . "'" . addslashes((string) $type_cast_quote) . "')";
2184
-		}
2185
-	}
2186
-
2187
-	if (
2188
-		str_contains((string) $val[0], '@@defaultcast@@')
2189
-		&& preg_match("/'@@defaultcast@@'\s*\)\s*\z/ms", (string) $val[0], $r)
2190
-	) {
2191
-		$val[0] = substr((string) $val[0], 0, -strlen($r[0])) . "'char')";
2192
-	}
2193
-
2194
-	// Indicateur pour permettre aux fonctionx boucle_X de modifier
2195
-	// leurs requetes par defaut, notamment le champ statut
2196
-	// Ne pas confondre champs de la table principale et des jointures
2197
-	if ($table === $boucle->id_table) {
2198
-		$boucles[$idb]->modificateur['criteres'][$col_vraie] = true;
2199
-		if ($col_alias != $col_vraie) {
2200
-			$boucles[$idb]->modificateur['criteres'][$col_alias] = true;
2201
-		}
2202
-	}
2203
-
2204
-	// inserer le nom de la table SQL devant le nom du champ
2205
-	if ($table) {
2206
-		$arg = $col[0] == '`' ? "$table." . substr((string) $col, 1, -1) : "$table.$col";
2207
-	} else {
2208
-		$arg = $col;
2209
-	}
2210
-
2211
-	// inserer la fonction SQL
2212
-	if ($fct) {
2213
-		$arg = "$fct($arg$args_sql)";
2214
-	}
2215
-
2216
-	return [$arg, $op, $val, $col_alias, $where_complement];
2063
+    $boucle = &$boucles[$idb];
2064
+    $type = $boucle->type_requete;
2065
+    $table = $boucle->id_table;
2066
+    $desc = $boucle->show;
2067
+    $col_vraie = null;
2068
+
2069
+    [$fct, $col, $op, $val, $args_sql] =
2070
+        calculer_critere_infixe_ops($idb, $boucles, $crit);
2071
+
2072
+    $col_alias = $col;
2073
+    $where_complement = false;
2074
+
2075
+    // Cas particulier : id_enfant => utiliser la colonne id_objet
2076
+    if ($col == 'id_enfant') {
2077
+        $col = $boucle->primary;
2078
+    }
2079
+
2080
+    // Cas particulier : id_parent => verifier les exceptions de tables
2081
+    if (
2082
+        in_array($col, ['id_parent', 'id_secteur'])
2083
+        && isset($GLOBALS['exceptions_des_tables'][$table][$col]) || isset($GLOBALS['exceptions_des_tables'][$table][$col]) && is_string($GLOBALS['exceptions_des_tables'][$table][$col])
2084
+    ) {
2085
+        $col = $GLOBALS['exceptions_des_tables'][$table][$col];
2086
+    } // et possibilite de gerer un critere secteur sur des tables de plugins (ie forums)
2087
+    else {
2088
+        if ($col == 'id_secteur' && ($critere_secteur = charger_fonction("critere_secteur_$type", 'public', true))) {
2089
+            $table = $critere_secteur($idb, $boucles, $val, $crit);
2090
+        }
2091
+
2092
+        // cas id_article=xx qui se mappe en id_objet=xx AND objet=article
2093
+        // sauf si exception declaree : sauter cette etape
2094
+        else {
2095
+            if (
2096
+                !isset($GLOBALS['exceptions_des_jointures'][table_objet_sql($table)][$col])
2097
+                && !isset($GLOBALS['exceptions_des_jointures'][$col])
2098
+                && count(trouver_champs_decomposes($col, $desc)) > 1
2099
+            ) {
2100
+                $e = decompose_champ_id_objet($col);
2101
+                $col = array_shift($e);
2102
+                $where_complement = primary_doublee($e, $table);
2103
+            } // Cas particulier : expressions de date
2104
+            else {
2105
+                if ($c = calculer_critere_infixe_date($idb, $boucles, $col)) {
2106
+                    [$col, $col_vraie] = $c;
2107
+                    $table = '';
2108
+                } // table explicitée {mots.titre}
2109
+                else {
2110
+                    if (preg_match('/^(.*)\.(.*)$/', (string) $col, $r)) {
2111
+                        [, $table, $col] = $r;
2112
+                        $col_alias = $col;
2113
+
2114
+                        $trouver_table = charger_fonction('trouver_table', 'base');
2115
+                        if (
2116
+                            ($desc = $trouver_table($table, $boucle->sql_serveur))
2117
+                            && isset($desc['field'][$col])
2118
+                            && ($cle = array_search($desc['table'], $boucle->from))
2119
+                        ) {
2120
+                            $table = $cle;
2121
+                        } else {
2122
+                            $table = trouver_jointure_champ($col, $boucle, [$table], ($crit->cond || $op != '='));
2123
+                        }
2124
+                        #$table = calculer_critere_externe_init($boucle, array($table), $col, $desc, ($crit->cond OR $op!='='), true);
2125
+                        if (!$table) {
2126
+                            return '';
2127
+                        }
2128
+                    }
2129
+                    // si le champ n'est pas trouvé dans la table,
2130
+                    // on cherche si une jointure peut l'obtenir
2131
+                    elseif (@!array_key_exists($col, $desc['field'])) {
2132
+                        // Champ joker * des iterateurs DATA qui accepte tout
2133
+                        if (@array_key_exists('*', $desc['field'])) {
2134
+                            $desc['field'][$col_vraie ?: $col] = ''; // on veut pas de cast INT par defaut car le type peut etre n'importe quoi dans les boucles DATA
2135
+                        }
2136
+                        else {
2137
+                            $r = calculer_critere_infixe_externe($boucle, $crit, $op, $desc, $col, $col_alias, $table);
2138
+                            if (!$r) {
2139
+                                return '';
2140
+                            }
2141
+                            [$col, $col_alias, $table, $where_complement, $desc] = $r;
2142
+                        }
2143
+                    }
2144
+                }
2145
+            }
2146
+        }
2147
+    }
2148
+
2149
+    $col_vraie = ($col_vraie ?: $col);
2150
+    // Dans tous les cas,
2151
+    // virer les guillemets eventuels autour d'un int (qui sont refuses par certains SQL)
2152
+    // et passer dans sql_quote avec le type si connu
2153
+    // et int sinon si la valeur est numerique
2154
+    // sinon introduire le vrai type du champ si connu dans le sql_quote (ou int NOT NULL sinon)
2155
+    // Ne pas utiliser intval, PHP tronquant les Bigint de SQL
2156
+    if ($op == '=' || in_array($op, $GLOBALS['table_criteres_infixes'])) {
2157
+        $type_cast_quote = ($desc['field'][$col_vraie] ?? 'int NOT NULL');
2158
+        // defaire le quote des int et les passer dans sql_quote avec le bon type de champ si on le connait, int sinon
2159
+        // prendre en compte le debug ou la valeur arrive avec un commentaire PHP en debut
2160
+        if (preg_match(",^\\A(\s*//.*?$\s*)?\"'(-?\d+)'\"\\z,ms", (string) $val[0], $r)) {
2161
+            $val[0] = $r[1] . '"' . sql_quote($r[2], $boucle->sql_serveur, $type_cast_quote) . '"';
2162
+        }
2163
+        // sinon expliciter les
2164
+        // sql_quote(truc) en sql_quote(truc,'',type)
2165
+        // sql_quote(truc,serveur) en sql_quote(truc,serveur,type)
2166
+        // sql_quote(truc,serveur,'') en sql_quote(truc,serveur,type)
2167
+        // sans toucher aux
2168
+        // sql_quote(truc,'','varchar(10) DEFAULT \'oui\' COLLATE NOCASE')
2169
+        // sql_quote(truc,'','varchar')
2170
+        elseif (
2171
+            preg_match('/\Asql_quote[(](.*?)(,[^)]*?)?(,[^)]*(?:\(\d+\)[^)]*)?)?[)]\s*\z/ms', (string) $val[0], $r)
2172
+            && (!isset($r[3]) || !$r[3] || !trim($r[3], ", '"))
2173
+        ) {
2174
+            $r = $r[1]
2175
+                . ((isset($r[2]) && $r[2]) ? $r[2] : ",''")
2176
+                . ",'" . addslashes((string) $type_cast_quote) . "'";
2177
+            $val[0] = "sql_quote($r)";
2178
+        }
2179
+        elseif (
2180
+            str_contains((string) $val[0], '@@defaultcast@@')
2181
+            && preg_match("/'@@defaultcast@@'\s*\)\s*\z/ms", (string) $val[0], $r)
2182
+        ) {
2183
+            $val[0] = substr((string) $val[0], 0, -strlen($r[0])) . "'" . addslashes((string) $type_cast_quote) . "')";
2184
+        }
2185
+    }
2186
+
2187
+    if (
2188
+        str_contains((string) $val[0], '@@defaultcast@@')
2189
+        && preg_match("/'@@defaultcast@@'\s*\)\s*\z/ms", (string) $val[0], $r)
2190
+    ) {
2191
+        $val[0] = substr((string) $val[0], 0, -strlen($r[0])) . "'char')";
2192
+    }
2193
+
2194
+    // Indicateur pour permettre aux fonctionx boucle_X de modifier
2195
+    // leurs requetes par defaut, notamment le champ statut
2196
+    // Ne pas confondre champs de la table principale et des jointures
2197
+    if ($table === $boucle->id_table) {
2198
+        $boucles[$idb]->modificateur['criteres'][$col_vraie] = true;
2199
+        if ($col_alias != $col_vraie) {
2200
+            $boucles[$idb]->modificateur['criteres'][$col_alias] = true;
2201
+        }
2202
+    }
2203
+
2204
+    // inserer le nom de la table SQL devant le nom du champ
2205
+    if ($table) {
2206
+        $arg = $col[0] == '`' ? "$table." . substr((string) $col, 1, -1) : "$table.$col";
2207
+    } else {
2208
+        $arg = $col;
2209
+    }
2210
+
2211
+    // inserer la fonction SQL
2212
+    if ($fct) {
2213
+        $arg = "$fct($arg$args_sql)";
2214
+    }
2215
+
2216
+    return [$arg, $op, $val, $col_alias, $where_complement];
2217 2217
 }
2218 2218
 
2219 2219
 
@@ -2242,75 +2242,75 @@  discard block
 block discarded – undo
2242 2242
  **/
2243 2243
 function calculer_critere_infixe_externe($boucle, $crit, $op, $desc, $col, $col_alias, $table) {
2244 2244
 
2245
-	$where = '';
2246
-
2247
-	$calculer_critere_externe = 'calculer_critere_externe_init';
2248
-	// gestion par les plugins des jointures tordues
2249
-	// pas automatiques mais necessaires
2250
-	$table_sql = table_objet_sql($table);
2251
-	if (
2252
-		isset($GLOBALS['exceptions_des_jointures'][$table_sql])
2253
-		&& is_array($GLOBALS['exceptions_des_jointures'][$table_sql])
2254
-		&& (
2255
-			isset($GLOBALS['exceptions_des_jointures'][$table_sql][$col])
2256
-			|| isset($GLOBALS['exceptions_des_jointures'][$table_sql][''])
2257
-		)
2258
-	) {
2259
-		$t = $GLOBALS['exceptions_des_jointures'][$table_sql];
2260
-		$index = $t[$col] ?? $t[''] ?? [];
2261
-
2262
-		if ((is_countable($index) ? count($index) : 0) == 3) {
2263
-			[$t, $col, $calculer_critere_externe] = $index;
2264
-		} elseif ((is_countable($index) ? count($index) : 0) == 2) {
2265
-			[$t, $col] = $t[$col];
2266
-		} elseif ((is_countable($index) ? count($index) : 0) == 1) {
2267
-			[$calculer_critere_externe] = $index;
2268
-			$t = $table;
2269
-		} else {
2270
-			$t = '';
2271
-		} // jointure non declaree. La trouver.
2272
-	} elseif (isset($GLOBALS['exceptions_des_jointures'][$col])) {
2273
-		[$t, $col] = $GLOBALS['exceptions_des_jointures'][$col];
2274
-	} else {
2275
-		$t = '';
2276
-	} // jointure non declaree. La trouver.
2277
-
2278
-	// ici on construit le from pour fournir $col en piochant dans les jointures
2279
-
2280
-	// si des jointures explicites sont fournies, on cherche d'abord dans celles ci
2281
-	// permet de forcer une table de lien quand il y a ambiguite
2282
-	// <BOUCLE_(DOCUMENTS documents_liens){id_mot}>
2283
-	// alors que <BOUCLE_(DOCUMENTS){id_mot}> produit la meme chose que <BOUCLE_(DOCUMENTS mots_liens){id_mot}>
2284
-	$table = '';
2285
-	if ($boucle->jointures_explicites) {
2286
-		$jointures_explicites = explode(' ', $boucle->jointures_explicites);
2287
-		$table = $calculer_critere_externe($boucle, $jointures_explicites, $col, $desc, ($crit->cond || $op != '='), $t);
2288
-	}
2289
-
2290
-	// et sinon on cherche parmi toutes les jointures declarees
2291
-	if (!$table) {
2292
-		$table = $calculer_critere_externe($boucle, $boucle->jointures, $col, $desc, ($crit->cond || $op != '='), $t);
2293
-	}
2294
-
2295
-	if (!$table) {
2296
-		return '';
2297
-	}
2298
-
2299
-	// il ne reste plus qu'a trouver le champ dans les from
2300
-	[$nom, $desc, $cle] = trouver_champ_exterieur($col, $boucle->from, $boucle);
2301
-
2302
-	if ((is_countable($cle) ? count($cle) : 0) > 1 || reset($cle) !== $col) {
2303
-		$col_alias = $col; // id_article devient juste le nom d'origine
2304
-		if ((is_countable($cle) ? count($cle) : 0) > 1 && reset($cle) == 'id_objet') {
2305
-			$e = decompose_champ_id_objet($col);
2306
-			$col = array_shift($e);
2307
-			$where = primary_doublee($e, $table);
2308
-		} else {
2309
-			$col = reset($cle);
2310
-		}
2311
-	}
2312
-
2313
-	return [$col, $col_alias, $table, $where, $desc];
2245
+    $where = '';
2246
+
2247
+    $calculer_critere_externe = 'calculer_critere_externe_init';
2248
+    // gestion par les plugins des jointures tordues
2249
+    // pas automatiques mais necessaires
2250
+    $table_sql = table_objet_sql($table);
2251
+    if (
2252
+        isset($GLOBALS['exceptions_des_jointures'][$table_sql])
2253
+        && is_array($GLOBALS['exceptions_des_jointures'][$table_sql])
2254
+        && (
2255
+            isset($GLOBALS['exceptions_des_jointures'][$table_sql][$col])
2256
+            || isset($GLOBALS['exceptions_des_jointures'][$table_sql][''])
2257
+        )
2258
+    ) {
2259
+        $t = $GLOBALS['exceptions_des_jointures'][$table_sql];
2260
+        $index = $t[$col] ?? $t[''] ?? [];
2261
+
2262
+        if ((is_countable($index) ? count($index) : 0) == 3) {
2263
+            [$t, $col, $calculer_critere_externe] = $index;
2264
+        } elseif ((is_countable($index) ? count($index) : 0) == 2) {
2265
+            [$t, $col] = $t[$col];
2266
+        } elseif ((is_countable($index) ? count($index) : 0) == 1) {
2267
+            [$calculer_critere_externe] = $index;
2268
+            $t = $table;
2269
+        } else {
2270
+            $t = '';
2271
+        } // jointure non declaree. La trouver.
2272
+    } elseif (isset($GLOBALS['exceptions_des_jointures'][$col])) {
2273
+        [$t, $col] = $GLOBALS['exceptions_des_jointures'][$col];
2274
+    } else {
2275
+        $t = '';
2276
+    } // jointure non declaree. La trouver.
2277
+
2278
+    // ici on construit le from pour fournir $col en piochant dans les jointures
2279
+
2280
+    // si des jointures explicites sont fournies, on cherche d'abord dans celles ci
2281
+    // permet de forcer une table de lien quand il y a ambiguite
2282
+    // <BOUCLE_(DOCUMENTS documents_liens){id_mot}>
2283
+    // alors que <BOUCLE_(DOCUMENTS){id_mot}> produit la meme chose que <BOUCLE_(DOCUMENTS mots_liens){id_mot}>
2284
+    $table = '';
2285
+    if ($boucle->jointures_explicites) {
2286
+        $jointures_explicites = explode(' ', $boucle->jointures_explicites);
2287
+        $table = $calculer_critere_externe($boucle, $jointures_explicites, $col, $desc, ($crit->cond || $op != '='), $t);
2288
+    }
2289
+
2290
+    // et sinon on cherche parmi toutes les jointures declarees
2291
+    if (!$table) {
2292
+        $table = $calculer_critere_externe($boucle, $boucle->jointures, $col, $desc, ($crit->cond || $op != '='), $t);
2293
+    }
2294
+
2295
+    if (!$table) {
2296
+        return '';
2297
+    }
2298
+
2299
+    // il ne reste plus qu'a trouver le champ dans les from
2300
+    [$nom, $desc, $cle] = trouver_champ_exterieur($col, $boucle->from, $boucle);
2301
+
2302
+    if ((is_countable($cle) ? count($cle) : 0) > 1 || reset($cle) !== $col) {
2303
+        $col_alias = $col; // id_article devient juste le nom d'origine
2304
+        if ((is_countable($cle) ? count($cle) : 0) > 1 && reset($cle) == 'id_objet') {
2305
+            $e = decompose_champ_id_objet($col);
2306
+            $col = array_shift($e);
2307
+            $where = primary_doublee($e, $table);
2308
+        } else {
2309
+            $col = reset($cle);
2310
+        }
2311
+    }
2312
+
2313
+    return [$col, $col_alias, $table, $where, $desc];
2314 2314
 }
2315 2315
 
2316 2316
 
@@ -2331,10 +2331,10 @@  discard block
 block discarded – undo
2331 2331
  *     - valeur
2332 2332
  **/
2333 2333
 function primary_doublee($decompose, $table) {
2334
-	$e1 = reset($decompose);
2335
-	$e2 = "sql_quote('" . end($decompose) . "')";
2334
+    $e1 = reset($decompose);
2335
+    $e2 = "sql_quote('" . end($decompose) . "')";
2336 2336
 
2337
-	return ["'='", "'$table." . $e1 . "'", $e2];
2337
+    return ["'='", "'$table." . $e1 . "'", $e2];
2338 2338
 }
2339 2339
 
2340 2340
 /**
@@ -2365,56 +2365,56 @@  discard block
 block discarded – undo
2365 2365
  *     Vide sinon.
2366 2366
  */
2367 2367
 function calculer_critere_externe_init(&$boucle, $joints, $col, $desc, $cond, $checkarrivee = false) {
2368
-	// si on demande un truc du genre spip_mots
2369
-	// avec aussi spip_mots_liens dans les jointures dispo
2370
-	// et qu'on est la
2371
-	// il faut privilegier la jointure directe en 2 etapes spip_mots_liens, spip_mots
2372
-	if (
2373
-		$checkarrivee
2374
-		&& is_string($checkarrivee)
2375
-		&& ($a = table_objet($checkarrivee))
2376
-		&& in_array($a . '_liens', $joints)
2377
-		&& ($res = calculer_lien_externe_init($boucle, $joints, $col, $desc, $cond, $checkarrivee))
2378
-	) {
2379
-		return $res;
2380
-	}
2381
-	foreach ($joints as $joint) {
2382
-		if ($arrivee = trouver_champ_exterieur($col, [$joint], $boucle, $checkarrivee)) {
2383
-			// alias de table dans le from
2384
-			$t = array_search($arrivee[0], $boucle->from);
2385
-			// recuperer la cle id_xx eventuellement decomposee en (id_objet,objet)
2386
-			$cols = $arrivee[2];
2387
-			// mais on ignore la 3eme cle si presente qui correspond alors au point de depart
2388
-			if ((is_countable($cols) ? count($cols) : 0) > 2) {
2389
-				array_pop($cols);
2390
-			}
2391
-			if ($t) {
2392
-				// la table est déjà dans le FROM, on vérifie si le champ est utilisé.
2393
-				$joindre = false;
2394
-				foreach ($cols as $col) {
2395
-					$c = '/\b' . $t . ".$col" . '\b/';
2396
-					if (trouver_champ($c, $boucle->where)) {
2397
-						$joindre = true;
2398
-					} else {
2399
-						// mais ca peut etre dans le FIELD pour le Having
2400
-						$c = "/FIELD.$t" . ".$col,/";
2401
-						if (trouver_champ($c, $boucle->select)) {
2402
-							$joindre = true;
2403
-						}
2404
-					}
2405
-				}
2406
-				if (!$joindre) {
2407
-					return $t;
2408
-				}
2409
-			}
2410
-			array_pop($arrivee);
2411
-			if ($res = calculer_jointure($boucle, [$boucle->id_table, $desc], $arrivee, $cols, $cond, 1)) {
2412
-				return $res;
2413
-			}
2414
-		}
2415
-	}
2416
-
2417
-	return '';
2368
+    // si on demande un truc du genre spip_mots
2369
+    // avec aussi spip_mots_liens dans les jointures dispo
2370
+    // et qu'on est la
2371
+    // il faut privilegier la jointure directe en 2 etapes spip_mots_liens, spip_mots
2372
+    if (
2373
+        $checkarrivee
2374
+        && is_string($checkarrivee)
2375
+        && ($a = table_objet($checkarrivee))
2376
+        && in_array($a . '_liens', $joints)
2377
+        && ($res = calculer_lien_externe_init($boucle, $joints, $col, $desc, $cond, $checkarrivee))
2378
+    ) {
2379
+        return $res;
2380
+    }
2381
+    foreach ($joints as $joint) {
2382
+        if ($arrivee = trouver_champ_exterieur($col, [$joint], $boucle, $checkarrivee)) {
2383
+            // alias de table dans le from
2384
+            $t = array_search($arrivee[0], $boucle->from);
2385
+            // recuperer la cle id_xx eventuellement decomposee en (id_objet,objet)
2386
+            $cols = $arrivee[2];
2387
+            // mais on ignore la 3eme cle si presente qui correspond alors au point de depart
2388
+            if ((is_countable($cols) ? count($cols) : 0) > 2) {
2389
+                array_pop($cols);
2390
+            }
2391
+            if ($t) {
2392
+                // la table est déjà dans le FROM, on vérifie si le champ est utilisé.
2393
+                $joindre = false;
2394
+                foreach ($cols as $col) {
2395
+                    $c = '/\b' . $t . ".$col" . '\b/';
2396
+                    if (trouver_champ($c, $boucle->where)) {
2397
+                        $joindre = true;
2398
+                    } else {
2399
+                        // mais ca peut etre dans le FIELD pour le Having
2400
+                        $c = "/FIELD.$t" . ".$col,/";
2401
+                        if (trouver_champ($c, $boucle->select)) {
2402
+                            $joindre = true;
2403
+                        }
2404
+                    }
2405
+                }
2406
+                if (!$joindre) {
2407
+                    return $t;
2408
+                }
2409
+            }
2410
+            array_pop($arrivee);
2411
+            if ($res = calculer_jointure($boucle, [$boucle->id_table, $desc], $arrivee, $cols, $cond, 1)) {
2412
+                return $res;
2413
+            }
2414
+        }
2415
+    }
2416
+
2417
+    return '';
2418 2418
 }
2419 2419
 
2420 2420
 /**
@@ -2440,35 +2440,35 @@  discard block
 block discarded – undo
2440 2440
  *     Alias de la table de jointure (Lx)
2441 2441
  */
2442 2442
 function calculer_lien_externe_init(&$boucle, $joints, $col, $desc, $cond, $checkarrivee = false) {
2443
-	$primary_arrivee = id_table_objet($checkarrivee);
2444
-
2445
-	// [FIXME] $checkarrivee peut-il arriver avec false ????
2446
-	$intermediaire = trouver_champ_exterieur($primary_arrivee, $joints, $boucle, $checkarrivee . '_liens');
2447
-	$arrivee = trouver_champ_exterieur($col, $joints, $boucle, $checkarrivee);
2448
-
2449
-	if (!$intermediaire || !$arrivee) {
2450
-		return '';
2451
-	}
2452
-	array_pop($intermediaire); // enlever la cle en 3eme argument
2453
-	array_pop($arrivee); // enlever la cle en 3eme argument
2454
-
2455
-	$res = fabrique_jointures(
2456
-		$boucle,
2457
-		[
2458
-			[
2459
-				$boucle->id_table,
2460
-				$intermediaire,
2461
-				[id_table_objet($desc['table_objet']), 'id_objet', 'objet', $desc['type']]
2462
-			],
2463
-			[reset($intermediaire), $arrivee, $primary_arrivee]
2464
-		],
2465
-		$cond,
2466
-		$desc,
2467
-		$boucle->id_table,
2468
-		[$col]
2469
-	);
2470
-
2471
-	return $res;
2443
+    $primary_arrivee = id_table_objet($checkarrivee);
2444
+
2445
+    // [FIXME] $checkarrivee peut-il arriver avec false ????
2446
+    $intermediaire = trouver_champ_exterieur($primary_arrivee, $joints, $boucle, $checkarrivee . '_liens');
2447
+    $arrivee = trouver_champ_exterieur($col, $joints, $boucle, $checkarrivee);
2448
+
2449
+    if (!$intermediaire || !$arrivee) {
2450
+        return '';
2451
+    }
2452
+    array_pop($intermediaire); // enlever la cle en 3eme argument
2453
+    array_pop($arrivee); // enlever la cle en 3eme argument
2454
+
2455
+    $res = fabrique_jointures(
2456
+        $boucle,
2457
+        [
2458
+            [
2459
+                $boucle->id_table,
2460
+                $intermediaire,
2461
+                [id_table_objet($desc['table_objet']), 'id_objet', 'objet', $desc['type']]
2462
+            ],
2463
+            [reset($intermediaire), $arrivee, $primary_arrivee]
2464
+        ],
2465
+        $cond,
2466
+        $desc,
2467
+        $boucle->id_table,
2468
+        [$col]
2469
+    );
2470
+
2471
+    return $res;
2472 2472
 }
2473 2473
 
2474 2474
 
@@ -2485,17 +2485,17 @@  discard block
 block discarded – undo
2485 2485
  *     false sinon.
2486 2486
  **/
2487 2487
 function trouver_champ($champ, $where) {
2488
-	if (!is_array($where)) {
2489
-		return preg_match($champ, $where);
2490
-	} else {
2491
-		foreach ($where as $clause) {
2492
-			if (trouver_champ($champ, $clause)) {
2493
-				return true;
2494
-			}
2495
-		}
2496
-
2497
-		return false;
2498
-	}
2488
+    if (!is_array($where)) {
2489
+        return preg_match($champ, $where);
2490
+    } else {
2491
+        foreach ($where as $clause) {
2492
+            if (trouver_champ($champ, $clause)) {
2493
+                return true;
2494
+            }
2495
+        }
2496
+
2497
+        return false;
2498
+    }
2499 2499
 }
2500 2500
 
2501 2501
 
@@ -2521,128 +2521,128 @@  discard block
 block discarded – undo
2521 2521
  *     - string $args_sql  Suite des arguments du critère. ?
2522 2522
  **/
2523 2523
 function calculer_critere_infixe_ops($idb, &$boucles, $crit) {
2524
-	// cas d'une valeur comparee a elle-meme ou son referent
2525
-	if ((is_countable($crit->param) ? count($crit->param) : 0) == 0) {
2526
-		$op = '=';
2527
-		$col = $val = $crit->op;
2528
-		if (preg_match('/^(.*)\.(.*)$/', $col, $r)) {
2529
-			$val = $r[2];
2530
-		}
2531
-		// Cas special {lang} : aller chercher $GLOBALS['spip_lang']
2532
-		if ($val == 'lang') {
2533
-			$val = [kwote('$GLOBALS[\'spip_lang\']')];
2534
-		} else {
2535
-			$defaut = null;
2536
-			if ($val == 'id_parent') {
2537
-				// Si id_parent, comparer l'id_parent avec l'id_objet
2538
-				// de la boucle superieure.... faudrait verifier qu'il existe
2539
-				// pour eviter l'erreur SQL
2540
-				$val = $boucles[$idb]->primary;
2541
-				// mais si pas de boucle superieure, prendre id_parent dans l'env
2542
-				$defaut = "(\$Pile[0]['id_parent'] ?? null)";
2543
-			} elseif ($val == 'id_enfant') {
2544
-				// Si id_enfant, comparer l'id_objet avec l'id_parent
2545
-				// de la boucle superieure
2546
-				$val = 'id_parent';
2547
-			} elseif ($crit->cond && ($col == 'date' || $col == 'date_redac')) {
2548
-				// un critere conditionnel sur date est traite a part
2549
-				// car la date est mise d'office par SPIP,
2550
-				$defaut = "(\$Pile[0]['{$col}_default']?'':\$Pile[0]['" . $col . "'])";
2551
-			}
2552
-
2553
-			$val = calculer_argument_precedent($idb, $val, $boucles, $defaut);
2554
-			$val = [kwote($val)];
2555
-		}
2556
-	} else {
2557
-		// comparaison explicite
2558
-		// le phraseur impose que le premier param soit du texte
2559
-		$params = $crit->param;
2560
-		$op = $crit->op;
2561
-		if ($op == '==') {
2562
-			$op = 'REGEXP';
2563
-		}
2564
-		$col = array_shift($params);
2565
-		$col = $col[0]->texte;
2566
-
2567
-		$val = [];
2568
-		$parent = $boucles[$idb]->id_parent;
2569
-
2570
-		// Dans le cas {x=='#DATE'} etc, defaire le travail du phraseur,
2571
-		// celui ne sachant pas ce qu'est un critere infixe
2572
-		// et a fortiori son 2e operande qu'entoure " ou '
2573
-		if (
2574
-			(is_countable($params) ? count($params) : 0) == 1
2575
-			&& (is_countable($params[0]) ? count($params[0]) : 0) == 3
2576
-			&& $params[0][0]->type == 'texte'
2577
-			&& $params[0][2]->type == 'texte'
2578
-			&& ($p = $params[0][0]->texte) == $params[0][2]->texte
2579
-			&& ($p == "'" || $p == '"')
2580
-			&& $params[0][1]->type == 'champ'
2581
-		) {
2582
-			$val[] = "$p\\$p#" . $params[0][1]->nom_champ . "\\$p$p";
2583
-		} else {
2584
-			foreach ((($op != 'IN') ? $params : calculer_vieux_in($params)) as $p) {
2585
-				$a = calculer_liste($p, $idb, $boucles, $parent);
2586
-				$val[] = strcasecmp($op, 'IN') == 0
2587
-					? $a
2588
-					// toujours quoter en char ici
2589
-					: kwote($a, $boucles[$idb]->sql_serveur, '@@defaultcast@@');
2590
-			}
2591
-		}
2592
-	}
2593
-
2594
-	$fct = $args_sql = '';
2595
-	// fonction SQL ?
2596
-	// chercher FONCTION(champ) tel que CONCAT(titre,descriptif)
2597
-	if (preg_match('/^(.*)' . SQL_ARGS . '$/', (string) $col, $m)) {
2598
-		$fct = $m[1];
2599
-		preg_match('/^\(([^,]*)(.*)\)$/', $m[2], $a);
2600
-		$col = $a[1];
2601
-		if (preg_match('/^(\S*)(\s+AS\s+.*)$/i', $col, $m)) {
2602
-			$col = $m[1];
2603
-			$args_sql = $m[2];
2604
-		}
2605
-		$args_sql .= $a[2];
2606
-	}
2607
-
2608
-	return [$fct, $col, $op, $val, $args_sql];
2524
+    // cas d'une valeur comparee a elle-meme ou son referent
2525
+    if ((is_countable($crit->param) ? count($crit->param) : 0) == 0) {
2526
+        $op = '=';
2527
+        $col = $val = $crit->op;
2528
+        if (preg_match('/^(.*)\.(.*)$/', $col, $r)) {
2529
+            $val = $r[2];
2530
+        }
2531
+        // Cas special {lang} : aller chercher $GLOBALS['spip_lang']
2532
+        if ($val == 'lang') {
2533
+            $val = [kwote('$GLOBALS[\'spip_lang\']')];
2534
+        } else {
2535
+            $defaut = null;
2536
+            if ($val == 'id_parent') {
2537
+                // Si id_parent, comparer l'id_parent avec l'id_objet
2538
+                // de la boucle superieure.... faudrait verifier qu'il existe
2539
+                // pour eviter l'erreur SQL
2540
+                $val = $boucles[$idb]->primary;
2541
+                // mais si pas de boucle superieure, prendre id_parent dans l'env
2542
+                $defaut = "(\$Pile[0]['id_parent'] ?? null)";
2543
+            } elseif ($val == 'id_enfant') {
2544
+                // Si id_enfant, comparer l'id_objet avec l'id_parent
2545
+                // de la boucle superieure
2546
+                $val = 'id_parent';
2547
+            } elseif ($crit->cond && ($col == 'date' || $col == 'date_redac')) {
2548
+                // un critere conditionnel sur date est traite a part
2549
+                // car la date est mise d'office par SPIP,
2550
+                $defaut = "(\$Pile[0]['{$col}_default']?'':\$Pile[0]['" . $col . "'])";
2551
+            }
2552
+
2553
+            $val = calculer_argument_precedent($idb, $val, $boucles, $defaut);
2554
+            $val = [kwote($val)];
2555
+        }
2556
+    } else {
2557
+        // comparaison explicite
2558
+        // le phraseur impose que le premier param soit du texte
2559
+        $params = $crit->param;
2560
+        $op = $crit->op;
2561
+        if ($op == '==') {
2562
+            $op = 'REGEXP';
2563
+        }
2564
+        $col = array_shift($params);
2565
+        $col = $col[0]->texte;
2566
+
2567
+        $val = [];
2568
+        $parent = $boucles[$idb]->id_parent;
2569
+
2570
+        // Dans le cas {x=='#DATE'} etc, defaire le travail du phraseur,
2571
+        // celui ne sachant pas ce qu'est un critere infixe
2572
+        // et a fortiori son 2e operande qu'entoure " ou '
2573
+        if (
2574
+            (is_countable($params) ? count($params) : 0) == 1
2575
+            && (is_countable($params[0]) ? count($params[0]) : 0) == 3
2576
+            && $params[0][0]->type == 'texte'
2577
+            && $params[0][2]->type == 'texte'
2578
+            && ($p = $params[0][0]->texte) == $params[0][2]->texte
2579
+            && ($p == "'" || $p == '"')
2580
+            && $params[0][1]->type == 'champ'
2581
+        ) {
2582
+            $val[] = "$p\\$p#" . $params[0][1]->nom_champ . "\\$p$p";
2583
+        } else {
2584
+            foreach ((($op != 'IN') ? $params : calculer_vieux_in($params)) as $p) {
2585
+                $a = calculer_liste($p, $idb, $boucles, $parent);
2586
+                $val[] = strcasecmp($op, 'IN') == 0
2587
+                    ? $a
2588
+                    // toujours quoter en char ici
2589
+                    : kwote($a, $boucles[$idb]->sql_serveur, '@@defaultcast@@');
2590
+            }
2591
+        }
2592
+    }
2593
+
2594
+    $fct = $args_sql = '';
2595
+    // fonction SQL ?
2596
+    // chercher FONCTION(champ) tel que CONCAT(titre,descriptif)
2597
+    if (preg_match('/^(.*)' . SQL_ARGS . '$/', (string) $col, $m)) {
2598
+        $fct = $m[1];
2599
+        preg_match('/^\(([^,]*)(.*)\)$/', $m[2], $a);
2600
+        $col = $a[1];
2601
+        if (preg_match('/^(\S*)(\s+AS\s+.*)$/i', $col, $m)) {
2602
+            $col = $m[1];
2603
+            $args_sql = $m[2];
2604
+        }
2605
+        $args_sql .= $a[2];
2606
+    }
2607
+
2608
+    return [$fct, $col, $op, $val, $args_sql];
2609 2609
 }
2610 2610
 
2611 2611
 // compatibilite ancienne version
2612 2612
 
2613 2613
 function calculer_vieux_in($params) {
2614
-	$deb = $params[0][0];
2615
-	$k = (is_countable($params) ? count($params) : 0) - 1;
2616
-	$last = $params[$k];
2617
-	$j = (is_countable($last) ? count($last) : 0) - 1;
2618
-	$last = $last[$j];
2619
-	$n = isset($last->texte) ? strlen((string) $last->texte) : 0;
2620
-
2621
-	if (
2622
-		!((isset($deb->texte[0]) && $deb->texte[0] == '(')
2623
-		&& (isset($last->texte[$n - 1]) && $last->texte[$n - 1] == ')'))
2624
-	) {
2625
-		return $params;
2626
-	}
2627
-	$params[0][0]->texte = substr((string) $deb->texte, 1);
2628
-	// attention, on peut avoir k=0,j=0 ==> recalculer
2629
-	$last = $params[$k][$j];
2630
-	$n = strlen((string) $last->texte);
2631
-	$params[$k][$j]->texte = substr((string) $last->texte, 0, $n - 1);
2632
-	$newp = [];
2633
-	foreach ($params as $v) {
2634
-		if ($v[0]->type != 'texte') {
2635
-			$newp[] = $v;
2636
-		} else {
2637
-			foreach (explode(',', (string) $v[0]->texte) as $x) {
2638
-				$t = new Texte();
2639
-				$t->texte = $x;
2640
-				$newp[] = [$t];
2641
-			}
2642
-		}
2643
-	}
2644
-
2645
-	return $newp;
2614
+    $deb = $params[0][0];
2615
+    $k = (is_countable($params) ? count($params) : 0) - 1;
2616
+    $last = $params[$k];
2617
+    $j = (is_countable($last) ? count($last) : 0) - 1;
2618
+    $last = $last[$j];
2619
+    $n = isset($last->texte) ? strlen((string) $last->texte) : 0;
2620
+
2621
+    if (
2622
+        !((isset($deb->texte[0]) && $deb->texte[0] == '(')
2623
+        && (isset($last->texte[$n - 1]) && $last->texte[$n - 1] == ')'))
2624
+    ) {
2625
+        return $params;
2626
+    }
2627
+    $params[0][0]->texte = substr((string) $deb->texte, 1);
2628
+    // attention, on peut avoir k=0,j=0 ==> recalculer
2629
+    $last = $params[$k][$j];
2630
+    $n = strlen((string) $last->texte);
2631
+    $params[$k][$j]->texte = substr((string) $last->texte, 0, $n - 1);
2632
+    $newp = [];
2633
+    foreach ($params as $v) {
2634
+        if ($v[0]->type != 'texte') {
2635
+            $newp[] = $v;
2636
+        } else {
2637
+            foreach (explode(',', (string) $v[0]->texte) as $x) {
2638
+                $t = new Texte();
2639
+                $t->texte = $x;
2640
+                $newp[] = [$t];
2641
+            }
2642
+        }
2643
+    }
2644
+
2645
+    return $newp;
2646 2646
 }
2647 2647
 
2648 2648
 /**
@@ -2661,91 +2661,91 @@  discard block
 block discarded – undo
2661 2661
  *     - nom de la colonne de date (si le calcul n'est pas relatif)
2662 2662
  **/
2663 2663
 function calculer_critere_infixe_date($idb, &$boucles, $col) {
2664
-	if (!preg_match(',^((age|jour|mois|annee)_relatif|date|mois|annee|jour|heure|age)(_[a-z_]+)?$,', $col, $regs)) {
2665
-		return '';
2666
-	}
2667
-
2668
-	$boucle = $boucles[$idb];
2669
-	$table = $boucle->show;
2670
-
2671
-	// si c'est une colonne de la table, ne rien faire
2672
-	if (isset($table['field'][$col])) {
2673
-		return '';
2674
-	}
2675
-
2676
-	// Le type de critère à prendre en compte
2677
-	$col = $regs[1];
2678
-
2679
-	// Si on trouve un nom de champ date précis, on l'utilise, pas besoin de déclaration dans l'API objet
2680
-	if (isset($regs[3]) && ($suite = $regs[3])) {
2681
-		# Recherche de l'existence du champ date_xxxx,
2682
-		# si oui choisir ce champ, sinon choisir xxxx
2683
-		$date_orig = isset($table['field']["date$suite"]) ? 'date' . $suite : substr($suite, 1);
2684
-
2685
-		$pred = $date_orig;
2686
-	} else { // Sinon il FAUT avoir déclaré le champ date officiel dans l'API objet
2687
-		// Si aucune déclaration trouvée, on quitte
2688
-		if (!$table['date'] && !isset($GLOBALS['table_date'][$table['id_table']])) {
2689
-			return '';
2690
-		}
2691
-		// Par défaut, on prend le champ date déclaré dans l'API
2692
-		$pred = $date_orig = $GLOBALS['table_date'][$table['id_table']] ?? $table['date'];
2693
-
2694
-		// Si c'est pour du relatif
2695
-		if (isset($regs[2]) && ($rel = $regs[2])) {
2696
-			$pred = 'date';
2697
-		}
2698
-	}
2699
-
2700
-	$date_compare = "\"' . normaliser_date(" .
2701
-		calculer_argument_precedent($idb, $pred, $boucles) .
2702
-		") . '\"";
2703
-
2704
-	$col_vraie = $date_orig;
2705
-	$date_orig = $boucle->id_table . '.' . $date_orig;
2706
-
2707
-	switch ($col) {
2708
-		case 'date':
2709
-			$col = $date_orig;
2710
-			break;
2711
-		case 'jour':
2712
-			$col = "DAYOFMONTH($date_orig)";
2713
-			break;
2714
-		case 'mois':
2715
-			$col = "MONTH($date_orig)";
2716
-			break;
2717
-		case 'annee':
2718
-			$col = "YEAR($date_orig)";
2719
-			break;
2720
-		case 'heure':
2721
-			$col = "DATE_FORMAT($date_orig, \\'%H:%i\\')";
2722
-			break;
2723
-		case 'age':
2724
-			$col = calculer_param_date("\'' . date('Y-m-d H:i:00') . '\'", $date_orig);
2725
-			$col_vraie = '';// comparer a un int (par defaut)
2726
-			break;
2727
-		case 'age_relatif':
2728
-			$col = calculer_param_date($date_compare, $date_orig);
2729
-			$col_vraie = '';// comparer a un int (par defaut)
2730
-			break;
2731
-		case 'jour_relatif':
2732
-			$col = '(TO_DAYS(' . $date_compare . ')-TO_DAYS(' . $date_orig . '))';
2733
-			$col_vraie = '';// comparer a un int (par defaut)
2734
-			break;
2735
-		case 'mois_relatif':
2736
-			$col = 'MONTH(' . $date_compare . ')-MONTH(' .
2737
-				$date_orig . ')+12*(YEAR(' . $date_compare .
2738
-				')-YEAR(' . $date_orig . '))';
2739
-			$col_vraie = '';// comparer a un int (par defaut)
2740
-			break;
2741
-		case 'annee_relatif':
2742
-			$col = 'YEAR(' . $date_compare . ')-YEAR(' .
2743
-				$date_orig . ')';
2744
-			$col_vraie = '';// comparer a un int (par defaut)
2745
-			break;
2746
-	}
2747
-
2748
-	return [$col, $col_vraie];
2664
+    if (!preg_match(',^((age|jour|mois|annee)_relatif|date|mois|annee|jour|heure|age)(_[a-z_]+)?$,', $col, $regs)) {
2665
+        return '';
2666
+    }
2667
+
2668
+    $boucle = $boucles[$idb];
2669
+    $table = $boucle->show;
2670
+
2671
+    // si c'est une colonne de la table, ne rien faire
2672
+    if (isset($table['field'][$col])) {
2673
+        return '';
2674
+    }
2675
+
2676
+    // Le type de critère à prendre en compte
2677
+    $col = $regs[1];
2678
+
2679
+    // Si on trouve un nom de champ date précis, on l'utilise, pas besoin de déclaration dans l'API objet
2680
+    if (isset($regs[3]) && ($suite = $regs[3])) {
2681
+        # Recherche de l'existence du champ date_xxxx,
2682
+        # si oui choisir ce champ, sinon choisir xxxx
2683
+        $date_orig = isset($table['field']["date$suite"]) ? 'date' . $suite : substr($suite, 1);
2684
+
2685
+        $pred = $date_orig;
2686
+    } else { // Sinon il FAUT avoir déclaré le champ date officiel dans l'API objet
2687
+        // Si aucune déclaration trouvée, on quitte
2688
+        if (!$table['date'] && !isset($GLOBALS['table_date'][$table['id_table']])) {
2689
+            return '';
2690
+        }
2691
+        // Par défaut, on prend le champ date déclaré dans l'API
2692
+        $pred = $date_orig = $GLOBALS['table_date'][$table['id_table']] ?? $table['date'];
2693
+
2694
+        // Si c'est pour du relatif
2695
+        if (isset($regs[2]) && ($rel = $regs[2])) {
2696
+            $pred = 'date';
2697
+        }
2698
+    }
2699
+
2700
+    $date_compare = "\"' . normaliser_date(" .
2701
+        calculer_argument_precedent($idb, $pred, $boucles) .
2702
+        ") . '\"";
2703
+
2704
+    $col_vraie = $date_orig;
2705
+    $date_orig = $boucle->id_table . '.' . $date_orig;
2706
+
2707
+    switch ($col) {
2708
+        case 'date':
2709
+            $col = $date_orig;
2710
+            break;
2711
+        case 'jour':
2712
+            $col = "DAYOFMONTH($date_orig)";
2713
+            break;
2714
+        case 'mois':
2715
+            $col = "MONTH($date_orig)";
2716
+            break;
2717
+        case 'annee':
2718
+            $col = "YEAR($date_orig)";
2719
+            break;
2720
+        case 'heure':
2721
+            $col = "DATE_FORMAT($date_orig, \\'%H:%i\\')";
2722
+            break;
2723
+        case 'age':
2724
+            $col = calculer_param_date("\'' . date('Y-m-d H:i:00') . '\'", $date_orig);
2725
+            $col_vraie = '';// comparer a un int (par defaut)
2726
+            break;
2727
+        case 'age_relatif':
2728
+            $col = calculer_param_date($date_compare, $date_orig);
2729
+            $col_vraie = '';// comparer a un int (par defaut)
2730
+            break;
2731
+        case 'jour_relatif':
2732
+            $col = '(TO_DAYS(' . $date_compare . ')-TO_DAYS(' . $date_orig . '))';
2733
+            $col_vraie = '';// comparer a un int (par defaut)
2734
+            break;
2735
+        case 'mois_relatif':
2736
+            $col = 'MONTH(' . $date_compare . ')-MONTH(' .
2737
+                $date_orig . ')+12*(YEAR(' . $date_compare .
2738
+                ')-YEAR(' . $date_orig . '))';
2739
+            $col_vraie = '';// comparer a un int (par defaut)
2740
+            break;
2741
+        case 'annee_relatif':
2742
+            $col = 'YEAR(' . $date_compare . ')-YEAR(' .
2743
+                $date_orig . ')';
2744
+            $col_vraie = '';// comparer a un int (par defaut)
2745
+            break;
2746
+    }
2747
+
2748
+    return [$col, $col_vraie];
2749 2749
 }
2750 2750
 
2751 2751
 /**
@@ -2764,16 +2764,16 @@  discard block
 block discarded – undo
2764 2764
  *     de colonne SQL et une date.
2765 2765
  **/
2766 2766
 function calculer_param_date($date_compare, $date_orig) {
2767
-	if (preg_match(",'\" *\.(.*)\. *\"',", $date_compare, $r)) {
2768
-		$init = "'\" . (\$x = $r[1]) . \"'";
2769
-		$date_compare = '\'$x\'';
2770
-	} else {
2771
-		$init = $date_compare;
2772
-	}
2773
-
2774
-	return
2775
-		// optimisation : mais prevoir le support SQLite avant
2776
-		"TIMESTAMPDIFF(HOUR,$date_orig,$init)/24";
2767
+    if (preg_match(",'\" *\.(.*)\. *\"',", $date_compare, $r)) {
2768
+        $init = "'\" . (\$x = $r[1]) . \"'";
2769
+        $date_compare = '\'$x\'';
2770
+    } else {
2771
+        $init = $date_compare;
2772
+    }
2773
+
2774
+    return
2775
+        // optimisation : mais prevoir le support SQLite avant
2776
+        "TIMESTAMPDIFF(HOUR,$date_orig,$init)/24";
2777 2777
 }
2778 2778
 
2779 2779
 /**
@@ -2791,17 +2791,17 @@  discard block
 block discarded – undo
2791 2791
  * @param Critere $crit Paramètres du critère dans cette boucle
2792 2792
  */
2793 2793
 function critere_DATA_source_dist($idb, &$boucles, $crit) {
2794
-	$boucle = &$boucles[$idb];
2794
+    $boucle = &$boucles[$idb];
2795 2795
 
2796
-	$args = [];
2797
-	foreach ($crit->param as &$param) {
2798
-		$args[] = calculer_liste($param, $idb, $boucles, $boucles[$idb]->id_parent);
2799
-	}
2796
+    $args = [];
2797
+    foreach ($crit->param as &$param) {
2798
+        $args[] = calculer_liste($param, $idb, $boucles, $boucles[$idb]->id_parent);
2799
+    }
2800 2800
 
2801
-	$boucle->hash .= '
2801
+    $boucle->hash .= '
2802 2802
 	$command[\'sourcemode\'] = ' . array_shift($args) . ";\n";
2803 2803
 
2804
-	$boucle->hash .= '
2804
+    $boucle->hash .= '
2805 2805
 	$command[\'source\'] = array(' . implode(', ', $args) . ");\n";
2806 2806
 }
2807 2807
 
@@ -2819,8 +2819,8 @@  discard block
 block discarded – undo
2819 2819
  * @param Critere $crit Paramètres du critère dans cette boucle
2820 2820
  */
2821 2821
 function critere_DATA_datacache_dist($idb, &$boucles, $crit) {
2822
-	$boucle = &$boucles[$idb];
2823
-	$boucle->hash .= '
2822
+    $boucle = &$boucles[$idb];
2823
+    $boucle->hash .= '
2824 2824
 	$command[\'datacache\'] = ' . calculer_liste($crit->param[0], $idb, $boucles, $boucles[$idb]->id_parent) . ';';
2825 2825
 }
2826 2826
 
@@ -2836,12 +2836,12 @@  discard block
 block discarded – undo
2836 2836
  * @param Critere $crit Paramètres du critère dans cette boucle
2837 2837
  */
2838 2838
 function critere_php_args_dist($idb, &$boucles, $crit) {
2839
-	$boucle = &$boucles[$idb];
2840
-	$boucle->hash .= '$command[\'args\']=array();';
2841
-	foreach ($crit->param as $param) {
2842
-		$boucle->hash .= '
2839
+    $boucle = &$boucles[$idb];
2840
+    $boucle->hash .= '$command[\'args\']=array();';
2841
+    foreach ($crit->param as $param) {
2842
+        $boucle->hash .= '
2843 2843
 			$command[\'args\'][] = ' . calculer_liste($param, $idb, $boucles, $boucles[$idb]->id_parent) . ';';
2844
-	}
2844
+    }
2845 2845
 }
2846 2846
 
2847 2847
 /**
@@ -2858,16 +2858,16 @@  discard block
 block discarded – undo
2858 2858
  * @param Critere $crit Paramètres du critère dans cette boucle
2859 2859
  */
2860 2860
 function critere_DATA_liste_dist($idb, &$boucles, $crit) {
2861
-	$boucle = &$boucles[$idb];
2862
-	$boucle->hash .= "\n\t" . '$command[\'liste\'] = array();' . "\n";
2863
-	foreach ($crit->param as $param) {
2864
-		$boucle->hash .= "\t" . '$command[\'liste\'][] = ' . calculer_liste(
2865
-			$param,
2866
-			$idb,
2867
-			$boucles,
2868
-			$boucles[$idb]->id_parent
2869
-		) . ";\n";
2870
-	}
2861
+    $boucle = &$boucles[$idb];
2862
+    $boucle->hash .= "\n\t" . '$command[\'liste\'] = array();' . "\n";
2863
+    foreach ($crit->param as $param) {
2864
+        $boucle->hash .= "\t" . '$command[\'liste\'][] = ' . calculer_liste(
2865
+            $param,
2866
+            $idb,
2867
+            $boucles,
2868
+            $boucles[$idb]->id_parent
2869
+        ) . ";\n";
2870
+    }
2871 2871
 }
2872 2872
 
2873 2873
 /**
@@ -2892,16 +2892,16 @@  discard block
 block discarded – undo
2892 2892
  * @param Critere $crit Paramètres du critère dans cette boucle
2893 2893
  */
2894 2894
 function critere_DATA_enum_dist($idb, &$boucles, $crit) {
2895
-	$boucle = &$boucles[$idb];
2896
-	$boucle->hash .= "\n\t" . '$command[\'enum\'] = array();' . "\n";
2897
-	foreach ($crit->param as $param) {
2898
-		$boucle->hash .= "\t" . '$command[\'enum\'][] = ' . calculer_liste(
2899
-			$param,
2900
-			$idb,
2901
-			$boucles,
2902
-			$boucles[$idb]->id_parent
2903
-		) . ";\n";
2904
-	}
2895
+    $boucle = &$boucles[$idb];
2896
+    $boucle->hash .= "\n\t" . '$command[\'enum\'] = array();' . "\n";
2897
+    foreach ($crit->param as $param) {
2898
+        $boucle->hash .= "\t" . '$command[\'enum\'][] = ' . calculer_liste(
2899
+            $param,
2900
+            $idb,
2901
+            $boucles,
2902
+            $boucles[$idb]->id_parent
2903
+        ) . ";\n";
2904
+    }
2905 2905
 }
2906 2906
 
2907 2907
 /**
@@ -2916,11 +2916,11 @@  discard block
 block discarded – undo
2916 2916
  * @param Critere $crit Paramètres du critère dans cette boucle
2917 2917
  */
2918 2918
 function critere_DATA_datapath_dist($idb, &$boucles, $crit) {
2919
-	$boucle = &$boucles[$idb];
2920
-	foreach ($crit->param as $param) {
2921
-		$boucle->hash .= '
2919
+    $boucle = &$boucles[$idb];
2920
+    foreach ($crit->param as $param) {
2921
+        $boucle->hash .= '
2922 2922
 			$command[\'datapath\'][] = ' . calculer_liste($param, $idb, $boucles, $boucles[$idb]->id_parent) . ';';
2923
-	}
2923
+    }
2924 2924
 }
2925 2925
 
2926 2926
 
@@ -2952,20 +2952,20 @@  discard block
 block discarded – undo
2952 2952
  * @param Critere $crit Paramètres du critère dans cette boucle
2953 2953
  */
2954 2954
 function critere_si_dist($idb, &$boucles, $crit) {
2955
-	$boucle = &$boucles[$idb];
2956
-	// il faut initialiser 1 fois le tableau a chaque appel de la boucle
2957
-	// (par exemple lorsque notre boucle est appelee dans une autre boucle)
2958
-	// mais ne pas l'initialiser n fois si il y a n criteres {si } dans la boucle !
2959
-	$boucle->hash .= "\n\tif (!isset(\$si_init)) { \$command['si'] = array(); \$si_init = true; }\n";
2960
-	if ($crit->param) {
2961
-		foreach ($crit->param as $param) {
2962
-			$boucle->hash .= "\t\$command['si'][] = "
2963
-				. calculer_liste($param, $idb, $boucles, $boucles[$idb]->id_parent) . ";\n";
2964
-		}
2965
-		// interdire {si 0} aussi !
2966
-	} else {
2967
-		$boucle->hash .= '$command[\'si\'][] = 0;';
2968
-	}
2955
+    $boucle = &$boucles[$idb];
2956
+    // il faut initialiser 1 fois le tableau a chaque appel de la boucle
2957
+    // (par exemple lorsque notre boucle est appelee dans une autre boucle)
2958
+    // mais ne pas l'initialiser n fois si il y a n criteres {si } dans la boucle !
2959
+    $boucle->hash .= "\n\tif (!isset(\$si_init)) { \$command['si'] = array(); \$si_init = true; }\n";
2960
+    if ($crit->param) {
2961
+        foreach ($crit->param as $param) {
2962
+            $boucle->hash .= "\t\$command['si'][] = "
2963
+                . calculer_liste($param, $idb, $boucles, $boucles[$idb]->id_parent) . ";\n";
2964
+        }
2965
+        // interdire {si 0} aussi !
2966
+    } else {
2967
+        $boucle->hash .= '$command[\'si\'][] = 0;';
2968
+    }
2969 2969
 }
2970 2970
 
2971 2971
 /**
@@ -2983,27 +2983,27 @@  discard block
 block discarded – undo
2983 2983
  */
2984 2984
 function critere_noeud_dist($idb, &$boucles, $crit) {
2985 2985
 
2986
-	$not = $crit->not;
2987
-	$boucle = &$boucles[$idb];
2988
-	$primary = $boucle->primary;
2986
+    $not = $crit->not;
2987
+    $boucle = &$boucles[$idb];
2988
+    $primary = $boucle->primary;
2989 2989
 
2990
-	if (!$primary || strpos((string) $primary, ',')) {
2991
-		erreur_squelette(_T('zbug_doublon_sur_table_sans_cle_primaire'), $boucle);
2990
+    if (!$primary || strpos((string) $primary, ',')) {
2991
+        erreur_squelette(_T('zbug_doublon_sur_table_sans_cle_primaire'), $boucle);
2992 2992
 
2993
-		return;
2994
-	}
2995
-	$table = $boucle->type_requete;
2996
-	$table_sql = table_objet_sql(objet_type($table));
2993
+        return;
2994
+    }
2995
+    $table = $boucle->type_requete;
2996
+    $table_sql = table_objet_sql(objet_type($table));
2997 2997
 
2998
-	$id_parent = $GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'] ?? 'id_parent';
2998
+    $id_parent = $GLOBALS['exceptions_des_tables'][$boucle->id_table]['id_parent'] ?? 'id_parent';
2999 2999
 
3000
-	$in = 'IN';
3001
-	$where = ["'IN'", "'$boucle->id_table." . "$primary'", "'('.sql_get_select('$id_parent', '$table_sql').')'"];
3002
-	if ($not) {
3003
-		$where = ["'NOT'", $where];
3004
-	}
3000
+    $in = 'IN';
3001
+    $where = ["'IN'", "'$boucle->id_table." . "$primary'", "'('.sql_get_select('$id_parent', '$table_sql').')'"];
3002
+    if ($not) {
3003
+        $where = ["'NOT'", $where];
3004
+    }
3005 3005
 
3006
-	$boucle->where[] = $where;
3006
+    $boucle->where[] = $where;
3007 3007
 }
3008 3008
 
3009 3009
 /**
@@ -3019,8 +3019,8 @@  discard block
 block discarded – undo
3019 3019
  * @param Critere $crit Paramètres du critère dans cette boucle
3020 3020
  */
3021 3021
 function critere_feuille_dist($idb, &$boucles, $crit) {
3022
-	$not = $crit->not;
3023
-	$crit->not = !$not;
3024
-	critere_noeud_dist($idb, $boucles, $crit);
3025
-	$crit->not = $not;
3022
+    $not = $crit->not;
3023
+    $crit->not = !$not;
3024
+    critere_noeud_dist($idb, $boucles, $crit);
3025
+    $crit->not = $not;
3026 3026
 }
Please login to merge, or discard this patch.
ecrire/public/evaluer_page.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 \***************************************************************************/
11 11
 
12 12
 if (!defined('_ECRIRE_INC_VERSION')) {
13
-	return;
13
+    return;
14 14
 }
15 15
 
16 16
 /**
@@ -28,50 +28,50 @@  discard block
 block discarded – undo
28 28
  * @return void
29 29
  */
30 30
 
31
- /** @var bool Évaluation réussie ? */
31
+    /** @var bool Évaluation réussie ? */
32 32
 $res = true;
33 33
 
34 34
 // Cas d'une page contenant du PHP :
35 35
 if (empty($page['process_ins']) || $page['process_ins'] != 'html') {
36
-	include_spip('inc/lang');
36
+    include_spip('inc/lang');
37 37
 
38
-	// restaurer l'etat des notes avant calcul
39
-	if (
40
-		isset($page['notes'])
41
-		&& $page['notes']
42
-		&& ($notes = charger_fonction('notes', 'inc', true))
43
-	) {
44
-		$notes($page['notes'], 'restaurer_etat');
45
-	}
46
-	ob_start();
47
-	if (str_contains((string) $page['texte'], '?xml')) {
48
-		$page['texte'] = str_replace('<?xml', "<\1?xml", (string) $page['texte']);
49
-	}
38
+    // restaurer l'etat des notes avant calcul
39
+    if (
40
+        isset($page['notes'])
41
+        && $page['notes']
42
+        && ($notes = charger_fonction('notes', 'inc', true))
43
+    ) {
44
+        $notes($page['notes'], 'restaurer_etat');
45
+    }
46
+    ob_start();
47
+    if (str_contains((string) $page['texte'], '?xml')) {
48
+        $page['texte'] = str_replace('<?xml', "<\1?xml", (string) $page['texte']);
49
+    }
50 50
 
51
-	try {
52
-		$res = eval('?' . '>' . $page['texte']);
53
-		$page['texte'] = ob_get_contents();
54
-	} catch (\Throwable $e) {
55
-		$code = $page['texte'];
56
-		$GLOBALS['numero_ligne_php'] = 1;
57
-		if (!function_exists('numerote_ligne_php')) {
58
-			function numerote_ligne_php($match) {
59
-				$GLOBALS['numero_ligne_php']++;
60
-				return "\n/*" . str_pad((string) $GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/';
61
-			}
62
-		}
63
-		$code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', (string) $code);
64
-		$code = trim(highlight_string($code, true));
65
-		erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]);
66
-		$page['texte'] = '<!-- Erreur -->';
67
-	}
68
-	ob_end_clean();
51
+    try {
52
+        $res = eval('?' . '>' . $page['texte']);
53
+        $page['texte'] = ob_get_contents();
54
+    } catch (\Throwable $e) {
55
+        $code = $page['texte'];
56
+        $GLOBALS['numero_ligne_php'] = 1;
57
+        if (!function_exists('numerote_ligne_php')) {
58
+            function numerote_ligne_php($match) {
59
+                $GLOBALS['numero_ligne_php']++;
60
+                return "\n/*" . str_pad((string) $GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/';
61
+            }
62
+        }
63
+        $code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', (string) $code);
64
+        $code = trim(highlight_string($code, true));
65
+        erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]);
66
+        $page['texte'] = '<!-- Erreur -->';
67
+    }
68
+    ob_end_clean();
69 69
 
70
-	$page['process_ins'] = 'html';
70
+    $page['process_ins'] = 'html';
71 71
 
72
-	if (str_contains((string) $page['texte'], '?xml')) {
73
-		$page['texte'] = str_replace("<\1?xml", '<?xml', (string) $page['texte']);
74
-	}
72
+    if (str_contains((string) $page['texte'], '?xml')) {
73
+        $page['texte'] = str_replace("<\1?xml", '<?xml', (string) $page['texte']);
74
+    }
75 75
 }
76 76
 
77 77
 // le résultat de calcul d'un squelette est toujours de type string
Please login to merge, or discard this patch.
ecrire/public/phraser_html.php 1 patch
Indentation   +1060 added lines, -1060 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  **/
28 28
 
29 29
 if (!defined('_ECRIRE_INC_VERSION')) {
30
-	return;
30
+    return;
31 31
 }
32 32
 
33 33
 /** Début de la partie principale d'une boucle */
@@ -74,54 +74,54 @@  discard block
 block discarded – undo
74 74
  */
75 75
 function phraser_inclure(string $texte, int $ligne, array $result): array {
76 76
 
77
-	while (
78
-		(($p = strpos($texte, '<INC')) !== false)
79
-		&& preg_match(BALISE_INCLURE, $texte, $match, PREG_OFFSET_CAPTURE, $p)
80
-	) {
81
-		$poss = array_column($match, 1);
82
-		$match = array_column($match, 0);
83
-		$match = array_pad($match, 3, null);
84
-
85
-		$p = $poss[0];
86
-		$debut = substr($texte, 0, $p);
87
-		if ($p) {
88
-			$result = phraser_idiomes($debut, $ligne, $result);
89
-		}
90
-		$ligne += public_compte_ligne($debut);
91
-
92
-		$champ = new Inclure();
93
-		$champ->ligne = $ligne;
94
-		$ligne += public_compte_ligne((string) $match[0]);
95
-		$fichier = $match[2];
96
-		$champ->texte = $fichier;
97
-
98
-		$texte = substr($texte, $p + strlen((string) $match[0]));
99
-
100
-		// on assimile {var=val} a une liste de un argument sans fonction
101
-		$pos_apres = 0;
102
-		phraser_args($texte, '/>', '', $result, $champ, $pos_apres);
103
-		if (!$champ->texte || (is_countable($champ->param) ? count($champ->param) : 0) > 1) {
104
-			if (!function_exists('normaliser_inclure')) {
105
-				include_spip('public/normaliser');
106
-			}
107
-			normaliser_inclure($champ);
108
-		}
109
-		$pos_fin = strpos($texte, '>', $pos_apres) + 1;
110
-		if (
111
-			(strpos($texte, '</INCLUDE>', $pos_fin) === $pos_fin)
112
-			|| (strpos($texte, '</INCLURE>', $pos_fin) === $pos_fin)
113
-		) {
114
-			$pos_fin += 10;
115
-		}
116
-		$texte = substr($texte, $pos_fin);
117
-		$result[] = $champ;
118
-	}
119
-
120
-	if ($texte != '') {
121
-		$result = phraser_idiomes($texte, $ligne, $result);
122
-	}
123
-
124
-	return $result;
77
+    while (
78
+        (($p = strpos($texte, '<INC')) !== false)
79
+        && preg_match(BALISE_INCLURE, $texte, $match, PREG_OFFSET_CAPTURE, $p)
80
+    ) {
81
+        $poss = array_column($match, 1);
82
+        $match = array_column($match, 0);
83
+        $match = array_pad($match, 3, null);
84
+
85
+        $p = $poss[0];
86
+        $debut = substr($texte, 0, $p);
87
+        if ($p) {
88
+            $result = phraser_idiomes($debut, $ligne, $result);
89
+        }
90
+        $ligne += public_compte_ligne($debut);
91
+
92
+        $champ = new Inclure();
93
+        $champ->ligne = $ligne;
94
+        $ligne += public_compte_ligne((string) $match[0]);
95
+        $fichier = $match[2];
96
+        $champ->texte = $fichier;
97
+
98
+        $texte = substr($texte, $p + strlen((string) $match[0]));
99
+
100
+        // on assimile {var=val} a une liste de un argument sans fonction
101
+        $pos_apres = 0;
102
+        phraser_args($texte, '/>', '', $result, $champ, $pos_apres);
103
+        if (!$champ->texte || (is_countable($champ->param) ? count($champ->param) : 0) > 1) {
104
+            if (!function_exists('normaliser_inclure')) {
105
+                include_spip('public/normaliser');
106
+            }
107
+            normaliser_inclure($champ);
108
+        }
109
+        $pos_fin = strpos($texte, '>', $pos_apres) + 1;
110
+        if (
111
+            (strpos($texte, '</INCLUDE>', $pos_fin) === $pos_fin)
112
+            || (strpos($texte, '</INCLURE>', $pos_fin) === $pos_fin)
113
+        ) {
114
+            $pos_fin += 10;
115
+        }
116
+        $texte = substr($texte, $pos_fin);
117
+        $result[] = $champ;
118
+    }
119
+
120
+    if ($texte != '') {
121
+        $result = phraser_idiomes($texte, $ligne, $result);
122
+    }
123
+
124
+    return $result;
125 125
 }
126 126
 
127 127
 /**
@@ -133,38 +133,38 @@  discard block
 block discarded – undo
133 133
  */
134 134
 function phraser_polyglotte(string $texte, int $ligne, array $result): array {
135 135
 
136
-	$collecteur = new Spip\Texte\Collecteur\Multis();
137
-	$multis = $collecteur->collecter($texte);
138
-
139
-	if (!empty($multis)) {
140
-		$pos_prev = 0;
141
-		foreach ($multis as $multi) {
142
-			if ($multi['pos'] > $pos_prev) {
143
-				$champ = new Texte();
144
-				$champ->texte = substr($texte, $pos_prev, $multi['pos'] - $pos_prev);
145
-				$champ->ligne = $ligne;
146
-				$result[] = $champ;
147
-				$ligne += public_compte_ligne($champ->texte);
148
-			}
149
-
150
-			$champ = new Polyglotte();
151
-			$champ->ligne = $ligne;
152
-			$champ->traductions = $multi['trads'];
153
-			$result[] = $champ;
154
-			$ligne += public_compte_ligne($multi['raw']);
155
-			$pos_prev = $multi['pos'] + $multi['length'];
156
-		}
157
-		$texte = substr($texte, $pos_prev);
158
-	}
159
-
160
-	if ($texte !== '') {
161
-		$champ = new Texte();
162
-		$champ->texte = $texte;
163
-		$champ->ligne = $ligne;
164
-		$result[] = $champ;
165
-	}
166
-
167
-	return $result;
136
+    $collecteur = new Spip\Texte\Collecteur\Multis();
137
+    $multis = $collecteur->collecter($texte);
138
+
139
+    if (!empty($multis)) {
140
+        $pos_prev = 0;
141
+        foreach ($multis as $multi) {
142
+            if ($multi['pos'] > $pos_prev) {
143
+                $champ = new Texte();
144
+                $champ->texte = substr($texte, $pos_prev, $multi['pos'] - $pos_prev);
145
+                $champ->ligne = $ligne;
146
+                $result[] = $champ;
147
+                $ligne += public_compte_ligne($champ->texte);
148
+            }
149
+
150
+            $champ = new Polyglotte();
151
+            $champ->ligne = $ligne;
152
+            $champ->traductions = $multi['trads'];
153
+            $result[] = $champ;
154
+            $ligne += public_compte_ligne($multi['raw']);
155
+            $pos_prev = $multi['pos'] + $multi['length'];
156
+        }
157
+        $texte = substr($texte, $pos_prev);
158
+    }
159
+
160
+    if ($texte !== '') {
161
+        $champ = new Texte();
162
+        $champ->texte = $texte;
163
+        $champ->ligne = $ligne;
164
+        $result[] = $champ;
165
+    }
166
+
167
+    return $result;
168 168
 }
169 169
 
170 170
 
@@ -187,64 +187,64 @@  discard block
 block discarded – undo
187 187
  **/
188 188
 function phraser_idiomes(string $texte, int $ligne, array $result): array {
189 189
 
190
-	while (
191
-		(($p = strpos($texte, '<:')) !== false)
192
-		&& preg_match(BALISE_IDIOMES, $texte, $match, PREG_OFFSET_CAPTURE, $p)
193
-	) {
194
-		$poss = array_column($match, 1);
195
-		$match = array_column($match, 0);
196
-		$match = array_pad($match, 8, null);
197
-		$p = $poss[0];
198
-
199
-		$idiome = (string) $match[0];
200
-		// faux idiome ?
201
-		if (!$match[3] && (empty($match[5]) || $match[5][0] !== '=')) {
202
-			$debut = substr($texte, 0, $p + strlen($idiome));
203
-			$result = phraser_champs($debut, $ligne, $result);
204
-			$ligne += public_compte_ligne($debut);
205
-			continue;
206
-		}
207
-
208
-		$debut = substr($texte, 0, $p);
209
-		$result = phraser_champs($debut, $ligne, $result);
210
-		$ligne += public_compte_ligne($debut);
211
-
212
-		$texte = substr($texte, $p + strlen($idiome));
213
-
214
-		$champ = new Idiome();
215
-		$champ->ligne = $ligne;
216
-		$ligne += public_compte_ligne($idiome);
217
-		// Stocker les arguments de la balise de traduction
218
-		$args = [];
219
-		$largs = (string) $match[5];
220
-		while (
221
-			str_contains($largs, '=')
222
-			&& preg_match(BALISE_IDIOMES_ARGS, $largs, $r)
223
-		) {
224
-			$args[$r[1]] = phraser_champs($r[2], 0, []);
225
-			$largs = substr($largs, strlen($r[0]));
226
-		}
227
-		$champ->arg = $args;
228
-
229
-		// TODO : supprimer ce strtolower cf https://git.spip.net/spip/spip/issues/2536
230
-		$champ->nom_champ = strtolower((string) $match[3]);
231
-		$champ->module = $match[2];
232
-
233
-		// pas d'imbrication pour les filtres sur langue
234
-		$champ->apres = '';
235
-		if (!is_null($match[7])) {
236
-			$pos_apres = 0;
237
-			phraser_args($match[7], ':', '', [], $champ, $pos_apres);
238
-			$champ->apres = substr($match[7], $pos_apres);
239
-		}
240
-		$result[] = $champ;
241
-	}
242
-
243
-	if ($texte !== '') {
244
-		$result = phraser_champs($texte, $ligne, $result);
245
-	}
246
-
247
-	return $result;
190
+    while (
191
+        (($p = strpos($texte, '<:')) !== false)
192
+        && preg_match(BALISE_IDIOMES, $texte, $match, PREG_OFFSET_CAPTURE, $p)
193
+    ) {
194
+        $poss = array_column($match, 1);
195
+        $match = array_column($match, 0);
196
+        $match = array_pad($match, 8, null);
197
+        $p = $poss[0];
198
+
199
+        $idiome = (string) $match[0];
200
+        // faux idiome ?
201
+        if (!$match[3] && (empty($match[5]) || $match[5][0] !== '=')) {
202
+            $debut = substr($texte, 0, $p + strlen($idiome));
203
+            $result = phraser_champs($debut, $ligne, $result);
204
+            $ligne += public_compte_ligne($debut);
205
+            continue;
206
+        }
207
+
208
+        $debut = substr($texte, 0, $p);
209
+        $result = phraser_champs($debut, $ligne, $result);
210
+        $ligne += public_compte_ligne($debut);
211
+
212
+        $texte = substr($texte, $p + strlen($idiome));
213
+
214
+        $champ = new Idiome();
215
+        $champ->ligne = $ligne;
216
+        $ligne += public_compte_ligne($idiome);
217
+        // Stocker les arguments de la balise de traduction
218
+        $args = [];
219
+        $largs = (string) $match[5];
220
+        while (
221
+            str_contains($largs, '=')
222
+            && preg_match(BALISE_IDIOMES_ARGS, $largs, $r)
223
+        ) {
224
+            $args[$r[1]] = phraser_champs($r[2], 0, []);
225
+            $largs = substr($largs, strlen($r[0]));
226
+        }
227
+        $champ->arg = $args;
228
+
229
+        // TODO : supprimer ce strtolower cf https://git.spip.net/spip/spip/issues/2536
230
+        $champ->nom_champ = strtolower((string) $match[3]);
231
+        $champ->module = $match[2];
232
+
233
+        // pas d'imbrication pour les filtres sur langue
234
+        $champ->apres = '';
235
+        if (!is_null($match[7])) {
236
+            $pos_apres = 0;
237
+            phraser_args($match[7], ':', '', [], $champ, $pos_apres);
238
+            $champ->apres = substr($match[7], $pos_apres);
239
+        }
240
+        $result[] = $champ;
241
+    }
242
+
243
+    if ($texte !== '') {
244
+        $result = phraser_champs($texte, $ligne, $result);
245
+    }
246
+
247
+    return $result;
248 248
 }
249 249
 
250 250
 /**
@@ -263,53 +263,53 @@  discard block
 block discarded – undo
263 263
  **/
264 264
 function phraser_champs(string $texte, int $ligne, array $result): array {
265 265
 
266
-	while (
267
-		(($p = strpos($texte, '#')) !== false)
268
-		&& preg_match('/' . NOM_DE_CHAMP . '/S', $texte, $match, PREG_OFFSET_CAPTURE, $p)
269
-	) {
270
-		$poss = array_column($match, 1);
271
-		$match = array_column($match, 0);
272
-
273
-		$p = $poss[0];
274
-		if ($p) {
275
-			$debut = substr($texte, 0, $p);
276
-			$result = phraser_polyglotte($debut, $ligne, $result);
277
-			$ligne += public_compte_ligne($debut);
278
-		}
279
-
280
-		$champ = new Champ();
281
-		$champ->ligne = $ligne;
282
-		$ligne += public_compte_ligne($match[0]);
283
-		$champ->nom_boucle = $match[2];
284
-		$champ->nom_champ = $match[3];
285
-		$champ->etoile = $match[5];
286
-
287
-		// texte après la balise
288
-		$suite = substr($texte, $p + strlen($match[0]));
289
-		if ($suite && str_starts_with($suite, '{')) {
290
-			phraser_arg($suite, '', [], $champ);
291
-			// ce ltrim est une ereur de conception
292
-			// mais on le conserve par souci de compatibilite
293
-			$texte = ltrim((string) $suite);
294
-			// Il faudrait le normaliser dans l'arbre de syntaxe abstraite
295
-			// pour faire sauter ce cas particulier a la decompilation.
296
-			/* Ce qui suit est malheureusement incomplet pour cela:
266
+    while (
267
+        (($p = strpos($texte, '#')) !== false)
268
+        && preg_match('/' . NOM_DE_CHAMP . '/S', $texte, $match, PREG_OFFSET_CAPTURE, $p)
269
+    ) {
270
+        $poss = array_column($match, 1);
271
+        $match = array_column($match, 0);
272
+
273
+        $p = $poss[0];
274
+        if ($p) {
275
+            $debut = substr($texte, 0, $p);
276
+            $result = phraser_polyglotte($debut, $ligne, $result);
277
+            $ligne += public_compte_ligne($debut);
278
+        }
279
+
280
+        $champ = new Champ();
281
+        $champ->ligne = $ligne;
282
+        $ligne += public_compte_ligne($match[0]);
283
+        $champ->nom_boucle = $match[2];
284
+        $champ->nom_champ = $match[3];
285
+        $champ->etoile = $match[5];
286
+
287
+        // texte après la balise
288
+        $suite = substr($texte, $p + strlen($match[0]));
289
+        if ($suite && str_starts_with($suite, '{')) {
290
+            phraser_arg($suite, '', [], $champ);
291
+            // ce ltrim est une ereur de conception
292
+            // mais on le conserve par souci de compatibilite
293
+            $texte = ltrim((string) $suite);
294
+            // Il faudrait le normaliser dans l'arbre de syntaxe abstraite
295
+            // pour faire sauter ce cas particulier a la decompilation.
296
+            /* Ce qui suit est malheureusement incomplet pour cela:
297 297
 			if ($n = (strlen($suite) - strlen($texte))) {
298 298
 				$champ->apres = array(new Texte);
299 299
 				$champ->apres[0]->texte = substr($suite,0,$n);
300 300
 			}
301 301
 			*/
302
-		} else {
303
-			$texte = $suite;
304
-		}
305
-		phraser_vieux($champ);
306
-		$result[] = $champ;
307
-	}
308
-	if ($texte !== '') {
309
-		$result = phraser_polyglotte($texte, $ligne, $result);
310
-	}
311
-
312
-	return $result;
302
+        } else {
303
+            $texte = $suite;
304
+        }
305
+        phraser_vieux($champ);
306
+        $result[] = $champ;
307
+    }
308
+    if ($texte !== '') {
309
+        $result = phraser_polyglotte($texte, $ligne, $result);
310
+    }
311
+
312
+    return $result;
313 313
 }
314 314
 
315 315
 /**
@@ -324,17 +324,17 @@  discard block
 block discarded – undo
324 324
  * @see phraser_champs_interieurs()
325 325
  */
326 326
 function phraser_champs_etendus(string $texte, int $ligne, array $result): array {
327
-	if ($texte === '') {
328
-		return $result;
329
-	}
327
+    if ($texte === '') {
328
+        return $result;
329
+    }
330 330
 
331
-	$sep = '##';
332
-	while (str_contains($texte, $sep)) {
333
-		$sep .= '#';
334
-	}
331
+    $sep = '##';
332
+    while (str_contains($texte, $sep)) {
333
+        $sep .= '#';
334
+    }
335 335
 
336
-	$champs = phraser_champs_interieurs($texte, $ligne, $sep);
337
-	return array_merge($result, $champs);
336
+    $champs = phraser_champs_interieurs($texte, $ligne, $sep);
337
+    return array_merge($result, $champs);
338 338
 }
339 339
 
340 340
 /**
@@ -347,156 +347,156 @@  discard block
 block discarded – undo
347 347
  * @param Champ|Inclure|Idiome|Boucle $pointeur_champ
348 348
  */
349 349
 function phraser_args(string $texte, string $fin, string $sep, array $result, &$pointeur_champ, int &$pos_debut): array {
350
-	$length = strlen($texte);
351
-	while ($pos_debut < $length && trim($texte[$pos_debut]) === '') {
352
-		$pos_debut++;
353
-	}
354
-	while (($pos_debut < $length) && !str_contains($fin, $texte[$pos_debut])) {
355
-		// phraser_arg modifie directement le $texte, on fait donc avec ici en passant par une sous chaine
356
-		$st = substr($texte, $pos_debut);
357
-		$result = phraser_arg($st, $sep, $result, $pointeur_champ);
358
-		$pos_debut = $length - strlen((string) $st);
359
-		while ($pos_debut < $length && trim($texte[$pos_debut]) === '') {
360
-			$pos_debut++;
361
-		}
362
-	}
363
-
364
-	return $result;
350
+    $length = strlen($texte);
351
+    while ($pos_debut < $length && trim($texte[$pos_debut]) === '') {
352
+        $pos_debut++;
353
+    }
354
+    while (($pos_debut < $length) && !str_contains($fin, $texte[$pos_debut])) {
355
+        // phraser_arg modifie directement le $texte, on fait donc avec ici en passant par une sous chaine
356
+        $st = substr($texte, $pos_debut);
357
+        $result = phraser_arg($st, $sep, $result, $pointeur_champ);
358
+        $pos_debut = $length - strlen((string) $st);
359
+        while ($pos_debut < $length && trim($texte[$pos_debut]) === '') {
360
+            $pos_debut++;
361
+        }
362
+    }
363
+
364
+    return $result;
365 365
 }
366 366
 
367 367
 function phraser_arg(&$texte, $sep, $result, &$pointeur_champ) {
368
-	preg_match(',^(\|?[^}{)|]*)(.*)$,ms', (string) $texte, $match);
369
-	$suite = ltrim($match[2]);
370
-	$fonc = trim($match[1]);
371
-	if ($fonc && $fonc[0] == '|') {
372
-		$fonc = ltrim(substr($fonc, 1));
373
-	}
374
-	$res = [$fonc];
375
-	$err_f = '';
376
-	// cas du filtre sans argument ou du critere /
377
-	if (($suite && ($suite[0] != '{')) || ($fonc && $fonc[0] == '/')) {
378
-		// si pas d'argument, alors il faut une fonction ou un double |
379
-		if (!$match[1]) {
380
-			$err_f = ['zbug_erreur_filtre', ['filtre' => $texte]];
381
-			erreur_squelette($err_f, $pointeur_champ);
382
-			$texte = '';
383
-		} else {
384
-			$texte = $suite;
385
-		}
386
-		if ($err_f) {
387
-			$pointeur_champ->param = false;
388
-		} elseif ($fonc !== '') {
389
-			$pointeur_champ->param[] = $res;
390
-		}
391
-		// pour les balises avec faux filtres qui boudent ce dur larbeur
392
-		$pointeur_champ->fonctions[] = [$fonc, ''];
393
-
394
-		return $result;
395
-	}
396
-	$args = ltrim(substr($suite, 1)); // virer le '(' initial
397
-	$collecte = [];
398
-	while ($args && $args[0] != '}') {
399
-		if ($args[0] == '"') {
400
-			preg_match('/^(")([^"]*)(")(.*)$/ms', $args, $regs);
401
-		} elseif ($args[0] == "'") {
402
-			preg_match("/^(')([^']*)(')(.*)$/ms", $args, $regs);
403
-		} else {
404
-			preg_match('/^([[:space:]]*)([^,([{}]*([(\[{][^])}]*[])}])?[^,}]*)([,}].*)$/ms', $args, $regs);
405
-			if (!isset($regs[2]) || !strlen($regs[2])) {
406
-				$err_f = ['zbug_erreur_filtre', ['filtre' => $args]];
407
-				erreur_squelette($err_f, $pointeur_champ);
408
-				$champ = new Texte();
409
-				$champ->apres = $champ->avant = $args = '';
410
-				break;
411
-			}
412
-		}
413
-		$arg = $regs[2];
414
-		if (trim($regs[1])) {
415
-			$champ = new Texte();
416
-			$champ->texte = $arg;
417
-			$champ->apres = $champ->avant = $regs[1];
418
-			$result[] = $champ;
419
-			$collecte[] = $champ;
420
-			$args = ltrim($regs[count($regs) - 1]);
421
-		} else {
422
-			if (!preg_match('/' . NOM_DE_CHAMP . '([{|])/', $arg, $r)) {
423
-				// 0 est un aveu d'impuissance. A completer
424
-				$arg = phraser_champs_exterieurs($arg, 0, $sep, $result);
425
-
426
-				$args = ltrim($regs[count($regs) - 1]);
427
-				$collecte = array_merge($collecte, $arg);
428
-				$result = array_merge($result, $arg);
429
-			} else {
430
-				$n = strpos($args, (string) $r[0]);
431
-				$pred = substr($args, 0, $n);
432
-				$par = ',}';
433
-				if (preg_match('/^(.*)\($/', $pred, $m)) {
434
-					$pred = $m[1];
435
-					$par = ')';
436
-				}
437
-				if ($pred) {
438
-					$champ = new Texte();
439
-					$champ->texte = $pred;
440
-					$champ->apres = $champ->avant = '';
441
-					$result[] = $champ;
442
-					$collecte[] = $champ;
443
-				}
444
-				$rec = substr($args, $n + strlen($r[0]) - 1);
445
-				$champ = new Champ();
446
-				$champ->nom_boucle = $r[2];
447
-				$champ->nom_champ = $r[3];
448
-				$champ->etoile = $r[5];
449
-				$next = $r[6];
450
-				while ($next == '{') {
451
-					phraser_arg($rec, $sep, [], $champ);
452
-					$args = ltrim((string) $rec);
453
-					$next = $args[0] ?? '';
454
-				}
455
-				while ($next == '|') {
456
-					$pos_apres = 0;
457
-					phraser_args($rec, $par, $sep, [], $champ, $pos_apres);
458
-					$args = substr((string) $rec, $pos_apres);
459
-					$next = $args[0] ?? '';
460
-				}
461
-				// Si erreur de syntaxe dans un sous-argument, propager.
462
-				if ($champ->param === false) {
463
-					$err_f = true;
464
-				} else {
465
-					phraser_vieux($champ);
466
-				}
467
-				if ($par == ')') {
468
-					$args = substr($args, 1);
469
-				}
470
-				$collecte[] = $champ;
471
-				$result[] = $champ;
472
-			}
473
-		}
474
-		if (isset($args[0]) && $args[0] == ',') {
475
-			$args = ltrim(substr($args, 1));
476
-			if ($collecte) {
477
-				$res[] = $collecte;
478
-				$collecte = [];
479
-			}
480
-		}
481
-	}
482
-	if ($collecte) {
483
-		$res[] = $collecte;
484
-		$collecte = [];
485
-	}
486
-	$texte = substr($args, 1);
487
-	$source = substr($suite, 0, strlen($suite) - strlen($texte));
488
-	// propager les erreurs, et ignorer les param vides
489
-	if ($pointeur_champ->param !== false) {
490
-		if ($err_f) {
491
-			$pointeur_champ->param = false;
492
-		} elseif ($fonc !== '' || count($res) > 1) {
493
-			$pointeur_champ->param[] = $res;
494
-		}
495
-	}
496
-	// pour les balises avec faux filtres qui boudent ce dur larbeur
497
-	$pointeur_champ->fonctions[] = [$fonc, $source];
498
-
499
-	return $result;
368
+    preg_match(',^(\|?[^}{)|]*)(.*)$,ms', (string) $texte, $match);
369
+    $suite = ltrim($match[2]);
370
+    $fonc = trim($match[1]);
371
+    if ($fonc && $fonc[0] == '|') {
372
+        $fonc = ltrim(substr($fonc, 1));
373
+    }
374
+    $res = [$fonc];
375
+    $err_f = '';
376
+    // cas du filtre sans argument ou du critere /
377
+    if (($suite && ($suite[0] != '{')) || ($fonc && $fonc[0] == '/')) {
378
+        // si pas d'argument, alors il faut une fonction ou un double |
379
+        if (!$match[1]) {
380
+            $err_f = ['zbug_erreur_filtre', ['filtre' => $texte]];
381
+            erreur_squelette($err_f, $pointeur_champ);
382
+            $texte = '';
383
+        } else {
384
+            $texte = $suite;
385
+        }
386
+        if ($err_f) {
387
+            $pointeur_champ->param = false;
388
+        } elseif ($fonc !== '') {
389
+            $pointeur_champ->param[] = $res;
390
+        }
391
+        // pour les balises avec faux filtres qui boudent ce dur larbeur
392
+        $pointeur_champ->fonctions[] = [$fonc, ''];
393
+
394
+        return $result;
395
+    }
396
+    $args = ltrim(substr($suite, 1)); // virer le '(' initial
397
+    $collecte = [];
398
+    while ($args && $args[0] != '}') {
399
+        if ($args[0] == '"') {
400
+            preg_match('/^(")([^"]*)(")(.*)$/ms', $args, $regs);
401
+        } elseif ($args[0] == "'") {
402
+            preg_match("/^(')([^']*)(')(.*)$/ms", $args, $regs);
403
+        } else {
404
+            preg_match('/^([[:space:]]*)([^,([{}]*([(\[{][^])}]*[])}])?[^,}]*)([,}].*)$/ms', $args, $regs);
405
+            if (!isset($regs[2]) || !strlen($regs[2])) {
406
+                $err_f = ['zbug_erreur_filtre', ['filtre' => $args]];
407
+                erreur_squelette($err_f, $pointeur_champ);
408
+                $champ = new Texte();
409
+                $champ->apres = $champ->avant = $args = '';
410
+                break;
411
+            }
412
+        }
413
+        $arg = $regs[2];
414
+        if (trim($regs[1])) {
415
+            $champ = new Texte();
416
+            $champ->texte = $arg;
417
+            $champ->apres = $champ->avant = $regs[1];
418
+            $result[] = $champ;
419
+            $collecte[] = $champ;
420
+            $args = ltrim($regs[count($regs) - 1]);
421
+        } else {
422
+            if (!preg_match('/' . NOM_DE_CHAMP . '([{|])/', $arg, $r)) {
423
+                // 0 est un aveu d'impuissance. A completer
424
+                $arg = phraser_champs_exterieurs($arg, 0, $sep, $result);
425
+
426
+                $args = ltrim($regs[count($regs) - 1]);
427
+                $collecte = array_merge($collecte, $arg);
428
+                $result = array_merge($result, $arg);
429
+            } else {
430
+                $n = strpos($args, (string) $r[0]);
431
+                $pred = substr($args, 0, $n);
432
+                $par = ',}';
433
+                if (preg_match('/^(.*)\($/', $pred, $m)) {
434
+                    $pred = $m[1];
435
+                    $par = ')';
436
+                }
437
+                if ($pred) {
438
+                    $champ = new Texte();
439
+                    $champ->texte = $pred;
440
+                    $champ->apres = $champ->avant = '';
441
+                    $result[] = $champ;
442
+                    $collecte[] = $champ;
443
+                }
444
+                $rec = substr($args, $n + strlen($r[0]) - 1);
445
+                $champ = new Champ();
446
+                $champ->nom_boucle = $r[2];
447
+                $champ->nom_champ = $r[3];
448
+                $champ->etoile = $r[5];
449
+                $next = $r[6];
450
+                while ($next == '{') {
451
+                    phraser_arg($rec, $sep, [], $champ);
452
+                    $args = ltrim((string) $rec);
453
+                    $next = $args[0] ?? '';
454
+                }
455
+                while ($next == '|') {
456
+                    $pos_apres = 0;
457
+                    phraser_args($rec, $par, $sep, [], $champ, $pos_apres);
458
+                    $args = substr((string) $rec, $pos_apres);
459
+                    $next = $args[0] ?? '';
460
+                }
461
+                // Si erreur de syntaxe dans un sous-argument, propager.
462
+                if ($champ->param === false) {
463
+                    $err_f = true;
464
+                } else {
465
+                    phraser_vieux($champ);
466
+                }
467
+                if ($par == ')') {
468
+                    $args = substr($args, 1);
469
+                }
470
+                $collecte[] = $champ;
471
+                $result[] = $champ;
472
+            }
473
+        }
474
+        if (isset($args[0]) && $args[0] == ',') {
475
+            $args = ltrim(substr($args, 1));
476
+            if ($collecte) {
477
+                $res[] = $collecte;
478
+                $collecte = [];
479
+            }
480
+        }
481
+    }
482
+    if ($collecte) {
483
+        $res[] = $collecte;
484
+        $collecte = [];
485
+    }
486
+    $texte = substr($args, 1);
487
+    $source = substr($suite, 0, strlen($suite) - strlen($texte));
488
+    // propager les erreurs, et ignorer les param vides
489
+    if ($pointeur_champ->param !== false) {
490
+        if ($err_f) {
491
+            $pointeur_champ->param = false;
492
+        } elseif ($fonc !== '' || count($res) > 1) {
493
+            $pointeur_champ->param[] = $res;
494
+        }
495
+    }
496
+    // pour les balises avec faux filtres qui boudent ce dur larbeur
497
+    $pointeur_champ->fonctions[] = [$fonc, $source];
498
+
499
+    return $result;
500 500
 }
501 501
 
502 502
 /**
@@ -504,28 +504,28 @@  discard block
 block discarded – undo
504 504
  * et phraser les inclure sur les morceaux intermédiaires
505 505
  */
506 506
 function phraser_champs_exterieurs(string $texte, int $ligne, string $sep, array $nested_res): array {
507
-	$res = [];
508
-	$preg = ',^%' . preg_quote($sep, ',') . '([0-9]+)(\n*)@,';
509
-	while (($p = strpos($texte, "%$sep")) !== false) {
510
-		$suite = substr($texte, $p);
511
-		if (!preg_match($preg, $suite, $m)) {
512
-			break;
513
-		}
514
-		if ($p) {
515
-			$debut = substr($texte, 0, $p);
516
-			$res = phraser_inclure($debut, $ligne, $res);
517
-			$ligne += public_compte_ligne($debut);
518
-		}
519
-		$res[] = $nested_res[$m[1]];
520
-		$ligne += strlen($m[2]);
521
-		$texte = substr($suite, strlen($m[0]));
522
-	}
523
-
524
-	if ($texte !== '') {
525
-		$res = phraser_inclure($texte, $ligne, $res);
526
-	}
527
-
528
-	return $res;
507
+    $res = [];
508
+    $preg = ',^%' . preg_quote($sep, ',') . '([0-9]+)(\n*)@,';
509
+    while (($p = strpos($texte, "%$sep")) !== false) {
510
+        $suite = substr($texte, $p);
511
+        if (!preg_match($preg, $suite, $m)) {
512
+            break;
513
+        }
514
+        if ($p) {
515
+            $debut = substr($texte, 0, $p);
516
+            $res = phraser_inclure($debut, $ligne, $res);
517
+            $ligne += public_compte_ligne($debut);
518
+        }
519
+        $res[] = $nested_res[$m[1]];
520
+        $ligne += strlen($m[2]);
521
+        $texte = substr($suite, strlen($m[0]));
522
+    }
523
+
524
+    if ($texte !== '') {
525
+        $res = phraser_inclure($texte, $ligne, $res);
526
+    }
527
+
528
+    return $res;
529 529
 }
530 530
 
531 531
 /**
@@ -542,75 +542,75 @@  discard block
 block discarded – undo
542 542
  */
543 543
 function phraser_champs_interieurs(string $texte, int $no_ligne, string $sep): array {
544 544
 
545
-	$champs_trouves = [];
546
-	do {
547
-		$parties = [];
548
-		$nbl = $no_ligne;
549
-		$search_pos = 0;
550
-
551
-		// trouver tous les champs intérieurs (sans autre champs imbriqués), les analyser, et les remplacer par un placehoder
552
-		// le $texte est découpé en parties qu'on re-parse ensuite jusqu'à ce qu'on ne trouve plus de nouveaux champs
553
-		while (
554
-			(($p = strpos($texte, '[', $search_pos)) !== false)
555
-			&& preg_match(CHAMP_ETENDU, $texte, $match, PREG_OFFSET_CAPTURE, $p)
556
-		) {
557
-			$poss = array_column($match, 1);
558
-			$match = array_column($match, 0);
559
-			// si jamais il y a une sous balise inclue dans la partie 7, alors on est pas dans le champ le plus interieur, on continue le search plus loin
560
-			if (str_contains($match[7], '[') && preg_match(CHAMP_ETENDU, $texte, $r, 0, $poss[7])) {
561
-				$search_pos = $poss[7];
562
-				continue;
563
-			}
564
-
565
-			$nbl_debut = 0;
566
-			if ($poss[0]) {
567
-				$nbl_debut = public_compte_ligne($texte, 0, $poss[0]);
568
-				$parties[] = substr($texte, 0, $poss[0]);
569
-			}
570
-			$nbl += $nbl_debut;
571
-
572
-			$champ = new Champ();
573
-			$champ->ligne = $nbl;
574
-			$champ->nom_boucle = $match[3];
575
-			$champ->nom_champ = $match[4];
576
-			$champ->etoile = $match[6];
577
-			$nbl_champ = public_compte_ligne($texte, $poss[0], $poss[0] + strlen($match[0]));
578
-
579
-			// phraser_args indiquera ou commence apres
580
-			$pos_apres = 0;
581
-			$champs_trouves = phraser_args($match[7], ')', $sep, $champs_trouves, $champ, $pos_apres);
582
-			phraser_vieux($champ);
583
-			$champ->avant =	phraser_champs_exterieurs($match[1], $nbl, $sep, $champs_trouves);
584
-			$apres = substr($match[7], $pos_apres + 1);
585
-
586
-			$nbl_debut_champ = 0;
587
-			if (!empty($apres)) {
588
-				$nbl_debut_champ = public_compte_ligne($texte, $poss[0], $poss[7] + $pos_apres + 1);
589
-			}
590
-			$champ->apres = phraser_champs_exterieurs($apres, $nbl + $nbl_debut_champ, $sep, $champs_trouves);
591
-
592
-			// reinjecter la boucle si c'en est une
593
-			phraser_boucle_placeholder($champ);
594
-
595
-			$champs_trouves[] = $champ;
596
-			$j = count($champs_trouves) - 1;
597
-			// on remplace ce champ par un placeholder
598
-			// ajouter $nbl_champ retour ligne pour que la partie conserve le nombre de lignes lors des itérations suivantes
599
-			$parties[] = ($t = "%{$sep}{$j}" . str_repeat("\n", $nbl_champ) . '@');
600
-			$nbl += $nbl_champ;
601
-
602
-			$texte = substr($texte, $poss[0] + strlen($match[0]));
603
-			$search_pos = 0;
604
-		}
605
-
606
-		// si on a trouvé des morceaux, il faut recommencer
607
-		if (count($parties)) {
608
-			// reprenons tous les morceaux qu'on a mis de côté car ne matchant pas (encore)
609
-			$texte = implode('', $parties) . $texte;
610
-		}
611
-	} while (count($parties));
612
-
613
-	return phraser_champs_exterieurs($texte, $no_ligne, $sep, $champs_trouves);
545
+    $champs_trouves = [];
546
+    do {
547
+        $parties = [];
548
+        $nbl = $no_ligne;
549
+        $search_pos = 0;
550
+
551
+        // trouver tous les champs intérieurs (sans autre champs imbriqués), les analyser, et les remplacer par un placehoder
552
+        // le $texte est découpé en parties qu'on re-parse ensuite jusqu'à ce qu'on ne trouve plus de nouveaux champs
553
+        while (
554
+            (($p = strpos($texte, '[', $search_pos)) !== false)
555
+            && preg_match(CHAMP_ETENDU, $texte, $match, PREG_OFFSET_CAPTURE, $p)
556
+        ) {
557
+            $poss = array_column($match, 1);
558
+            $match = array_column($match, 0);
559
+            // si jamais il y a une sous balise inclue dans la partie 7, alors on est pas dans le champ le plus interieur, on continue le search plus loin
560
+            if (str_contains($match[7], '[') && preg_match(CHAMP_ETENDU, $texte, $r, 0, $poss[7])) {
561
+                $search_pos = $poss[7];
562
+                continue;
563
+            }
564
+
565
+            $nbl_debut = 0;
566
+            if ($poss[0]) {
567
+                $nbl_debut = public_compte_ligne($texte, 0, $poss[0]);
568
+                $parties[] = substr($texte, 0, $poss[0]);
569
+            }
570
+            $nbl += $nbl_debut;
571
+
572
+            $champ = new Champ();
573
+            $champ->ligne = $nbl;
574
+            $champ->nom_boucle = $match[3];
575
+            $champ->nom_champ = $match[4];
576
+            $champ->etoile = $match[6];
577
+            $nbl_champ = public_compte_ligne($texte, $poss[0], $poss[0] + strlen($match[0]));
578
+
579
+            // phraser_args indiquera ou commence apres
580
+            $pos_apres = 0;
581
+            $champs_trouves = phraser_args($match[7], ')', $sep, $champs_trouves, $champ, $pos_apres);
582
+            phraser_vieux($champ);
583
+            $champ->avant =	phraser_champs_exterieurs($match[1], $nbl, $sep, $champs_trouves);
584
+            $apres = substr($match[7], $pos_apres + 1);
585
+
586
+            $nbl_debut_champ = 0;
587
+            if (!empty($apres)) {
588
+                $nbl_debut_champ = public_compte_ligne($texte, $poss[0], $poss[7] + $pos_apres + 1);
589
+            }
590
+            $champ->apres = phraser_champs_exterieurs($apres, $nbl + $nbl_debut_champ, $sep, $champs_trouves);
591
+
592
+            // reinjecter la boucle si c'en est une
593
+            phraser_boucle_placeholder($champ);
594
+
595
+            $champs_trouves[] = $champ;
596
+            $j = count($champs_trouves) - 1;
597
+            // on remplace ce champ par un placeholder
598
+            // ajouter $nbl_champ retour ligne pour que la partie conserve le nombre de lignes lors des itérations suivantes
599
+            $parties[] = ($t = "%{$sep}{$j}" . str_repeat("\n", $nbl_champ) . '@');
600
+            $nbl += $nbl_champ;
601
+
602
+            $texte = substr($texte, $poss[0] + strlen($match[0]));
603
+            $search_pos = 0;
604
+        }
605
+
606
+        // si on a trouvé des morceaux, il faut recommencer
607
+        if (count($parties)) {
608
+            // reprenons tous les morceaux qu'on a mis de côté car ne matchant pas (encore)
609
+            $texte = implode('', $parties) . $texte;
610
+        }
611
+    } while (count($parties));
612
+
613
+    return phraser_champs_exterieurs($texte, $no_ligne, $sep, $champs_trouves);
614 614
 }
615 615
 
616 616
 /**
@@ -621,20 +621,20 @@  discard block
 block discarded – undo
621 621
  * @return void
622 622
  */
623 623
 function phraser_vieux(&$champ) {
624
-	$nom = $champ->nom_champ;
625
-	if ($champ->param) {
626
-		if ($nom == 'MODELE') {
627
-			if (!function_exists('phraser_vieux_modele')) {
628
-				include_spip('public/normaliser');
629
-			}
630
-			phraser_vieux_modele($champ);
631
-		} elseif ($nom == 'INCLURE' || $nom == 'INCLUDE') {
632
-			if (!function_exists('phraser_vieux_inclu')) {
633
-				include_spip('public/normaliser');
634
-			}
635
-			phraser_vieux_inclu($champ);
636
-		}
637
-	}
624
+    $nom = $champ->nom_champ;
625
+    if ($champ->param) {
626
+        if ($nom == 'MODELE') {
627
+            if (!function_exists('phraser_vieux_modele')) {
628
+                include_spip('public/normaliser');
629
+            }
630
+            phraser_vieux_modele($champ);
631
+        } elseif ($nom == 'INCLURE' || $nom == 'INCLUDE') {
632
+            if (!function_exists('phraser_vieux_inclu')) {
633
+                include_spip('public/normaliser');
634
+            }
635
+            phraser_vieux_inclu($champ);
636
+        }
637
+    }
638 638
 }
639 639
 
640 640
 
@@ -662,199 +662,199 @@  discard block
 block discarded – undo
662 662
  **/
663 663
 function phraser_criteres($params, &$result) {
664 664
 
665
-	$err_ci = ''; // indiquera s'il y a eu une erreur
666
-	$args = [];
667
-	$type = $result->type_requete;
668
-	$doublons = [];
669
-	foreach ($params as $v) {
670
-		$var = $v[1][0];
671
-		$param = ($var->type != 'texte') ? '' : $var->texte;
672
-		if (((is_countable($v) ? count($v) : 0) > 2) && (!preg_match(',[^A-Za-z]IN[^A-Za-z],i', (string) $param))) {
673
-			// plus d'un argument et pas le critere IN:
674
-			// detecter comme on peut si c'est le critere implicite LIMIT debut, fin
675
-			if (
676
-				$var->type != 'texte' || preg_match('/^(n|n-|(n-)?\d+)$/S', (string) $param)
677
-			) {
678
-				$op = ',';
679
-				$not = false;
680
-				$cond = false;
681
-			} else {
682
-				// Le debut du premier argument est l'operateur
683
-				preg_match('/^([!]?)([a-zA-Z]\w*)[[:space:]]*(\??)[[:space:]]*(.*)$/ms', (string) $param, $m);
684
-				$op = $m[2];
685
-				$not = (bool) $m[1];
686
-				$cond = (bool) $m[3];
687
-				// virer le premier argument,
688
-				// et mettre son reliquat eventuel
689
-				// Recopier pour ne pas alterer le texte source
690
-				// utile au debusqueur
691
-				if ($m[4]) {
692
-					// une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"}
693
-					if (preg_match(',^(["\'])(.*)\1$,', $m[4])) {
694
-						$c = null;
695
-						eval('$c = ' . $m[4] . ';');
696
-						if (isset($c)) {
697
-							$m[4] = $c;
698
-						}
699
-					}
700
-					$texte = new Texte();
701
-					$texte->texte = $m[4];
702
-					$v[1][0] = $texte;
703
-				} else {
704
-					array_shift($v[1]);
705
-				}
706
-			}
707
-			array_shift($v); // $v[O] est vide
708
-			$crit = new Critere();
709
-			$crit->op = $op;
710
-			$crit->not = $not;
711
-			$crit->cond = $cond;
712
-			$crit->exclus = '';
713
-			$crit->param = $v;
714
-			$args[] = $crit;
715
-		} else {
716
-			if ($var->type != 'texte') {
717
-				// cas 1 seul arg ne commencant pas par du texte brut:
718
-				// erreur ou critere infixe "/"
719
-				if (($v[1][1]->type != 'texte') || (trim((string) $v[1][1]->texte) != '/')) {
720
-					$err_ci = [
721
-						'zbug_critere_inconnu',
722
-						['critere' => $var->nom_champ]
723
-					];
724
-					erreur_squelette($err_ci, $result);
725
-				} else {
726
-					$crit = new Critere();
727
-					$crit->op = '/';
728
-					$crit->not = false;
729
-					$crit->exclus = '';
730
-					$crit->param = [[$v[1][0]], [$v[1][2]]];
731
-					$args[] = $crit;
732
-				}
733
-			} else {
734
-				// traiter qq lexemes particuliers pour faciliter la suite
735
-				// les separateurs
736
-				if ($var->apres) {
737
-					$result->separateur[] = $param;
738
-				} elseif ($param == 'tout' || $param == 'tous') {
739
-					$result->modificateur['tout'] = true;
740
-				} elseif ($param == 'plat') {
741
-					$result->modificateur['plat'] = true;
742
-				}
743
-
744
-				// Boucle hierarchie, analyser le critere id_rubrique
745
-				// et les autres critères {id_x} pour forcer {tout} sur
746
-				// ceux-ci pour avoir la rubrique mere...
747
-				// Les autres critères de la boucle hierarchie doivent être
748
-				// traités normalement.
749
-				elseif (
750
-					strcasecmp($type, 'hierarchie') == 0
751
-					&& !preg_match(",^id_rubrique\b,", (string) $param)
752
-					&& preg_match(',^id_\w+\s*$,', (string) $param)
753
-				) {
754
-					$result->modificateur['tout'] = true;
755
-				} elseif (strcasecmp($type, 'hierarchie') == 0 && $param == 'id_rubrique') {
756
-					// rien a faire sur {id_rubrique} tout seul
757
-				} else {
758
-					// pas d'emplacement statique, faut un dynamique
759
-					// mais il y a 2 cas qui ont les 2 !
760
-					if (($param == 'unique') || (preg_match(',^!?doublons *,', (string) $param))) {
761
-						// cette variable sera inseree dans le code
762
-						// et son nom sert d'indicateur des maintenant
763
-						$result->doublons = '$doublons_index';
764
-						if ($param == 'unique') {
765
-							$param = 'doublons';
766
-						}
767
-					} elseif ($param == 'recherche') {
768
-						// meme chose (a cause de #nom_de_boucle:URL_*)
769
-						$result->hash = ' ';
770
-					}
771
-
772
-					if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', (string) $param, $m)) {
773
-						$crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', '');
774
-					} elseif (
775
-						preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC .
776
-						')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', (string) $param, $m)
777
-					) {
778
-						$a2 = trim($m[8]);
779
-						if ($a2 && ($a2[0] == "'" || $a2[0] == '"') && $a2[0] == substr($a2, -1)) {
780
-							$a2 = substr($a2, 1, -1);
781
-						}
782
-						$crit = phraser_critere_infixe(
783
-							$m[2],
784
-							$a2,
785
-							$v,
786
-							(($m[2] == 'lang_select') ? $m[2] : $m[7]),
787
-							$m[6],
788
-							$m[5]
789
-						);
790
-						$crit->exclus = $m[1];
791
-					} elseif (
792
-						preg_match('/^([!]?)\s*(' .
793
-						CHAMP_SQL_PLUS_FONC .
794
-						')\s*(\??)(.*)$/is', (string) $param, $m)
795
-					) {
796
-						// contient aussi les comparaisons implicites !
797
-						// Comme ci-dessus:
798
-						// le premier arg contient l'operateur
799
-						array_shift($v);
800
-						if ($m[6]) {
801
-							$v[0][0] = new Texte();
802
-							$v[0][0]->texte = $m[6];
803
-						} else {
804
-							array_shift($v[0]);
805
-							if (!$v[0]) {
806
-								array_shift($v);
807
-							}
808
-						}
809
-						$crit = new Critere();
810
-						$crit->op = $m[2];
811
-						$crit->param = $v;
812
-						$crit->not = (bool) $m[1];
813
-						$crit->cond = (bool) $m[5];
814
-					} else {
815
-						$err_ci = [
816
-							'zbug_critere_inconnu',
817
-							['critere' => $param]
818
-						];
819
-						erreur_squelette($err_ci, $result);
820
-					}
821
-
822
-					if ((!preg_match(',^!?doublons *,', (string) $param)) || $crit->not) {
823
-						$args[] = $crit;
824
-					} else {
825
-						$doublons[] = $crit;
826
-					}
827
-				}
828
-			}
829
-		}
830
-	}
831
-
832
-	// les doublons non nies doivent etre le dernier critere
833
-	// pour que la variable $doublon_index ait la bonne valeur
834
-	// cf critere_doublon
835
-	if ($doublons) {
836
-		$args = [...$args, ...$doublons];
837
-	}
838
-
839
-	// Si erreur, laisser la chaine dans ce champ pour le HTTP 503
840
-	if (!$err_ci) {
841
-		$result->criteres = $args;
842
-	}
665
+    $err_ci = ''; // indiquera s'il y a eu une erreur
666
+    $args = [];
667
+    $type = $result->type_requete;
668
+    $doublons = [];
669
+    foreach ($params as $v) {
670
+        $var = $v[1][0];
671
+        $param = ($var->type != 'texte') ? '' : $var->texte;
672
+        if (((is_countable($v) ? count($v) : 0) > 2) && (!preg_match(',[^A-Za-z]IN[^A-Za-z],i', (string) $param))) {
673
+            // plus d'un argument et pas le critere IN:
674
+            // detecter comme on peut si c'est le critere implicite LIMIT debut, fin
675
+            if (
676
+                $var->type != 'texte' || preg_match('/^(n|n-|(n-)?\d+)$/S', (string) $param)
677
+            ) {
678
+                $op = ',';
679
+                $not = false;
680
+                $cond = false;
681
+            } else {
682
+                // Le debut du premier argument est l'operateur
683
+                preg_match('/^([!]?)([a-zA-Z]\w*)[[:space:]]*(\??)[[:space:]]*(.*)$/ms', (string) $param, $m);
684
+                $op = $m[2];
685
+                $not = (bool) $m[1];
686
+                $cond = (bool) $m[3];
687
+                // virer le premier argument,
688
+                // et mettre son reliquat eventuel
689
+                // Recopier pour ne pas alterer le texte source
690
+                // utile au debusqueur
691
+                if ($m[4]) {
692
+                    // une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"}
693
+                    if (preg_match(',^(["\'])(.*)\1$,', $m[4])) {
694
+                        $c = null;
695
+                        eval('$c = ' . $m[4] . ';');
696
+                        if (isset($c)) {
697
+                            $m[4] = $c;
698
+                        }
699
+                    }
700
+                    $texte = new Texte();
701
+                    $texte->texte = $m[4];
702
+                    $v[1][0] = $texte;
703
+                } else {
704
+                    array_shift($v[1]);
705
+                }
706
+            }
707
+            array_shift($v); // $v[O] est vide
708
+            $crit = new Critere();
709
+            $crit->op = $op;
710
+            $crit->not = $not;
711
+            $crit->cond = $cond;
712
+            $crit->exclus = '';
713
+            $crit->param = $v;
714
+            $args[] = $crit;
715
+        } else {
716
+            if ($var->type != 'texte') {
717
+                // cas 1 seul arg ne commencant pas par du texte brut:
718
+                // erreur ou critere infixe "/"
719
+                if (($v[1][1]->type != 'texte') || (trim((string) $v[1][1]->texte) != '/')) {
720
+                    $err_ci = [
721
+                        'zbug_critere_inconnu',
722
+                        ['critere' => $var->nom_champ]
723
+                    ];
724
+                    erreur_squelette($err_ci, $result);
725
+                } else {
726
+                    $crit = new Critere();
727
+                    $crit->op = '/';
728
+                    $crit->not = false;
729
+                    $crit->exclus = '';
730
+                    $crit->param = [[$v[1][0]], [$v[1][2]]];
731
+                    $args[] = $crit;
732
+                }
733
+            } else {
734
+                // traiter qq lexemes particuliers pour faciliter la suite
735
+                // les separateurs
736
+                if ($var->apres) {
737
+                    $result->separateur[] = $param;
738
+                } elseif ($param == 'tout' || $param == 'tous') {
739
+                    $result->modificateur['tout'] = true;
740
+                } elseif ($param == 'plat') {
741
+                    $result->modificateur['plat'] = true;
742
+                }
743
+
744
+                // Boucle hierarchie, analyser le critere id_rubrique
745
+                // et les autres critères {id_x} pour forcer {tout} sur
746
+                // ceux-ci pour avoir la rubrique mere...
747
+                // Les autres critères de la boucle hierarchie doivent être
748
+                // traités normalement.
749
+                elseif (
750
+                    strcasecmp($type, 'hierarchie') == 0
751
+                    && !preg_match(",^id_rubrique\b,", (string) $param)
752
+                    && preg_match(',^id_\w+\s*$,', (string) $param)
753
+                ) {
754
+                    $result->modificateur['tout'] = true;
755
+                } elseif (strcasecmp($type, 'hierarchie') == 0 && $param == 'id_rubrique') {
756
+                    // rien a faire sur {id_rubrique} tout seul
757
+                } else {
758
+                    // pas d'emplacement statique, faut un dynamique
759
+                    // mais il y a 2 cas qui ont les 2 !
760
+                    if (($param == 'unique') || (preg_match(',^!?doublons *,', (string) $param))) {
761
+                        // cette variable sera inseree dans le code
762
+                        // et son nom sert d'indicateur des maintenant
763
+                        $result->doublons = '$doublons_index';
764
+                        if ($param == 'unique') {
765
+                            $param = 'doublons';
766
+                        }
767
+                    } elseif ($param == 'recherche') {
768
+                        // meme chose (a cause de #nom_de_boucle:URL_*)
769
+                        $result->hash = ' ';
770
+                    }
771
+
772
+                    if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', (string) $param, $m)) {
773
+                        $crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', '');
774
+                    } elseif (
775
+                        preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC .
776
+                        ')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', (string) $param, $m)
777
+                    ) {
778
+                        $a2 = trim($m[8]);
779
+                        if ($a2 && ($a2[0] == "'" || $a2[0] == '"') && $a2[0] == substr($a2, -1)) {
780
+                            $a2 = substr($a2, 1, -1);
781
+                        }
782
+                        $crit = phraser_critere_infixe(
783
+                            $m[2],
784
+                            $a2,
785
+                            $v,
786
+                            (($m[2] == 'lang_select') ? $m[2] : $m[7]),
787
+                            $m[6],
788
+                            $m[5]
789
+                        );
790
+                        $crit->exclus = $m[1];
791
+                    } elseif (
792
+                        preg_match('/^([!]?)\s*(' .
793
+                        CHAMP_SQL_PLUS_FONC .
794
+                        ')\s*(\??)(.*)$/is', (string) $param, $m)
795
+                    ) {
796
+                        // contient aussi les comparaisons implicites !
797
+                        // Comme ci-dessus:
798
+                        // le premier arg contient l'operateur
799
+                        array_shift($v);
800
+                        if ($m[6]) {
801
+                            $v[0][0] = new Texte();
802
+                            $v[0][0]->texte = $m[6];
803
+                        } else {
804
+                            array_shift($v[0]);
805
+                            if (!$v[0]) {
806
+                                array_shift($v);
807
+                            }
808
+                        }
809
+                        $crit = new Critere();
810
+                        $crit->op = $m[2];
811
+                        $crit->param = $v;
812
+                        $crit->not = (bool) $m[1];
813
+                        $crit->cond = (bool) $m[5];
814
+                    } else {
815
+                        $err_ci = [
816
+                            'zbug_critere_inconnu',
817
+                            ['critere' => $param]
818
+                        ];
819
+                        erreur_squelette($err_ci, $result);
820
+                    }
821
+
822
+                    if ((!preg_match(',^!?doublons *,', (string) $param)) || $crit->not) {
823
+                        $args[] = $crit;
824
+                    } else {
825
+                        $doublons[] = $crit;
826
+                    }
827
+                }
828
+            }
829
+        }
830
+    }
831
+
832
+    // les doublons non nies doivent etre le dernier critere
833
+    // pour que la variable $doublon_index ait la bonne valeur
834
+    // cf critere_doublon
835
+    if ($doublons) {
836
+        $args = [...$args, ...$doublons];
837
+    }
838
+
839
+    // Si erreur, laisser la chaine dans ce champ pour le HTTP 503
840
+    if (!$err_ci) {
841
+        $result->criteres = $args;
842
+    }
843 843
 }
844 844
 
845 845
 function phraser_critere_infixe($arg1, $arg2, $args, $op, $not, $cond) {
846
-	$args[0] = new Texte();
847
-	$args[0]->texte = $arg1;
848
-	$args[0] = [$args[0]];
849
-	$args[1][0] = new Texte();
850
-	$args[1][0]->texte = $arg2;
851
-	$crit = new Critere();
852
-	$crit->op = $op;
853
-	$crit->not = (bool) $not;
854
-	$crit->cond = (bool) $cond;
855
-	$crit->param = $args;
856
-
857
-	return $crit;
846
+    $args[0] = new Texte();
847
+    $args[0]->texte = $arg1;
848
+    $args[0] = [$args[0]];
849
+    $args[1][0] = new Texte();
850
+    $args[1][0]->texte = $arg2;
851
+    $crit = new Critere();
852
+    $crit->op = $op;
853
+    $crit->not = (bool) $not;
854
+    $crit->cond = (bool) $cond;
855
+    $crit->param = $args;
856
+
857
+    return $crit;
858 858
 }
859 859
 
860 860
 /**
@@ -865,11 +865,11 @@  discard block
 block discarded – undo
865 865
  * @return int
866 866
  */
867 867
 function public_compte_ligne($texte, $debut = 0, $fin = null) {
868
-	if (is_null($fin)) {
869
-		return substr_count((string) $texte, "\n", $debut);
870
-	} else {
871
-		return substr_count((string) $texte, "\n", $debut, $fin - $debut);
872
-	}
868
+    if (is_null($fin)) {
869
+        return substr_count((string) $texte, "\n", $debut);
870
+    } else {
871
+        return substr_count((string) $texte, "\n", $debut, $fin - $debut);
872
+    }
873 873
 }
874 874
 
875 875
 
@@ -879,87 +879,87 @@  discard block
 block discarded – undo
879 879
  * et ensuite on regarde son vrai debut soit <B_xxx> soit <BB_xxx>
880 880
  */
881 881
 function public_trouver_premiere_boucle(string $texte, string $id_parent, array $descr, int $pos_debut_texte = 0): ?array {
882
-	$premiere_boucle = null;
883
-	$pos_derniere_boucle_anonyme = $pos_debut_texte;
884
-
885
-	$current_pos = $pos_debut_texte;
886
-	while (($pos_boucle = strpos((string) $texte, BALISE_BOUCLE, $current_pos)) !== false) {
887
-		$current_pos = $pos_boucle + 1;
888
-		$pos_parent = strpos((string) $texte, '(', $pos_boucle);
889
-
890
-		$id_boucle = '';
891
-		if ($pos_parent !== false) {
892
-			$id_boucle = trim(substr((string) $texte, $pos_boucle + strlen(BALISE_BOUCLE), $pos_parent - $pos_boucle - strlen(BALISE_BOUCLE)));
893
-		}
894
-		if (
895
-			$pos_parent === false
896
-			|| strlen($id_boucle) && (!is_numeric($id_boucle) && !str_starts_with($id_boucle, '_'))
897
-		) {
898
-			$result = new Boucle();
899
-			$result->id_parent = $id_parent;
900
-			$result->descr = $descr;
901
-
902
-			// un id_boucle pour l'affichage de l'erreur
903
-			if (!strlen($id_boucle)) {
904
-				$id_boucle = substr((string) $texte, $pos_boucle + strlen(BALISE_BOUCLE), 15);
905
-			}
906
-			$result->id_boucle = $id_boucle;
907
-			$err_b = ['zbug_erreur_boucle_syntaxe', ['id' => $id_boucle]];
908
-			erreur_squelette($err_b, $result);
909
-
910
-			continue;
911
-		}
912
-		else {
913
-			$boucle = [
914
-				'id_boucle' => $id_boucle,
915
-				'id_boucle_err' => $id_boucle,
916
-				'debut_boucle' => $pos_boucle,
917
-				'pos_boucle' => $pos_boucle,
918
-				'pos_parent' => $pos_parent,
919
-				'pos_precond' => false,
920
-				'pos_precond_inside' => false,
921
-				'pos_preaff' => false,
922
-				'pos_preaff_inside' => false,
923
-			];
924
-
925
-			// un id_boucle pour l'affichage de l'erreur sur les boucle anonymes
926
-			if (!strlen($id_boucle)) {
927
-				$boucle['id_boucle_err'] = substr((string) $texte, $pos_boucle + strlen(BALISE_BOUCLE), 15);
928
-			}
929
-
930
-			// trouver sa position de depart reelle : au <Bxx> ou au <BBxx>
931
-			$precond_boucle = BALISE_PRECOND_BOUCLE . $id_boucle . '>';
932
-			$pos_precond = strpos((string) $texte, $precond_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
933
-			if (
934
-				$pos_precond !== false
935
-				&& $pos_precond < $boucle['debut_boucle']
936
-			) {
937
-				$boucle['debut_boucle'] = $pos_precond;
938
-				$boucle['pos_precond'] = $pos_precond;
939
-				$boucle['pos_precond_inside'] = $pos_precond + strlen($precond_boucle);
940
-			}
941
-
942
-			$preaff_boucle = BALISE_PREAFF_BOUCLE . $id_boucle . '>';
943
-			$pos_preaff = strpos((string) $texte, $preaff_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
944
-			if (
945
-				$pos_preaff !== false
946
-				&& $pos_preaff < $boucle['debut_boucle']
947
-			) {
948
-				$boucle['debut_boucle'] = $pos_preaff;
949
-				$boucle['pos_preaff'] = $pos_preaff;
950
-				$boucle['pos_preaff_inside'] = $pos_preaff + strlen($preaff_boucle);
951
-			}
952
-			if (!strlen($id_boucle)) {
953
-				$pos_derniere_boucle_anonyme = $pos_boucle;
954
-			}
955
-
956
-			if (is_null($premiere_boucle) || $premiere_boucle['debut_boucle'] > $boucle['debut_boucle']) {
957
-				$premiere_boucle = $boucle;
958
-			}
959
-		}
960
-	}
961
-
962
-	return $premiere_boucle;
882
+    $premiere_boucle = null;
883
+    $pos_derniere_boucle_anonyme = $pos_debut_texte;
884
+
885
+    $current_pos = $pos_debut_texte;
886
+    while (($pos_boucle = strpos((string) $texte, BALISE_BOUCLE, $current_pos)) !== false) {
887
+        $current_pos = $pos_boucle + 1;
888
+        $pos_parent = strpos((string) $texte, '(', $pos_boucle);
889
+
890
+        $id_boucle = '';
891
+        if ($pos_parent !== false) {
892
+            $id_boucle = trim(substr((string) $texte, $pos_boucle + strlen(BALISE_BOUCLE), $pos_parent - $pos_boucle - strlen(BALISE_BOUCLE)));
893
+        }
894
+        if (
895
+            $pos_parent === false
896
+            || strlen($id_boucle) && (!is_numeric($id_boucle) && !str_starts_with($id_boucle, '_'))
897
+        ) {
898
+            $result = new Boucle();
899
+            $result->id_parent = $id_parent;
900
+            $result->descr = $descr;
901
+
902
+            // un id_boucle pour l'affichage de l'erreur
903
+            if (!strlen($id_boucle)) {
904
+                $id_boucle = substr((string) $texte, $pos_boucle + strlen(BALISE_BOUCLE), 15);
905
+            }
906
+            $result->id_boucle = $id_boucle;
907
+            $err_b = ['zbug_erreur_boucle_syntaxe', ['id' => $id_boucle]];
908
+            erreur_squelette($err_b, $result);
909
+
910
+            continue;
911
+        }
912
+        else {
913
+            $boucle = [
914
+                'id_boucle' => $id_boucle,
915
+                'id_boucle_err' => $id_boucle,
916
+                'debut_boucle' => $pos_boucle,
917
+                'pos_boucle' => $pos_boucle,
918
+                'pos_parent' => $pos_parent,
919
+                'pos_precond' => false,
920
+                'pos_precond_inside' => false,
921
+                'pos_preaff' => false,
922
+                'pos_preaff_inside' => false,
923
+            ];
924
+
925
+            // un id_boucle pour l'affichage de l'erreur sur les boucle anonymes
926
+            if (!strlen($id_boucle)) {
927
+                $boucle['id_boucle_err'] = substr((string) $texte, $pos_boucle + strlen(BALISE_BOUCLE), 15);
928
+            }
929
+
930
+            // trouver sa position de depart reelle : au <Bxx> ou au <BBxx>
931
+            $precond_boucle = BALISE_PRECOND_BOUCLE . $id_boucle . '>';
932
+            $pos_precond = strpos((string) $texte, $precond_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
933
+            if (
934
+                $pos_precond !== false
935
+                && $pos_precond < $boucle['debut_boucle']
936
+            ) {
937
+                $boucle['debut_boucle'] = $pos_precond;
938
+                $boucle['pos_precond'] = $pos_precond;
939
+                $boucle['pos_precond_inside'] = $pos_precond + strlen($precond_boucle);
940
+            }
941
+
942
+            $preaff_boucle = BALISE_PREAFF_BOUCLE . $id_boucle . '>';
943
+            $pos_preaff = strpos((string) $texte, $preaff_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
944
+            if (
945
+                $pos_preaff !== false
946
+                && $pos_preaff < $boucle['debut_boucle']
947
+            ) {
948
+                $boucle['debut_boucle'] = $pos_preaff;
949
+                $boucle['pos_preaff'] = $pos_preaff;
950
+                $boucle['pos_preaff_inside'] = $pos_preaff + strlen($preaff_boucle);
951
+            }
952
+            if (!strlen($id_boucle)) {
953
+                $pos_derniere_boucle_anonyme = $pos_boucle;
954
+            }
955
+
956
+            if (is_null($premiere_boucle) || $premiere_boucle['debut_boucle'] > $boucle['debut_boucle']) {
957
+                $premiere_boucle = $boucle;
958
+            }
959
+        }
960
+    }
961
+
962
+    return $premiere_boucle;
963 963
 }
964 964
 
965 965
 /**
@@ -975,68 +975,68 @@  discard block
 block discarded – undo
975 975
  *   la description de la boucle dans un tableau associatif
976 976
  */
977 977
 function public_trouver_fin_boucle(string $texte, string $id_parent, array $boucle, int $pos_debut_texte, $result): array {
978
-	$id_boucle = $boucle['id_boucle'];
979
-	$pos_courante = $pos_debut_texte;
980
-
981
-	$boucle['pos_postcond'] = false;
982
-	$boucle['pos_postcond_inside'] = false;
983
-	$boucle['pos_altern'] = false;
984
-	$boucle['pos_altern_inside'] = false;
985
-	$boucle['pos_postaff'] = false;
986
-	$boucle['pos_postaff_inside'] = false;
987
-
988
-	$pos_anonyme_next = null;
989
-	// si c'est une boucle anonyme, chercher la position de la prochaine boucle anonyme
990
-	if (!strlen((string) $id_boucle)) {
991
-		$pos_anonyme_next = strpos((string) $texte, BALISE_BOUCLE . '(', $pos_courante);
992
-	}
993
-
994
-	//
995
-	// 1. Recuperer la partie conditionnelle apres
996
-	//
997
-	$apres_boucle = BALISE_POSTCOND_BOUCLE . $id_boucle . '>';
998
-	$pos_apres = strpos((string) $texte, $apres_boucle, $pos_courante);
999
-	if (
1000
-		$pos_apres !== false
1001
-		&& (!$pos_anonyme_next || $pos_apres < $pos_anonyme_next)
1002
-	) {
1003
-		$boucle['pos_postcond'] = $pos_apres;
1004
-		$pos_apres += strlen($apres_boucle);
1005
-		$boucle['pos_postcond_inside'] = $pos_apres;
1006
-		$pos_courante = $pos_apres ;
1007
-	}
1008
-
1009
-	//
1010
-	// 2. Récuperer la partie alternative apres
1011
-	//
1012
-	$altern_boucle = BALISE_ALT_BOUCLE . $id_boucle . '>';
1013
-	$pos_altern = strpos((string) $texte, $altern_boucle, $pos_courante);
1014
-	if (
1015
-		$pos_altern !== false
1016
-		&& (!$pos_anonyme_next || $pos_altern < $pos_anonyme_next)
1017
-	) {
1018
-		$boucle['pos_altern'] = $pos_altern;
1019
-		$pos_altern += strlen($altern_boucle);
1020
-		$boucle['pos_altern_inside'] = $pos_altern;
1021
-		$pos_courante = $pos_altern;
1022
-	}
1023
-
1024
-	//
1025
-	// 3. Recuperer la partie footer non alternative
1026
-	//
1027
-	$postaff_boucle = BALISE_POSTAFF_BOUCLE . $id_boucle . '>';
1028
-	$pos_postaff = strpos((string) $texte, $postaff_boucle, $pos_courante);
1029
-	if (
1030
-		$pos_postaff !== false
1031
-		&& (!$pos_anonyme_next || $pos_postaff < $pos_anonyme_next)
1032
-	) {
1033
-		$boucle['pos_postaff'] = $pos_postaff;
1034
-		$pos_postaff += strlen($postaff_boucle);
1035
-		$boucle['pos_postaff_inside'] = $pos_postaff;
1036
-		$pos_courante = $pos_postaff ;
1037
-	}
1038
-
1039
-	return $boucle;
978
+    $id_boucle = $boucle['id_boucle'];
979
+    $pos_courante = $pos_debut_texte;
980
+
981
+    $boucle['pos_postcond'] = false;
982
+    $boucle['pos_postcond_inside'] = false;
983
+    $boucle['pos_altern'] = false;
984
+    $boucle['pos_altern_inside'] = false;
985
+    $boucle['pos_postaff'] = false;
986
+    $boucle['pos_postaff_inside'] = false;
987
+
988
+    $pos_anonyme_next = null;
989
+    // si c'est une boucle anonyme, chercher la position de la prochaine boucle anonyme
990
+    if (!strlen((string) $id_boucle)) {
991
+        $pos_anonyme_next = strpos((string) $texte, BALISE_BOUCLE . '(', $pos_courante);
992
+    }
993
+
994
+    //
995
+    // 1. Recuperer la partie conditionnelle apres
996
+    //
997
+    $apres_boucle = BALISE_POSTCOND_BOUCLE . $id_boucle . '>';
998
+    $pos_apres = strpos((string) $texte, $apres_boucle, $pos_courante);
999
+    if (
1000
+        $pos_apres !== false
1001
+        && (!$pos_anonyme_next || $pos_apres < $pos_anonyme_next)
1002
+    ) {
1003
+        $boucle['pos_postcond'] = $pos_apres;
1004
+        $pos_apres += strlen($apres_boucle);
1005
+        $boucle['pos_postcond_inside'] = $pos_apres;
1006
+        $pos_courante = $pos_apres ;
1007
+    }
1008
+
1009
+    //
1010
+    // 2. Récuperer la partie alternative apres
1011
+    //
1012
+    $altern_boucle = BALISE_ALT_BOUCLE . $id_boucle . '>';
1013
+    $pos_altern = strpos((string) $texte, $altern_boucle, $pos_courante);
1014
+    if (
1015
+        $pos_altern !== false
1016
+        && (!$pos_anonyme_next || $pos_altern < $pos_anonyme_next)
1017
+    ) {
1018
+        $boucle['pos_altern'] = $pos_altern;
1019
+        $pos_altern += strlen($altern_boucle);
1020
+        $boucle['pos_altern_inside'] = $pos_altern;
1021
+        $pos_courante = $pos_altern;
1022
+    }
1023
+
1024
+    //
1025
+    // 3. Recuperer la partie footer non alternative
1026
+    //
1027
+    $postaff_boucle = BALISE_POSTAFF_BOUCLE . $id_boucle . '>';
1028
+    $pos_postaff = strpos((string) $texte, $postaff_boucle, $pos_courante);
1029
+    if (
1030
+        $pos_postaff !== false
1031
+        && (!$pos_anonyme_next || $pos_postaff < $pos_anonyme_next)
1032
+    ) {
1033
+        $boucle['pos_postaff'] = $pos_postaff;
1034
+        $pos_postaff += strlen($postaff_boucle);
1035
+        $boucle['pos_postaff_inside'] = $pos_postaff;
1036
+        $pos_courante = $pos_postaff ;
1037
+    }
1038
+
1039
+    return $boucle;
1040 1040
 }
1041 1041
 
1042 1042
 
@@ -1045,21 +1045,21 @@  discard block
 block discarded – undo
1045 1045
  * @param null|object $boucle
1046 1046
  */
1047 1047
 function phraser_boucle_placeholder(&$champ, ?string $boucle_placeholder = null, $boucle = null) {
1048
-	static $boucles_connues = [];
1049
-	// si c'est un appel pour memoriser une boucle, memorisons la
1050
-	if (is_string($champ) && !empty($boucle_placeholder) && !empty($boucle)) {
1051
-		$boucles_connues[$boucle_placeholder][$champ] = &$boucle;
1052
-	}
1053
-	else {
1054
-		if (!empty($champ->nom_champ) && !empty($boucles_connues[$champ->nom_champ])) {
1055
-			$placeholder = $champ->nom_champ;
1056
-			$id = reset($champ->param[0][1]);
1057
-			$id = $id->texte;
1058
-			if (!empty($boucles_connues[$placeholder][$id])) {
1059
-				$champ = $boucles_connues[$placeholder][$id];
1060
-			}
1061
-		}
1062
-	}
1048
+    static $boucles_connues = [];
1049
+    // si c'est un appel pour memoriser une boucle, memorisons la
1050
+    if (is_string($champ) && !empty($boucle_placeholder) && !empty($boucle)) {
1051
+        $boucles_connues[$boucle_placeholder][$champ] = &$boucle;
1052
+    }
1053
+    else {
1054
+        if (!empty($champ->nom_champ) && !empty($boucles_connues[$champ->nom_champ])) {
1055
+            $placeholder = $champ->nom_champ;
1056
+            $id = reset($champ->param[0][1]);
1057
+            $id = $id->texte;
1058
+            if (!empty($boucles_connues[$placeholder][$id])) {
1059
+                $champ = $boucles_connues[$placeholder][$id];
1060
+            }
1061
+        }
1062
+    }
1063 1063
 }
1064 1064
 
1065 1065
 
@@ -1069,11 +1069,11 @@  discard block
 block discarded – undo
1069 1069
  * @return string
1070 1070
  */
1071 1071
 function public_generer_boucle_placeholder(string $id_boucle, &$boucle, string $boucle_placeholder, int $nb_lignes): string {
1072
-	$placeholder = "[(#{$boucle_placeholder}{" . $id_boucle . '})' . str_pad('', $nb_lignes, "\n") . ']';
1073
-	//memoriser la boucle a reinjecter
1074
-	$id_boucle = "$id_boucle";
1075
-	phraser_boucle_placeholder($id_boucle, $boucle_placeholder, $boucle);
1076
-	return $placeholder;
1072
+    $placeholder = "[(#{$boucle_placeholder}{" . $id_boucle . '})' . str_pad('', $nb_lignes, "\n") . ']';
1073
+    //memoriser la boucle a reinjecter
1074
+    $id_boucle = "$id_boucle";
1075
+    phraser_boucle_placeholder($id_boucle, $boucle_placeholder, $boucle);
1076
+    return $placeholder;
1077 1077
 }
1078 1078
 
1079 1079
 /**
@@ -1086,264 +1086,264 @@  discard block
 block discarded – undo
1086 1086
  */
1087 1087
 function public_phraser_html_dist(string $texte, string $id_parent, array &$boucles, array $descr, int $ligne_debut_texte = 1, ?string $boucle_placeholder = null): array {
1088 1088
 
1089
-	$all_res = [];
1090
-	// definir un placholder pour les boucles dont on est sur d'avoir aucune occurence dans le squelette
1091
-	if (is_null($boucle_placeholder)) {
1092
-		do {
1093
-			$boucle_placeholder = 'BOUCLE_PLACEHOLDER_' . strtoupper(md5(uniqid()));
1094
-		} while (str_contains((string) $texte, $boucle_placeholder));
1095
-	}
1096
-
1097
-	$ligne_debut_initial = $ligne_debut_texte;
1098
-	$pos_debut_texte = 0;
1099
-	while ($boucle = public_trouver_premiere_boucle($texte, $id_parent, $descr, $pos_debut_texte)) {
1100
-		$err_b = ''; // indiquera s'il y a eu une erreur
1101
-		$result = new Boucle();
1102
-		$result->id_parent = $id_parent;
1103
-		$result->descr = $descr;
1104
-
1105
-		$pos_courante = $boucle['pos_boucle'];
1106
-		$pos_parent = $boucle['pos_parent'];
1107
-		$id_boucle_search = $id_boucle = $boucle['id_boucle'];
1108
-
1109
-		$ligne_preaff = $ligne_avant = $ligne_milieu = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_parent);
1110
-
1111
-		// boucle anonyme ?
1112
-		if (!strlen((string) $id_boucle)) {
1113
-			$id_boucle = '_anon_L' . $ligne_milieu . '_' . substr(md5('anonyme:' . $id_parent . ':' . json_encode($boucle, JSON_THROW_ON_ERROR)), 0, 8);
1114
-		}
1115
-
1116
-		$pos_debut_boucle = $pos_courante;
1117
-
1118
-		$pos_milieu = $pos_parent;
1119
-
1120
-		// Regarder si on a une partie conditionnelle avant <B_xxx>
1121
-		if ($boucle['pos_precond'] !== false) {
1122
-			$pos_debut_boucle = $boucle['pos_precond'];
1123
-
1124
-			$pos_avant = $boucle['pos_precond_inside'];
1125
-			$result->avant = substr((string) $texte, $pos_avant, $pos_courante - $pos_avant);
1126
-			$ligne_avant = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1127
-		}
1128
-
1129
-		// Regarder si on a une partie inconditionnelle avant <BB_xxx>
1130
-		if ($boucle['pos_preaff'] !== false) {
1131
-			$end_preaff = $pos_debut_boucle;
1132
-
1133
-			$pos_preaff = $boucle['pos_preaff_inside'];
1134
-			$result->preaff = substr((string) $texte, $pos_preaff, $end_preaff - $pos_preaff);
1135
-			$ligne_preaff = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1136
-		}
1137
-
1138
-		$result->id_boucle = $id_boucle;
1139
-
1140
-		if (
1141
-			!preg_match(SPEC_BOUCLE, (string) $texte, $match, 0, $pos_milieu)
1142
-			|| ($pos_match = strpos((string) $texte, (string) $match[0], $pos_milieu)) === false
1143
-			|| $pos_match > $pos_milieu
1144
-		) {
1145
-			$err_b = ['zbug_erreur_boucle_syntaxe', ['id' => $id_boucle]];
1146
-			erreur_squelette($err_b, $result);
1147
-
1148
-			$ligne_debut_texte += public_compte_ligne($texte, $pos_debut_texte, $pos_courante + 1);
1149
-			$pos_debut_texte = $pos_courante + 1;
1150
-			continue;
1151
-		}
1152
-
1153
-		$result->type_requete = $match[0];
1154
-		$pos_milieu += strlen($match[0]);
1155
-		$pos_courante = $pos_milieu; // on s'en sert pour compter les lignes plus precisemment
1156
-
1157
-		$type = $match[1];
1158
-		$jointures = trim($match[2]);
1159
-		$table_optionnelle = ($match[3]);
1160
-		if ($jointures) {
1161
-			// on affecte pas ici les jointures explicites, mais dans la compilation
1162
-			// ou elles seront completees des jointures declarees
1163
-			$result->jointures_explicites = $jointures;
1164
-		}
1165
-
1166
-		if ($table_optionnelle) {
1167
-			$result->table_optionnelle = true;
1168
-			$result->type_table_optionnelle = $type;
1169
-		}
1170
-
1171
-		// 1ere passe sur les criteres, vu comme des arguments sans fct
1172
-		// Resultat mis dans result->param
1173
-		$pos_fin_criteres = $pos_milieu;
1174
-		phraser_args($texte, '/>', '', $all_res, $result, $pos_fin_criteres);
1175
-
1176
-		// En 2e passe result->criteres contiendra un tableau
1177
-		// pour l'instant on met le source (chaine) :
1178
-		// si elle reste ici au final, c'est qu'elle contient une erreur
1179
-		$pos_courante = $pos_fin_criteres; // on s'en sert pour compter les lignes plus precisemment
1180
-		$result->criteres = substr((string) $texte, $pos_milieu, $pos_fin_criteres - $pos_milieu);
1181
-		$pos_milieu = $pos_fin_criteres;
1182
-
1183
-		//
1184
-		// Recuperer la fin :
1185
-		//
1186
-		if ($texte[$pos_milieu] === '/') {
1187
-			// boucle autofermante : pas de partie conditionnelle apres
1188
-			$pos_courante += 2;
1189
-			$result->milieu = '';
1190
-		} else {
1191
-			$pos_milieu += 1;
1192
-
1193
-			$fin_boucle = BALISE_FIN_BOUCLE . $id_boucle_search . '>';
1194
-			$pos_fin = strpos((string) $texte, $fin_boucle, $pos_milieu);
1195
-			if ($pos_fin === false) {
1196
-				$err_b = [
1197
-					'zbug_erreur_boucle_fermant',
1198
-					['id' => $id_boucle]
1199
-				];
1200
-				erreur_squelette($err_b, $result);
1201
-				$pos_courante += strlen($fin_boucle);
1202
-			}
1203
-			else {
1204
-				// verifier une eventuelle imbrication d'une boucle homonyme
1205
-				// (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1206
-				$search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
1207
-				$search_from = $pos_milieu;
1208
-				$nb_open = 1;
1209
-				$nb_close = 1;
1210
-				$maxiter = 0;
1211
-				do {
1212
-					while (
1213
-						$nb_close < $nb_open
1214
-						&& ($p = strpos((string) $texte, $fin_boucle, $pos_fin + 1))
1215
-					) {
1216
-						$nb_close++;
1217
-						$pos_fin = $p;
1218
-					}
1219
-					// si on a pas trouve assez de boucles fermantes, sortir de la, on a fait de notre mieux
1220
-					if ($nb_close < $nb_open) {
1221
-						break;
1222
-					}
1223
-					while (
1224
-						($p = strpos((string) $texte, $search_debut_boucle, $search_from))
1225
-						&& $p < $pos_fin
1226
-					) {
1227
-						$nb_open++;
1228
-						$search_from = $p + 1;
1229
-					}
1230
-				} while ($nb_close < $nb_open && $maxiter++ < 5);
1231
-
1232
-				$pos_courante = $pos_fin + strlen($fin_boucle);
1233
-			}
1234
-			$result->milieu = substr((string) $texte, $pos_milieu, $pos_fin - $pos_milieu);
1235
-		}
1236
-
1237
-		$ligne_suite = $ligne_apres = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_courante);
1238
-		$boucle = public_trouver_fin_boucle($texte, $id_parent, $boucle, $pos_courante, $result);
1239
-
1240
-		//
1241
-		// 1. Partie conditionnelle apres ?
1242
-		//
1243
-		if ($boucle['pos_postcond']) {
1244
-			$result->apres = substr((string) $texte, $pos_courante, $boucle['pos_postcond'] - $pos_courante);
1245
-			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postcond_inside']);
1246
-			$pos_courante = $boucle['pos_postcond_inside'] ;
1247
-		}
1248
-
1249
-
1250
-		//
1251
-		// 2. Partie alternative apres ?
1252
-		//
1253
-		$ligne_altern = $ligne_suite;
1254
-		if ($boucle['pos_altern']) {
1255
-			$result->altern = substr((string) $texte, $pos_courante, $boucle['pos_altern'] - $pos_courante);
1256
-			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_altern_inside']);
1257
-			$pos_courante = $boucle['pos_altern_inside'];
1258
-		}
1259
-
1260
-		//
1261
-		// 3. Partie footer non alternative ?
1262
-		//
1263
-		$ligne_postaff = $ligne_suite;
1264
-		if ($boucle['pos_postaff']) {
1265
-			$result->postaff = substr((string) $texte, $pos_courante, $boucle['pos_postaff'] - $pos_courante);
1266
-			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postaff_inside']);
1267
-			$pos_courante = $boucle['pos_postaff_inside'];
1268
-		}
1269
-
1270
-		$result->ligne = $ligne_preaff;
1271
-
1272
-		if ($p = strpos($type, ':')) {
1273
-			$result->sql_serveur = substr($type, 0, $p);
1274
-			$type = substr($type, $p + 1);
1275
-		}
1276
-		$soustype = strtolower($type);
1277
-
1278
-		if (!isset($GLOBALS['table_des_tables'][$soustype])) {
1279
-			$soustype = $type;
1280
-		}
1281
-
1282
-		$result->type_requete = $soustype;
1283
-		// Lancer la 2e passe sur les criteres si la 1ere etait bonne
1284
-		if (!is_array($result->param)) {
1285
-			$err_b = true;
1286
-		} else {
1287
-			phraser_criteres($result->param, $result);
1288
-			if (strncasecmp($soustype, TYPE_RECURSIF, strlen(TYPE_RECURSIF)) == 0) {
1289
-				$result->type_requete = TYPE_RECURSIF;
1290
-				$args = $result->param;
1291
-				array_unshift(
1292
-					$args,
1293
-					substr($type, strlen(TYPE_RECURSIF))
1294
-				);
1295
-				$result->param = $args;
1296
-			}
1297
-		}
1298
-
1299
-		$descr['id_mere_contexte'] = $id_boucle;
1300
-		$result->milieu = public_phraser_html_dist($result->milieu, $id_boucle, $boucles, $descr, $ligne_milieu, $boucle_placeholder);
1301
-		// reserver la place dans la pile des boucles pour compiler ensuite dans le bon ordre
1302
-		// ie les boucles qui apparaissent dans les partie conditionnelles doivent etre compilees apres cette boucle
1303
-		// si il y a deja une boucle de ce nom, cela declenchera une erreur ensuite
1304
-		if (empty($boucles[$id_boucle])) {
1305
-			$boucles[$id_boucle] = null;
1306
-		}
1307
-		$result->preaff = public_phraser_html_dist($result->preaff, $id_parent, $boucles, $descr, $ligne_preaff, $boucle_placeholder);
1308
-		$result->avant = public_phraser_html_dist($result->avant, $id_parent, $boucles, $descr, $ligne_avant, $boucle_placeholder);
1309
-		$result->apres = public_phraser_html_dist($result->apres, $id_parent, $boucles, $descr, $ligne_apres, $boucle_placeholder);
1310
-		$result->altern = public_phraser_html_dist($result->altern, $id_parent, $boucles, $descr, $ligne_altern, $boucle_placeholder);
1311
-		$result->postaff = public_phraser_html_dist($result->postaff, $id_parent, $boucles, $descr, $ligne_postaff, $boucle_placeholder);
1312
-
1313
-		// Prevenir le generateur de code que le squelette est faux
1314
-		if ($err_b) {
1315
-			$result->type_requete = false;
1316
-		}
1317
-
1318
-		// Verifier qu'il n'y a pas double definition
1319
-		// apres analyse des sous-parties (pas avant).
1320
-		if (!empty($boucles[$id_boucle])) {
1321
-			if ($boucles[$id_boucle]->type_requete !== false) {
1322
-				$err_b_d = [
1323
-					'zbug_erreur_boucle_double',
1324
-					['id' => $id_boucle]
1325
-				];
1326
-				erreur_squelette($err_b_d, $result);
1327
-				// Prevenir le generateur de code que le squelette est faux
1328
-				$boucles[$id_boucle]->type_requete = false;
1329
-			}
1330
-		} else {
1331
-			$boucles[$id_boucle] = $result;
1332
-		}
1333
-
1334
-		// remplacer la boucle par un placeholder qui compte le meme nombre de lignes
1335
-		$placeholder = public_generer_boucle_placeholder($id_boucle, $boucles[$id_boucle], $boucle_placeholder, $ligne_suite - $ligne_debut_texte);
1336
-		$longueur_boucle = $pos_courante - $boucle['debut_boucle'];
1337
-		$texte = substr_replace((string) $texte, $placeholder, $boucle['debut_boucle'], $longueur_boucle);
1338
-		$pos_courante = $pos_courante - $longueur_boucle + strlen($placeholder);
1339
-
1340
-		// phraser la partie avant le debut de la boucle
1341
-		#$all_res = phraser_champs_etendus(substr($texte, $pos_debut_texte, $boucle['debut_boucle'] - $pos_debut_texte), $ligne_debut_texte, $all_res);
1342
-		#$all_res[] = &$boucles[$id_boucle];
1343
-
1344
-		$ligne_debut_texte = $ligne_suite;
1345
-		$pos_debut_texte = $pos_courante;
1346
-	}
1347
-
1348
-	return phraser_champs_etendus($texte, $ligne_debut_initial, $all_res);
1089
+    $all_res = [];
1090
+    // definir un placholder pour les boucles dont on est sur d'avoir aucune occurence dans le squelette
1091
+    if (is_null($boucle_placeholder)) {
1092
+        do {
1093
+            $boucle_placeholder = 'BOUCLE_PLACEHOLDER_' . strtoupper(md5(uniqid()));
1094
+        } while (str_contains((string) $texte, $boucle_placeholder));
1095
+    }
1096
+
1097
+    $ligne_debut_initial = $ligne_debut_texte;
1098
+    $pos_debut_texte = 0;
1099
+    while ($boucle = public_trouver_premiere_boucle($texte, $id_parent, $descr, $pos_debut_texte)) {
1100
+        $err_b = ''; // indiquera s'il y a eu une erreur
1101
+        $result = new Boucle();
1102
+        $result->id_parent = $id_parent;
1103
+        $result->descr = $descr;
1104
+
1105
+        $pos_courante = $boucle['pos_boucle'];
1106
+        $pos_parent = $boucle['pos_parent'];
1107
+        $id_boucle_search = $id_boucle = $boucle['id_boucle'];
1108
+
1109
+        $ligne_preaff = $ligne_avant = $ligne_milieu = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_parent);
1110
+
1111
+        // boucle anonyme ?
1112
+        if (!strlen((string) $id_boucle)) {
1113
+            $id_boucle = '_anon_L' . $ligne_milieu . '_' . substr(md5('anonyme:' . $id_parent . ':' . json_encode($boucle, JSON_THROW_ON_ERROR)), 0, 8);
1114
+        }
1115
+
1116
+        $pos_debut_boucle = $pos_courante;
1117
+
1118
+        $pos_milieu = $pos_parent;
1119
+
1120
+        // Regarder si on a une partie conditionnelle avant <B_xxx>
1121
+        if ($boucle['pos_precond'] !== false) {
1122
+            $pos_debut_boucle = $boucle['pos_precond'];
1123
+
1124
+            $pos_avant = $boucle['pos_precond_inside'];
1125
+            $result->avant = substr((string) $texte, $pos_avant, $pos_courante - $pos_avant);
1126
+            $ligne_avant = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1127
+        }
1128
+
1129
+        // Regarder si on a une partie inconditionnelle avant <BB_xxx>
1130
+        if ($boucle['pos_preaff'] !== false) {
1131
+            $end_preaff = $pos_debut_boucle;
1132
+
1133
+            $pos_preaff = $boucle['pos_preaff_inside'];
1134
+            $result->preaff = substr((string) $texte, $pos_preaff, $end_preaff - $pos_preaff);
1135
+            $ligne_preaff = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1136
+        }
1137
+
1138
+        $result->id_boucle = $id_boucle;
1139
+
1140
+        if (
1141
+            !preg_match(SPEC_BOUCLE, (string) $texte, $match, 0, $pos_milieu)
1142
+            || ($pos_match = strpos((string) $texte, (string) $match[0], $pos_milieu)) === false
1143
+            || $pos_match > $pos_milieu
1144
+        ) {
1145
+            $err_b = ['zbug_erreur_boucle_syntaxe', ['id' => $id_boucle]];
1146
+            erreur_squelette($err_b, $result);
1147
+
1148
+            $ligne_debut_texte += public_compte_ligne($texte, $pos_debut_texte, $pos_courante + 1);
1149
+            $pos_debut_texte = $pos_courante + 1;
1150
+            continue;
1151
+        }
1152
+
1153
+        $result->type_requete = $match[0];
1154
+        $pos_milieu += strlen($match[0]);
1155
+        $pos_courante = $pos_milieu; // on s'en sert pour compter les lignes plus precisemment
1156
+
1157
+        $type = $match[1];
1158
+        $jointures = trim($match[2]);
1159
+        $table_optionnelle = ($match[3]);
1160
+        if ($jointures) {
1161
+            // on affecte pas ici les jointures explicites, mais dans la compilation
1162
+            // ou elles seront completees des jointures declarees
1163
+            $result->jointures_explicites = $jointures;
1164
+        }
1165
+
1166
+        if ($table_optionnelle) {
1167
+            $result->table_optionnelle = true;
1168
+            $result->type_table_optionnelle = $type;
1169
+        }
1170
+
1171
+        // 1ere passe sur les criteres, vu comme des arguments sans fct
1172
+        // Resultat mis dans result->param
1173
+        $pos_fin_criteres = $pos_milieu;
1174
+        phraser_args($texte, '/>', '', $all_res, $result, $pos_fin_criteres);
1175
+
1176
+        // En 2e passe result->criteres contiendra un tableau
1177
+        // pour l'instant on met le source (chaine) :
1178
+        // si elle reste ici au final, c'est qu'elle contient une erreur
1179
+        $pos_courante = $pos_fin_criteres; // on s'en sert pour compter les lignes plus precisemment
1180
+        $result->criteres = substr((string) $texte, $pos_milieu, $pos_fin_criteres - $pos_milieu);
1181
+        $pos_milieu = $pos_fin_criteres;
1182
+
1183
+        //
1184
+        // Recuperer la fin :
1185
+        //
1186
+        if ($texte[$pos_milieu] === '/') {
1187
+            // boucle autofermante : pas de partie conditionnelle apres
1188
+            $pos_courante += 2;
1189
+            $result->milieu = '';
1190
+        } else {
1191
+            $pos_milieu += 1;
1192
+
1193
+            $fin_boucle = BALISE_FIN_BOUCLE . $id_boucle_search . '>';
1194
+            $pos_fin = strpos((string) $texte, $fin_boucle, $pos_milieu);
1195
+            if ($pos_fin === false) {
1196
+                $err_b = [
1197
+                    'zbug_erreur_boucle_fermant',
1198
+                    ['id' => $id_boucle]
1199
+                ];
1200
+                erreur_squelette($err_b, $result);
1201
+                $pos_courante += strlen($fin_boucle);
1202
+            }
1203
+            else {
1204
+                // verifier une eventuelle imbrication d'une boucle homonyme
1205
+                // (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1206
+                $search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
1207
+                $search_from = $pos_milieu;
1208
+                $nb_open = 1;
1209
+                $nb_close = 1;
1210
+                $maxiter = 0;
1211
+                do {
1212
+                    while (
1213
+                        $nb_close < $nb_open
1214
+                        && ($p = strpos((string) $texte, $fin_boucle, $pos_fin + 1))
1215
+                    ) {
1216
+                        $nb_close++;
1217
+                        $pos_fin = $p;
1218
+                    }
1219
+                    // si on a pas trouve assez de boucles fermantes, sortir de la, on a fait de notre mieux
1220
+                    if ($nb_close < $nb_open) {
1221
+                        break;
1222
+                    }
1223
+                    while (
1224
+                        ($p = strpos((string) $texte, $search_debut_boucle, $search_from))
1225
+                        && $p < $pos_fin
1226
+                    ) {
1227
+                        $nb_open++;
1228
+                        $search_from = $p + 1;
1229
+                    }
1230
+                } while ($nb_close < $nb_open && $maxiter++ < 5);
1231
+
1232
+                $pos_courante = $pos_fin + strlen($fin_boucle);
1233
+            }
1234
+            $result->milieu = substr((string) $texte, $pos_milieu, $pos_fin - $pos_milieu);
1235
+        }
1236
+
1237
+        $ligne_suite = $ligne_apres = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_courante);
1238
+        $boucle = public_trouver_fin_boucle($texte, $id_parent, $boucle, $pos_courante, $result);
1239
+
1240
+        //
1241
+        // 1. Partie conditionnelle apres ?
1242
+        //
1243
+        if ($boucle['pos_postcond']) {
1244
+            $result->apres = substr((string) $texte, $pos_courante, $boucle['pos_postcond'] - $pos_courante);
1245
+            $ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postcond_inside']);
1246
+            $pos_courante = $boucle['pos_postcond_inside'] ;
1247
+        }
1248
+
1249
+
1250
+        //
1251
+        // 2. Partie alternative apres ?
1252
+        //
1253
+        $ligne_altern = $ligne_suite;
1254
+        if ($boucle['pos_altern']) {
1255
+            $result->altern = substr((string) $texte, $pos_courante, $boucle['pos_altern'] - $pos_courante);
1256
+            $ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_altern_inside']);
1257
+            $pos_courante = $boucle['pos_altern_inside'];
1258
+        }
1259
+
1260
+        //
1261
+        // 3. Partie footer non alternative ?
1262
+        //
1263
+        $ligne_postaff = $ligne_suite;
1264
+        if ($boucle['pos_postaff']) {
1265
+            $result->postaff = substr((string) $texte, $pos_courante, $boucle['pos_postaff'] - $pos_courante);
1266
+            $ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postaff_inside']);
1267
+            $pos_courante = $boucle['pos_postaff_inside'];
1268
+        }
1269
+
1270
+        $result->ligne = $ligne_preaff;
1271
+
1272
+        if ($p = strpos($type, ':')) {
1273
+            $result->sql_serveur = substr($type, 0, $p);
1274
+            $type = substr($type, $p + 1);
1275
+        }
1276
+        $soustype = strtolower($type);
1277
+
1278
+        if (!isset($GLOBALS['table_des_tables'][$soustype])) {
1279
+            $soustype = $type;
1280
+        }
1281
+
1282
+        $result->type_requete = $soustype;
1283
+        // Lancer la 2e passe sur les criteres si la 1ere etait bonne
1284
+        if (!is_array($result->param)) {
1285
+            $err_b = true;
1286
+        } else {
1287
+            phraser_criteres($result->param, $result);
1288
+            if (strncasecmp($soustype, TYPE_RECURSIF, strlen(TYPE_RECURSIF)) == 0) {
1289
+                $result->type_requete = TYPE_RECURSIF;
1290
+                $args = $result->param;
1291
+                array_unshift(
1292
+                    $args,
1293
+                    substr($type, strlen(TYPE_RECURSIF))
1294
+                );
1295
+                $result->param = $args;
1296
+            }
1297
+        }
1298
+
1299
+        $descr['id_mere_contexte'] = $id_boucle;
1300
+        $result->milieu = public_phraser_html_dist($result->milieu, $id_boucle, $boucles, $descr, $ligne_milieu, $boucle_placeholder);
1301
+        // reserver la place dans la pile des boucles pour compiler ensuite dans le bon ordre
1302
+        // ie les boucles qui apparaissent dans les partie conditionnelles doivent etre compilees apres cette boucle
1303
+        // si il y a deja une boucle de ce nom, cela declenchera une erreur ensuite
1304
+        if (empty($boucles[$id_boucle])) {
1305
+            $boucles[$id_boucle] = null;
1306
+        }
1307
+        $result->preaff = public_phraser_html_dist($result->preaff, $id_parent, $boucles, $descr, $ligne_preaff, $boucle_placeholder);
1308
+        $result->avant = public_phraser_html_dist($result->avant, $id_parent, $boucles, $descr, $ligne_avant, $boucle_placeholder);
1309
+        $result->apres = public_phraser_html_dist($result->apres, $id_parent, $boucles, $descr, $ligne_apres, $boucle_placeholder);
1310
+        $result->altern = public_phraser_html_dist($result->altern, $id_parent, $boucles, $descr, $ligne_altern, $boucle_placeholder);
1311
+        $result->postaff = public_phraser_html_dist($result->postaff, $id_parent, $boucles, $descr, $ligne_postaff, $boucle_placeholder);
1312
+
1313
+        // Prevenir le generateur de code que le squelette est faux
1314
+        if ($err_b) {
1315
+            $result->type_requete = false;
1316
+        }
1317
+
1318
+        // Verifier qu'il n'y a pas double definition
1319
+        // apres analyse des sous-parties (pas avant).
1320
+        if (!empty($boucles[$id_boucle])) {
1321
+            if ($boucles[$id_boucle]->type_requete !== false) {
1322
+                $err_b_d = [
1323
+                    'zbug_erreur_boucle_double',
1324
+                    ['id' => $id_boucle]
1325
+                ];
1326
+                erreur_squelette($err_b_d, $result);
1327
+                // Prevenir le generateur de code que le squelette est faux
1328
+                $boucles[$id_boucle]->type_requete = false;
1329
+            }
1330
+        } else {
1331
+            $boucles[$id_boucle] = $result;
1332
+        }
1333
+
1334
+        // remplacer la boucle par un placeholder qui compte le meme nombre de lignes
1335
+        $placeholder = public_generer_boucle_placeholder($id_boucle, $boucles[$id_boucle], $boucle_placeholder, $ligne_suite - $ligne_debut_texte);
1336
+        $longueur_boucle = $pos_courante - $boucle['debut_boucle'];
1337
+        $texte = substr_replace((string) $texte, $placeholder, $boucle['debut_boucle'], $longueur_boucle);
1338
+        $pos_courante = $pos_courante - $longueur_boucle + strlen($placeholder);
1339
+
1340
+        // phraser la partie avant le debut de la boucle
1341
+        #$all_res = phraser_champs_etendus(substr($texte, $pos_debut_texte, $boucle['debut_boucle'] - $pos_debut_texte), $ligne_debut_texte, $all_res);
1342
+        #$all_res[] = &$boucles[$id_boucle];
1343
+
1344
+        $ligne_debut_texte = $ligne_suite;
1345
+        $pos_debut_texte = $pos_courante;
1346
+    }
1347
+
1348
+    return phraser_champs_etendus($texte, $ligne_debut_initial, $all_res);
1349 1349
 }
Please login to merge, or discard this patch.
ecrire/lang/spip_pl.php 1 patch
Indentation   +605 added lines, -605 removed lines patch added patch discarded remove patch
@@ -5,226 +5,226 @@  discard block
 block discarded – undo
5 5
 
6 6
 return [
7 7
 
8
-	// A
9
-	'access_interface_graphique' => 'Powrót do pełnego interfejsu graficznego',
10
-	'access_mode_texte' => 'Uproszczony interfejs - tryb tekstowy',
11
-	'admin_debug' => 'debug',
12
-	'admin_modifier_article' => 'Modyfikuj artykuł',
13
-	'admin_modifier_auteur' => 'Modyfikuj autora',
14
-	'admin_modifier_breve' => 'Modyfikuj news',
15
-	'admin_modifier_mot' => 'Modyfikuj słowo kluczowe',
16
-	'admin_modifier_rubrique' => 'Modyfikuj dział',
17
-	'admin_recalculer' => 'Odśwież ',
18
-	'afficher_calendrier' => 'Wyświetl kalendarz',
19
-	'afficher_trad' => 'pokaż przekłady',
20
-	'alerte_maj_impossible' => '<b>Uwaga!</b> Uaktualnienie bazy danych SQL do wersji @version@ jest nie możliwe. Powodem jest prawdopodobnie brak uprawnień do modyfikacji bazy danych. Skontaktuj się z administratorem lub firmą hostingową.',
21
-	'alerte_modif_info_concourante' => 'UWAGA: Ta informacja była zmieniana w innym miejscu. Obecna wartość to:Cette information a été modifiée par ailleurs. La valeur actuelle est :',
22
-	'analyse_xml' => 'Analiza XML',
23
-	'annuler' => 'Anuluj',
24
-	'antispam_champ_vide' => 'Pozostaw puste:',
25
-	'articles_recents' => 'Najnowsze artykuły',
26
-	'avis_archive_incorrect' => 'ten plik archiwalny nie należy do SPIP',
27
-	'avis_archive_invalide' => 'plik archiwalny jest nieprawidłowy',
28
-	'avis_attention' => 'UWAGA !',
29
-	'avis_champ_incorrect_type_objet' => 'Nieprawiłowa nazwa pola @name@ dla obiektu typu @type@',
30
-	'avis_colonne_inexistante' => 'Kolumna @col@ nie istnieje',
31
-	'avis_erreur' => 'Błąd: zobacz poniżej’;',
32
-	'avis_erreur_connexion' => 'Błąd połączenia',
33
-	'avis_erreur_cookie' => 'problem z cookie',
34
-	'avis_erreur_fonction_contexte' => 'Błąd programistyczny. Ta funkcja nie powinna być wywoływana w tym kontekście.',
35
-	'avis_erreur_mysql' => 'Błąd SQL',
36
-	'avis_erreur_sauvegarde' => 'Błąd archiwizacji (@type@ @id_objet@)!',
37
-	'avis_erreur_visiteur' => 'Problem z dostępem do stron administracyjnych',
8
+    // A
9
+    'access_interface_graphique' => 'Powrót do pełnego interfejsu graficznego',
10
+    'access_mode_texte' => 'Uproszczony interfejs - tryb tekstowy',
11
+    'admin_debug' => 'debug',
12
+    'admin_modifier_article' => 'Modyfikuj artykuł',
13
+    'admin_modifier_auteur' => 'Modyfikuj autora',
14
+    'admin_modifier_breve' => 'Modyfikuj news',
15
+    'admin_modifier_mot' => 'Modyfikuj słowo kluczowe',
16
+    'admin_modifier_rubrique' => 'Modyfikuj dział',
17
+    'admin_recalculer' => 'Odśwież ',
18
+    'afficher_calendrier' => 'Wyświetl kalendarz',
19
+    'afficher_trad' => 'pokaż przekłady',
20
+    'alerte_maj_impossible' => '<b>Uwaga!</b> Uaktualnienie bazy danych SQL do wersji @version@ jest nie możliwe. Powodem jest prawdopodobnie brak uprawnień do modyfikacji bazy danych. Skontaktuj się z administratorem lub firmą hostingową.',
21
+    'alerte_modif_info_concourante' => 'UWAGA: Ta informacja była zmieniana w innym miejscu. Obecna wartość to:Cette information a été modifiée par ailleurs. La valeur actuelle est :',
22
+    'analyse_xml' => 'Analiza XML',
23
+    'annuler' => 'Anuluj',
24
+    'antispam_champ_vide' => 'Pozostaw puste:',
25
+    'articles_recents' => 'Najnowsze artykuły',
26
+    'avis_archive_incorrect' => 'ten plik archiwalny nie należy do SPIP',
27
+    'avis_archive_invalide' => 'plik archiwalny jest nieprawidłowy',
28
+    'avis_attention' => 'UWAGA !',
29
+    'avis_champ_incorrect_type_objet' => 'Nieprawiłowa nazwa pola @name@ dla obiektu typu @type@',
30
+    'avis_colonne_inexistante' => 'Kolumna @col@ nie istnieje',
31
+    'avis_erreur' => 'Błąd: zobacz poniżej’;',
32
+    'avis_erreur_connexion' => 'Błąd połączenia',
33
+    'avis_erreur_cookie' => 'problem z cookie',
34
+    'avis_erreur_fonction_contexte' => 'Błąd programistyczny. Ta funkcja nie powinna być wywoływana w tym kontekście.',
35
+    'avis_erreur_mysql' => 'Błąd SQL',
36
+    'avis_erreur_sauvegarde' => 'Błąd archiwizacji (@type@ @id_objet@)!',
37
+    'avis_erreur_visiteur' => 'Problem z dostępem do stron administracyjnych',
38 38
 
39
-	// B
40
-	'barre_a_accent_grave' => 'Wstaw dużą literę A z akcentem grave',
41
-	'barre_aide' => 'Użyj skrótów typograficznych do ulepszenia layoutu',
42
-	'barre_e_accent_aigu' => 'Wstaw dużą literę E z akcentem acute',
43
-	'barre_eo' => 'Wstaw ligaturę oe',
44
-	'barre_eo_maj' => 'Wstaw dużą ligaturę EO',
45
-	'barre_euro' => 'Umieść symbol €€',
46
-	'barre_gras' => 'Wstaw w {{boldzie}}',
47
-	'barre_guillemets' => 'Umieść w "cudzysłowie"',
48
-	'barre_guillemets_simples' => 'Umieść w innym “cudzysłowie”',
49
-	'barre_intertitre' => 'Przekształć w {{{śródtytuł}}}',
50
-	'barre_italic' => 'Wstaw w {italiku}',
51
-	'barre_lien' => 'Zmień w [hiperłącze->http://...]',
52
-	'barre_lien_input' => 'Proszę wpisać cel hiperłącza (może to być URL internetowy w formie http://www.mysite.com lub po prostu numer artykułu na tej stronie).',
53
-	'barre_note' => 'Zmień w [[Przypis]]',
54
-	'barre_paragraphe' => 'Utwórz paragraf',
55
-	'barre_quote' => '<quote>Zacytuj wiadomość</quote>',
56
-	'bouton_changer' => 'Zatwierdź',
57
-	'bouton_chercher' => 'Szukaj',
58
-	'bouton_choisir' => 'Wybierz',
59
-	'bouton_deplacer' => 'Przenieś',
60
-	'bouton_download' => 'Ściągnij',
61
-	'bouton_enregistrer' => 'Zapisz',
62
-	'bouton_radio_desactiver_messagerie_interne' => 'Dezaktywuj pocztę wewnętrzną',
63
-	'bouton_radio_envoi_annonces' => 'Wyślij ogłoszenia redakcyjne',
64
-	'bouton_radio_non_envoi_annonces' => 'Nie wysyłaj żadnych zawiadomień',
65
-	'bouton_radio_non_envoi_liste_nouveautes' => 'Nie wysyłaj najnowszej listy newsów',
66
-	'bouton_recharger_page' => 'ponownie załaduj tę stronę',
67
-	'bouton_telecharger' => 'Załaduj',
68
-	'bouton_upload' => 'Załaduj',
69
-	'bouton_valider' => 'Zatwierdź',
39
+    // B
40
+    'barre_a_accent_grave' => 'Wstaw dużą literę A z akcentem grave',
41
+    'barre_aide' => 'Użyj skrótów typograficznych do ulepszenia layoutu',
42
+    'barre_e_accent_aigu' => 'Wstaw dużą literę E z akcentem acute',
43
+    'barre_eo' => 'Wstaw ligaturę oe',
44
+    'barre_eo_maj' => 'Wstaw dużą ligaturę EO',
45
+    'barre_euro' => 'Umieść symbol €€',
46
+    'barre_gras' => 'Wstaw w {{boldzie}}',
47
+    'barre_guillemets' => 'Umieść w "cudzysłowie"',
48
+    'barre_guillemets_simples' => 'Umieść w innym “cudzysłowie”',
49
+    'barre_intertitre' => 'Przekształć w {{{śródtytuł}}}',
50
+    'barre_italic' => 'Wstaw w {italiku}',
51
+    'barre_lien' => 'Zmień w [hiperłącze->http://...]',
52
+    'barre_lien_input' => 'Proszę wpisać cel hiperłącza (może to być URL internetowy w formie http://www.mysite.com lub po prostu numer artykułu na tej stronie).',
53
+    'barre_note' => 'Zmień w [[Przypis]]',
54
+    'barre_paragraphe' => 'Utwórz paragraf',
55
+    'barre_quote' => '<quote>Zacytuj wiadomość</quote>',
56
+    'bouton_changer' => 'Zatwierdź',
57
+    'bouton_chercher' => 'Szukaj',
58
+    'bouton_choisir' => 'Wybierz',
59
+    'bouton_deplacer' => 'Przenieś',
60
+    'bouton_download' => 'Ściągnij',
61
+    'bouton_enregistrer' => 'Zapisz',
62
+    'bouton_radio_desactiver_messagerie_interne' => 'Dezaktywuj pocztę wewnętrzną',
63
+    'bouton_radio_envoi_annonces' => 'Wyślij ogłoszenia redakcyjne',
64
+    'bouton_radio_non_envoi_annonces' => 'Nie wysyłaj żadnych zawiadomień',
65
+    'bouton_radio_non_envoi_liste_nouveautes' => 'Nie wysyłaj najnowszej listy newsów',
66
+    'bouton_recharger_page' => 'ponownie załaduj tę stronę',
67
+    'bouton_telecharger' => 'Załaduj',
68
+    'bouton_upload' => 'Załaduj',
69
+    'bouton_valider' => 'Zatwierdź',
70 70
 
71
-	// C
72
-	'cal_apresmidi' => 'popołudniu',
73
-	'cal_jour_entier' => 'cały dzień',
74
-	'cal_matin' => 'rano',
75
-	'cal_par_jour' => 'wg dni',
76
-	'cal_par_mois' => 'wg miesięcy',
77
-	'cal_par_semaine' => 'wg tygodni',
78
-	'choix_couleur_interface' => 'kolor',
79
-	'choix_interface' => 'wybór interfejsu',
80
-	'colonne' => 'Kolumna',
81
-	'confirm_changer_statut' => 'Uwaga, czy na pewno chcesz zmienić status tego elementu ? Kontynuować ?',
82
-	'correcte' => 'poprawna',
71
+    // C
72
+    'cal_apresmidi' => 'popołudniu',
73
+    'cal_jour_entier' => 'cały dzień',
74
+    'cal_matin' => 'rano',
75
+    'cal_par_jour' => 'wg dni',
76
+    'cal_par_mois' => 'wg miesięcy',
77
+    'cal_par_semaine' => 'wg tygodni',
78
+    'choix_couleur_interface' => 'kolor',
79
+    'choix_interface' => 'wybór interfejsu',
80
+    'colonne' => 'Kolumna',
81
+    'confirm_changer_statut' => 'Uwaga, czy na pewno chcesz zmienić status tego elementu ? Kontynuować ?',
82
+    'correcte' => 'poprawna',
83 83
 
84
-	// D
85
-	'date_aujourdhui' => 'dziś',
86
-	'date_avant_jc' => 'P.N.E.',
87
-	'date_dans' => 'w @delai@',
88
-	'date_de_mois_1' => '@j@ stycznia',
89
-	'date_de_mois_10' => '@j@ października',
90
-	'date_de_mois_11' => '@j@ listopada',
91
-	'date_de_mois_12' => '@j@ grudnia',
92
-	'date_de_mois_2' => '@j@ lutego',
93
-	'date_de_mois_3' => '@j@ marca',
94
-	'date_de_mois_4' => '@j@ kwietnia',
95
-	'date_de_mois_5' => '@j@ maja',
96
-	'date_de_mois_6' => '@j@ czerwca',
97
-	'date_de_mois_7' => '@j@ lipca',
98
-	'date_de_mois_8' => '@j@ sierpnia',
99
-	'date_de_mois_9' => '@j@ września',
100
-	'date_demain' => 'jutro',
101
-	'date_fmt_heures_minutes' => '@h@h@m@min',
102
-	'date_fmt_jour_heure' => '@jour@ o @heure@',
103
-	'date_fmt_jour_mois' => '@jourmois@',
104
-	'date_fmt_jour_mois_annee' => '@jourmois@ @annee@',
105
-	'date_fmt_mois_annee' => '@nommois@ @annee@',
106
-	'date_fmt_nomjour_date' => '@date@ @nomjour@ ',
107
-	'date_heures' => 'godziny',
108
-	'date_hier' => 'wczoraj',
109
-	'date_il_y_a' => 'jest @delai@',
110
-	'date_jnum1' => '1',
111
-	'date_jnum10' => '10',
112
-	'date_jnum11' => '11',
113
-	'date_jnum12' => '12',
114
-	'date_jnum13' => '13',
115
-	'date_jnum14' => '14',
116
-	'date_jnum15' => '15',
117
-	'date_jnum16' => '16',
118
-	'date_jnum17' => '17',
119
-	'date_jnum18' => '18',
120
-	'date_jnum19' => '19',
121
-	'date_jnum2' => '2',
122
-	'date_jnum20' => '20',
123
-	'date_jnum21' => '21',
124
-	'date_jnum22' => '22',
125
-	'date_jnum23' => '23',
126
-	'date_jnum24' => '24',
127
-	'date_jnum25' => '25',
128
-	'date_jnum26' => '26',
129
-	'date_jnum27' => '27',
130
-	'date_jnum28' => '28',
131
-	'date_jnum29' => '29',
132
-	'date_jnum3' => '3',
133
-	'date_jnum30' => '30',
134
-	'date_jnum31' => '31',
135
-	'date_jnum4' => '4',
136
-	'date_jnum5' => '5',
137
-	'date_jnum6' => '6',
138
-	'date_jnum7' => '7',
139
-	'date_jnum8' => '8',
140
-	'date_jnum9' => '9',
141
-	'date_jour_1' => 'Niedziela',
142
-	'date_jour_1_abbr' => 'nie.',
143
-	'date_jour_1_initiale' => 'n.',
144
-	'date_jour_2' => 'Poniedziałek',
145
-	'date_jour_2_abbr' => 'pon.',
146
-	'date_jour_2_initiale' => 'p.',
147
-	'date_jour_3' => 'Wtorek',
148
-	'date_jour_3_abbr' => 'wto.',
149
-	'date_jour_3_initiale' => 'w.',
150
-	'date_jour_4' => 'Środa',
151
-	'date_jour_4_abbr' => 'śro.',
152
-	'date_jour_4_initiale' => 'ś.',
153
-	'date_jour_5' => 'Czwartek',
154
-	'date_jour_5_abbr' => 'czw.',
155
-	'date_jour_5_initiale' => 'c.',
156
-	'date_jour_6' => 'Piątek',
157
-	'date_jour_6_abbr' => 'pią.',
158
-	'date_jour_6_initiale' => 'p.',
159
-	'date_jour_7' => 'Sobota',
160
-	'date_jour_7_abbr' => 'sob.',
161
-	'date_jour_7_initiale' => 's.',
162
-	'date_jours' => 'dni',
163
-	'date_minutes' => 'minuty',
164
-	'date_mois' => 'miesiąc',
165
-	'date_mois_1' => 'Styczeń',
166
-	'date_mois_10' => 'Październik',
167
-	'date_mois_10_abbr' => 'paźdź.',
168
-	'date_mois_11' => 'Listopad',
169
-	'date_mois_11_abbr' => 'list.',
170
-	'date_mois_12' => 'Grudzień',
171
-	'date_mois_12_abbr' => 'gru.',
172
-	'date_mois_1_abbr' => 'sty.',
173
-	'date_mois_2' => 'Luty',
174
-	'date_mois_2_abbr' => 'lut.',
175
-	'date_mois_3' => 'Marzec',
176
-	'date_mois_3_abbr' => 'mar.',
177
-	'date_mois_4' => 'Kwiecień',
178
-	'date_mois_4_abbr' => 'kw.',
179
-	'date_mois_5' => 'Maj',
180
-	'date_mois_5_abbr' => 'maj',
181
-	'date_mois_6' => 'Czerwiec',
182
-	'date_mois_6_abbr' => 'czer.',
183
-	'date_mois_7' => 'Lipiec',
184
-	'date_mois_7_abbr' => 'lip.',
185
-	'date_mois_8' => 'Sierpień',
186
-	'date_mois_8_abbr' => 'sie.',
187
-	'date_mois_9' => 'Wrzesień',
188
-	'date_mois_9_abbr' => 'wrz.',
189
-	'date_saison_1' => 'zima',
190
-	'date_saison_2' => 'wiosna',
191
-	'date_saison_3' => 'lato',
192
-	'date_saison_4' => 'jesień',
193
-	'date_secondes' => 'sekundy',
194
-	'date_semaines' => 'tygodnie',
195
-	'date_un_mois' => 'miesiące',
196
-	'date_une_heure' => 'godzina',
197
-	'date_une_minute' => 'minuta',
198
-	'date_une_seconde' => 'sekunda',
199
-	'date_une_semaine' => 'tydzień',
200
-	'dirs_commencer' => ' w celu rzeczywistego rozpoczęcia instalacji',
201
-	'dirs_preliminaire' => 'Wstęp: <b>Ustawienia pozwoleń dostępu</b>',
202
-	'dirs_probleme_droits' => 'Problem z prawami dostępu',
203
-	'dirs_repertoires_absents' => '<p><b>Następujące katalogi nie zostały odnalezione :</b></p> <ul>@bad_dirs@.</ul> 
84
+    // D
85
+    'date_aujourdhui' => 'dziś',
86
+    'date_avant_jc' => 'P.N.E.',
87
+    'date_dans' => 'w @delai@',
88
+    'date_de_mois_1' => '@j@ stycznia',
89
+    'date_de_mois_10' => '@j@ października',
90
+    'date_de_mois_11' => '@j@ listopada',
91
+    'date_de_mois_12' => '@j@ grudnia',
92
+    'date_de_mois_2' => '@j@ lutego',
93
+    'date_de_mois_3' => '@j@ marca',
94
+    'date_de_mois_4' => '@j@ kwietnia',
95
+    'date_de_mois_5' => '@j@ maja',
96
+    'date_de_mois_6' => '@j@ czerwca',
97
+    'date_de_mois_7' => '@j@ lipca',
98
+    'date_de_mois_8' => '@j@ sierpnia',
99
+    'date_de_mois_9' => '@j@ września',
100
+    'date_demain' => 'jutro',
101
+    'date_fmt_heures_minutes' => '@h@h@m@min',
102
+    'date_fmt_jour_heure' => '@jour@ o @heure@',
103
+    'date_fmt_jour_mois' => '@jourmois@',
104
+    'date_fmt_jour_mois_annee' => '@jourmois@ @annee@',
105
+    'date_fmt_mois_annee' => '@nommois@ @annee@',
106
+    'date_fmt_nomjour_date' => '@date@ @nomjour@ ',
107
+    'date_heures' => 'godziny',
108
+    'date_hier' => 'wczoraj',
109
+    'date_il_y_a' => 'jest @delai@',
110
+    'date_jnum1' => '1',
111
+    'date_jnum10' => '10',
112
+    'date_jnum11' => '11',
113
+    'date_jnum12' => '12',
114
+    'date_jnum13' => '13',
115
+    'date_jnum14' => '14',
116
+    'date_jnum15' => '15',
117
+    'date_jnum16' => '16',
118
+    'date_jnum17' => '17',
119
+    'date_jnum18' => '18',
120
+    'date_jnum19' => '19',
121
+    'date_jnum2' => '2',
122
+    'date_jnum20' => '20',
123
+    'date_jnum21' => '21',
124
+    'date_jnum22' => '22',
125
+    'date_jnum23' => '23',
126
+    'date_jnum24' => '24',
127
+    'date_jnum25' => '25',
128
+    'date_jnum26' => '26',
129
+    'date_jnum27' => '27',
130
+    'date_jnum28' => '28',
131
+    'date_jnum29' => '29',
132
+    'date_jnum3' => '3',
133
+    'date_jnum30' => '30',
134
+    'date_jnum31' => '31',
135
+    'date_jnum4' => '4',
136
+    'date_jnum5' => '5',
137
+    'date_jnum6' => '6',
138
+    'date_jnum7' => '7',
139
+    'date_jnum8' => '8',
140
+    'date_jnum9' => '9',
141
+    'date_jour_1' => 'Niedziela',
142
+    'date_jour_1_abbr' => 'nie.',
143
+    'date_jour_1_initiale' => 'n.',
144
+    'date_jour_2' => 'Poniedziałek',
145
+    'date_jour_2_abbr' => 'pon.',
146
+    'date_jour_2_initiale' => 'p.',
147
+    'date_jour_3' => 'Wtorek',
148
+    'date_jour_3_abbr' => 'wto.',
149
+    'date_jour_3_initiale' => 'w.',
150
+    'date_jour_4' => 'Środa',
151
+    'date_jour_4_abbr' => 'śro.',
152
+    'date_jour_4_initiale' => 'ś.',
153
+    'date_jour_5' => 'Czwartek',
154
+    'date_jour_5_abbr' => 'czw.',
155
+    'date_jour_5_initiale' => 'c.',
156
+    'date_jour_6' => 'Piątek',
157
+    'date_jour_6_abbr' => 'pią.',
158
+    'date_jour_6_initiale' => 'p.',
159
+    'date_jour_7' => 'Sobota',
160
+    'date_jour_7_abbr' => 'sob.',
161
+    'date_jour_7_initiale' => 's.',
162
+    'date_jours' => 'dni',
163
+    'date_minutes' => 'minuty',
164
+    'date_mois' => 'miesiąc',
165
+    'date_mois_1' => 'Styczeń',
166
+    'date_mois_10' => 'Październik',
167
+    'date_mois_10_abbr' => 'paźdź.',
168
+    'date_mois_11' => 'Listopad',
169
+    'date_mois_11_abbr' => 'list.',
170
+    'date_mois_12' => 'Grudzień',
171
+    'date_mois_12_abbr' => 'gru.',
172
+    'date_mois_1_abbr' => 'sty.',
173
+    'date_mois_2' => 'Luty',
174
+    'date_mois_2_abbr' => 'lut.',
175
+    'date_mois_3' => 'Marzec',
176
+    'date_mois_3_abbr' => 'mar.',
177
+    'date_mois_4' => 'Kwiecień',
178
+    'date_mois_4_abbr' => 'kw.',
179
+    'date_mois_5' => 'Maj',
180
+    'date_mois_5_abbr' => 'maj',
181
+    'date_mois_6' => 'Czerwiec',
182
+    'date_mois_6_abbr' => 'czer.',
183
+    'date_mois_7' => 'Lipiec',
184
+    'date_mois_7_abbr' => 'lip.',
185
+    'date_mois_8' => 'Sierpień',
186
+    'date_mois_8_abbr' => 'sie.',
187
+    'date_mois_9' => 'Wrzesień',
188
+    'date_mois_9_abbr' => 'wrz.',
189
+    'date_saison_1' => 'zima',
190
+    'date_saison_2' => 'wiosna',
191
+    'date_saison_3' => 'lato',
192
+    'date_saison_4' => 'jesień',
193
+    'date_secondes' => 'sekundy',
194
+    'date_semaines' => 'tygodnie',
195
+    'date_un_mois' => 'miesiące',
196
+    'date_une_heure' => 'godzina',
197
+    'date_une_minute' => 'minuta',
198
+    'date_une_seconde' => 'sekunda',
199
+    'date_une_semaine' => 'tydzień',
200
+    'dirs_commencer' => ' w celu rzeczywistego rozpoczęcia instalacji',
201
+    'dirs_preliminaire' => 'Wstęp: <b>Ustawienia pozwoleń dostępu</b>',
202
+    'dirs_probleme_droits' => 'Problem z prawami dostępu',
203
+    'dirs_repertoires_absents' => '<p><b>Następujące katalogi nie zostały odnalezione :</b></p> <ul>@bad_dirs@.</ul> 
204 204
   <p>Możliwe, że powodem tego jest nazwa, w której pomylone zostały duże i małe litery.
205 205
   Sprawdź nazwy pod względem małych i dużych liter.
206 206
   Jeśli rzeczywiście wielkość liter jest różna, zmień nazwy katalogów za pomocą dowolnego programu FTP
207 207
   <p>Po wykonaniu tej operacji będziesz mógł',
208
-	'dirs_repertoires_suivants' => '<p><b>Następujące katalogi nie są skonfigurowane do zapisu :</b></p> <ul>@bad_dirs@.</ul> 
208
+    'dirs_repertoires_suivants' => '<p><b>Następujące katalogi nie są skonfigurowane do zapisu :</b></p> <ul>@bad_dirs@.</ul> 
209 209
   <p>Aby temu zapobiec, skorzystaj z klienta FTP i ureguluj konieczne prawa dostępu
210 210
   do tych katalogów. Procedura jest wytłumaczona od A-Z w przewodniku instalacji.
211 211
   <p>Kiedy dokonasz koniecznych zmian, będziesz mógł',
212
-	'double_occurrence' => 'Podwójne wystąpienie @balise@',
212
+    'double_occurrence' => 'Podwójne wystąpienie @balise@',
213 213
 
214
-	// E
215
-	'en_cours' => 'w trakcie',
216
-	'envoi_via_le_site' => 'Wyślij ze strony',
217
-	'erreur' => 'Błąd',
218
-	'erreur_balise_non_fermee' => 'ostatni znacznik nie jest zamknięty :',
219
-	'erreur_texte' => 'błąd/błędy',
220
-	'etape' => 'Etap',
214
+    // E
215
+    'en_cours' => 'w trakcie',
216
+    'envoi_via_le_site' => 'Wyślij ze strony',
217
+    'erreur' => 'Błąd',
218
+    'erreur_balise_non_fermee' => 'ostatni znacznik nie jest zamknięty :',
219
+    'erreur_texte' => 'błąd/błędy',
220
+    'etape' => 'Etap',
221 221
 
222
-	// F
223
-	'fichier_introuvable' => 'Plik @fichier@ nie odnaleziony', # MODIF
224
-	'form_auteur_confirmation' => 'Potwierdź swój e-mail',
225
-	'form_auteur_email_modifie' => 'Twój adres e-mail został zmieniony.',
226
-	'form_auteur_envoi_mail_confirmation' => 'Mail z potwierdzeniem został wysłany na adres @email@. Prosimy o kliknięcie w link, przesłany w e-mailu aby zatwierdzić adres e-mail.',
227
-	'form_auteur_mail_confirmation' => 'Dzień dobry,
222
+    // F
223
+    'fichier_introuvable' => 'Plik @fichier@ nie odnaleziony', # MODIF
224
+    'form_auteur_confirmation' => 'Potwierdź swój e-mail',
225
+    'form_auteur_email_modifie' => 'Twój adres e-mail został zmieniony.',
226
+    'form_auteur_envoi_mail_confirmation' => 'Mail z potwierdzeniem został wysłany na adres @email@. Prosimy o kliknięcie w link, przesłany w e-mailu aby zatwierdzić adres e-mail.',
227
+    'form_auteur_mail_confirmation' => 'Dzień dobry,
228 228
 
229 229
 Uruchomiłeś procedurę zmiany adresu e-mail.
230 230
 Aby zatwierdzić nowy adres, wystarczy wejść pod podany niżej link,
@@ -232,315 +232,315 @@  discard block
 block discarded – undo
232 232
 
233 233
     @url@
234 234
 ',
235
-	'form_deja_inscrit' => 'Jesteś już zarejestrowany.',
236
-	'form_email_non_valide' => 'Twój adres e-mail nie jest prawidłowy.',
237
-	'form_forum_access_refuse' => 'Nie masz już dostępu do tej strony.',
238
-	'form_forum_bonjour' => 'Witaj @nom@,',
239
-	'form_forum_confirmer_email' => 'Aby zatwierdzić Twój adres e-mail, kliknij w ten link: @url_confirm@',
240
-	'form_forum_email_deja_enregistre' => 'Ten adres e-mail jest już zarejestrowany, wskutek czego nie możesz używać swojego zwykłego hasła.',
241
-	'form_forum_identifiant_mail' => 'Twój nowy identyfikator został właśnie wysłany do Ciebie e-mailem.',
242
-	'form_forum_identifiants' => 'Osobista identyfikacja',
243
-	'form_forum_indiquer_nom_email' => 'Wpisz tutaj swoje nazwisko i adres e-mail. Wkrótce otrzymasz e-mailem swój osobisty identyfikator.',
244
-	'form_forum_login' => 'login:',
245
-	'form_forum_message_auto' => '(to jest wiadomość automatyczna)',
246
-	'form_forum_pass' => 'hasło:',
247
-	'form_forum_probleme_mail' => 'Problem z pocztą: Twój identyfikator nie może zostać wysłany.',
248
-	'form_forum_voici1' => 'Oto Twóje dane, które pozwolą Ci wziąć udział w rozwoju serwisu
235
+    'form_deja_inscrit' => 'Jesteś już zarejestrowany.',
236
+    'form_email_non_valide' => 'Twój adres e-mail nie jest prawidłowy.',
237
+    'form_forum_access_refuse' => 'Nie masz już dostępu do tej strony.',
238
+    'form_forum_bonjour' => 'Witaj @nom@,',
239
+    'form_forum_confirmer_email' => 'Aby zatwierdzić Twój adres e-mail, kliknij w ten link: @url_confirm@',
240
+    'form_forum_email_deja_enregistre' => 'Ten adres e-mail jest już zarejestrowany, wskutek czego nie możesz używać swojego zwykłego hasła.',
241
+    'form_forum_identifiant_mail' => 'Twój nowy identyfikator został właśnie wysłany do Ciebie e-mailem.',
242
+    'form_forum_identifiants' => 'Osobista identyfikacja',
243
+    'form_forum_indiquer_nom_email' => 'Wpisz tutaj swoje nazwisko i adres e-mail. Wkrótce otrzymasz e-mailem swój osobisty identyfikator.',
244
+    'form_forum_login' => 'login:',
245
+    'form_forum_message_auto' => '(to jest wiadomość automatyczna)',
246
+    'form_forum_pass' => 'hasło:',
247
+    'form_forum_probleme_mail' => 'Problem z pocztą: Twój identyfikator nie może zostać wysłany.',
248
+    'form_forum_voici1' => 'Oto Twóje dane, które pozwolą Ci wziąć udział w rozwoju serwisu
249 249
 "@nom_site_spip@" (@adresse_site@):',
250
-	'form_forum_voici2' => 'Oto Twój identyfikator do proponowania artykułów w
250
+    'form_forum_voici2' => 'Oto Twój identyfikator do proponowania artykułów w
251 251
 serwisie "@nom_site_spip@" (@adresse_login@):',
252
-	'form_indiquer_email' => 'Proszę wpisać swój adres e-mail.',
253
-	'form_indiquer_nom' => 'Proszę wpisać swoje nazwisko.',
254
-	'form_indiquer_nom_site' => 'Proszę wpisać nazwę swoich stron\\y.',
255
-	'form_pet_deja_enregistre' => 'Ta strona jest już zarejestrowana',
256
-	'form_pet_signature_pasprise' => 'Twój podpis został zlekceważony.',
257
-	'form_prop_confirmer_envoi' => 'Potwierdź wysłanie',
258
-	'form_prop_description' => 'Opis/komentarz',
259
-	'form_prop_enregistre' => 'Twoja propozycja została zapisana, pojawi się online po jej zatwierdzeniu przez administratora tej strony.',
260
-	'form_prop_envoyer' => 'Wyślij wiadomość',
261
-	'form_prop_indiquer_email' => 'Proszę wpisać prawidłowy adres e-mail',
262
-	'form_prop_indiquer_nom_site' => 'Proszę wpisać nazwę strony.',
263
-	'form_prop_indiquer_sujet' => 'Proszę wpisać temat',
264
-	'form_prop_message_envoye' => 'Wiadomość wysłana',
265
-	'form_prop_non_enregistre' => 'Twoja propozycja nie została zapisana.',
266
-	'form_prop_sujet' => 'Temat',
267
-	'form_prop_url_site' => 'URL stron\\y', # MODIF
268
-	'forum_non_inscrit' => 'Nie jesteś zarejestrowany, lub adres bądź hasło są nieprawidłowe.',
269
-	'forum_par_auteur' => 'wg @auteur@',
270
-	'forum_titre_erreur' => 'Błąd...',
252
+    'form_indiquer_email' => 'Proszę wpisać swój adres e-mail.',
253
+    'form_indiquer_nom' => 'Proszę wpisać swoje nazwisko.',
254
+    'form_indiquer_nom_site' => 'Proszę wpisać nazwę swoich stron\\y.',
255
+    'form_pet_deja_enregistre' => 'Ta strona jest już zarejestrowana',
256
+    'form_pet_signature_pasprise' => 'Twój podpis został zlekceważony.',
257
+    'form_prop_confirmer_envoi' => 'Potwierdź wysłanie',
258
+    'form_prop_description' => 'Opis/komentarz',
259
+    'form_prop_enregistre' => 'Twoja propozycja została zapisana, pojawi się online po jej zatwierdzeniu przez administratora tej strony.',
260
+    'form_prop_envoyer' => 'Wyślij wiadomość',
261
+    'form_prop_indiquer_email' => 'Proszę wpisać prawidłowy adres e-mail',
262
+    'form_prop_indiquer_nom_site' => 'Proszę wpisać nazwę strony.',
263
+    'form_prop_indiquer_sujet' => 'Proszę wpisać temat',
264
+    'form_prop_message_envoye' => 'Wiadomość wysłana',
265
+    'form_prop_non_enregistre' => 'Twoja propozycja nie została zapisana.',
266
+    'form_prop_sujet' => 'Temat',
267
+    'form_prop_url_site' => 'URL stron\\y', # MODIF
268
+    'forum_non_inscrit' => 'Nie jesteś zarejestrowany, lub adres bądź hasło są nieprawidłowe.',
269
+    'forum_par_auteur' => 'wg @auteur@',
270
+    'forum_titre_erreur' => 'Błąd...',
271 271
 
272
-	// I
273
-	'ical_texte_rss_articles' => 'Plik "backend" artykułów tej strony znajduje się pod adresem:',
274
-	'ical_texte_rss_articles2' => 'Możesz również otrzymać pliki "backend" dla artykułów dla każdego z działów strony:',
275
-	'ical_texte_rss_breves' => 'Istnieje także plik zawierający wszystkie newsy opublikowane na stronie. Precyzując numer działu, otrzymasz newsy opublikowane w tym dziale.',
276
-	'icone_a_suivre' => 'Aktualności',
277
-	'icone_admin_site' => 'Administracja strony',
278
-	'icone_agenda' => 'Kalendarz',
279
-	'icone_aide_ligne' => 'Pomoc',
280
-	'icone_articles' => 'Artykuły',
281
-	'icone_auteurs' => 'Autorzy',
282
-	'icone_brouteur' => 'Menu podręczne',
283
-	'icone_configuration_site' => 'Konfiguracja',
284
-	'icone_configurer_site' => 'Konfiguruj swoją stronę',
285
-	'icone_creer_nouvel_auteur' => 'Utwórz nowego autora',
286
-	'icone_creer_rubrique' => 'Utwórz dział',
287
-	'icone_creer_sous_rubrique' => 'Utwórz poddział',
288
-	'icone_deconnecter' => 'Rozłącz',
289
-	'icone_discussions' => 'Dyskusje',
290
-	'icone_doc_rubrique' => 'Załączniki',
291
-	'icone_ecrire_article' => 'Napisz nowy artykuł',
292
-	'icone_edition_site' => 'Edycja',
293
-	'icone_gestion_langues' => 'Zarządzanie językami',
294
-	'icone_informations_personnelles' => 'Informacje osobiste',
295
-	'icone_interface_complet' => 'cały interfejs',
296
-	'icone_interface_simple' => 'Uproszczony interfejs',
297
-	'icone_maintenance_site' => 'Administracja stroną',
298
-	'icone_messagerie_personnelle' => 'Wiadomości prywatne',
299
-	'icone_repartition_debut' => 'Pokaż dystrybucję od początku',
300
-	'icone_rubriques' => 'Działy',
301
-	'icone_sauver_site' => 'Backup strony',
302
-	'icone_site_entier' => 'Cała strona',
303
-	'icone_sites_references' => 'Zlinkowane strony',
304
-	'icone_statistiques' => 'Statystyki strony',
305
-	'icone_suivi_activite' => 'Prace redakcyjne',
306
-	'icone_suivi_actualite' => 'Rozwój strony',
307
-	'icone_suivi_pettions' => 'Śledź/zarządzaj ogłoszeniami',
308
-	'icone_suivi_revisions' => 'Zmiany artykułów',
309
-	'icone_supprimer_document' => 'Usuń ten dokument',
310
-	'icone_supprimer_image' => 'Usuń ten obrazek',
311
-	'icone_tous_articles' => 'Wszystkie Twoje artykuły',
312
-	'icone_tous_auteur' => 'Wszyscy autorzy',
313
-	'icone_tous_visiteur' => 'Wszyscy odwiedzający',
314
-	'icone_visiter_site' => 'Przejdź do Twojego serwisu',
315
-	'icone_voir_en_ligne' => 'Obejrzyj online',
316
-	'img_indisponible' => 'obrazek niedostępny',
317
-	'impossible' => 'niemożliwe',
318
-	'info_a_suivre' => 'KONTYNUUJ »',
319
-	'info_acces_interdit' => 'Dostęp zabroniony',
320
-	'info_acces_refuse' => 'Brak dostępu',
321
-	'info_action' => 'Akcja: @action@',
322
-	'info_administrer_rubriques' => 'Możesz zarządzać tą działami i jej poddziałami',
323
-	'info_adresse_non_indiquee' => 'Nie podałeś adresu testowego!',
324
-	'info_aide' => 'POMOC:',
325
-	'info_ajouter_mot' => 'Dodaj to słowo kluczowe',
326
-	'info_annonce' => 'ZAWIADOMIENIE',
327
-	'info_annonces_generales' => 'Ogólne ogłoszenia:',
328
-	'info_article_propose' => 'Zaproponowany artykuł',
329
-	'info_article_publie' => 'Artykuł opublikowany',
330
-	'info_article_redaction' => 'Artykuł w trakcie tworzenia',
331
-	'info_article_refuse' => 'Artykuł odrzucony',
332
-	'info_article_supprime' => 'Artykuł usunięty',
333
-	'info_articles' => 'Artykuły',
334
-	'info_articles_a_valider' => 'Artykuły do zatwierdzenia',
335
-	'info_articles_nb' => '@nb@ artykułów',
336
-	'info_articles_proposes' => 'Zaproponowane artykuły',
337
-	'info_articles_un' => '1 artykuł',
338
-	'info_auteurs_nombre' => 'autor(zy):',
339
-	'info_authentification_ftp' => 'Uwierzytelnienie (poprzez FTP).',
340
-	'info_breves_2' => 'newsy',
341
-	'info_breves_nb' => '@nb@ newsów',
342
-	'info_connexion_refusee' => 'Brak połączenia',
343
-	'info_contact_developpeur' => 'Proszę skontaktować się z deweloperem.',
344
-	'info_contenance' => 'Ta strona zawiera:',
345
-	'info_contribution' => 'wpisy na forum', # MODIF
346
-	'info_copyright' => '@spip@ - darmowe oprogramowanie dystrybuowane w oparciu o licencję @lien_gpl@.',
347
-	'info_copyright_doc' => 'Więcej informacji na stronie <a href="@spipnet@">http://www.spip.net</a>.', # MODIF
348
-	'info_copyright_gpl' => 'na licencji GPL',
349
-	'info_cours_edition' => 'Twoje artykuły w trakcie redagowania', # MODIF
350
-	'info_creer_repertoire' => 'Utwórz plik lub katalog o nazwie:',
351
-	'info_creer_repertoire_2' => 'w podkatalogu <b>@repertoire@</b>, a następnie:',
352
-	'info_creer_vignette' => 'generowanie miniaturki',
353
-	'info_deplier' => 'Rozwiń',
354
-	'info_descriptif_nombre' => 'opis(y):',
355
-	'info_description' => 'Opis:',
356
-	'info_description_2' => 'Opis:',
357
-	'info_dimension' => 'Rozmiar:',
358
-	'info_ecire_message_prive' => 'Napisz prywatną wiadomość',
359
-	'info_email_invalide' => 'Nieprawidłowy adres e-mail.',
360
-	'info_en_cours_validation' => 'Twoje artykuły są w trakcie redagowania',
361
-	'info_en_ligne' => 'Teraz online:',
362
-	'info_envoyer_message_prive' => 'Wyślij prywatną wiadomość do tego autora',
363
-	'info_erreur_requete' => 'Błąd zapytania :',
364
-	'info_erreur_squelette2' => 'Żaden szkielet <b>@fichier@</b> nie jest dostępny ...',
365
-	'info_erreur_systeme' => 'Błąd systemu (errno @errsys@)',
366
-	'info_erreur_systeme2' => 'Albo dysk twardy jest pełny albo uszkodzona jest baza danych.<br />
272
+    // I
273
+    'ical_texte_rss_articles' => 'Plik "backend" artykułów tej strony znajduje się pod adresem:',
274
+    'ical_texte_rss_articles2' => 'Możesz również otrzymać pliki "backend" dla artykułów dla każdego z działów strony:',
275
+    'ical_texte_rss_breves' => 'Istnieje także plik zawierający wszystkie newsy opublikowane na stronie. Precyzując numer działu, otrzymasz newsy opublikowane w tym dziale.',
276
+    'icone_a_suivre' => 'Aktualności',
277
+    'icone_admin_site' => 'Administracja strony',
278
+    'icone_agenda' => 'Kalendarz',
279
+    'icone_aide_ligne' => 'Pomoc',
280
+    'icone_articles' => 'Artykuły',
281
+    'icone_auteurs' => 'Autorzy',
282
+    'icone_brouteur' => 'Menu podręczne',
283
+    'icone_configuration_site' => 'Konfiguracja',
284
+    'icone_configurer_site' => 'Konfiguruj swoją stronę',
285
+    'icone_creer_nouvel_auteur' => 'Utwórz nowego autora',
286
+    'icone_creer_rubrique' => 'Utwórz dział',
287
+    'icone_creer_sous_rubrique' => 'Utwórz poddział',
288
+    'icone_deconnecter' => 'Rozłącz',
289
+    'icone_discussions' => 'Dyskusje',
290
+    'icone_doc_rubrique' => 'Załączniki',
291
+    'icone_ecrire_article' => 'Napisz nowy artykuł',
292
+    'icone_edition_site' => 'Edycja',
293
+    'icone_gestion_langues' => 'Zarządzanie językami',
294
+    'icone_informations_personnelles' => 'Informacje osobiste',
295
+    'icone_interface_complet' => 'cały interfejs',
296
+    'icone_interface_simple' => 'Uproszczony interfejs',
297
+    'icone_maintenance_site' => 'Administracja stroną',
298
+    'icone_messagerie_personnelle' => 'Wiadomości prywatne',
299
+    'icone_repartition_debut' => 'Pokaż dystrybucję od początku',
300
+    'icone_rubriques' => 'Działy',
301
+    'icone_sauver_site' => 'Backup strony',
302
+    'icone_site_entier' => 'Cała strona',
303
+    'icone_sites_references' => 'Zlinkowane strony',
304
+    'icone_statistiques' => 'Statystyki strony',
305
+    'icone_suivi_activite' => 'Prace redakcyjne',
306
+    'icone_suivi_actualite' => 'Rozwój strony',
307
+    'icone_suivi_pettions' => 'Śledź/zarządzaj ogłoszeniami',
308
+    'icone_suivi_revisions' => 'Zmiany artykułów',
309
+    'icone_supprimer_document' => 'Usuń ten dokument',
310
+    'icone_supprimer_image' => 'Usuń ten obrazek',
311
+    'icone_tous_articles' => 'Wszystkie Twoje artykuły',
312
+    'icone_tous_auteur' => 'Wszyscy autorzy',
313
+    'icone_tous_visiteur' => 'Wszyscy odwiedzający',
314
+    'icone_visiter_site' => 'Przejdź do Twojego serwisu',
315
+    'icone_voir_en_ligne' => 'Obejrzyj online',
316
+    'img_indisponible' => 'obrazek niedostępny',
317
+    'impossible' => 'niemożliwe',
318
+    'info_a_suivre' => 'KONTYNUUJ »',
319
+    'info_acces_interdit' => 'Dostęp zabroniony',
320
+    'info_acces_refuse' => 'Brak dostępu',
321
+    'info_action' => 'Akcja: @action@',
322
+    'info_administrer_rubriques' => 'Możesz zarządzać tą działami i jej poddziałami',
323
+    'info_adresse_non_indiquee' => 'Nie podałeś adresu testowego!',
324
+    'info_aide' => 'POMOC:',
325
+    'info_ajouter_mot' => 'Dodaj to słowo kluczowe',
326
+    'info_annonce' => 'ZAWIADOMIENIE',
327
+    'info_annonces_generales' => 'Ogólne ogłoszenia:',
328
+    'info_article_propose' => 'Zaproponowany artykuł',
329
+    'info_article_publie' => 'Artykuł opublikowany',
330
+    'info_article_redaction' => 'Artykuł w trakcie tworzenia',
331
+    'info_article_refuse' => 'Artykuł odrzucony',
332
+    'info_article_supprime' => 'Artykuł usunięty',
333
+    'info_articles' => 'Artykuły',
334
+    'info_articles_a_valider' => 'Artykuły do zatwierdzenia',
335
+    'info_articles_nb' => '@nb@ artykułów',
336
+    'info_articles_proposes' => 'Zaproponowane artykuły',
337
+    'info_articles_un' => '1 artykuł',
338
+    'info_auteurs_nombre' => 'autor(zy):',
339
+    'info_authentification_ftp' => 'Uwierzytelnienie (poprzez FTP).',
340
+    'info_breves_2' => 'newsy',
341
+    'info_breves_nb' => '@nb@ newsów',
342
+    'info_connexion_refusee' => 'Brak połączenia',
343
+    'info_contact_developpeur' => 'Proszę skontaktować się z deweloperem.',
344
+    'info_contenance' => 'Ta strona zawiera:',
345
+    'info_contribution' => 'wpisy na forum', # MODIF
346
+    'info_copyright' => '@spip@ - darmowe oprogramowanie dystrybuowane w oparciu o licencję @lien_gpl@.',
347
+    'info_copyright_doc' => 'Więcej informacji na stronie <a href="@spipnet@">http://www.spip.net</a>.', # MODIF
348
+    'info_copyright_gpl' => 'na licencji GPL',
349
+    'info_cours_edition' => 'Twoje artykuły w trakcie redagowania', # MODIF
350
+    'info_creer_repertoire' => 'Utwórz plik lub katalog o nazwie:',
351
+    'info_creer_repertoire_2' => 'w podkatalogu <b>@repertoire@</b>, a następnie:',
352
+    'info_creer_vignette' => 'generowanie miniaturki',
353
+    'info_deplier' => 'Rozwiń',
354
+    'info_descriptif_nombre' => 'opis(y):',
355
+    'info_description' => 'Opis:',
356
+    'info_description_2' => 'Opis:',
357
+    'info_dimension' => 'Rozmiar:',
358
+    'info_ecire_message_prive' => 'Napisz prywatną wiadomość',
359
+    'info_email_invalide' => 'Nieprawidłowy adres e-mail.',
360
+    'info_en_cours_validation' => 'Twoje artykuły są w trakcie redagowania',
361
+    'info_en_ligne' => 'Teraz online:',
362
+    'info_envoyer_message_prive' => 'Wyślij prywatną wiadomość do tego autora',
363
+    'info_erreur_requete' => 'Błąd zapytania :',
364
+    'info_erreur_squelette2' => 'Żaden szkielet <b>@fichier@</b> nie jest dostępny ...',
365
+    'info_erreur_systeme' => 'Błąd systemu (errno @errsys@)',
366
+    'info_erreur_systeme2' => 'Albo dysk twardy jest pełny albo uszkodzona jest baza danych.<br />
367 367
 <span style="color:red;">Spróbuj <a href=\'@script@\'>naprawić bazę danych</a>, lub skontaktuj się z administratorem serwera.</span>',
368
-	'info_fini' => 'Zakończono!',
369
-	'info_format_image' => 'Formaty plików obrazków, które mogą być używane do tworzenia minitaturek : @gd_formats@.',
370
-	'info_format_non_defini' => 'format niezdefiniowany',
371
-	'info_grand_ecran' => 'Cały ekran',
372
-	'info_image_aide' => 'POMOC',
373
-	'info_image_process_titre' => 'Sposób generowania miniaturek',
374
-	'info_impossible_lire_page' => '<b>Błąd !</b> Nie można odczytać strony<tt><html>@test_proxy@</html></tt> za pośrednictwem proxy<tt>',
375
-	'info_installation_systeme_publication' => 'Instalacja systemu publikacji...',
376
-	'info_installer_documents' => 'Możesz automatycznie dodawać wszystkie dokumenty znajdujące się w folderze @upload@.',
377
-	'info_installer_ftp' => 'Jako administrator możesz umieszczać (przez FTP) pliki w folderze @upload@, aby później wybierać je bezpośrednio stąd.',
378
-	'info_installer_images' => 'Możesz umieszczać obrazki w formatach JPEG, GIF i PNG.',
379
-	'info_installer_images_dossier' => 'Umieść obrazki w folderze @upload@ aby móc je stąd wybierać.',
380
-	'info_interface_complete' => 'cały interfejs',
381
-	'info_interface_simple' => 'Uproszczony interfejs',
382
-	'info_joindre_document_article' => 'Do tego artykułu możesz załączać dokumenty typu',
383
-	'info_joindre_document_rubrique' => 'Do tego działu możesz dodawać dokumenty typu',
384
-	'info_joindre_documents_article' => 'Do swojego atykułu możesz załączać dokumenty typu:',
385
-	'info_l_article' => 'artykuł',
386
-	'info_la_breve' => 'news',
387
-	'info_la_rubrique' => 'dział',
388
-	'info_langue_principale' => 'Język głównej strony',
389
-	'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ pikseli',
390
-	'info_les_auteurs_1' => 'wg @les_auteurs@',
391
-	'info_logo_format_interdit' => 'Dla logo dozwolone są następujące formaty: @formats@.',
392
-	'info_logo_max_poids' => 'Logo może mieć maksymalnie @maxi@ (teraz ma @actuel@).',
393
-	'info_mail_fournisseur' => '[email protected]',
394
-	'info_message_2' => 'WIADOMOŚĆ',
395
-	'info_message_supprime' => 'WIADOMOŚĆ USUNIĘTA',
396
-	'info_mise_en_ligne' => 'Data publikacji online:',
397
-	'info_modification_parametres_securite' => 'modyfikacja parametrów bezpieczeństwa',
398
-	'info_mois_courant' => 'Bieżący miesiąc:',
399
-	'info_mot_cle_ajoute' => 'Następujące słowo kluczowe dodane zostało do',
400
-	'info_multi_herit' => 'Język domyślny',
401
-	'info_multi_langues_soulignees' => '<u>Podkreślonie języka</u> świadczy o kompletnym przekładzie wszystkich tekstów interfejsu. Jeśli wybierzesz jeden z tych języków, elementy serwisu (daty, formularze) zostaną automatycznie przetłumaczone. W przypadku języków nie-podkreślonych, elementy te ukażą się w głównym języku serwisu.', # MODIF
402
-	'info_multilinguisme' => 'Wielojęzyczny',
403
-	'info_nom_non_utilisateurs_connectes' => 'Twoja nazwa nie pojawia się na liście podłączonych użytkowników.',
404
-	'info_nom_utilisateurs_connectes' => 'Twoje imię występuje na liście podłączonych użytkowników.',
405
-	'info_nombre_en_ligne' => 'Teraz online:',
406
-	'info_non_resultat' => 'Żadnych wyników dla "@cherche_mot@"',
407
-	'info_non_utilisation_messagerie' => 'Nie korzystasz z wewnętrznej komunikacji tego serwisu.',
408
-	'info_nouveau_message' => 'MASZ NOWĄ WIADOMOŚĆ',
409
-	'info_nouveaux_messages' => 'MASZ @total_messages@ NOWYCH WIADOMOŚCI',
410
-	'info_numero_abbreviation' => 'N° ',
411
-	'info_pense_bete' => 'NOTATKA',
412
-	'info_petit_ecran' => 'Małe okno',
413
-	'info_pixels' => 'piksele',
414
-	'info_plusieurs_mots_trouves' => 'Kilkanaście słów kluczowych zostało znalezionych dla "@cherche_mot@":',
415
-	'info_portfolio_automatique' => 'Automatyczne portfolio:',
416
-	'info_premier_resultat' => '[@debut_limit@ pierwsze wyniki z @total@]',
417
-	'info_premier_resultat_sur' => '[@debut_limit@ pierwsze wyniki z @total@]',
418
-	'info_propose_1' => '[@nom_site_spip@] Zatwierdza: @titre@',
419
-	'info_propose_2' => 'Artykuły zatwierdzone
368
+    'info_fini' => 'Zakończono!',
369
+    'info_format_image' => 'Formaty plików obrazków, które mogą być używane do tworzenia minitaturek : @gd_formats@.',
370
+    'info_format_non_defini' => 'format niezdefiniowany',
371
+    'info_grand_ecran' => 'Cały ekran',
372
+    'info_image_aide' => 'POMOC',
373
+    'info_image_process_titre' => 'Sposób generowania miniaturek',
374
+    'info_impossible_lire_page' => '<b>Błąd !</b> Nie można odczytać strony<tt><html>@test_proxy@</html></tt> za pośrednictwem proxy<tt>',
375
+    'info_installation_systeme_publication' => 'Instalacja systemu publikacji...',
376
+    'info_installer_documents' => 'Możesz automatycznie dodawać wszystkie dokumenty znajdujące się w folderze @upload@.',
377
+    'info_installer_ftp' => 'Jako administrator możesz umieszczać (przez FTP) pliki w folderze @upload@, aby później wybierać je bezpośrednio stąd.',
378
+    'info_installer_images' => 'Możesz umieszczać obrazki w formatach JPEG, GIF i PNG.',
379
+    'info_installer_images_dossier' => 'Umieść obrazki w folderze @upload@ aby móc je stąd wybierać.',
380
+    'info_interface_complete' => 'cały interfejs',
381
+    'info_interface_simple' => 'Uproszczony interfejs',
382
+    'info_joindre_document_article' => 'Do tego artykułu możesz załączać dokumenty typu',
383
+    'info_joindre_document_rubrique' => 'Do tego działu możesz dodawać dokumenty typu',
384
+    'info_joindre_documents_article' => 'Do swojego atykułu możesz załączać dokumenty typu:',
385
+    'info_l_article' => 'artykuł',
386
+    'info_la_breve' => 'news',
387
+    'info_la_rubrique' => 'dział',
388
+    'info_langue_principale' => 'Język głównej strony',
389
+    'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ pikseli',
390
+    'info_les_auteurs_1' => 'wg @les_auteurs@',
391
+    'info_logo_format_interdit' => 'Dla logo dozwolone są następujące formaty: @formats@.',
392
+    'info_logo_max_poids' => 'Logo może mieć maksymalnie @maxi@ (teraz ma @actuel@).',
393
+    'info_mail_fournisseur' => '[email protected]',
394
+    'info_message_2' => 'WIADOMOŚĆ',
395
+    'info_message_supprime' => 'WIADOMOŚĆ USUNIĘTA',
396
+    'info_mise_en_ligne' => 'Data publikacji online:',
397
+    'info_modification_parametres_securite' => 'modyfikacja parametrów bezpieczeństwa',
398
+    'info_mois_courant' => 'Bieżący miesiąc:',
399
+    'info_mot_cle_ajoute' => 'Następujące słowo kluczowe dodane zostało do',
400
+    'info_multi_herit' => 'Język domyślny',
401
+    'info_multi_langues_soulignees' => '<u>Podkreślonie języka</u> świadczy o kompletnym przekładzie wszystkich tekstów interfejsu. Jeśli wybierzesz jeden z tych języków, elementy serwisu (daty, formularze) zostaną automatycznie przetłumaczone. W przypadku języków nie-podkreślonych, elementy te ukażą się w głównym języku serwisu.', # MODIF
402
+    'info_multilinguisme' => 'Wielojęzyczny',
403
+    'info_nom_non_utilisateurs_connectes' => 'Twoja nazwa nie pojawia się na liście podłączonych użytkowników.',
404
+    'info_nom_utilisateurs_connectes' => 'Twoje imię występuje na liście podłączonych użytkowników.',
405
+    'info_nombre_en_ligne' => 'Teraz online:',
406
+    'info_non_resultat' => 'Żadnych wyników dla "@cherche_mot@"',
407
+    'info_non_utilisation_messagerie' => 'Nie korzystasz z wewnętrznej komunikacji tego serwisu.',
408
+    'info_nouveau_message' => 'MASZ NOWĄ WIADOMOŚĆ',
409
+    'info_nouveaux_messages' => 'MASZ @total_messages@ NOWYCH WIADOMOŚCI',
410
+    'info_numero_abbreviation' => 'N° ',
411
+    'info_pense_bete' => 'NOTATKA',
412
+    'info_petit_ecran' => 'Małe okno',
413
+    'info_pixels' => 'piksele',
414
+    'info_plusieurs_mots_trouves' => 'Kilkanaście słów kluczowych zostało znalezionych dla "@cherche_mot@":',
415
+    'info_portfolio_automatique' => 'Automatyczne portfolio:',
416
+    'info_premier_resultat' => '[@debut_limit@ pierwsze wyniki z @total@]',
417
+    'info_premier_resultat_sur' => '[@debut_limit@ pierwsze wyniki z @total@]',
418
+    'info_propose_1' => '[@nom_site_spip@] Zatwierdza: @titre@',
419
+    'info_propose_2' => 'Artykuły zatwierdzone
420 420
 -----------------',
421
-	'info_propose_3' => 'Artykuł "@titre@" został zatwierdzony do publikacji.',
422
-	'info_propose_4' => 'Zostałeś zaproszony do przeglądu i wyrażenia swojej opinii',
423
-	'info_propose_5' => 'w forum, które jest przyporządkowane. Jest ono dostępne pod adresem :',
424
-	'info_publie_01' => 'Artykuł "@titre@" został zatwierdzony przez @connect_nom@.',
425
-	'info_publie_1' => '[@nom_site_spip@] PUBLIKUJE: @titre@',
426
-	'info_publie_2' => 'Artykuł opublikowany
421
+    'info_propose_3' => 'Artykuł "@titre@" został zatwierdzony do publikacji.',
422
+    'info_propose_4' => 'Zostałeś zaproszony do przeglądu i wyrażenia swojej opinii',
423
+    'info_propose_5' => 'w forum, które jest przyporządkowane. Jest ono dostępne pod adresem :',
424
+    'info_publie_01' => 'Artykuł "@titre@" został zatwierdzony przez @connect_nom@.',
425
+    'info_publie_1' => '[@nom_site_spip@] PUBLIKUJE: @titre@',
426
+    'info_publie_2' => 'Artykuł opublikowany
427 427
 -----------------',
428
-	'info_rechercher' => 'Szukaj',
429
-	'info_rechercher_02' => 'Szukaj:',
430
-	'info_remplacer_vignette' => 'Zamień domyślną miniaturkę na wybrane przez ciebie logo :',
431
-	'info_sans_titre_2' => 'bez tytułu',
432
-	'info_selectionner_fichier' => 'Możesz wybrać plik z folderu @upload@',
433
-	'info_selectionner_fichier_2' => 'Wybierz plik:',
434
-	'info_supprimer_vignette' => 'usuń winietę',
435
-	'info_symbole_bleu' => 'Symbol <b>niebieski</b> oznacza  <b>notatkę</b>: n.p. wiadomość do prywatnego użytku.',
436
-	'info_symbole_jaune' => 'Symbol <b>żółty</b> oznacza <b>zawiadomienie dla wszystkich redaktorów</b>: może być opublikowana przez wszystkich administratorów, i jest widoczna dla wszystkich redaktorów.',
437
-	'info_symbole_vert' => 'Symbol <b>zielony</b> oznacza <b>wiadomości wymieniane z innymi użytkownikami</b> strony.',
438
-	'info_telecharger_nouveau_logo' => 'Załaduj nowe logo:',
439
-	'info_telecharger_ordinateur' => 'Załaduj ze swojego komputera:',
440
-	'info_tous_resultats_enregistres' => '[wszystkie wyniki są zapisane]',
441
-	'info_tout_afficher' => 'Pokaż wszystko',
442
-	'info_travaux_texte' => 'Ten serwis nie jest jeszcze skonfigurowany. Zapraszamy później...',
443
-	'info_travaux_titre' => 'Strona w trakcie budowy',
444
-	'info_trop_resultat' => 'Zbyt dużo rezultatów "@cherche_mot@" ; spróbuj sprecyzować kryteria wyszukiwania.',
445
-	'info_utilisation_messagerie_interne' => 'Używasz wewnętrznej poczty w tym serwisie.',
446
-	'info_valider_lien' => 'zatwierdź ten link',
447
-	'info_verifier_image' => ', proszę się upewnić, czy obrazki zostały przesłane prawidłowo.',
448
-	'info_vignette_defaut' => 'Domyślna winieta',
449
-	'info_vignette_personnalisee' => 'Miniaturka spersonalizowana',
450
-	'info_visite' => 'odwiedziny:',
451
-	'info_vos_rendez_vous' => 'Twoje przyszłe spotkania',
452
-	'infos_vos_pense_bete' => 'Twoje notatki', # MODIF
428
+    'info_rechercher' => 'Szukaj',
429
+    'info_rechercher_02' => 'Szukaj:',
430
+    'info_remplacer_vignette' => 'Zamień domyślną miniaturkę na wybrane przez ciebie logo :',
431
+    'info_sans_titre_2' => 'bez tytułu',
432
+    'info_selectionner_fichier' => 'Możesz wybrać plik z folderu @upload@',
433
+    'info_selectionner_fichier_2' => 'Wybierz plik:',
434
+    'info_supprimer_vignette' => 'usuń winietę',
435
+    'info_symbole_bleu' => 'Symbol <b>niebieski</b> oznacza  <b>notatkę</b>: n.p. wiadomość do prywatnego użytku.',
436
+    'info_symbole_jaune' => 'Symbol <b>żółty</b> oznacza <b>zawiadomienie dla wszystkich redaktorów</b>: może być opublikowana przez wszystkich administratorów, i jest widoczna dla wszystkich redaktorów.',
437
+    'info_symbole_vert' => 'Symbol <b>zielony</b> oznacza <b>wiadomości wymieniane z innymi użytkownikami</b> strony.',
438
+    'info_telecharger_nouveau_logo' => 'Załaduj nowe logo:',
439
+    'info_telecharger_ordinateur' => 'Załaduj ze swojego komputera:',
440
+    'info_tous_resultats_enregistres' => '[wszystkie wyniki są zapisane]',
441
+    'info_tout_afficher' => 'Pokaż wszystko',
442
+    'info_travaux_texte' => 'Ten serwis nie jest jeszcze skonfigurowany. Zapraszamy później...',
443
+    'info_travaux_titre' => 'Strona w trakcie budowy',
444
+    'info_trop_resultat' => 'Zbyt dużo rezultatów "@cherche_mot@" ; spróbuj sprecyzować kryteria wyszukiwania.',
445
+    'info_utilisation_messagerie_interne' => 'Używasz wewnętrznej poczty w tym serwisie.',
446
+    'info_valider_lien' => 'zatwierdź ten link',
447
+    'info_verifier_image' => ', proszę się upewnić, czy obrazki zostały przesłane prawidłowo.',
448
+    'info_vignette_defaut' => 'Domyślna winieta',
449
+    'info_vignette_personnalisee' => 'Miniaturka spersonalizowana',
450
+    'info_visite' => 'odwiedziny:',
451
+    'info_vos_rendez_vous' => 'Twoje przyszłe spotkania',
452
+    'infos_vos_pense_bete' => 'Twoje notatki', # MODIF
453 453
 
454
-	// L
455
-	'lien_afficher_icones_seuls' => 'Pokazuj tylko ikonki',
456
-	'lien_afficher_texte_icones' => 'POkazuj ikonki i tekst',
457
-	'lien_afficher_texte_seul' => 'Pokazuj tylko tekst',
458
-	'lien_liberer' => 'uwolnij',
459
-	'lien_liberer_tous' => 'uwolnij artykuły', # MODIF
460
-	'lien_nouvea_pense_bete' => 'NOWA NOTATKA',
461
-	'lien_nouveau_message' => 'NOWA WIADOMOŚĆ',
462
-	'lien_nouvelle_annonce' => 'NOWE ZAWIADOMIENIE',
463
-	'lien_petitions' => 'OGŁOSZENIE',
464
-	'lien_popularite' => 'popularność: @popularite@%',
465
-	'lien_racine_site' => 'RDZEŃ STRONY',
466
-	'lien_reessayer' => 'spróbuj ponownie',
467
-	'lien_repondre_message' => 'Odpowiedz na tę wiadomość',
468
-	'lien_supprimer' => 'usuń',
469
-	'lien_tout_afficher' => 'Pokaż wszystko',
470
-	'lien_visite_site' => 'odwiedź stronę',
471
-	'lien_visites' => '@visites@ odwiedzin',
472
-	'lien_voir_auteur' => 'Sprawdź autora',
473
-	'ligne' => 'Linia',
474
-	'login' => 'Połączenie',
475
-	'login_acces_prive' => 'dostęp do obszaru prywatnego',
476
-	'login_autre_identifiant' => 'zaloguj używając innego loginu',
477
-	'login_cookie_accepte' => 'Zmień ustawienia Twojej przeglądarki, aby je akceptowała (przynajmniej dla tej strony).',
478
-	'login_cookie_oblige' => 'Aby móc zalogować się bezpiecznie do tej strony, musicie zaakceptować cookies.',
479
-	'login_deconnexion_ok' => 'Rozłączanie zakończono.',
480
-	'login_erreur_pass' => 'Błąd hasła.',
481
-	'login_espace_prive' => 'obszar prywatny',
482
-	'login_identifiant_inconnu' => 'Login « @login@ » nieznany.',
483
-	'login_login' => 'Login:',
484
-	'login_login2' => 'Login (identyfikator) :', # MODIF
485
-	'login_login_pass_incorrect' => '(Zły login lub hasło).',
486
-	'login_motpasseoublie' => 'zapomniałeś hasła?',
487
-	'login_non_securise' => 'Uwaga ten formularz nie jest bezpieczny.
454
+    // L
455
+    'lien_afficher_icones_seuls' => 'Pokazuj tylko ikonki',
456
+    'lien_afficher_texte_icones' => 'POkazuj ikonki i tekst',
457
+    'lien_afficher_texte_seul' => 'Pokazuj tylko tekst',
458
+    'lien_liberer' => 'uwolnij',
459
+    'lien_liberer_tous' => 'uwolnij artykuły', # MODIF
460
+    'lien_nouvea_pense_bete' => 'NOWA NOTATKA',
461
+    'lien_nouveau_message' => 'NOWA WIADOMOŚĆ',
462
+    'lien_nouvelle_annonce' => 'NOWE ZAWIADOMIENIE',
463
+    'lien_petitions' => 'OGŁOSZENIE',
464
+    'lien_popularite' => 'popularność: @popularite@%',
465
+    'lien_racine_site' => 'RDZEŃ STRONY',
466
+    'lien_reessayer' => 'spróbuj ponownie',
467
+    'lien_repondre_message' => 'Odpowiedz na tę wiadomość',
468
+    'lien_supprimer' => 'usuń',
469
+    'lien_tout_afficher' => 'Pokaż wszystko',
470
+    'lien_visite_site' => 'odwiedź stronę',
471
+    'lien_visites' => '@visites@ odwiedzin',
472
+    'lien_voir_auteur' => 'Sprawdź autora',
473
+    'ligne' => 'Linia',
474
+    'login' => 'Połączenie',
475
+    'login_acces_prive' => 'dostęp do obszaru prywatnego',
476
+    'login_autre_identifiant' => 'zaloguj używając innego loginu',
477
+    'login_cookie_accepte' => 'Zmień ustawienia Twojej przeglądarki, aby je akceptowała (przynajmniej dla tej strony).',
478
+    'login_cookie_oblige' => 'Aby móc zalogować się bezpiecznie do tej strony, musicie zaakceptować cookies.',
479
+    'login_deconnexion_ok' => 'Rozłączanie zakończono.',
480
+    'login_erreur_pass' => 'Błąd hasła.',
481
+    'login_espace_prive' => 'obszar prywatny',
482
+    'login_identifiant_inconnu' => 'Login « @login@ » nieznany.',
483
+    'login_login' => 'Login:',
484
+    'login_login2' => 'Login (identyfikator) :', # MODIF
485
+    'login_login_pass_incorrect' => '(Zły login lub hasło).',
486
+    'login_motpasseoublie' => 'zapomniałeś hasła?',
487
+    'login_non_securise' => 'Uwaga ten formularz nie jest bezpieczny.
488 488
    Jeśli nie chcesz aby Twoje hasło zostało przechwycone w sieci
489 489
    , włącz JavaScript w Twojej przeglądarce i',
490
-	'login_nouvelle_tentative' => 'Nowa próba',
491
-	'login_par_ici' => 'Jesteś zarejestrowany... tędy...',
492
-	'login_pass2' => 'Hasło:',
493
-	'login_preferez_refuser' => '<b>Jeśli wolisz nie korzystać z cookies</b>, jest inna (mniej bezpieczna) metoda do dyspozycji :',
494
-	'login_recharger' => 'przeładuj stronę',
495
-	'login_rester_identifie' => 'Pozostań zalogowany kilka dni', # MODIF
496
-	'login_retour_public' => 'Powrót do strony publicznej',
497
-	'login_retour_site' => 'Powrót do strony publicznej',
498
-	'login_retoursitepublic' => 'Powrót do strony publicznej',
499
-	'login_sinscrire' => 'rejestracja', # MODIF
500
-	'login_test_navigateur' => 'test przeglądarki/łącz ponownie',
501
-	'login_verifiez_navigateur' => '(Sprawdź czy Twoja przeglądarka nie zapamiętała hasła...)',
490
+    'login_nouvelle_tentative' => 'Nowa próba',
491
+    'login_par_ici' => 'Jesteś zarejestrowany... tędy...',
492
+    'login_pass2' => 'Hasło:',
493
+    'login_preferez_refuser' => '<b>Jeśli wolisz nie korzystać z cookies</b>, jest inna (mniej bezpieczna) metoda do dyspozycji :',
494
+    'login_recharger' => 'przeładuj stronę',
495
+    'login_rester_identifie' => 'Pozostań zalogowany kilka dni', # MODIF
496
+    'login_retour_public' => 'Powrót do strony publicznej',
497
+    'login_retour_site' => 'Powrót do strony publicznej',
498
+    'login_retoursitepublic' => 'Powrót do strony publicznej',
499
+    'login_sinscrire' => 'rejestracja', # MODIF
500
+    'login_test_navigateur' => 'test przeglądarki/łącz ponownie',
501
+    'login_verifiez_navigateur' => '(Sprawdź czy Twoja przeglądarka nie zapamiętała hasła...)',
502 502
 
503
-	// M
504
-	'masquer_trad' => 'ukryj tlumaczenia',
505
-	'module_fichiers_langues' => 'Pliki językowe',
503
+    // M
504
+    'masquer_trad' => 'ukryj tlumaczenia',
505
+    'module_fichiers_langues' => 'Pliki językowe',
506 506
 
507
-	// N
508
-	'navigateur_pas_redirige' => 'Jeśli twoja przeglądarka cię nie przekierowała, kliknij tutaj, żeby kontynuować.',
509
-	'numero' => 'Numer',
507
+    // N
508
+    'navigateur_pas_redirige' => 'Jeśli twoja przeglądarka cię nie przekierowała, kliknij tutaj, żeby kontynuować.',
509
+    'numero' => 'Numer',
510 510
 
511
-	// O
512
-	'occurence' => 'Wystąpienie',
513
-	'onglet_affacer_base' => 'Usuń bazę danych',
514
-	'onglet_auteur' => 'Autor',
515
-	'onglet_contenu_site' => 'Zawartość strony',
516
-	'onglet_evolution_visite_mod' => 'Ewolucja',
517
-	'onglet_fonctions_avances' => 'Funkcje zaawansowane',
518
-	'onglet_informations_personnelles' => 'Informacje osobiste',
519
-	'onglet_interactivite' => 'Interaktywność',
520
-	'onglet_messagerie' => 'Wiadomości',
521
-	'onglet_repartition_rubrique' => 'Rozłożenie działów',
522
-	'onglet_save_restaur_base' => 'Backup/zapisywanie bazy danych',
523
-	'onglet_vider_cache' => 'Opróżnij cache',
511
+    // O
512
+    'occurence' => 'Wystąpienie',
513
+    'onglet_affacer_base' => 'Usuń bazę danych',
514
+    'onglet_auteur' => 'Autor',
515
+    'onglet_contenu_site' => 'Zawartość strony',
516
+    'onglet_evolution_visite_mod' => 'Ewolucja',
517
+    'onglet_fonctions_avances' => 'Funkcje zaawansowane',
518
+    'onglet_informations_personnelles' => 'Informacje osobiste',
519
+    'onglet_interactivite' => 'Interaktywność',
520
+    'onglet_messagerie' => 'Wiadomości',
521
+    'onglet_repartition_rubrique' => 'Rozłożenie działów',
522
+    'onglet_save_restaur_base' => 'Backup/zapisywanie bazy danych',
523
+    'onglet_vider_cache' => 'Opróżnij cache',
524 524
 
525
-	// P
526
-	'pass_choix_pass' => 'Proszę wybrać swoje nowe hasło:',
527
-	'pass_erreur' => 'Błąd',
528
-	'pass_erreur_acces_refuse' => '<b>Błąd:</b> nie masz już dostępu do tej strony.',
529
-	'pass_erreur_code_inconnu' => '<b>Błąd :</b> ten kod nie odpowiada, żadnemu z użytkowników, którzy mają dostęp do tej strony.',
530
-	'pass_erreur_non_enregistre' => '<b>Błąd :</b> adres <tt>@email_oubli@</tt> nie jest zarejestrowany na tej stronie.',
531
-	'pass_erreur_non_valide' => '<b>Błąd :</b> e-mail <tt>@email_oubli@</tt> nie jest prawidłowy!',
532
-	'pass_erreur_probleme_technique' => '<b>Bład :</b> e-mail nie mógł być wysłany z powodu problemów technicznych.',
533
-	'pass_espace_prive_bla' => 'Strefa prywatna tego serwisu jest dostęna
525
+    // P
526
+    'pass_choix_pass' => 'Proszę wybrać swoje nowe hasło:',
527
+    'pass_erreur' => 'Błąd',
528
+    'pass_erreur_acces_refuse' => '<b>Błąd:</b> nie masz już dostępu do tej strony.',
529
+    'pass_erreur_code_inconnu' => '<b>Błąd :</b> ten kod nie odpowiada, żadnemu z użytkowników, którzy mają dostęp do tej strony.',
530
+    'pass_erreur_non_enregistre' => '<b>Błąd :</b> adres <tt>@email_oubli@</tt> nie jest zarejestrowany na tej stronie.',
531
+    'pass_erreur_non_valide' => '<b>Błąd :</b> e-mail <tt>@email_oubli@</tt> nie jest prawidłowy!',
532
+    'pass_erreur_probleme_technique' => '<b>Bład :</b> e-mail nie mógł być wysłany z powodu problemów technicznych.',
533
+    'pass_espace_prive_bla' => 'Strefa prywatna tego serwisu jest dostęna
534 534
   dla zapisanych użytkowników. Jako zarejestrowany użytkownik,
535 535
   będziesz mógł czytać artykuły, które są w trakcie redagowania,
536 536
   proponować artykuły i brać udział w dyskusjach na forum.',
537
-	'pass_forum_bla' => 'Chcesz wziąć udział w forum
537
+    'pass_forum_bla' => 'Chcesz wziąć udział w forum
538 538
   zarezerwowanym dla zarejestrowanych użytkowników.',
539
-	'pass_indiquez_cidessous' => 'Wpisz poniżej adres e-mail pod jakim
539
+    'pass_indiquez_cidessous' => 'Wpisz poniżej adres e-mail pod jakim
540 540
 byłeś zarejestrowany poprzednio.
541 541
 Otrzymasz e-maila wyjaśniającego jak
542 542
 możesz odzyskać swój dostęp.',
543
-	'pass_mail_passcookie' => '(to jest automatyczna wiadomość)
543
+    'pass_mail_passcookie' => '(to jest automatyczna wiadomość)
544 544
 
545 545
 Aby odzyskać dostęp do strony
546 546
 @nom_site_spip@ (@adresse_site@)
@@ -552,128 +552,128 @@  discard block
 block discarded – undo
552 552
 Po wpisaniu nowego hasła
553 553
 można ponownie połączyć się ze stroną.
554 554
 ',
555
-	'pass_mot_oublie' => 'Zapomniane hasło',
556
-	'pass_nouveau_enregistre' => 'Twoje nowe hasło zostało zapisane.',
557
-	'pass_nouveau_pass' => 'Nowe hasło',
558
-	'pass_ok' => 'OK',
559
-	'pass_oubli_mot' => 'Zapomnienie hasła',
560
-	'pass_quitter_fenetre' => 'Zamknij okno',
561
-	'pass_rappel_login' => 'Przypomnienie : twój identyfikator (login) to « @login@ ».',
562
-	'pass_recevoir_mail' => 'Otrzymasz e-mail wyjaśniający jak możesz odzyskać dostęp do strony.', # MODIF
563
-	'pass_retour_public' => 'Powrót do strony publicznej',
564
-	'pass_rien_a_faire_ici' => 'Nie ma tu nic do zrobienia.',
565
-	'pass_vousinscrire' => 'Zapisaś się w tym serwisie',
566
-	'precedent' => 'poprzedni',
567
-	'previsualisation' => 'Podgląd',
568
-	'previsualiser' => 'Włącz podgląd',
555
+    'pass_mot_oublie' => 'Zapomniane hasło',
556
+    'pass_nouveau_enregistre' => 'Twoje nowe hasło zostało zapisane.',
557
+    'pass_nouveau_pass' => 'Nowe hasło',
558
+    'pass_ok' => 'OK',
559
+    'pass_oubli_mot' => 'Zapomnienie hasła',
560
+    'pass_quitter_fenetre' => 'Zamknij okno',
561
+    'pass_rappel_login' => 'Przypomnienie : twój identyfikator (login) to « @login@ ».',
562
+    'pass_recevoir_mail' => 'Otrzymasz e-mail wyjaśniający jak możesz odzyskać dostęp do strony.', # MODIF
563
+    'pass_retour_public' => 'Powrót do strony publicznej',
564
+    'pass_rien_a_faire_ici' => 'Nie ma tu nic do zrobienia.',
565
+    'pass_vousinscrire' => 'Zapisaś się w tym serwisie',
566
+    'precedent' => 'poprzedni',
567
+    'previsualisation' => 'Podgląd',
568
+    'previsualiser' => 'Włącz podgląd',
569 569
 
570
-	// R
571
-	'retour' => 'Powrót',
570
+    // R
571
+    'retour' => 'Powrót',
572 572
 
573
-	// S
574
-	'spip_conforme_dtd' => 'SPIP uznaje ten dokument za zgodny z jego DOCTYPE :',
575
-	'squelette' => 'szkielet',
576
-	'squelette_inclus_ligne' => 'szkielet zainkludowany, linia',
577
-	'squelette_ligne' => 'szkielet, linia',
578
-	'stats_visites_et_popularite' => '@visites@ odwiedzin; popularność: @popularite@',
579
-	'suivant' => 'następny',
573
+    // S
574
+    'spip_conforme_dtd' => 'SPIP uznaje ten dokument za zgodny z jego DOCTYPE :',
575
+    'squelette' => 'szkielet',
576
+    'squelette_inclus_ligne' => 'szkielet zainkludowany, linia',
577
+    'squelette_ligne' => 'szkielet, linia',
578
+    'stats_visites_et_popularite' => '@visites@ odwiedzin; popularność: @popularite@',
579
+    'suivant' => 'następny',
580 580
 
581
-	// T
582
-	'taille_ko' => '@taille@ kb',
583
-	'taille_mo' => '@taille@ Mb',
584
-	'taille_octets' => '@taille@ bytes',
585
-	'taille_octets_bi' => '@taille@ bytes',
586
-	'texte_actualite_site_1' => 'Kiedy poznasz interfejs, kliknij na «',
587
-	'texte_actualite_site_2' => 'kompletny interfejs',
588
-	'texte_actualite_site_3' => '» aby uruchomić więcej możliwości.',
589
-	'texte_creation_automatique_vignette' => 'W tym serwisie, uruchomione jest generowanie minitaurek.Jeśli instalujecie za pośrednictwem tego formularza pliki graficzne w formatach @gd_formats@, zostaną one uzupełnione o minitaurkę, o miniaturkę w wielkości maksymalnej: @taille_preview@ pixels.',
590
-	'texte_documents_associes' => 'Następujące dokumenty są związane z artykułem,
581
+    // T
582
+    'taille_ko' => '@taille@ kb',
583
+    'taille_mo' => '@taille@ Mb',
584
+    'taille_octets' => '@taille@ bytes',
585
+    'taille_octets_bi' => '@taille@ bytes',
586
+    'texte_actualite_site_1' => 'Kiedy poznasz interfejs, kliknij na «',
587
+    'texte_actualite_site_2' => 'kompletny interfejs',
588
+    'texte_actualite_site_3' => '» aby uruchomić więcej możliwości.',
589
+    'texte_creation_automatique_vignette' => 'W tym serwisie, uruchomione jest generowanie minitaurek.Jeśli instalujecie za pośrednictwem tego formularza pliki graficzne w formatach @gd_formats@, zostaną one uzupełnione o minitaurkę, o miniaturkę w wielkości maksymalnej: @taille_preview@ pixels.',
590
+    'texte_documents_associes' => 'Następujące dokumenty są związane z artykułem,
591 591
     ale nie zostały bezpośrednio do niego
592 592
     dołączone. Zależnie od układu stron publicznych,
593 593
     będę mogły pojawić się na nich jako załączniki.',
594
-	'texte_erreur_mise_niveau_base' => 'Błąd bazy danych zaistniały w trakcie uaktualniania.
594
+    'texte_erreur_mise_niveau_base' => 'Błąd bazy danych zaistniały w trakcie uaktualniania.
595 595
   Obrazek <b>@fichier@</b> nie przeszedł (artykuł @id_article@).
596 596
   Zapisz te dane, i spróbuj ponownego uaktualnienia,
597 597
 a następnie sprawdź czy obrazki pojawiają się zawsze w artykułach.',
598
-	'texte_erreur_visiteur' => 'Próbujesz dostać się do panelu administracyjnego za pomocą loginu, który na to nie pozwala.',
599
-	'texte_inc_auth_1' => 'Jesteś zalogowany za pomocą
598
+    'texte_erreur_visiteur' => 'Próbujesz dostać się do panelu administracyjnego za pomocą loginu, który na to nie pozwala.',
599
+    'texte_inc_auth_1' => 'Jesteś zalogowany za pomocą
600 600
   loginu <b>@auth_login@</b>, ale nie istnieje on (już) w bazie danych. 
601 601
   Spróbuj się', # MODIF
602
-	'texte_inc_auth_2' => 'połączyć',
603
-	'texte_inc_auth_3' => ', opuszczjąc ewentualnie przeglądarkę
602
+    'texte_inc_auth_2' => 'połączyć',
603
+    'texte_inc_auth_3' => ', opuszczjąc ewentualnie przeglądarkę
604 604
   i włączając ją na powrót.',
605
-	'texte_inc_config' => 'Zmiany dokonane na tych stronach znacząco wpłyną na
605
+    'texte_inc_config' => 'Zmiany dokonane na tych stronach znacząco wpłyną na
606 606
  funkcjonowanie Twojego serwisu. Radzimy nie zatwierdzać tych zmian do momentu, w którym nie będziecie
607 607
  dobrze obeznani z funkcjonowaniem systemu SPIP. <br /><br /><b>Najbardziej
608 608
  zalecamy, poproszenie o dokonanie zmian głównego adminsitratora serwisu.</b>',
609
-	'texte_inc_meta_1' => 'System nie może zapisać plików <code>@fichier@</code>. Jako administrator strony,',
610
-	'texte_inc_meta_2' => 'sprawdź pozwolenia zapisu',
611
-	'texte_inc_meta_3' => 'dla katalogu <code>@repertoire@</code>.',
612
-	'texte_statut_en_cours_redaction' => 'redakcja w toku',
613
-	'texte_statut_poubelle' => 'do kosza',
614
-	'texte_statut_propose_evaluation' => 'zaproponowany do oceny',
615
-	'texte_statut_publie' => 'opublikowany online',
616
-	'texte_statut_refuse' => 'odrzucony',
617
-	'titre_ajouter_mot_cle' => 'DODAJ SŁOWO KLUCZOWE:',
618
-	'titre_cadre_raccourcis' => 'SKRÓTY :',
619
-	'titre_changer_couleur_interface' => 'Zmiana koloru interfejsu',
620
-	'titre_image_admin_article' => 'Możesz edytować ten artykuł',
621
-	'titre_image_administrateur' => 'Administrator',
622
-	'titre_image_aide' => 'Pomoc do tego elementu',
623
-	'titre_image_auteur_supprime' => 'Autor usunięty',
624
-	'titre_image_redacteur' => 'Redaktor bez dostępu',
625
-	'titre_image_redacteur_02' => 'Redaktor',
626
-	'titre_image_visiteur' => 'Odwiedzający',
627
-	'titre_joindre_document' => 'ZAŁĄCZ DOKUMENT',
628
-	'titre_mots_cles' => 'SŁOWA KLUCZOWE',
629
-	'titre_probleme_technique' => 'Uwaga: problem techniczny (serwer SQL) blokuje dostęp do tej części strony. Dziękujemy za zrozumienie.',
630
-	'titre_publier_document' => 'PUBLIKUJ DOKUMENT W TYM DZIALE',
631
-	'titre_statistiques' => 'Statystyki strony',
632
-	'titre_titre_document' => 'Tytuł dokumentu:',
633
-	'trad_reference' => '(artykuł wzorcowy)', # MODIF
609
+    'texte_inc_meta_1' => 'System nie może zapisać plików <code>@fichier@</code>. Jako administrator strony,',
610
+    'texte_inc_meta_2' => 'sprawdź pozwolenia zapisu',
611
+    'texte_inc_meta_3' => 'dla katalogu <code>@repertoire@</code>.',
612
+    'texte_statut_en_cours_redaction' => 'redakcja w toku',
613
+    'texte_statut_poubelle' => 'do kosza',
614
+    'texte_statut_propose_evaluation' => 'zaproponowany do oceny',
615
+    'texte_statut_publie' => 'opublikowany online',
616
+    'texte_statut_refuse' => 'odrzucony',
617
+    'titre_ajouter_mot_cle' => 'DODAJ SŁOWO KLUCZOWE:',
618
+    'titre_cadre_raccourcis' => 'SKRÓTY :',
619
+    'titre_changer_couleur_interface' => 'Zmiana koloru interfejsu',
620
+    'titre_image_admin_article' => 'Możesz edytować ten artykuł',
621
+    'titre_image_administrateur' => 'Administrator',
622
+    'titre_image_aide' => 'Pomoc do tego elementu',
623
+    'titre_image_auteur_supprime' => 'Autor usunięty',
624
+    'titre_image_redacteur' => 'Redaktor bez dostępu',
625
+    'titre_image_redacteur_02' => 'Redaktor',
626
+    'titre_image_visiteur' => 'Odwiedzający',
627
+    'titre_joindre_document' => 'ZAŁĄCZ DOKUMENT',
628
+    'titre_mots_cles' => 'SŁOWA KLUCZOWE',
629
+    'titre_probleme_technique' => 'Uwaga: problem techniczny (serwer SQL) blokuje dostęp do tej części strony. Dziękujemy za zrozumienie.',
630
+    'titre_publier_document' => 'PUBLIKUJ DOKUMENT W TYM DZIALE',
631
+    'titre_statistiques' => 'Statystyki strony',
632
+    'titre_titre_document' => 'Tytuł dokumentu:',
633
+    'trad_reference' => '(artykuł wzorcowy)', # MODIF
634 634
 
635
-	// Z
636
-	'zbug_balise_b_aval' => ' : balise B en aval',
637
-	'zbug_balise_inexistante' => 'erreur @from@: la balise #@balise@ n’existe pas', # MODIF
638
-	'zbug_boucle' => 'pętla',
639
-	'zbug_boucle_recursive_undef' => 'pętla rekursywna nie została zdefiniowana', # MODIF
640
-	'zbug_champ_hors_boucle' => 'Pole @champ@ jest bez pętli',
641
-	'zbug_champ_hors_motif' => 'Pole @champ@ jest poza pętlą @motif@', # MODIF
642
-	'zbug_code' => 'kod',
643
-	'zbug_critere_inconnu' => 'nieznane kryterium @critere@', # MODIF
644
-	'zbug_distant_interdit' => 'operacja niedozwolona w zewnętrznej bazie', # MODIF
645
-	'zbug_doublon_table_sans_cle_primaire' => 'doublons sur une table sans clef primaire atomique', # MODIF
646
-	'zbug_doublon_table_sans_index' => 'podwójny wpis w tablicy bez indeksu', # MODIF
647
-	'zbug_erreur_boucle_double' => 'BOUCLE@id@: podwójna definicja', # MODIF
648
-	'zbug_erreur_boucle_fermant' => 'BOUCLE@id@: brakuje znacznika zamykającego', # MODIF
649
-	'zbug_erreur_boucle_syntaxe' => 'Składnia pętli (boucle) nieprawidłowa', # MODIF
650
-	'zbug_erreur_compilation' => 'Błąd kompilacji',
651
-	'zbug_erreur_execution_page' => 'błąd w wykonaniu strony', # MODIF
652
-	'zbug_erreur_filtre' => 'Błąd : filtr <b>« @filtre@ »</b> nie zdefiniowany', # MODIF
653
-	'zbug_erreur_meme_parent' => '{meme_parent} stosuje się wyłącznie do pętli (FORUMS) i (RUBRIQUES)', # MODIF
654
-	'zbug_erreur_squelette' => 'Błąd (błędy) w szkielecie',
655
-	'zbug_info_erreur_squelette' => 'Błąd na stronie',
656
-	'zbug_inversion_ordre_inexistant' => 'odwrócenie nieistniejącego uporządkowania', # MODIF
657
-	'zbug_pagination_sans_critere' => '#PAGINATION bez kryterium {pagination} lub użyta w pętli rekursywnej', # MODIF
658
-	'zbug_parametres_inclus_incorrects' => 'Złe parametry załączenia (include)', # MODIF
659
-	'zbug_profile' => 'Czas przeliczania: @time@',
660
-	'zbug_resultat' => 'wynik',
661
-	'zbug_serveur_indefini' => 'serwer SQL niezdefiniowany', # MODIF
662
-	'zbug_table_inconnue' => 'Tabela SQL « @table@ » nieznana',
663
-	'zxml_connus_attributs' => 'znane atrybuty',
664
-	'zxml_de' => 'z',
665
-	'zxml_inconnu_attribut' => 'atrybut nieznany',
666
-	'zxml_inconnu_balise' => 'znacznik nieznany',
667
-	'zxml_inconnu_entite' => 'nieznana wartość',
668
-	'zxml_inconnu_id' => 'ID nieznany',
669
-	'zxml_mais_de' => 'ale z',
670
-	'zxml_non_conforme' => 'nie jest zgodny',
671
-	'zxml_non_fils' => 'nie jest z',
672
-	'zxml_nonvide_balise' => 'znacznik nie jest pusty',
673
-	'zxml_obligatoire_attribut' => 'nieobecny atrybut obowiązkowy',
674
-	'zxml_succession_fils_incorrecte' => 'niepoprawne dziedziczenie',
675
-	'zxml_survoler' => 'najedź wskaźnikiem aby zobaczyć poprawne',
676
-	'zxml_valeur_attribut' => 'wartość artybutu',
677
-	'zxml_vide_balise' => 'pusty znacznik',
678
-	'zxml_vu' => 'widziany wcześniej',
635
+    // Z
636
+    'zbug_balise_b_aval' => ' : balise B en aval',
637
+    'zbug_balise_inexistante' => 'erreur @from@: la balise #@balise@ n’existe pas', # MODIF
638
+    'zbug_boucle' => 'pętla',
639
+    'zbug_boucle_recursive_undef' => 'pętla rekursywna nie została zdefiniowana', # MODIF
640
+    'zbug_champ_hors_boucle' => 'Pole @champ@ jest bez pętli',
641
+    'zbug_champ_hors_motif' => 'Pole @champ@ jest poza pętlą @motif@', # MODIF
642
+    'zbug_code' => 'kod',
643
+    'zbug_critere_inconnu' => 'nieznane kryterium @critere@', # MODIF
644
+    'zbug_distant_interdit' => 'operacja niedozwolona w zewnętrznej bazie', # MODIF
645
+    'zbug_doublon_table_sans_cle_primaire' => 'doublons sur une table sans clef primaire atomique', # MODIF
646
+    'zbug_doublon_table_sans_index' => 'podwójny wpis w tablicy bez indeksu', # MODIF
647
+    'zbug_erreur_boucle_double' => 'BOUCLE@id@: podwójna definicja', # MODIF
648
+    'zbug_erreur_boucle_fermant' => 'BOUCLE@id@: brakuje znacznika zamykającego', # MODIF
649
+    'zbug_erreur_boucle_syntaxe' => 'Składnia pętli (boucle) nieprawidłowa', # MODIF
650
+    'zbug_erreur_compilation' => 'Błąd kompilacji',
651
+    'zbug_erreur_execution_page' => 'błąd w wykonaniu strony', # MODIF
652
+    'zbug_erreur_filtre' => 'Błąd : filtr <b>« @filtre@ »</b> nie zdefiniowany', # MODIF
653
+    'zbug_erreur_meme_parent' => '{meme_parent} stosuje się wyłącznie do pętli (FORUMS) i (RUBRIQUES)', # MODIF
654
+    'zbug_erreur_squelette' => 'Błąd (błędy) w szkielecie',
655
+    'zbug_info_erreur_squelette' => 'Błąd na stronie',
656
+    'zbug_inversion_ordre_inexistant' => 'odwrócenie nieistniejącego uporządkowania', # MODIF
657
+    'zbug_pagination_sans_critere' => '#PAGINATION bez kryterium {pagination} lub użyta w pętli rekursywnej', # MODIF
658
+    'zbug_parametres_inclus_incorrects' => 'Złe parametry załączenia (include)', # MODIF
659
+    'zbug_profile' => 'Czas przeliczania: @time@',
660
+    'zbug_resultat' => 'wynik',
661
+    'zbug_serveur_indefini' => 'serwer SQL niezdefiniowany', # MODIF
662
+    'zbug_table_inconnue' => 'Tabela SQL « @table@ » nieznana',
663
+    'zxml_connus_attributs' => 'znane atrybuty',
664
+    'zxml_de' => 'z',
665
+    'zxml_inconnu_attribut' => 'atrybut nieznany',
666
+    'zxml_inconnu_balise' => 'znacznik nieznany',
667
+    'zxml_inconnu_entite' => 'nieznana wartość',
668
+    'zxml_inconnu_id' => 'ID nieznany',
669
+    'zxml_mais_de' => 'ale z',
670
+    'zxml_non_conforme' => 'nie jest zgodny',
671
+    'zxml_non_fils' => 'nie jest z',
672
+    'zxml_nonvide_balise' => 'znacznik nie jest pusty',
673
+    'zxml_obligatoire_attribut' => 'nieobecny atrybut obowiązkowy',
674
+    'zxml_succession_fils_incorrecte' => 'niepoprawne dziedziczenie',
675
+    'zxml_survoler' => 'najedź wskaźnikiem aby zobaczyć poprawne',
676
+    'zxml_valeur_attribut' => 'wartość artybutu',
677
+    'zxml_vide_balise' => 'pusty znacznik',
678
+    'zxml_vu' => 'widziany wcześniej',
679 679
 ];
Please login to merge, or discard this patch.
ecrire/lang/public_id.php 1 patch
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -5,100 +5,100 @@
 block discarded – undo
5 5
 
6 6
 return [
7 7
 
8
-	// A
9
-	'accueil_site' => 'Halaman Depan', # MODIF
10
-	'articles' => 'Artikel-artikel',
11
-	'articles_auteur' => 'Artikel-artikel penulis ini',
12
-	'articles_populaires' => 'Artikel-artikel yang paling banyak dibaca',
13
-	'articles_rubrique' => 'Artikel-artikel bagian ini',
14
-	'aucun_article' => 'Tidak ada artikel di alamat ini',
15
-	'aucun_auteur' => 'Tidak ada penulis di alamat ini',
16
-	'aucun_site' => 'Tidak ada situs di alamat ini',
17
-	'aucune_breve' => 'Tidak ada berita di alamat ini',
18
-	'aucune_rubrique' => 'Tidak ada bagian di alamat ini',
19
-	'autres_breves' => 'Berita lainnya',
20
-	'autres_groupes_mots_clefs' => 'Kelompok-kelompok kata kunci lainnya',
21
-	'autres_sites' => 'Situs-situs lainnya',
8
+    // A
9
+    'accueil_site' => 'Halaman Depan', # MODIF
10
+    'articles' => 'Artikel-artikel',
11
+    'articles_auteur' => 'Artikel-artikel penulis ini',
12
+    'articles_populaires' => 'Artikel-artikel yang paling banyak dibaca',
13
+    'articles_rubrique' => 'Artikel-artikel bagian ini',
14
+    'aucun_article' => 'Tidak ada artikel di alamat ini',
15
+    'aucun_auteur' => 'Tidak ada penulis di alamat ini',
16
+    'aucun_site' => 'Tidak ada situs di alamat ini',
17
+    'aucune_breve' => 'Tidak ada berita di alamat ini',
18
+    'aucune_rubrique' => 'Tidak ada bagian di alamat ini',
19
+    'autres_breves' => 'Berita lainnya',
20
+    'autres_groupes_mots_clefs' => 'Kelompok-kelompok kata kunci lainnya',
21
+    'autres_sites' => 'Situs-situs lainnya',
22 22
 
23
-	// B
24
-	'bonjour' => 'Halo',
23
+    // B
24
+    'bonjour' => 'Halo',
25 25
 
26
-	// C
27
-	'commenter_site' => 'Komentar di situs ini',
26
+    // C
27
+    'commenter_site' => 'Komentar di situs ini',
28 28
 
29
-	// D
30
-	'date' => 'Tanggal',
31
-	'dernier_ajout' => 'Penambahan terbaru',
32
-	'dernieres_breves' => 'Berita terbaru',
33
-	'derniers_articles' => 'Artikel-artikel terbaru',
34
-	'derniers_commentaires' => 'Komentar-komentar terbaru',
35
-	'derniers_messages_forum' => 'Pesan-pesan terbaru yang dipublikasikan di forum ini',
29
+    // D
30
+    'date' => 'Tanggal',
31
+    'dernier_ajout' => 'Penambahan terbaru',
32
+    'dernieres_breves' => 'Berita terbaru',
33
+    'derniers_articles' => 'Artikel-artikel terbaru',
34
+    'derniers_commentaires' => 'Komentar-komentar terbaru',
35
+    'derniers_messages_forum' => 'Pesan-pesan terbaru yang dipublikasikan di forum ini',
36 36
 
37
-	// E
38
-	'edition_mode_texte' => 'Tampilan teks saja',
39
-	'en_reponse' => 'Membalas kepada:',
40
-	'en_resume' => 'Ringkasan',
41
-	'envoyer_message' => 'Untuk mengirimkan sebuah pesan',
42
-	'espace_prive' => 'Area pribadi',
37
+    // E
38
+    'edition_mode_texte' => 'Tampilan teks saja',
39
+    'en_reponse' => 'Membalas kepada:',
40
+    'en_resume' => 'Ringkasan',
41
+    'envoyer_message' => 'Untuk mengirimkan sebuah pesan',
42
+    'espace_prive' => 'Area pribadi',
43 43
 
44
-	// H
45
-	'hierarchie_site' => 'Hirarki situs',
44
+    // H
45
+    'hierarchie_site' => 'Hirarki situs',
46 46
 
47
-	// J
48
-	'jours' => 'hari',
47
+    // J
48
+    'jours' => 'hari',
49 49
 
50
-	// M
51
-	'meme_auteur' => 'Oleh penulis yang sama',
52
-	'meme_rubrique' => 'Dalam bagian yang sama',
53
-	'memes_auteurs' => 'Oleh penulis-penulis yang sama',
54
-	'message' => 'Pesan',
55
-	'messages_forum' => 'Pesan-pesan forum', # MODIF
56
-	'messages_recents' => 'Pesan-pesan forum terbaru',
57
-	'mots_clefs' => 'Kata-kata kunci',
58
-	'mots_clefs_meme_groupe' => 'Kata-kata kunci dalam kelompok yang sama',
50
+    // M
51
+    'meme_auteur' => 'Oleh penulis yang sama',
52
+    'meme_rubrique' => 'Dalam bagian yang sama',
53
+    'memes_auteurs' => 'Oleh penulis-penulis yang sama',
54
+    'message' => 'Pesan',
55
+    'messages_forum' => 'Pesan-pesan forum', # MODIF
56
+    'messages_recents' => 'Pesan-pesan forum terbaru',
57
+    'mots_clefs' => 'Kata-kata kunci',
58
+    'mots_clefs_meme_groupe' => 'Kata-kata kunci dalam kelompok yang sama',
59 59
 
60
-	// N
61
-	'navigation' => 'Navigasi',
62
-	'nom' => 'Nama',
63
-	'nouveautes' => 'Yang terbaru',
64
-	'nouveautes_web' => 'Yang terbaru di dunia Web',
65
-	'nouveaux_articles' => 'Artikel-artikel baru',
66
-	'nouvelles_breves' => 'Berita-berita baru',
60
+    // N
61
+    'navigation' => 'Navigasi',
62
+    'nom' => 'Nama',
63
+    'nouveautes' => 'Yang terbaru',
64
+    'nouveautes_web' => 'Yang terbaru di dunia Web',
65
+    'nouveaux_articles' => 'Artikel-artikel baru',
66
+    'nouvelles_breves' => 'Berita-berita baru',
67 67
 
68
-	// P
69
-	'page_precedente' => 'halaman sebelumnya',
70
-	'page_suivante' => 'halaman selanjutnya',
71
-	'par_auteur' => 'oleh ',
72
-	'participer_site' => 'Anda dapat berpartisipasi secara aktif di situs web ini dan menulis artikel anda sendiri dengan sebelumnya mendaftarkan diri di bawah ini. Anda akan menerima segera sebuah e-mail yang berisikan kode akses ke area pribadi situs ini.',
73
-	'plan_site' => 'Peta Situs',
74
-	'popularite' => 'Popularitas',
75
-	'poster_message' => 'Untuk mengirimkan sebuah pesan',
76
-	'proposer_site' => 'Anda dapat merekomendasikan sebuah situs untuk ditambahkan ke dalam bagian ini:',
68
+    // P
69
+    'page_precedente' => 'halaman sebelumnya',
70
+    'page_suivante' => 'halaman selanjutnya',
71
+    'par_auteur' => 'oleh ',
72
+    'participer_site' => 'Anda dapat berpartisipasi secara aktif di situs web ini dan menulis artikel anda sendiri dengan sebelumnya mendaftarkan diri di bawah ini. Anda akan menerima segera sebuah e-mail yang berisikan kode akses ke area pribadi situs ini.',
73
+    'plan_site' => 'Peta Situs',
74
+    'popularite' => 'Popularitas',
75
+    'poster_message' => 'Untuk mengirimkan sebuah pesan',
76
+    'proposer_site' => 'Anda dapat merekomendasikan sebuah situs untuk ditambahkan ke dalam bagian ini:',
77 77
 
78
-	// R
79
-	'repondre_article' => 'Balasan pada artikel ini',
80
-	'repondre_breve' => 'Balasan pada artikel berita ini',
81
-	'resultats_recherche' => 'Hasil pencarian',
82
-	'retour_debut_forums' => 'Kembali ke awal forum',
83
-	'rubrique' => 'Bagian',
84
-	'rubriques' => 'Bagian',
78
+    // R
79
+    'repondre_article' => 'Balasan pada artikel ini',
80
+    'repondre_breve' => 'Balasan pada artikel berita ini',
81
+    'resultats_recherche' => 'Hasil pencarian',
82
+    'retour_debut_forums' => 'Kembali ke awal forum',
83
+    'rubrique' => 'Bagian',
84
+    'rubriques' => 'Bagian',
85 85
 
86
-	// S
87
-	'signatures_petition' => 'Tanda tangan',
88
-	'site_realise_avec_spip' => 'Situs dibuat dengan SPIP',
89
-	'sites_web' => 'Situs-situs web',
90
-	'sous_rubriques' => 'Sub-sub bagian',
91
-	'suite' => 'lanjut',
92
-	'sur_web' => 'Di Web',
93
-	'syndiquer_rubrique' => 'Sindikasi bagian ini',
94
-	'syndiquer_site' => 'Sindikasi seluruh isi situs',
86
+    // S
87
+    'signatures_petition' => 'Tanda tangan',
88
+    'site_realise_avec_spip' => 'Situs dibuat dengan SPIP',
89
+    'sites_web' => 'Situs-situs web',
90
+    'sous_rubriques' => 'Sub-sub bagian',
91
+    'suite' => 'lanjut',
92
+    'sur_web' => 'Di Web',
93
+    'syndiquer_rubrique' => 'Sindikasi bagian ini',
94
+    'syndiquer_site' => 'Sindikasi seluruh isi situs',
95 95
 
96
-	// T
97
-	'texte_lettre_information' => 'Berikut adalah laporan berkala situs',
98
-	'texte_lettre_information_2' => 'Laporan ini memberikan ringkasan artikel-artikel dan berita-berita yang dipublikasikan sejak', # MODIF
96
+    // T
97
+    'texte_lettre_information' => 'Berikut adalah laporan berkala situs',
98
+    'texte_lettre_information_2' => 'Laporan ini memberikan ringkasan artikel-artikel dan berita-berita yang dipublikasikan sejak', # MODIF
99 99
 
100
-	// V
101
-	'ver_imprimer' => 'Versi cetak',
102
-	'voir_en_ligne' => 'Lihat secara online',
103
-	'voir_squelette' => 'ٍTampilkan templat halaman ini',
100
+    // V
101
+    'ver_imprimer' => 'Versi cetak',
102
+    'voir_en_ligne' => 'Lihat secara online',
103
+    'voir_squelette' => 'ٍTampilkan templat halaman ini',
104 104
 ];
Please login to merge, or discard this patch.
ecrire/lang/ecrire_oc_prv.php 1 patch
Indentation   +521 added lines, -521 removed lines patch added patch discarded remove patch
@@ -5,484 +5,484 @@  discard block
 block discarded – undo
5 5
 
6 6
 return [
7 7
 
8
-	// A
9
-	'activer_plugin' => 'Activar l’ajuston',
10
-	'aide_non_disponible' => 'Aquela part de l’ajuda en linha es pas encara disponibla per aquesta lenga.',
11
-	'auteur' => 'Autor :',
12
-	'avis_acces_interdit' => 'Accès proïbit.',
13
-	'avis_article_modifie' => 'Atencion, @nom_auteur_modif@ a trabalhat sus aquel article fa @date_diff@ minutas',
14
-	'avis_aucun_resultat' => 'Ges de resultat.',
15
-	'avis_chemin_invalide_1' => 'Lo camin qu’avètz chausit',
16
-	'avis_chemin_invalide_2' => 'sembla pas valid. Vougatz tornar a la pagina anteriora per verificar leis informacions fornidas.',
17
-	'avis_connexion_echec_1' => 'La connexion au servidor SQL s’es encalada.', # MODIF
18
-	'avis_connexion_echec_2' => 'Tornatz a la pagina anteriora, e verificatz leis informacions qu’avètz fornidas.',
19
-	'avis_connexion_echec_3' => '<b>N.B.</b> Sus fòrça servidors, devètz <b>demandar</b> qu’activen vòstre accès a la basa SQL avans de la poder utilizar. Se vos podètz pas connectar, verificatz qu’agatz ben realizat aqueu procediment.', # MODIF
20
-	'avis_connexion_ldap_echec_1' => 'La connexion au servidor LDAP s’es encalada.',
21
-	'avis_connexion_ldap_echec_2' => 'Tornatz a la pagina anteriora, e verificatz leis informacions qu’avètz fornidas. ',
22
-	'avis_connexion_ldap_echec_3' => 'Alternativament, utilizetz pas lo supòrt LDAP per importar d’utilizaires.',
23
-	'avis_deplacement_rubrique' => 'Atention! Aquela rubrica conten @contient_breves@ brèvas@scb@: se la desplaçatz, voudretz ben oscar aquela casa de confirmacion.',
24
-	'avis_erreur_connexion_mysql' => 'Error de connexion SQL',
25
-	'avis_espace_interdit' => '<b>Espaci proïbit</b><p>SPIP es ja installat.', # MODIF
26
-	'avis_lecture_noms_bases_1' => 'Lo programa d’installacion a pas pogut legir lei noms dei basas de donadas installadas.',
27
-	'avis_lecture_noms_bases_2' => 'Siá ges de basa es disponibla, siá la foncion que permet d’entierar lei basas es estada desactivada per de rasons de seguretat (aquò’s lo cas en cò de mai d’un aubergador).',
28
-	'avis_lecture_noms_bases_3' => 'Dins la segonda alternativa, es probable qu’una basa que pòrta vòstre nom de login siá utilizabla:',
29
-	'avis_non_acces_page' => 'Podètz pas accedir a aquela pagina.',
30
-	'avis_operation_echec' => 'L’operacion s’es encalada.',
31
-	'avis_suppression_base' => 'ATENCION, suprimir lei donadas es irreversible',
8
+    // A
9
+    'activer_plugin' => 'Activar l’ajuston',
10
+    'aide_non_disponible' => 'Aquela part de l’ajuda en linha es pas encara disponibla per aquesta lenga.',
11
+    'auteur' => 'Autor :',
12
+    'avis_acces_interdit' => 'Accès proïbit.',
13
+    'avis_article_modifie' => 'Atencion, @nom_auteur_modif@ a trabalhat sus aquel article fa @date_diff@ minutas',
14
+    'avis_aucun_resultat' => 'Ges de resultat.',
15
+    'avis_chemin_invalide_1' => 'Lo camin qu’avètz chausit',
16
+    'avis_chemin_invalide_2' => 'sembla pas valid. Vougatz tornar a la pagina anteriora per verificar leis informacions fornidas.',
17
+    'avis_connexion_echec_1' => 'La connexion au servidor SQL s’es encalada.', # MODIF
18
+    'avis_connexion_echec_2' => 'Tornatz a la pagina anteriora, e verificatz leis informacions qu’avètz fornidas.',
19
+    'avis_connexion_echec_3' => '<b>N.B.</b> Sus fòrça servidors, devètz <b>demandar</b> qu’activen vòstre accès a la basa SQL avans de la poder utilizar. Se vos podètz pas connectar, verificatz qu’agatz ben realizat aqueu procediment.', # MODIF
20
+    'avis_connexion_ldap_echec_1' => 'La connexion au servidor LDAP s’es encalada.',
21
+    'avis_connexion_ldap_echec_2' => 'Tornatz a la pagina anteriora, e verificatz leis informacions qu’avètz fornidas. ',
22
+    'avis_connexion_ldap_echec_3' => 'Alternativament, utilizetz pas lo supòrt LDAP per importar d’utilizaires.',
23
+    'avis_deplacement_rubrique' => 'Atention! Aquela rubrica conten @contient_breves@ brèvas@scb@: se la desplaçatz, voudretz ben oscar aquela casa de confirmacion.',
24
+    'avis_erreur_connexion_mysql' => 'Error de connexion SQL',
25
+    'avis_espace_interdit' => '<b>Espaci proïbit</b><p>SPIP es ja installat.', # MODIF
26
+    'avis_lecture_noms_bases_1' => 'Lo programa d’installacion a pas pogut legir lei noms dei basas de donadas installadas.',
27
+    'avis_lecture_noms_bases_2' => 'Siá ges de basa es disponibla, siá la foncion que permet d’entierar lei basas es estada desactivada per de rasons de seguretat (aquò’s lo cas en cò de mai d’un aubergador).',
28
+    'avis_lecture_noms_bases_3' => 'Dins la segonda alternativa, es probable qu’una basa que pòrta vòstre nom de login siá utilizabla:',
29
+    'avis_non_acces_page' => 'Podètz pas accedir a aquela pagina.',
30
+    'avis_operation_echec' => 'L’operacion s’es encalada.',
31
+    'avis_suppression_base' => 'ATENCION, suprimir lei donadas es irreversible',
32 32
 
33
-	// B
34
-	'bouton_acces_ldap' => 'Apondre l’accès a LDAP >>',
35
-	'bouton_ajouter' => 'Apondre',
36
-	'bouton_demande_publication' => 'Demandar la publicacion d’aquest article',
37
-	'bouton_desactive_tout' => 'Desactivar tot',
38
-	'bouton_effacer_tout' => 'O escafar tot',
39
-	'bouton_envoyer_message' => 'Messatge definitiu: mandar',
40
-	'bouton_modifier' => 'Modificar',
41
-	'bouton_radio_afficher' => 'Afichar',
42
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Afichar dins la tiera dei redactors connectats',
43
-	'bouton_radio_envoi_annonces_adresse' => 'Mandar leis anoncis a l’adreiça:',
44
-	'bouton_radio_envoi_liste_nouveautes' => 'Mandar la tiera dei novetats',
45
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Pas aparéisser dins la tiera dei redactors',
46
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Pas mandar d’anoncis editoriaus',
47
-	'bouton_redirection' => 'TORNAR DIRIGIR',
48
-	'bouton_relancer_installation' => 'Tornar lançar l’installacion',
49
-	'bouton_suivant' => 'Seguent',
50
-	'bouton_tenter_recuperation' => 'Assajar de reparar',
51
-	'bouton_test_proxy' => 'Assajar lo proxy',
52
-	'bouton_vider_cache' => 'Vujar l’escondedor',
33
+    // B
34
+    'bouton_acces_ldap' => 'Apondre l’accès a LDAP >>',
35
+    'bouton_ajouter' => 'Apondre',
36
+    'bouton_demande_publication' => 'Demandar la publicacion d’aquest article',
37
+    'bouton_desactive_tout' => 'Desactivar tot',
38
+    'bouton_effacer_tout' => 'O escafar tot',
39
+    'bouton_envoyer_message' => 'Messatge definitiu: mandar',
40
+    'bouton_modifier' => 'Modificar',
41
+    'bouton_radio_afficher' => 'Afichar',
42
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Afichar dins la tiera dei redactors connectats',
43
+    'bouton_radio_envoi_annonces_adresse' => 'Mandar leis anoncis a l’adreiça:',
44
+    'bouton_radio_envoi_liste_nouveautes' => 'Mandar la tiera dei novetats',
45
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Pas aparéisser dins la tiera dei redactors',
46
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Pas mandar d’anoncis editoriaus',
47
+    'bouton_redirection' => 'TORNAR DIRIGIR',
48
+    'bouton_relancer_installation' => 'Tornar lançar l’installacion',
49
+    'bouton_suivant' => 'Seguent',
50
+    'bouton_tenter_recuperation' => 'Assajar de reparar',
51
+    'bouton_test_proxy' => 'Assajar lo proxy',
52
+    'bouton_vider_cache' => 'Vujar l’escondedor',
53 53
 
54
-	// C
55
-	'cache_modifiable_webmestre' => 'Lo webmèstre dau sit pòt modificar aquestei paramètres.',
56
-	'calendrier_synchro' => 'S’utilizatz un logiciau d’agenda compatible <b>iCal</b>, lo podètz sincronizar amb leis informacions d’aquest sit.',
54
+    // C
55
+    'cache_modifiable_webmestre' => 'Lo webmèstre dau sit pòt modificar aquestei paramètres.',
56
+    'calendrier_synchro' => 'S’utilizatz un logiciau d’agenda compatible <b>iCal</b>, lo podètz sincronizar amb leis informacions d’aquest sit.',
57 57
 
58
-	// D
59
-	'date_mot_heures' => 'oras',
58
+    // D
59
+    'date_mot_heures' => 'oras',
60 60
 
61
-	// E
62
-	'email' => 'e-mail',
63
-	'email_2' => 'e-mail:',
64
-	'entree_adresse_annuaire' => 'Adreiça de l’annuari',
65
-	'entree_adresse_email' => 'Vòstra adreiça e-mail',
66
-	'entree_base_donnee_1' => 'Adreiça de la basa de donadas',
67
-	'entree_base_donnee_2' => '(Sovent, aquela adreiça correspònd a la dau vòstre sit, de còps correspònd a la mençon "localhost", de còps, se laissa vueja completament.)',
68
-	'entree_biographie' => 'Biografia corta, en quauquei mots.',
69
-	'entree_chemin_acces' => '<b>Intrar</b> lo camin d’accès:',
70
-	'entree_cle_pgp' => 'Vòstra clau PGP',
71
-	'entree_contenu_rubrique' => '(Contengut de la rubrica en quauquei mots.)',
72
-	'entree_identifiants_connexion' => 'Vòstreis identificants de connexion...',
73
-	'entree_informations_connexion_ldap' => 'Vougatz intrar dins aqueu formulari leis informacions de connexion au vòstre annuari LDAP.
61
+    // E
62
+    'email' => 'e-mail',
63
+    'email_2' => 'e-mail:',
64
+    'entree_adresse_annuaire' => 'Adreiça de l’annuari',
65
+    'entree_adresse_email' => 'Vòstra adreiça e-mail',
66
+    'entree_base_donnee_1' => 'Adreiça de la basa de donadas',
67
+    'entree_base_donnee_2' => '(Sovent, aquela adreiça correspònd a la dau vòstre sit, de còps correspònd a la mençon "localhost", de còps, se laissa vueja completament.)',
68
+    'entree_biographie' => 'Biografia corta, en quauquei mots.',
69
+    'entree_chemin_acces' => '<b>Intrar</b> lo camin d’accès:',
70
+    'entree_cle_pgp' => 'Vòstra clau PGP',
71
+    'entree_contenu_rubrique' => '(Contengut de la rubrica en quauquei mots.)',
72
+    'entree_identifiants_connexion' => 'Vòstreis identificants de connexion...',
73
+    'entree_informations_connexion_ldap' => 'Vougatz intrar dins aqueu formulari leis informacions de connexion au vòstre annuari LDAP.
74 74
 L’administrator dau sistèma o de la ret vos deu poder fornir
75 75
  aqueleis informacions.',
76
-	'entree_infos_perso' => 'Quau siatz?',
77
-	'entree_interieur_rubrique' => 'Dintre la rubrica:',
78
-	'entree_liens_sites' => '<b>Liame ipertèxt</b> (referéncia, sit de vesitar...)',
79
-	'entree_login' => 'Lo vòstre login',
80
-	'entree_login_connexion_1' => 'Lo login de connexion',
81
-	'entree_login_connexion_2' => '(Correspònd de còps au vòstre login d’accès a l’FTP; de còps se laissa vuege)',
82
-	'entree_mot_passe' => 'Vòstre senhau',
83
-	'entree_mot_passe_1' => 'Senhau per la connexion',
84
-	'entree_mot_passe_2' => '(Correspònd de còps a vòstre senhau per l’FTP; de còps se laissa vuege)',
85
-	'entree_nom_fichier' => 'Vougatz intrar lo nom dau fichier @texte_compresse@:',
86
-	'entree_nom_pseudo' => 'Vòstre nom o vòstre pseudonim',
87
-	'entree_nom_pseudo_1' => '(Vòstre nom o vòstre pseudonim)',
88
-	'entree_nom_site' => 'Lo nom dau vòstre sit',
89
-	'entree_nouveau_passe' => 'Senhau novèu',
90
-	'entree_passe_ldap' => 'Senhau',
91
-	'entree_port_annuaire' => 'Lo numèro de pòrt de l’annuari',
92
-	'entree_signature' => 'Signatura',
93
-	'entree_titre_obligatoire' => '<b>Títol</b> [Obligatòri]<br />',
94
-	'entree_url' => 'L’adreiça (URL) dau vòstre sit',
76
+    'entree_infos_perso' => 'Quau siatz?',
77
+    'entree_interieur_rubrique' => 'Dintre la rubrica:',
78
+    'entree_liens_sites' => '<b>Liame ipertèxt</b> (referéncia, sit de vesitar...)',
79
+    'entree_login' => 'Lo vòstre login',
80
+    'entree_login_connexion_1' => 'Lo login de connexion',
81
+    'entree_login_connexion_2' => '(Correspònd de còps au vòstre login d’accès a l’FTP; de còps se laissa vuege)',
82
+    'entree_mot_passe' => 'Vòstre senhau',
83
+    'entree_mot_passe_1' => 'Senhau per la connexion',
84
+    'entree_mot_passe_2' => '(Correspònd de còps a vòstre senhau per l’FTP; de còps se laissa vuege)',
85
+    'entree_nom_fichier' => 'Vougatz intrar lo nom dau fichier @texte_compresse@:',
86
+    'entree_nom_pseudo' => 'Vòstre nom o vòstre pseudonim',
87
+    'entree_nom_pseudo_1' => '(Vòstre nom o vòstre pseudonim)',
88
+    'entree_nom_site' => 'Lo nom dau vòstre sit',
89
+    'entree_nouveau_passe' => 'Senhau novèu',
90
+    'entree_passe_ldap' => 'Senhau',
91
+    'entree_port_annuaire' => 'Lo numèro de pòrt de l’annuari',
92
+    'entree_signature' => 'Signatura',
93
+    'entree_titre_obligatoire' => '<b>Títol</b> [Obligatòri]<br />',
94
+    'entree_url' => 'L’adreiça (URL) dau vòstre sit',
95 95
 
96
-	// I
97
-	'ical_info1' => 'Aquela pagina mòstra de metòdes diferents per restar en contacte amb la vida d’aqueu sit.',
98
-	'ical_info2' => 'Per tenir mai d’informacions subre aquelei tecnicas, esitetz pas de consultar <a href="@spipnet@">la documentacion d’SPIP</a>.', # MODIF
99
-	'ical_info_calendrier' => 'I a dos calendiers a la vòstra disposicion. Lo primier es un plan dau sit qu’anóncia totei leis articles publicats. Lo segond conten leis anoncis editoriaus en mai de vòstrei darriers messatges privats: vos es reservat gràcias a una clau personala, que la podètz modificar en tot moment en renovant vòstre senhau. ',
100
-	'ical_methode_http' => 'Telecargament',
101
-	'ical_methode_webcal' => 'Sincronizacion (webcal://)', # MODIF
102
-	'ical_texte_prive' => 'Aqueu calendier, d’us estrictament personau, vos informa de l’activitat editoriala privada d’aqueu sit (òbras e rendètz-vos personaus, articles e brèvas prepausats...).',
103
-	'ical_texte_public' => 'Aqueu calendier vos permet de seguir l’activitat publica d’aqueu sit (articles e brèvas publicats).',
104
-	'ical_texte_rss' => 'Podètz sindicar lei novetats d’aquest sit dins quin legidor de fichiers que siá en format XML/RSS (Rich Site Summary). Es tanben lo format que permet a SPIP de legir lei novetats publicadas dins d’autrei sits en utilizant un format d’escambi compatible (sits sindicats). ',
105
-	'ical_titre_js' => 'Javascript',
106
-	'ical_titre_mailing' => 'Lista de corrier',
107
-	'ical_titre_rss' => 'Fichiers «backend»',
108
-	'icone_activer_cookie' => 'Activar lo cookie de correspondéncia',
109
-	'icone_admin_plugin' => 'Gestion deis ajustons',
110
-	'icone_afficher_auteurs' => 'Afichar leis autors',
111
-	'icone_afficher_visiteurs' => 'Afichar lei vesitaires',
112
-	'icone_arret_discussion' => 'Quitar aquela discussion',
113
-	'icone_calendrier' => 'Calendier',
114
-	'icone_creer_auteur' => 'Crear un autor nòu e l’associar a aquel article',
115
-	'icone_creer_mot_cle' => 'Crear un mot clau nòu e lo liar a aquel article',
116
-	'icone_creer_rubrique_2' => 'Crear una rubrica nòva',
117
-	'icone_modifier_article' => 'Modificar aquel article',
118
-	'icone_modifier_rubrique' => 'Modificar aquela rubrica',
119
-	'icone_retour' => 'Tornar',
120
-	'icone_retour_article' => 'Tornar a l’article',
121
-	'icone_supprimer_cookie' => 'Suprimir lo cookie de correspondéncia',
122
-	'icone_supprimer_rubrique' => 'Suprimir aquela rubrica',
123
-	'icone_supprimer_signature' => 'Suprimir aquela signatura',
124
-	'icone_valider_signature' => 'Validar aquela signatura',
125
-	'image_administrer_rubrique' => 'Podètz administrar aquela rubrica',
126
-	'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
127
-	'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
128
-	'info_1_article' => '1 article',
129
-	'info_activer_cookie' => 'Podètz activar un <b>cookie de correspondéncia</b>; aquò vos permetrà de passar aisat dau sit public au sit privat.',
130
-	'info_administrateur' => 'Administrator',
131
-	'info_administrateur_1' => 'Administrator',
132
-	'info_administrateur_2' => 'dau sit(<i>d’utilizar amb precaucion</i>)',
133
-	'info_administrateur_site_01' => 'Se siatz administrator/tritz dau sit, vougatz',
134
-	'info_administrateur_site_02' => 'clicar aqueu liame',
135
-	'info_administrateurs' => 'Administrators',
136
-	'info_administrer_rubrique' => 'Podètz administrar aquela rubrica',
137
-	'info_adresse' => 'a l’adreiça:',
138
-	'info_adresse_url' => 'Adreiça (URL) dau sit public',
139
-	'info_aide_en_ligne' => 'Ajuda en linha SPIP',
140
-	'info_ajout_image' => 'Quand apondètz d’imatges coma estacaments jonchs a un article, SPIP pòt crear automaticament per vos de vinhetas (miniaturas) deis imatges inserits. Aquò permet per exemple de crear automaticament una galariá o un pòrtfòlio.',
141
-	'info_ajouter_rubrique' => 'Apondre una autra rubrica d’administrar:',
142
-	'info_annonce_nouveautes' => 'Anonci dei novetats',
143
-	'info_article' => 'article',
144
-	'info_article_2' => 'articles',
145
-	'info_article_a_paraitre' => 'Leis articles pòstdatats per paréisser',
146
-	'info_articles_02' => 'articles',
147
-	'info_articles_2' => 'Articles',
148
-	'info_articles_auteur' => 'Los articles d’aquel autor',
149
-	'info_articles_trouves' => 'Articles trobats',
150
-	'info_attente_validation' => 'Vòstreis articles en espèra de validacion',
151
-	'info_aujourdhui' => 'uei:',
152
-	'info_auteurs' => 'Leis autors',
153
-	'info_auteurs_par_tri' => 'autors@partri@',
154
-	'info_auteurs_trouves' => 'Autors trobats',
155
-	'info_authentification_externe' => 'Autentificacion extèrna',
156
-	'info_avertissement' => 'Avís',
157
-	'info_base_installee' => 'L’estructura de vòstra basa de donadas es installada.',
158
-	'info_chapeau' => 'Capèu',
159
-	'info_chapeau_2' => 'Capèu:',
160
-	'info_chemin_acces_1' => 'Opcions: <b>camin d’accès dins l’annuari</b>',
161
-	'info_chemin_acces_2' => 'Ara devètz configurar lo camin d’accès ais informacions dins l’annuari.',
162
-	'info_chemin_acces_annuaire' => 'Opcions: <b>camin d’accès dins l’annuari',
163
-	'info_choix_base' => 'Tresena estapa:',
164
-	'info_classement_1' => '<sup>ier</sup> de @liste@',
165
-	'info_classement_2' => '<sup>nd</sup> de @liste@',
166
-	'info_code_acces' => 'Oblidetz pas vòstrei còdes d’accès pròpris!',
167
-	'info_config_suivi' => 'S’aquela adreiça correspònd a una lista de corrier, podètz indicar çai sota l’adreiça ont lei participants au sit se pòdon inscriure. Aquela adreiça pòt èstre una URL (per exemple la pagina d’inscripcion a la lista per lo web), o una adreiça e-mail tenent un subjècte especific (per exemple: <tt>@adresse_suivi@?subject=subscribe</tt>):',
168
-	'info_config_suivi_explication' => 'Vos podètz abonar a la lista de difusion d’aquest sit. Alora recebretz per e-mail leis anoncis d’articles e de brèvas que se prepausa a la publicacion.',
169
-	'info_confirmer_passe' => 'Confirmar aqueu senhau novèu:',
170
-	'info_connexion_base' => 'Segonda estapa: <b>Assai de connexion a la basa</b>',
171
-	'info_connexion_ldap_ok' => 'La connexion LDAP a capitat.</b><p> Podètz passar a l’estapa seguenta.</p>', # MODIF
172
-	'info_connexion_mysql' => 'Primiera estapa: <b>Vòstra connexion SQL</b>',
173
-	'info_connexion_ok' => 'La connexion a capitat.',
174
-	'info_contact' => 'Contacte',
175
-	'info_contenu_articles' => 'Contengut deis articles',
176
-	'info_creation_paragraphe' => '(Per crear de paragrafs, basta que laissetz de linhas vuejas.)', # MODIF
177
-	'info_creation_rubrique' => 'Avans de poder escriure d’articles,<br /> devètz crear aumens una rubrica.<br />',
178
-	'info_creation_tables' => 'Quatrena estapa: <b>Creacion dei taulas de la basa</b>',
179
-	'info_creer_base' => '<b>Crear</b> una basa de donadas novèla:',
180
-	'info_dans_rubrique' => 'Dins la rubrica:',
181
-	'info_date_publication_anterieure' => 'Data anteriora de publicacion:',
182
-	'info_date_referencement' => 'DATA DE REFERENCIAMENT D’AQUEU SIT:',
183
-	'info_derniere_etape' => 'Darriera estapa: <b>Es acabat!',
184
-	'info_descriptif' => 'Descriptiu:',
185
-	'info_discussion_cours' => 'Discussions en cors',
186
-	'info_ecrire_article' => 'Avans de poder escriure d’articles, vos cau crear aumens una rubrica.',
187
-	'info_email_envoi' => 'Adreiça e-mail de mandadís (opcionau)',
188
-	'info_email_envoi_txt' => 'Indicatz aicí l’adreiça d’utilizar per enviar leis e-mails (a fauta d’aquò, s’utilizarà l’adreiça destinatari coma adreiça de mandadís):',
189
-	'info_email_webmestre' => 'Adreiça e-mail dau responsable dau sit (opcionau)', # MODIF
190
-	'info_envoi_email_automatique' => 'Mandadís d’e-mails automatics',
191
-	'info_envoyer_maintenant' => 'Mandar ara',
192
-	'info_etape_suivante' => 'Passar a l’estapa seguenta',
193
-	'info_etape_suivante_1' => 'Podètz passar a l’estapa seguenta.',
194
-	'info_etape_suivante_2' => 'Podètz passar a l’estapa seguenta.',
195
-	'info_exportation_base' => 'exportacion de la basa vèrs @archive@',
196
-	'info_facilite_suivi_activite' => 'Per facilitar lo seguit de l’activitat editoriala dau sit, SPIP vos pòt fornir per e-mail, per exemple a una lista de corrier dei redactors, l’anonci dei demandas de publicacion e dei validacions d’articles.', # MODIF
197
-	'info_fichiers_authent' => 'Fichiers d’autentificacion « .htpasswd »',
198
-	'info_forums_abo_invites' => 'Vòstre sit web porgís de forums per leis abonats; dins lo sit public lei vesitaires son convidats a se registrar.',
199
-	'info_gauche_admin_tech' => '<b>A aquela pagina, ren que lei responsables dau sit i pòdon accedir.</b><p> Permet de trobar lei diferentei foncions de mantenença tecnica. D’unei que i a implican un procès d’autentificacion especific, que necessita un accès FTP au sit web.</p>', # MODIF
200
-	'info_gauche_admin_vider' => '<b>A aquela pagina, ren que lei responsables dau sit i pòdon accedir.</b><p> Permet de trobar lei diferentei foncions de mantenença tecnica. D’unei que i a implican un procès d’autentificacion especific, que necessita un accès FTP au sit web.</p>', # MODIF
201
-	'info_gauche_auteurs' => 'Trobaretz aicí totei leis autors dau sit. La color deis icònas n’indica l’estatut (administrator = verd; redactor = jaune).',
202
-	'info_gauche_auteurs_exterieurs' => 'Leis autors exteriors, sens accès au sit, son indicats per una icòna blava; leis autors escafats per un bordilhier.', # MODIF
203
-	'info_gauche_messagerie' => 'La messatjariá vos permet d’escambiar de messatges entre redactors, de servar de mementos (per vòstre usatge personau) o d’afichar d’anoncis sus la pagina d’acuelh de l’espaci privat (se siatz administrator/tritz).',
204
-	'info_gauche_statistiques_referers' => 'Aquela pagina presenta la lista dei <i>referidors</i>, valent a dire dei sits que contenon de liames menant vèrs vòstre sit pròpri, mai unicament per ièr e uei: aquela lista s’actualiza cada 24 oras.',
205
-	'info_gauche_visiteurs_enregistres' => 'Trobaretz aquí lei vesitaires registrats
96
+    // I
97
+    'ical_info1' => 'Aquela pagina mòstra de metòdes diferents per restar en contacte amb la vida d’aqueu sit.',
98
+    'ical_info2' => 'Per tenir mai d’informacions subre aquelei tecnicas, esitetz pas de consultar <a href="@spipnet@">la documentacion d’SPIP</a>.', # MODIF
99
+    'ical_info_calendrier' => 'I a dos calendiers a la vòstra disposicion. Lo primier es un plan dau sit qu’anóncia totei leis articles publicats. Lo segond conten leis anoncis editoriaus en mai de vòstrei darriers messatges privats: vos es reservat gràcias a una clau personala, que la podètz modificar en tot moment en renovant vòstre senhau. ',
100
+    'ical_methode_http' => 'Telecargament',
101
+    'ical_methode_webcal' => 'Sincronizacion (webcal://)', # MODIF
102
+    'ical_texte_prive' => 'Aqueu calendier, d’us estrictament personau, vos informa de l’activitat editoriala privada d’aqueu sit (òbras e rendètz-vos personaus, articles e brèvas prepausats...).',
103
+    'ical_texte_public' => 'Aqueu calendier vos permet de seguir l’activitat publica d’aqueu sit (articles e brèvas publicats).',
104
+    'ical_texte_rss' => 'Podètz sindicar lei novetats d’aquest sit dins quin legidor de fichiers que siá en format XML/RSS (Rich Site Summary). Es tanben lo format que permet a SPIP de legir lei novetats publicadas dins d’autrei sits en utilizant un format d’escambi compatible (sits sindicats). ',
105
+    'ical_titre_js' => 'Javascript',
106
+    'ical_titre_mailing' => 'Lista de corrier',
107
+    'ical_titre_rss' => 'Fichiers «backend»',
108
+    'icone_activer_cookie' => 'Activar lo cookie de correspondéncia',
109
+    'icone_admin_plugin' => 'Gestion deis ajustons',
110
+    'icone_afficher_auteurs' => 'Afichar leis autors',
111
+    'icone_afficher_visiteurs' => 'Afichar lei vesitaires',
112
+    'icone_arret_discussion' => 'Quitar aquela discussion',
113
+    'icone_calendrier' => 'Calendier',
114
+    'icone_creer_auteur' => 'Crear un autor nòu e l’associar a aquel article',
115
+    'icone_creer_mot_cle' => 'Crear un mot clau nòu e lo liar a aquel article',
116
+    'icone_creer_rubrique_2' => 'Crear una rubrica nòva',
117
+    'icone_modifier_article' => 'Modificar aquel article',
118
+    'icone_modifier_rubrique' => 'Modificar aquela rubrica',
119
+    'icone_retour' => 'Tornar',
120
+    'icone_retour_article' => 'Tornar a l’article',
121
+    'icone_supprimer_cookie' => 'Suprimir lo cookie de correspondéncia',
122
+    'icone_supprimer_rubrique' => 'Suprimir aquela rubrica',
123
+    'icone_supprimer_signature' => 'Suprimir aquela signatura',
124
+    'icone_valider_signature' => 'Validar aquela signatura',
125
+    'image_administrer_rubrique' => 'Podètz administrar aquela rubrica',
126
+    'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
127
+    'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
128
+    'info_1_article' => '1 article',
129
+    'info_activer_cookie' => 'Podètz activar un <b>cookie de correspondéncia</b>; aquò vos permetrà de passar aisat dau sit public au sit privat.',
130
+    'info_administrateur' => 'Administrator',
131
+    'info_administrateur_1' => 'Administrator',
132
+    'info_administrateur_2' => 'dau sit(<i>d’utilizar amb precaucion</i>)',
133
+    'info_administrateur_site_01' => 'Se siatz administrator/tritz dau sit, vougatz',
134
+    'info_administrateur_site_02' => 'clicar aqueu liame',
135
+    'info_administrateurs' => 'Administrators',
136
+    'info_administrer_rubrique' => 'Podètz administrar aquela rubrica',
137
+    'info_adresse' => 'a l’adreiça:',
138
+    'info_adresse_url' => 'Adreiça (URL) dau sit public',
139
+    'info_aide_en_ligne' => 'Ajuda en linha SPIP',
140
+    'info_ajout_image' => 'Quand apondètz d’imatges coma estacaments jonchs a un article, SPIP pòt crear automaticament per vos de vinhetas (miniaturas) deis imatges inserits. Aquò permet per exemple de crear automaticament una galariá o un pòrtfòlio.',
141
+    'info_ajouter_rubrique' => 'Apondre una autra rubrica d’administrar:',
142
+    'info_annonce_nouveautes' => 'Anonci dei novetats',
143
+    'info_article' => 'article',
144
+    'info_article_2' => 'articles',
145
+    'info_article_a_paraitre' => 'Leis articles pòstdatats per paréisser',
146
+    'info_articles_02' => 'articles',
147
+    'info_articles_2' => 'Articles',
148
+    'info_articles_auteur' => 'Los articles d’aquel autor',
149
+    'info_articles_trouves' => 'Articles trobats',
150
+    'info_attente_validation' => 'Vòstreis articles en espèra de validacion',
151
+    'info_aujourdhui' => 'uei:',
152
+    'info_auteurs' => 'Leis autors',
153
+    'info_auteurs_par_tri' => 'autors@partri@',
154
+    'info_auteurs_trouves' => 'Autors trobats',
155
+    'info_authentification_externe' => 'Autentificacion extèrna',
156
+    'info_avertissement' => 'Avís',
157
+    'info_base_installee' => 'L’estructura de vòstra basa de donadas es installada.',
158
+    'info_chapeau' => 'Capèu',
159
+    'info_chapeau_2' => 'Capèu:',
160
+    'info_chemin_acces_1' => 'Opcions: <b>camin d’accès dins l’annuari</b>',
161
+    'info_chemin_acces_2' => 'Ara devètz configurar lo camin d’accès ais informacions dins l’annuari.',
162
+    'info_chemin_acces_annuaire' => 'Opcions: <b>camin d’accès dins l’annuari',
163
+    'info_choix_base' => 'Tresena estapa:',
164
+    'info_classement_1' => '<sup>ier</sup> de @liste@',
165
+    'info_classement_2' => '<sup>nd</sup> de @liste@',
166
+    'info_code_acces' => 'Oblidetz pas vòstrei còdes d’accès pròpris!',
167
+    'info_config_suivi' => 'S’aquela adreiça correspònd a una lista de corrier, podètz indicar çai sota l’adreiça ont lei participants au sit se pòdon inscriure. Aquela adreiça pòt èstre una URL (per exemple la pagina d’inscripcion a la lista per lo web), o una adreiça e-mail tenent un subjècte especific (per exemple: <tt>@adresse_suivi@?subject=subscribe</tt>):',
168
+    'info_config_suivi_explication' => 'Vos podètz abonar a la lista de difusion d’aquest sit. Alora recebretz per e-mail leis anoncis d’articles e de brèvas que se prepausa a la publicacion.',
169
+    'info_confirmer_passe' => 'Confirmar aqueu senhau novèu:',
170
+    'info_connexion_base' => 'Segonda estapa: <b>Assai de connexion a la basa</b>',
171
+    'info_connexion_ldap_ok' => 'La connexion LDAP a capitat.</b><p> Podètz passar a l’estapa seguenta.</p>', # MODIF
172
+    'info_connexion_mysql' => 'Primiera estapa: <b>Vòstra connexion SQL</b>',
173
+    'info_connexion_ok' => 'La connexion a capitat.',
174
+    'info_contact' => 'Contacte',
175
+    'info_contenu_articles' => 'Contengut deis articles',
176
+    'info_creation_paragraphe' => '(Per crear de paragrafs, basta que laissetz de linhas vuejas.)', # MODIF
177
+    'info_creation_rubrique' => 'Avans de poder escriure d’articles,<br /> devètz crear aumens una rubrica.<br />',
178
+    'info_creation_tables' => 'Quatrena estapa: <b>Creacion dei taulas de la basa</b>',
179
+    'info_creer_base' => '<b>Crear</b> una basa de donadas novèla:',
180
+    'info_dans_rubrique' => 'Dins la rubrica:',
181
+    'info_date_publication_anterieure' => 'Data anteriora de publicacion:',
182
+    'info_date_referencement' => 'DATA DE REFERENCIAMENT D’AQUEU SIT:',
183
+    'info_derniere_etape' => 'Darriera estapa: <b>Es acabat!',
184
+    'info_descriptif' => 'Descriptiu:',
185
+    'info_discussion_cours' => 'Discussions en cors',
186
+    'info_ecrire_article' => 'Avans de poder escriure d’articles, vos cau crear aumens una rubrica.',
187
+    'info_email_envoi' => 'Adreiça e-mail de mandadís (opcionau)',
188
+    'info_email_envoi_txt' => 'Indicatz aicí l’adreiça d’utilizar per enviar leis e-mails (a fauta d’aquò, s’utilizarà l’adreiça destinatari coma adreiça de mandadís):',
189
+    'info_email_webmestre' => 'Adreiça e-mail dau responsable dau sit (opcionau)', # MODIF
190
+    'info_envoi_email_automatique' => 'Mandadís d’e-mails automatics',
191
+    'info_envoyer_maintenant' => 'Mandar ara',
192
+    'info_etape_suivante' => 'Passar a l’estapa seguenta',
193
+    'info_etape_suivante_1' => 'Podètz passar a l’estapa seguenta.',
194
+    'info_etape_suivante_2' => 'Podètz passar a l’estapa seguenta.',
195
+    'info_exportation_base' => 'exportacion de la basa vèrs @archive@',
196
+    'info_facilite_suivi_activite' => 'Per facilitar lo seguit de l’activitat editoriala dau sit, SPIP vos pòt fornir per e-mail, per exemple a una lista de corrier dei redactors, l’anonci dei demandas de publicacion e dei validacions d’articles.', # MODIF
197
+    'info_fichiers_authent' => 'Fichiers d’autentificacion « .htpasswd »',
198
+    'info_forums_abo_invites' => 'Vòstre sit web porgís de forums per leis abonats; dins lo sit public lei vesitaires son convidats a se registrar.',
199
+    'info_gauche_admin_tech' => '<b>A aquela pagina, ren que lei responsables dau sit i pòdon accedir.</b><p> Permet de trobar lei diferentei foncions de mantenença tecnica. D’unei que i a implican un procès d’autentificacion especific, que necessita un accès FTP au sit web.</p>', # MODIF
200
+    'info_gauche_admin_vider' => '<b>A aquela pagina, ren que lei responsables dau sit i pòdon accedir.</b><p> Permet de trobar lei diferentei foncions de mantenença tecnica. D’unei que i a implican un procès d’autentificacion especific, que necessita un accès FTP au sit web.</p>', # MODIF
201
+    'info_gauche_auteurs' => 'Trobaretz aicí totei leis autors dau sit. La color deis icònas n’indica l’estatut (administrator = verd; redactor = jaune).',
202
+    'info_gauche_auteurs_exterieurs' => 'Leis autors exteriors, sens accès au sit, son indicats per una icòna blava; leis autors escafats per un bordilhier.', # MODIF
203
+    'info_gauche_messagerie' => 'La messatjariá vos permet d’escambiar de messatges entre redactors, de servar de mementos (per vòstre usatge personau) o d’afichar d’anoncis sus la pagina d’acuelh de l’espaci privat (se siatz administrator/tritz).',
204
+    'info_gauche_statistiques_referers' => 'Aquela pagina presenta la lista dei <i>referidors</i>, valent a dire dei sits que contenon de liames menant vèrs vòstre sit pròpri, mai unicament per ièr e uei: aquela lista s’actualiza cada 24 oras.',
205
+    'info_gauche_visiteurs_enregistres' => 'Trobaretz aquí lei vesitaires registrats
206 206
  dins l’espaci public dau sit (forums amb abonament).',
207
-	'info_generation_miniatures_images' => 'Congreacion de miniaturas deis imatges',
208
-	'info_hebergeur_desactiver_envoi_email' => 'D’uneis aubergadors desactivan lo mandadís automatic
207
+    'info_generation_miniatures_images' => 'Congreacion de miniaturas deis imatges',
208
+    'info_hebergeur_desactiver_envoi_email' => 'D’uneis aubergadors desactivan lo mandadís automatic
209 209
  d’e-mails dempuei sei servidors. En aqueu cas, lei foncionalitats seguentas
210 210
  d’SPIP foncionaràn pas.',
211
-	'info_hier' => 'ièr:',
212
-	'info_identification_publique' => 'Vòstra identitat publica...',
213
-	'info_image_process' => 'Vougatz seleccionar lo melhor metòde de fabricacion dei vinhetas en clicant sus l’imatge correspondent.',
214
-	'info_images_auto' => 'Imatges calculats automaticament',
215
-	'info_informations_personnelles' => 'Cinquena estapa: <b>Informacions personalas</b>',
216
-	'info_inscription_automatique' => 'Inscripcion automatica de redactors novèus',
217
-	'info_jeu_caractere' => 'Jòc de caractèrs dau sit',
218
-	'info_jours' => 'jorns',
219
-	'info_laisser_champs_vides' => 'laissar aquelei camps vueges)',
220
-	'info_langues' => 'Lengas dau sit',
221
-	'info_ldap_ok' => 'L’autentificacion LDAP es installada.',
222
-	'info_lien_hypertexte' => 'Liame ipertèxt:',
223
-	'info_liste_redacteurs_connectes' => 'Tiera dei redactors connectats',
224
-	'info_login_existant' => 'Aqueu login ja existís.',
225
-	'info_login_trop_court' => 'Login tròp cort.',
226
-	'info_maximum' => 'maximum:',
227
-	'info_meme_rubrique' => 'Dins la meteissa rubrica',
228
-	'info_message_en_redaction' => 'Vòstrei messatges en cors de redaccion',
229
-	'info_message_technique' => 'Messatge tecnic:',
230
-	'info_messagerie_interne' => 'Messatjariá intèrna',
231
-	'info_mise_a_niveau_base' => 'Mesa a nivèu de vòstra basa SQL',
232
-	'info_mise_a_niveau_base_2' => '{{Atencion!}} Avètz installada una version
211
+    'info_hier' => 'ièr:',
212
+    'info_identification_publique' => 'Vòstra identitat publica...',
213
+    'info_image_process' => 'Vougatz seleccionar lo melhor metòde de fabricacion dei vinhetas en clicant sus l’imatge correspondent.',
214
+    'info_images_auto' => 'Imatges calculats automaticament',
215
+    'info_informations_personnelles' => 'Cinquena estapa: <b>Informacions personalas</b>',
216
+    'info_inscription_automatique' => 'Inscripcion automatica de redactors novèus',
217
+    'info_jeu_caractere' => 'Jòc de caractèrs dau sit',
218
+    'info_jours' => 'jorns',
219
+    'info_laisser_champs_vides' => 'laissar aquelei camps vueges)',
220
+    'info_langues' => 'Lengas dau sit',
221
+    'info_ldap_ok' => 'L’autentificacion LDAP es installada.',
222
+    'info_lien_hypertexte' => 'Liame ipertèxt:',
223
+    'info_liste_redacteurs_connectes' => 'Tiera dei redactors connectats',
224
+    'info_login_existant' => 'Aqueu login ja existís.',
225
+    'info_login_trop_court' => 'Login tròp cort.',
226
+    'info_maximum' => 'maximum:',
227
+    'info_meme_rubrique' => 'Dins la meteissa rubrica',
228
+    'info_message_en_redaction' => 'Vòstrei messatges en cors de redaccion',
229
+    'info_message_technique' => 'Messatge tecnic:',
230
+    'info_messagerie_interne' => 'Messatjariá intèrna',
231
+    'info_mise_a_niveau_base' => 'Mesa a nivèu de vòstra basa SQL',
232
+    'info_mise_a_niveau_base_2' => '{{Atencion!}} Avètz installada una version
233 233
   dei fichiers SPIP {anteriora} a la que i aviá
234 234
   avans sus aquest sit: riscatz de pèrdre vòstra basa de donadas
235 235
    e vòstre sit foncionarà pus.<br />{{Tornatz installar lei
236 236
   fichiers d’SPIP.}}',
237
-	'info_modifier_rubrique' => 'Modificar la rubrica:',
238
-	'info_modifier_titre' => 'Modificar: @titre@',
239
-	'info_mon_site_spip' => 'Mon sit SPIP',
240
-	'info_moyenne' => 'mejana:',
241
-	'info_multi_cet_article' => 'Lenga d’aquest article:',
242
-	'info_multi_langues_choisies' => 'Vougatz seleccionar çai sota lei lengas que son a posita dei redactors de vòstre sit.
237
+    'info_modifier_rubrique' => 'Modificar la rubrica:',
238
+    'info_modifier_titre' => 'Modificar: @titre@',
239
+    'info_mon_site_spip' => 'Mon sit SPIP',
240
+    'info_moyenne' => 'mejana:',
241
+    'info_multi_cet_article' => 'Lenga d’aquest article:',
242
+    'info_multi_langues_choisies' => 'Vougatz seleccionar çai sota lei lengas que son a posita dei redactors de vòstre sit.
243 243
   Lei lengas ja emplegadas dins vòstre sit (afichadas d’en primier) se pòdon pas desactivar.',
244
-	'info_multi_secteurs' => '... ren que per lei rubricas a la raiç dau sit?',
245
-	'info_nom' => 'Nom',
246
-	'info_nom_destinataire' => 'Nom dau destinatari',
247
-	'info_nom_site' => 'Nom dau vòstre sit',
248
-	'info_nombre_articles' => '@nb_articles@ articles,',
249
-	'info_nombre_rubriques' => '@nb_rubriques@ rubricas,',
250
-	'info_nombre_sites' => '@nb_sites@ sits,',
251
-	'info_non_deplacer' => 'De pas desplaçar...',
252
-	'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP pòt mandar, regularament, l’anonci dei darrierei novetats dau sit
244
+    'info_multi_secteurs' => '... ren que per lei rubricas a la raiç dau sit?',
245
+    'info_nom' => 'Nom',
246
+    'info_nom_destinataire' => 'Nom dau destinatari',
247
+    'info_nom_site' => 'Nom dau vòstre sit',
248
+    'info_nombre_articles' => '@nb_articles@ articles,',
249
+    'info_nombre_rubriques' => '@nb_rubriques@ rubricas,',
250
+    'info_nombre_sites' => '@nb_sites@ sits,',
251
+    'info_non_deplacer' => 'De pas desplaçar...',
252
+    'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP pòt mandar, regularament, l’anonci dei darrierei novetats dau sit
253 253
  (articles e brèvas publicats recentament).',
254
-	'info_non_envoi_liste_nouveautes' => 'Pas mandar la tiera dei novetats',
255
-	'info_non_modifiable' => 'se pòt pas modificar',
256
-	'info_non_suppression_mot_cle' => 'vòli pas suprimir aqueu mot clau.',
257
-	'info_notes' => 'Nòtas',
258
-	'info_nouvel_article' => 'Article nòu',
259
-	'info_nouvelle_traduction' => 'Revirada nòva:',
260
-	'info_numero_article' => 'ARTICLE NUMÈRO:',
261
-	'info_obligatoire_02' => '[Obligatòri]', # MODIF
262
-	'info_option_accepter_visiteurs' => 'Acceptar l’inscripcion dei vesitaires dau sit public',
263
-	'info_option_ne_pas_accepter_visiteurs' => 'Refusar l’inscripcion de vesitaires',
264
-	'info_options_avancees' => 'OPCIONS AVANÇADAS',
265
-	'info_ou' => 'o... ',
266
-	'info_page_interdite' => 'Pagina proïbida',
267
-	'info_par_nombre_article' => '(per nombre d’articles)',
268
-	'info_passe_trop_court' => 'Mot de santa Clara tròp cort.',
269
-	'info_passes_identiques' => 'Lei dos mots de santa Clara son pas identics.',
270
-	'info_plus_cinq_car' => 'mai de 5 caractèrs',
271
-	'info_plus_cinq_car_2' => '(mai de 5 caractèrs)',
272
-	'info_plus_trois_car' => '(mai de 3 caractèrs)',
273
-	'info_popularite' => 'popularitat: @popularite@; vesitas: @visites@',
274
-	'info_post_scriptum' => 'Post-scriptum',
275
-	'info_post_scriptum_2' => 'Post-scriptum:',
276
-	'info_pour' => 'per',
277
-	'info_preview_texte' => 'Es possible de previsualizar lo sit coma s’avián publicat totei leis articles e brèvas (que tenon aumens l’estatut "prepausat"). La cau dobrir, aquela possibilitat, ren qu’ais administrators, a totei lei redactors, o en degun?', # MODIF
278
-	'info_procedez_par_etape' => 'procedissètz estapa per estapa',
279
-	'info_procedure_maj_version' => 'Cau lançar la procedura d’actualizacion per adaptar
254
+    'info_non_envoi_liste_nouveautes' => 'Pas mandar la tiera dei novetats',
255
+    'info_non_modifiable' => 'se pòt pas modificar',
256
+    'info_non_suppression_mot_cle' => 'vòli pas suprimir aqueu mot clau.',
257
+    'info_notes' => 'Nòtas',
258
+    'info_nouvel_article' => 'Article nòu',
259
+    'info_nouvelle_traduction' => 'Revirada nòva:',
260
+    'info_numero_article' => 'ARTICLE NUMÈRO:',
261
+    'info_obligatoire_02' => '[Obligatòri]', # MODIF
262
+    'info_option_accepter_visiteurs' => 'Acceptar l’inscripcion dei vesitaires dau sit public',
263
+    'info_option_ne_pas_accepter_visiteurs' => 'Refusar l’inscripcion de vesitaires',
264
+    'info_options_avancees' => 'OPCIONS AVANÇADAS',
265
+    'info_ou' => 'o... ',
266
+    'info_page_interdite' => 'Pagina proïbida',
267
+    'info_par_nombre_article' => '(per nombre d’articles)',
268
+    'info_passe_trop_court' => 'Mot de santa Clara tròp cort.',
269
+    'info_passes_identiques' => 'Lei dos mots de santa Clara son pas identics.',
270
+    'info_plus_cinq_car' => 'mai de 5 caractèrs',
271
+    'info_plus_cinq_car_2' => '(mai de 5 caractèrs)',
272
+    'info_plus_trois_car' => '(mai de 3 caractèrs)',
273
+    'info_popularite' => 'popularitat: @popularite@; vesitas: @visites@',
274
+    'info_post_scriptum' => 'Post-scriptum',
275
+    'info_post_scriptum_2' => 'Post-scriptum:',
276
+    'info_pour' => 'per',
277
+    'info_preview_texte' => 'Es possible de previsualizar lo sit coma s’avián publicat totei leis articles e brèvas (que tenon aumens l’estatut "prepausat"). La cau dobrir, aquela possibilitat, ren qu’ais administrators, a totei lei redactors, o en degun?', # MODIF
278
+    'info_procedez_par_etape' => 'procedissètz estapa per estapa',
279
+    'info_procedure_maj_version' => 'Cau lançar la procedura d’actualizacion per adaptar
280 280
  la basa de donadas a la version novèla d’SPIP.',
281
-	'info_ps' => 'P.S.',
282
-	'info_publier' => 'publicar',
283
-	'info_publies' => 'Vòstreis articles publicats en linha',
284
-	'info_question_accepter_visiteurs' => 'S’ais esqueletas de vòstre sit web se prevei lo registrament de vesitaires sens accès a l’espaci privat, vougatz activar l’opcion seguenta:',
285
-	'info_question_inscription_nouveaux_redacteurs' => 'Acceptatz que de redactors novèus s’inscrigan
281
+    'info_ps' => 'P.S.',
282
+    'info_publier' => 'publicar',
283
+    'info_publies' => 'Vòstreis articles publicats en linha',
284
+    'info_question_accepter_visiteurs' => 'S’ais esqueletas de vòstre sit web se prevei lo registrament de vesitaires sens accès a l’espaci privat, vougatz activar l’opcion seguenta:',
285
+    'info_question_inscription_nouveaux_redacteurs' => 'Acceptatz que de redactors novèus s’inscrigan
286 286
  a partir dau sit public? S’o acceptatz, lei vesitaires se poiràn inscriure
287 287
  dieumercé un formulari automatizat e alora accediràn a l’espaci privat per
288 288
  prepausar d’articles.<blockquote><i> Durant la fasa d’inscripcion, leis utilizaires recebon un e-mail automatic
289 289
  que li baila un còde d’accès au sit privat.
290 290
 D’uneis aubergadors autorizan pas lo mandadís d’e-mails dempuei sei servidors: en aqueu cas, l’inscripcion automatica es
291 291
  impossibla.', # MODIF
292
-	'info_qui_edite' => '@nom_auteur_modif@ a travaillé sur ce contenu il y a @date_diff@ minutes', # MODIF
293
-	'info_racine_site' => 'Raiç dau sit',
294
-	'info_recharger_page' => 'Vougatz tornar cargar aquela pagina dins un momenton.',
295
-	'info_recherche_auteur_zero' => '<b>Ges de resultat trobat per "@cherche_auteur@".',
296
-	'info_recommencer' => 'Vougatz tornar començar.',
297
-	'info_redacteur_1' => 'Redactor',
298
-	'info_redacteur_2' => 'qu’accedís a l’espaci privat (<i>recomandat</i>)',
299
-	'info_redacteurs' => 'Redactors',
300
-	'info_redaction_en_cours' => 'EN CORS DE REDACCION',
301
-	'info_redirection' => 'Redireccion',
302
-	'info_refuses' => 'Vòstreis articles refusats',
303
-	'info_reglage_ldap' => 'Opcions: <b>Reglatge de l’importacion LDAP</b>',
304
-	'info_renvoi_article' => '<b>Redireccion.</b> Aquel article remanda a la pagina:',
305
-	'info_reserve_admin' => 'Ren que leis administrators pòdon modificar aquela adreiça.',
306
-	'info_restreindre_rubrique' => 'Restrénher la gestion a la rubrica:',
307
-	'info_resultat_recherche' => 'Resultats de la cèrca:',
308
-	'info_rubriques' => 'Rubricas',
309
-	'info_rubriques_02' => 'rubricas',
310
-	'info_rubriques_trouvees' => 'Rubricas trobadas',
311
-	'info_sans_titre' => 'Sensa títol',
312
-	'info_selection_chemin_acces' => '<b>Seleccionatz</b> çai sota lo camin d’accès dins l’annuari:',
313
-	'info_signatures' => 'signaturas',
314
-	'info_site' => 'Sit',
315
-	'info_site_2' => 'sit: ',
316
-	'info_site_min' => 'sit',
317
-	'info_site_reference_2' => 'Sit referenciat',
318
-	'info_site_web' => 'SIT WEB:', # MODIF
319
-	'info_sites' => 'sits',
320
-	'info_sites_lies_mot' => 'Lei sits referenciats ligats a aqueu mot clau',
321
-	'info_sites_proxy' => 'Utilizar un proxy',
322
-	'info_sites_trouves' => 'Sits trobats',
323
-	'info_sous_titre' => 'Sostítol:',
324
-	'info_statut_administrateur' => 'Administrator',
325
-	'info_statut_auteur' => 'Estatut d’aquel autor:', # MODIF
326
-	'info_statut_auteur_a_confirmer' => 'Inscripcion de confirmar',
327
-	'info_statut_auteur_autre' => 'Autre estatut :',
328
-	'info_statut_redacteur' => 'Redactor',
329
-	'info_statut_utilisateurs_1' => 'Estatut predefinit deis utilizaires importats',
330
-	'info_statut_utilisateurs_2' => 'Chausissètz l’estatut d’atribuir ai personas presentas dins l’annuari LDAP quora se connèctan per lo primier còp. Poiretz puei modificar aquel estatut per cada autor un cas per un.',
331
-	'info_suivi_activite' => 'Seguit de l’activitat editoriala',
332
-	'info_surtitre' => 'Subretítol:',
333
-	'info_taille_maximale_vignette' => 'Talha maximala dei vinhetas congreadas per lo sistèma:',
334
-	'info_terminer_installation' => 'Ara podètz acabar la procedura d’installacion estandard.',
335
-	'info_texte' => 'Tèxt',
336
-	'info_texte_explicatif' => 'Tèxt explicatiu',
337
-	'info_texte_long' => '(lo tèxt es lòng: apareis doncas en tròç distints que se tornaràn empegar un còp validats.)',
338
-	'info_texte_message' => 'Tèxt dau vòstre messatge:', # MODIF
339
-	'info_texte_message_02' => 'Tèxt dau messatge',
340
-	'info_titre' => 'Títol:',
341
-	'info_total' => 'totau: ',
342
-	'info_tous_articles_en_redaction' => 'Totei leis articles en cors de redaccion',
343
-	'info_tous_articles_presents' => 'Totei leis articles publicats dins aquela rubrica',
344
-	'info_tous_les' => 'totei lei:',
345
-	'info_tout_site' => 'Tot lo sit',
346
-	'info_tout_site2' => 'An pas revirat l’article dins aquela lenga.',
347
-	'info_tout_site3' => 'An revirat l’article dins aquela lenga, mai an portat puei de modificacions a l’article de referéncia. Cau actualizar la revirada.',
348
-	'info_tout_site4' => 'An revirat l’article dins aquela lenga, e la revirada es actualizada.',
349
-	'info_tout_site5' => 'Article originau.',
350
-	'info_tout_site6' => '<b>Atencion:</b> ren que leis articles originaus s’afichan.
292
+    'info_qui_edite' => '@nom_auteur_modif@ a travaillé sur ce contenu il y a @date_diff@ minutes', # MODIF
293
+    'info_racine_site' => 'Raiç dau sit',
294
+    'info_recharger_page' => 'Vougatz tornar cargar aquela pagina dins un momenton.',
295
+    'info_recherche_auteur_zero' => '<b>Ges de resultat trobat per "@cherche_auteur@".',
296
+    'info_recommencer' => 'Vougatz tornar començar.',
297
+    'info_redacteur_1' => 'Redactor',
298
+    'info_redacteur_2' => 'qu’accedís a l’espaci privat (<i>recomandat</i>)',
299
+    'info_redacteurs' => 'Redactors',
300
+    'info_redaction_en_cours' => 'EN CORS DE REDACCION',
301
+    'info_redirection' => 'Redireccion',
302
+    'info_refuses' => 'Vòstreis articles refusats',
303
+    'info_reglage_ldap' => 'Opcions: <b>Reglatge de l’importacion LDAP</b>',
304
+    'info_renvoi_article' => '<b>Redireccion.</b> Aquel article remanda a la pagina:',
305
+    'info_reserve_admin' => 'Ren que leis administrators pòdon modificar aquela adreiça.',
306
+    'info_restreindre_rubrique' => 'Restrénher la gestion a la rubrica:',
307
+    'info_resultat_recherche' => 'Resultats de la cèrca:',
308
+    'info_rubriques' => 'Rubricas',
309
+    'info_rubriques_02' => 'rubricas',
310
+    'info_rubriques_trouvees' => 'Rubricas trobadas',
311
+    'info_sans_titre' => 'Sensa títol',
312
+    'info_selection_chemin_acces' => '<b>Seleccionatz</b> çai sota lo camin d’accès dins l’annuari:',
313
+    'info_signatures' => 'signaturas',
314
+    'info_site' => 'Sit',
315
+    'info_site_2' => 'sit: ',
316
+    'info_site_min' => 'sit',
317
+    'info_site_reference_2' => 'Sit referenciat',
318
+    'info_site_web' => 'SIT WEB:', # MODIF
319
+    'info_sites' => 'sits',
320
+    'info_sites_lies_mot' => 'Lei sits referenciats ligats a aqueu mot clau',
321
+    'info_sites_proxy' => 'Utilizar un proxy',
322
+    'info_sites_trouves' => 'Sits trobats',
323
+    'info_sous_titre' => 'Sostítol:',
324
+    'info_statut_administrateur' => 'Administrator',
325
+    'info_statut_auteur' => 'Estatut d’aquel autor:', # MODIF
326
+    'info_statut_auteur_a_confirmer' => 'Inscripcion de confirmar',
327
+    'info_statut_auteur_autre' => 'Autre estatut :',
328
+    'info_statut_redacteur' => 'Redactor',
329
+    'info_statut_utilisateurs_1' => 'Estatut predefinit deis utilizaires importats',
330
+    'info_statut_utilisateurs_2' => 'Chausissètz l’estatut d’atribuir ai personas presentas dins l’annuari LDAP quora se connèctan per lo primier còp. Poiretz puei modificar aquel estatut per cada autor un cas per un.',
331
+    'info_suivi_activite' => 'Seguit de l’activitat editoriala',
332
+    'info_surtitre' => 'Subretítol:',
333
+    'info_taille_maximale_vignette' => 'Talha maximala dei vinhetas congreadas per lo sistèma:',
334
+    'info_terminer_installation' => 'Ara podètz acabar la procedura d’installacion estandard.',
335
+    'info_texte' => 'Tèxt',
336
+    'info_texte_explicatif' => 'Tèxt explicatiu',
337
+    'info_texte_long' => '(lo tèxt es lòng: apareis doncas en tròç distints que se tornaràn empegar un còp validats.)',
338
+    'info_texte_message' => 'Tèxt dau vòstre messatge:', # MODIF
339
+    'info_texte_message_02' => 'Tèxt dau messatge',
340
+    'info_titre' => 'Títol:',
341
+    'info_total' => 'totau: ',
342
+    'info_tous_articles_en_redaction' => 'Totei leis articles en cors de redaccion',
343
+    'info_tous_articles_presents' => 'Totei leis articles publicats dins aquela rubrica',
344
+    'info_tous_les' => 'totei lei:',
345
+    'info_tout_site' => 'Tot lo sit',
346
+    'info_tout_site2' => 'An pas revirat l’article dins aquela lenga.',
347
+    'info_tout_site3' => 'An revirat l’article dins aquela lenga, mai an portat puei de modificacions a l’article de referéncia. Cau actualizar la revirada.',
348
+    'info_tout_site4' => 'An revirat l’article dins aquela lenga, e la revirada es actualizada.',
349
+    'info_tout_site5' => 'Article originau.',
350
+    'info_tout_site6' => '<b>Atencion:</b> ren que leis articles originaus s’afichan.
351 351
 Lei reviradas s’assòcian a l’originau,
352 352
 una color indica lor estat:',
353
-	'info_travail_colaboratif' => 'Trabalh collaboratiu subre leis articles',
354
-	'info_un_article' => 'un article, ',
355
-	'info_un_site' => 'un sit, ',
356
-	'info_une_rubrique' => 'una rubrica, ',
357
-	'info_une_rubrique_02' => '1 rubrica',
358
-	'info_url' => 'URL:',
359
-	'info_urlref' => 'Liame ipertèxt:',
360
-	'info_utilisation_spip' => 'Ara podètz començar d’utilizar lo sistèma de publicacion assistida...',
361
-	'info_visites_par_mois' => 'Afichatge per mes:',
362
-	'info_visiteur_1' => 'Vesitaire',
363
-	'info_visiteur_2' => 'dau sit public',
364
-	'info_visiteurs' => 'Vesitaires',
365
-	'info_visiteurs_02' => 'Vesitaires dau sit public',
366
-	'install_echec_annonce' => 'L’installacion capitarà mau, o abotirà a un sit non foncionau...',
367
-	'install_extension_php_obligatoire' => 'SPIP exigís l’extension php:',
368
-	'install_select_langue' => 'Seleccionatz una lenga puei clicatz lo boton «seguent» per amodar la procedura d’installacion.',
369
-	'intem_redacteur' => 'redactor',
370
-	'item_accepter_inscriptions' => 'Acceptar leis inscripcions',
371
-	'item_activer_messages_avertissement' => 'Activar lei messatges d’avertiment',
372
-	'item_administrateur_2' => 'administrator',
373
-	'item_afficher_calendrier' => 'Afichar dins lo calendier',
374
-	'item_choix_administrateurs' => 'leis administrators',
375
-	'item_choix_generation_miniature' => 'Congrear automaticament lei miniaturas deis imatges.',
376
-	'item_choix_non_generation_miniature' => 'Congrear ges de miniaturas deis imatges.',
377
-	'item_choix_redacteurs' => 'lei redactors',
378
-	'item_choix_visiteurs' => 'lei vesitaires dau sit public',
379
-	'item_creer_fichiers_authent' => 'Crear de fichiers .htpasswd',
380
-	'item_login' => 'Login',
381
-	'item_mots_cles_association_articles' => 'ais articles',
382
-	'item_mots_cles_association_rubriques' => 'ai rubricas',
383
-	'item_mots_cles_association_sites' => 'ai sits referenciats o sindicats',
384
-	'item_non' => 'Non',
385
-	'item_non_accepter_inscriptions' => 'Pas acceptar leis inscripcions',
386
-	'item_non_activer_messages_avertissement' => 'Ges de messatge d’avertiment',
387
-	'item_non_afficher_calendrier' => 'De pas afichar dins lo calendier',
388
-	'item_non_creer_fichiers_authent' => 'Pas crear aquelei fichiers',
389
-	'item_non_publier_articles' => 'Pas publicar leis articles avans la data de publicacion prevista.',
390
-	'item_nouvel_auteur' => 'Autor nòu',
391
-	'item_nouvelle_rubrique' => 'Rubrica nòva',
392
-	'item_oui' => 'Òc',
393
-	'item_publier_articles' => 'Publicar leis articles, quina que siá sa data de publicacion',
394
-	'item_reponse_article' => 'Respònsa a l’article',
395
-	'item_visiteur' => 'vesitaire',
353
+    'info_travail_colaboratif' => 'Trabalh collaboratiu subre leis articles',
354
+    'info_un_article' => 'un article, ',
355
+    'info_un_site' => 'un sit, ',
356
+    'info_une_rubrique' => 'una rubrica, ',
357
+    'info_une_rubrique_02' => '1 rubrica',
358
+    'info_url' => 'URL:',
359
+    'info_urlref' => 'Liame ipertèxt:',
360
+    'info_utilisation_spip' => 'Ara podètz començar d’utilizar lo sistèma de publicacion assistida...',
361
+    'info_visites_par_mois' => 'Afichatge per mes:',
362
+    'info_visiteur_1' => 'Vesitaire',
363
+    'info_visiteur_2' => 'dau sit public',
364
+    'info_visiteurs' => 'Vesitaires',
365
+    'info_visiteurs_02' => 'Vesitaires dau sit public',
366
+    'install_echec_annonce' => 'L’installacion capitarà mau, o abotirà a un sit non foncionau...',
367
+    'install_extension_php_obligatoire' => 'SPIP exigís l’extension php:',
368
+    'install_select_langue' => 'Seleccionatz una lenga puei clicatz lo boton «seguent» per amodar la procedura d’installacion.',
369
+    'intem_redacteur' => 'redactor',
370
+    'item_accepter_inscriptions' => 'Acceptar leis inscripcions',
371
+    'item_activer_messages_avertissement' => 'Activar lei messatges d’avertiment',
372
+    'item_administrateur_2' => 'administrator',
373
+    'item_afficher_calendrier' => 'Afichar dins lo calendier',
374
+    'item_choix_administrateurs' => 'leis administrators',
375
+    'item_choix_generation_miniature' => 'Congrear automaticament lei miniaturas deis imatges.',
376
+    'item_choix_non_generation_miniature' => 'Congrear ges de miniaturas deis imatges.',
377
+    'item_choix_redacteurs' => 'lei redactors',
378
+    'item_choix_visiteurs' => 'lei vesitaires dau sit public',
379
+    'item_creer_fichiers_authent' => 'Crear de fichiers .htpasswd',
380
+    'item_login' => 'Login',
381
+    'item_mots_cles_association_articles' => 'ais articles',
382
+    'item_mots_cles_association_rubriques' => 'ai rubricas',
383
+    'item_mots_cles_association_sites' => 'ai sits referenciats o sindicats',
384
+    'item_non' => 'Non',
385
+    'item_non_accepter_inscriptions' => 'Pas acceptar leis inscripcions',
386
+    'item_non_activer_messages_avertissement' => 'Ges de messatge d’avertiment',
387
+    'item_non_afficher_calendrier' => 'De pas afichar dins lo calendier',
388
+    'item_non_creer_fichiers_authent' => 'Pas crear aquelei fichiers',
389
+    'item_non_publier_articles' => 'Pas publicar leis articles avans la data de publicacion prevista.',
390
+    'item_nouvel_auteur' => 'Autor nòu',
391
+    'item_nouvelle_rubrique' => 'Rubrica nòva',
392
+    'item_oui' => 'Òc',
393
+    'item_publier_articles' => 'Publicar leis articles, quina que siá sa data de publicacion',
394
+    'item_reponse_article' => 'Respònsa a l’article',
395
+    'item_visiteur' => 'vesitaire',
396 396
 
397
-	// J
398
-	'jour_non_connu_nc' => 'n.c.',
397
+    // J
398
+    'jour_non_connu_nc' => 'n.c.',
399 399
 
400
-	// L
401
-	'lien_ajouter_auteur' => 'Apondre aquel autor',
402
-	'lien_email' => 'e-mail',
403
-	'lien_nom_site' => 'NOM DAU SIT:',
404
-	'lien_retirer_auteur' => 'Levar l’autor',
405
-	'lien_site' => 'sit',
406
-	'lien_tout_deplier' => 'Desplegar tot',
407
-	'lien_tout_replier' => 'Tornar plegar',
408
-	'lien_trier_nom' => 'Triar per nom',
409
-	'lien_trier_nombre_articles' => 'Triar per nombre d’articles',
410
-	'lien_trier_statut' => 'Triar per estatut',
411
-	'lien_voir_en_ligne' => 'VEIRE EN LINHA:',
412
-	'logo_article' => 'LÒGO DE L’ARTICLE', # MODIF
413
-	'logo_auteur' => 'LÒGO DE L’AUTOR', # MODIF
414
-	'logo_rubrique' => 'LÒGO DE LA RUBRICA', # MODIF
415
-	'logo_site' => 'LÒGO D’AQUEU SIT', # MODIF
416
-	'logo_standard_rubrique' => 'LÒGO ESTANDARD DEI RUBRICAS', # MODIF
417
-	'logo_survol' => 'LÒGO PER LO SUBREVÒU', # MODIF
400
+    // L
401
+    'lien_ajouter_auteur' => 'Apondre aquel autor',
402
+    'lien_email' => 'e-mail',
403
+    'lien_nom_site' => 'NOM DAU SIT:',
404
+    'lien_retirer_auteur' => 'Levar l’autor',
405
+    'lien_site' => 'sit',
406
+    'lien_tout_deplier' => 'Desplegar tot',
407
+    'lien_tout_replier' => 'Tornar plegar',
408
+    'lien_trier_nom' => 'Triar per nom',
409
+    'lien_trier_nombre_articles' => 'Triar per nombre d’articles',
410
+    'lien_trier_statut' => 'Triar per estatut',
411
+    'lien_voir_en_ligne' => 'VEIRE EN LINHA:',
412
+    'logo_article' => 'LÒGO DE L’ARTICLE', # MODIF
413
+    'logo_auteur' => 'LÒGO DE L’AUTOR', # MODIF
414
+    'logo_rubrique' => 'LÒGO DE LA RUBRICA', # MODIF
415
+    'logo_site' => 'LÒGO D’AQUEU SIT', # MODIF
416
+    'logo_standard_rubrique' => 'LÒGO ESTANDARD DEI RUBRICAS', # MODIF
417
+    'logo_survol' => 'LÒGO PER LO SUBREVÒU', # MODIF
418 418
 
419
-	// M
420
-	'menu_aide_installation_choix_base' => 'Chausida de vòstra basa',
421
-	'module_fichier_langue' => 'Fichier de lenga',
422
-	'module_raccourci' => 'Acorcha',
423
-	'module_texte_affiche' => 'Tèxt afichat',
424
-	'module_texte_explicatif' => 'Podètz inserir leis acorchas seguentas dins leis esqueletas de vòstre sit public. Se reviraràn automaticament  dins lei diferentei lengas per lei qualas existís un fichier de lenga.',
425
-	'module_texte_traduction' => 'Lo fichier de lenga «@module@» es disponible en:',
426
-	'mois_non_connu' => 'non conegut',
419
+    // M
420
+    'menu_aide_installation_choix_base' => 'Chausida de vòstra basa',
421
+    'module_fichier_langue' => 'Fichier de lenga',
422
+    'module_raccourci' => 'Acorcha',
423
+    'module_texte_affiche' => 'Tèxt afichat',
424
+    'module_texte_explicatif' => 'Podètz inserir leis acorchas seguentas dins leis esqueletas de vòstre sit public. Se reviraràn automaticament  dins lei diferentei lengas per lei qualas existís un fichier de lenga.',
425
+    'module_texte_traduction' => 'Lo fichier de lenga «@module@» es disponible en:',
426
+    'mois_non_connu' => 'non conegut',
427 427
 
428
-	// O
429
-	'onglet_repartition_actuelle' => 'd’aquesta passa',
428
+    // O
429
+    'onglet_repartition_actuelle' => 'd’aquesta passa',
430 430
 
431
-	// P
432
-	'plugin_etat_developpement' => 'en cors de desvolopament',
433
-	'plugin_etat_experimental' => 'experimentau',
434
-	'plugin_etat_stable' => 'estable',
435
-	'plugin_etat_test' => 'a l’ensag',
436
-	'plugins_liste' => 'Tièra deis ajustons',
431
+    // P
432
+    'plugin_etat_developpement' => 'en cors de desvolopament',
433
+    'plugin_etat_experimental' => 'experimentau',
434
+    'plugin_etat_stable' => 'estable',
435
+    'plugin_etat_test' => 'a l’ensag',
436
+    'plugins_liste' => 'Tièra deis ajustons',
437 437
 
438
-	// R
439
-	'repertoire_plugins' => 'Repertòri :',
440
-	'required' => '[Obligatòri]', # MODIF
438
+    // R
439
+    'repertoire_plugins' => 'Repertòri :',
440
+    'required' => '[Obligatòri]', # MODIF
441 441
 
442
-	// S
443
-	'statut_admin_restreint' => '(admin. restrench)', # MODIF
442
+    // S
443
+    'statut_admin_restreint' => '(admin. restrench)', # MODIF
444 444
 
445
-	// T
446
-	'taille_cache_image' => 'Leis imatges qu’SPIP a calculat automaticament (vinhetas dei documents, títols presentats en forma grafica, foncions matematicas en format TeX...) ocupan dins lo repertòri @dir@ un totau de @taille@.',
447
-	'taille_cache_octets' => 'Ara la talha de l’escondedor compassa @octets@.', # MODIF
448
-	'taille_cache_vide' => 'L’escondedor es vuege.',
449
-	'taille_repertoire_cache' => 'Talha dau repertòri escondedor',
450
-	'text_article_propose_publication' => 'Article prepausat per la publicacion. Esitetz pas de donar vòstre vejaire gràcias au forum estacat a aquel article (en bas de pagina).', # MODIF
451
-	'texte_acces_ldap_anonyme_1' => 'D’unei servidors LDAP accèptan ges d’accès anonim. En aqueu cas, cau especificar un identificant d’accès iniciau per poder puei cercar d’informacions dins l’annuari. Pasmens, lei camps seguents se poiràn laissar vueges dins la màger part dei cas.',
452
-	'texte_admin_effacer_01' => 'Aquela comanda escafa <i>tot</i> lo contengut de la basa de donadas,
445
+    // T
446
+    'taille_cache_image' => 'Leis imatges qu’SPIP a calculat automaticament (vinhetas dei documents, títols presentats en forma grafica, foncions matematicas en format TeX...) ocupan dins lo repertòri @dir@ un totau de @taille@.',
447
+    'taille_cache_octets' => 'Ara la talha de l’escondedor compassa @octets@.', # MODIF
448
+    'taille_cache_vide' => 'L’escondedor es vuege.',
449
+    'taille_repertoire_cache' => 'Talha dau repertòri escondedor',
450
+    'text_article_propose_publication' => 'Article prepausat per la publicacion. Esitetz pas de donar vòstre vejaire gràcias au forum estacat a aquel article (en bas de pagina).', # MODIF
451
+    'texte_acces_ldap_anonyme_1' => 'D’unei servidors LDAP accèptan ges d’accès anonim. En aqueu cas, cau especificar un identificant d’accès iniciau per poder puei cercar d’informacions dins l’annuari. Pasmens, lei camps seguents se poiràn laissar vueges dins la màger part dei cas.',
452
+    'texte_admin_effacer_01' => 'Aquela comanda escafa <i>tot</i> lo contengut de la basa de donadas,
453 453
  inclús <i>totei</i> leis accès redactors e administrators. Un còp que l’auretz executada, auretz de tornar lançar l’installacion d’SPIP per tornar crear una basa novèla e mai un primier accès administrator.',
454
-	'texte_adresse_annuaire_1' => '(Se vòstre annuari es installat sus la meteissa maquina qu’aqueu sit web, s’agís probable de "localhost".)',
455
-	'texte_ajout_auteur' => 'L’autor seguent es estat apondut a l’article:',
456
-	'texte_annuaire_ldap_1' => 'S’accedissètz a un annuari (LDAP), lo podètz utilizar per importar automaticament d’utilizaires sota SPIP.',
457
-	'texte_article_statut' => 'Aquel article es:',
458
-	'texte_article_virtuel' => 'Article virtuau',
459
-	'texte_article_virtuel_reference' => '<b>Article virtuau:</b> article referenciat dins vòstre sit SPIP, mai redirigit vèrs una autra URL. Per suprimir la redireccion, escafatz l’URL çai subre.',
460
-	'texte_aucun_resultat_auteur' => 'Ges de resultat per "@cherche_auteur@"',
461
-	'texte_auteur_messagerie' => 'Aquest sit vos pòt indicar de contunha la tiera dei redactors connectats, çò que vos permet d’escambiar de messatges en dirècte. Podètz decidir de pas aparéisser dins aquela lista (siatz "invisible/a" per leis autreis utilizaires).',
462
-	'texte_auteurs' => 'LEIS AUTORS',
463
-	'texte_choix_base_1' => 'Chausissètz vòstra basa:',
464
-	'texte_choix_base_2' => 'Lo servidor SQL conten mai d’una basa de donadas.',
465
-	'texte_choix_base_3' => '<b>Chausissètz</b> çai sota la que vòstre aubergador vos a atribuida:',
466
-	'texte_compte_element' => '@count@ element',
467
-	'texte_compte_elements' => '@count@ elements',
468
-	'texte_connexion_mysql' => 'Consultatz leis informacions que vòstre aubergador fornís: i devètz trobar, se vòstre aubergador supòrta SQL, lei còdes de connexion au servidor SQL.', # MODIF
469
-	'texte_contenu_article' => '(Contengut de l’article en quauquei mots.)',
470
-	'texte_contenu_articles' => 'Segon la maqueta que vòstre sit a adoptada, podètz decidir
454
+    'texte_adresse_annuaire_1' => '(Se vòstre annuari es installat sus la meteissa maquina qu’aqueu sit web, s’agís probable de "localhost".)',
455
+    'texte_ajout_auteur' => 'L’autor seguent es estat apondut a l’article:',
456
+    'texte_annuaire_ldap_1' => 'S’accedissètz a un annuari (LDAP), lo podètz utilizar per importar automaticament d’utilizaires sota SPIP.',
457
+    'texte_article_statut' => 'Aquel article es:',
458
+    'texte_article_virtuel' => 'Article virtuau',
459
+    'texte_article_virtuel_reference' => '<b>Article virtuau:</b> article referenciat dins vòstre sit SPIP, mai redirigit vèrs una autra URL. Per suprimir la redireccion, escafatz l’URL çai subre.',
460
+    'texte_aucun_resultat_auteur' => 'Ges de resultat per "@cherche_auteur@"',
461
+    'texte_auteur_messagerie' => 'Aquest sit vos pòt indicar de contunha la tiera dei redactors connectats, çò que vos permet d’escambiar de messatges en dirècte. Podètz decidir de pas aparéisser dins aquela lista (siatz "invisible/a" per leis autreis utilizaires).',
462
+    'texte_auteurs' => 'LEIS AUTORS',
463
+    'texte_choix_base_1' => 'Chausissètz vòstra basa:',
464
+    'texte_choix_base_2' => 'Lo servidor SQL conten mai d’una basa de donadas.',
465
+    'texte_choix_base_3' => '<b>Chausissètz</b> çai sota la que vòstre aubergador vos a atribuida:',
466
+    'texte_compte_element' => '@count@ element',
467
+    'texte_compte_elements' => '@count@ elements',
468
+    'texte_connexion_mysql' => 'Consultatz leis informacions que vòstre aubergador fornís: i devètz trobar, se vòstre aubergador supòrta SQL, lei còdes de connexion au servidor SQL.', # MODIF
469
+    'texte_contenu_article' => '(Contengut de l’article en quauquei mots.)',
470
+    'texte_contenu_articles' => 'Segon la maqueta que vòstre sit a adoptada, podètz decidir
471 471
  que certaneis elements deis articles s’utilizen pas.
472 472
  Utilizatz la tiera çai sota per indicar quineis elements son disponibles.',
473
-	'texte_crash_base' => 'Se vòstra basa de donadas s’es
473
+    'texte_crash_base' => 'Se vòstra basa de donadas s’es
474 474
  encalada, podètz assajar una reparacion
475 475
  automatica.',
476
-	'texte_creer_rubrique' => 'Avans de poder escriure d’articles,<br /> devètz crear una rubrica.',
477
-	'texte_date_creation_article' => 'DATA DE CREACION DE L’ARTICLE:',
478
-	'texte_date_publication_anterieure' => 'DATA DE PUBLICACION ANTERIORA :',
479
-	'texte_date_publication_anterieure_nonaffichee' => 'Afichar ges de data de publicacion anteriora.',
480
-	'texte_date_publication_article' => 'DATA DE PUBLICACION EN LINHA :',
481
-	'texte_descriptif_rapide' => 'Descriptiu rapid',
482
-	'texte_effacer_base' => 'Escafar la basa de donadas SPIP',
483
-	'texte_en_cours_validation' => 'Se prepausa de publicar leis articles e brèvas çai sota. Esitetz pas de donar vòstre vejaire gràcias ai forums que i son estacats.', # MODIF
484
-	'texte_enrichir_mise_a_jour' => 'Podètz enriquir la compaginacion de vòstre tèxt en utilizant d’"acorchas tipograficas".',
485
-	'texte_fichier_authent' => '<b>Deu crear, SPIP, de fichiers especiaus  <tt>.htpasswd</tt>
476
+    'texte_creer_rubrique' => 'Avans de poder escriure d’articles,<br /> devètz crear una rubrica.',
477
+    'texte_date_creation_article' => 'DATA DE CREACION DE L’ARTICLE:',
478
+    'texte_date_publication_anterieure' => 'DATA DE PUBLICACION ANTERIORA :',
479
+    'texte_date_publication_anterieure_nonaffichee' => 'Afichar ges de data de publicacion anteriora.',
480
+    'texte_date_publication_article' => 'DATA DE PUBLICACION EN LINHA :',
481
+    'texte_descriptif_rapide' => 'Descriptiu rapid',
482
+    'texte_effacer_base' => 'Escafar la basa de donadas SPIP',
483
+    'texte_en_cours_validation' => 'Se prepausa de publicar leis articles e brèvas çai sota. Esitetz pas de donar vòstre vejaire gràcias ai forums que i son estacats.', # MODIF
484
+    'texte_enrichir_mise_a_jour' => 'Podètz enriquir la compaginacion de vòstre tèxt en utilizant d’"acorchas tipograficas".',
485
+    'texte_fichier_authent' => '<b>Deu crear, SPIP, de fichiers especiaus  <tt>.htpasswd</tt>
486 486
   e <tt>.htpasswd-admin</tt> dins lo repertòri @dossier@?</b><p>
487 487
   Aquelei fichiers vos pòdon servir per restrénher l’accès ais autors
488 488
   e administrators alhors dins vòstre sit
@@ -490,46 +490,46 @@  discard block
 block discarded – undo
490 490
  Se vos sèrv pas, podètz laissar aquesta opcion
491 491
   a sa valor predefinida (ges de creacion
492 492
   dei fichiers).</p>', # MODIF
493
-	'texte_informations_personnelles_1' => 'Ara lo sistèma vos crearà un accès personalizat au sit.',
494
-	'texte_informations_personnelles_2' => '(Nòta: se s’agís d’una reïnstallacion, e se vòstre accès fonciona encara, podètz', # MODIF
495
-	'texte_introductif_article' => '(Tèxt introductiu de l’article.)',
496
-	'texte_jeu_caractere' => 'Aquesta opcion es utila se vòstre sit deu afichar d’alfabets
493
+    'texte_informations_personnelles_1' => 'Ara lo sistèma vos crearà un accès personalizat au sit.',
494
+    'texte_informations_personnelles_2' => '(Nòta: se s’agís d’una reïnstallacion, e se vòstre accès fonciona encara, podètz', # MODIF
495
+    'texte_introductif_article' => '(Tèxt introductiu de l’article.)',
496
+    'texte_jeu_caractere' => 'Aquesta opcion es utila se vòstre sit deu afichar d’alfabets
497 497
  diferents de l’alfabet latin (o "occidentau") e sei derivats.
498 498
  En aqueu cas, cau cambiar lo reglatge predefinit per fin d’utilizar
499 499
  un jòc de caractèrs apropriat. Oblidetz pas tanpauc d’adaptar
500 500
  lo sit public en consequéncia (balisa <tt>#CHARSET</tt>).',
501
-	'texte_jeu_caractere_3' => 'Vòstre sit es per ara installat amb lo jòc de caractèrs :',
502
-	'texte_login_ldap_1' => '(Laissar vuege per un accès anonim, o picar lo camin complet, per exemple «<tt>uid=fabre, ou=usanciers, dc=mon-domeni, dc=com</tt>».)',
503
-	'texte_login_precaution' => 'Atencion! Aquò’s lo login amb lo quau siatz ara connectat/ada. 
501
+    'texte_jeu_caractere_3' => 'Vòstre sit es per ara installat amb lo jòc de caractèrs :',
502
+    'texte_login_ldap_1' => '(Laissar vuege per un accès anonim, o picar lo camin complet, per exemple «<tt>uid=fabre, ou=usanciers, dc=mon-domeni, dc=com</tt>».)',
503
+    'texte_login_precaution' => 'Atencion! Aquò’s lo login amb lo quau siatz ara connectat/ada. 
504 504
  Utilizatz aquest formulari amb precaucion...',
505
-	'texte_mise_a_niveau_base_1' => 'Venètz d’actualizar lei fichiers SPIP.
505
+    'texte_mise_a_niveau_base_1' => 'Venètz d’actualizar lei fichiers SPIP.
506 506
  Ara cau metre a nivèu la basa de donadas
507 507
  dau sit.',
508
-	'texte_modifier_article' => 'Modificar l’article:',
509
-	'texte_multilinguisme' => 'Se desiratz de gerir d’articles en mai d’una lenga, amb una navigacion complèxa, podètz apondre un menut per chausir la lenga deis articles e/o dei rubricas, en foncion de l’organizacion de vòstre sit.', # MODIF
510
-	'texte_multilinguisme_trad' => 'Podètz tanben activar un sistèma de gestion dei liames entre lei diferentei reviradas d’un article.', # MODIF
511
-	'texte_non_compresse' => '<i>non comprimit</i> (per amòr que vòstre servidor supòrta pas aquela foncionalitat)',
512
-	'texte_nouvelle_version_spip_1' => 'Avètz installada una version novèla d’SPIP.',
513
-	'texte_nouvelle_version_spip_2' => 'Aquesta version novèla demanda una actualizacion mai completa que de costuma. Se siatz webmèstre/webmèstra dau sit, vougatz escafar lo fichier <tt>inc_connect.php3</tt> dau repertòri <tt>ecrire</tt> e tornar prene l’installacion per fin d’actualizar vòstrei paramètres de connexion a la basa de donadas.<p> (NB: s’avètz demembrat vòstrei paramètres de connexion, espepissatz lo fichier  <tt>inc_connect.php3</tt> avans de lo suprimir...)</p>', # MODIF
514
-	'texte_operation_echec' => 'Tornatz a la pagina precedenta, chausissètz una autra basa o creatz-ne’n una novèla. Verificatz leis informacions que vòstre aubergador a fornidas.',
515
-	'texte_plus_trois_car' => 'mai de 3 caractèrs',
516
-	'texte_plusieurs_articles' => 'Mai d’un autor trobat per "@cherche_auteur@":',
517
-	'texte_port_annuaire' => '(La valor indicada coma predefinida conven en generau.)',
518
-	'texte_proposer_publication' => 'Quora auretz acabat vòstre article,<br /> poiretz prepausar que siá publicat.',
519
-	'texte_proxy' => 'Dins d’unei cas (intranet, rets protegidas...),
508
+    'texte_modifier_article' => 'Modificar l’article:',
509
+    'texte_multilinguisme' => 'Se desiratz de gerir d’articles en mai d’una lenga, amb una navigacion complèxa, podètz apondre un menut per chausir la lenga deis articles e/o dei rubricas, en foncion de l’organizacion de vòstre sit.', # MODIF
510
+    'texte_multilinguisme_trad' => 'Podètz tanben activar un sistèma de gestion dei liames entre lei diferentei reviradas d’un article.', # MODIF
511
+    'texte_non_compresse' => '<i>non comprimit</i> (per amòr que vòstre servidor supòrta pas aquela foncionalitat)',
512
+    'texte_nouvelle_version_spip_1' => 'Avètz installada una version novèla d’SPIP.',
513
+    'texte_nouvelle_version_spip_2' => 'Aquesta version novèla demanda una actualizacion mai completa que de costuma. Se siatz webmèstre/webmèstra dau sit, vougatz escafar lo fichier <tt>inc_connect.php3</tt> dau repertòri <tt>ecrire</tt> e tornar prene l’installacion per fin d’actualizar vòstrei paramètres de connexion a la basa de donadas.<p> (NB: s’avètz demembrat vòstrei paramètres de connexion, espepissatz lo fichier  <tt>inc_connect.php3</tt> avans de lo suprimir...)</p>', # MODIF
514
+    'texte_operation_echec' => 'Tornatz a la pagina precedenta, chausissètz una autra basa o creatz-ne’n una novèla. Verificatz leis informacions que vòstre aubergador a fornidas.',
515
+    'texte_plus_trois_car' => 'mai de 3 caractèrs',
516
+    'texte_plusieurs_articles' => 'Mai d’un autor trobat per "@cherche_auteur@":',
517
+    'texte_port_annuaire' => '(La valor indicada coma predefinida conven en generau.)',
518
+    'texte_proposer_publication' => 'Quora auretz acabat vòstre article,<br /> poiretz prepausar que siá publicat.',
519
+    'texte_proxy' => 'Dins d’unei cas (intranet, rets protegidas...),
520 520
   se pòt que cauga utilizar un <i>proxy HTTP</i> per aténher lei sits sindicats.
521 521
   En aqueu cas, marcatz çai sota son adreiça, sota la forma
522 522
   <tt><html>http://proxy:8080</html></tt>. En generau,
523 523
   laissaretz vueja aquela casa.',
524
-	'texte_publication_articles_post_dates' => 'Coma SPIP se deu comportar fàcia ais articles que sa
524
+    'texte_publication_articles_post_dates' => 'Coma SPIP se deu comportar fàcia ais articles que sa
525 525
   data de publicacion es fixada a una 
526 526
   escasença futura?',
527
-	'texte_rappel_selection_champs' => '[Oblidetz pas de seleccionar aqueu camp correctament.]',
528
-	'texte_recalcul_page' => 'Se volètz
527
+    'texte_rappel_selection_champs' => '[Oblidetz pas de seleccionar aqueu camp correctament.]',
528
+    'texte_recalcul_page' => 'Se volètz
529 529
 tornar calcular ren qu’una pagina, passatz puslèu per l’espaci public e utilizatz lo  boton "tornar calcular".',
530
-	'texte_recuperer_base' => 'Reparar la basa de donadas',
531
-	'texte_reference_mais_redirige' => 'article referenciat dins vòstre sit SPIP, mai redirigit vèrs una autra URL.',
532
-	'texte_requetes_echouent' => '<b>Quora d’unei requistas SQL s’encalan
530
+    'texte_recuperer_base' => 'Reparar la basa de donadas',
531
+    'texte_reference_mais_redirige' => 'article referenciat dins vòstre sit SPIP, mai redirigit vèrs una autra URL.',
532
+    'texte_requetes_echouent' => '<b>Quora d’unei requistas SQL s’encalan
533 533
   sistematicament e sensa rason aparenta, se pòt
534 534
   qu’aquò venga ben de la basa de donadas.  </b><p>
535 535
   SQL ten la facultat de reparar sei
@@ -539,73 +539,73 @@  discard block
 block discarded – undo
539 539
  benlèu d’indicis de çò que va pas...</p><p>
540 540
   Se lo problèma persistís, contactatz vòstre
541 541
   aubergador.</p>', # MODIF
542
-	'texte_selection_langue_principale' => 'Podètz seleccionar çai sota la "lenga principala" dau sit. Aquela chausida vos obliga pas -grand gaug- d’escriure vòstreis articles dins la lenga seleccionada, mai permet de determinar:
542
+    'texte_selection_langue_principale' => 'Podètz seleccionar çai sota la "lenga principala" dau sit. Aquela chausida vos obliga pas -grand gaug- d’escriure vòstreis articles dins la lenga seleccionada, mai permet de determinar:
543 543
  <ul><li> lo format predefinit dei datas sus lo sit public;</li>
544 544
  <li> la natura dau motor tipografic que SPIP deu utilizar per lo rendut dei tèxts;</li>
545 545
  <li> la lenga utilizada dins lei formularis dau sit public;</li>
546 546
  <li> la lenga presentada coma predefinida dins l’espaci privat.</li></ul>',
547
-	'texte_sous_titre' => 'Sostítol',
548
-	'texte_statistiques_visites' => '(barras escuras:  dimenge / corba escura: evolucion de la mejana)',
549
-	'texte_statut_attente_validation' => 'en espèra de validacion',
550
-	'texte_statut_publies' => 'publicats en linha',
551
-	'texte_statut_refuses' => 'refusats',
552
-	'texte_suppression_fichiers' => 'Utilizatz aquela comanda per suprimir totei lei fichiers que se tròban
547
+    'texte_sous_titre' => 'Sostítol',
548
+    'texte_statistiques_visites' => '(barras escuras:  dimenge / corba escura: evolucion de la mejana)',
549
+    'texte_statut_attente_validation' => 'en espèra de validacion',
550
+    'texte_statut_publies' => 'publicats en linha',
551
+    'texte_statut_refuses' => 'refusats',
552
+    'texte_suppression_fichiers' => 'Utilizatz aquela comanda per suprimir totei lei fichiers que se tròban
553 553
 dins l’escondedor SPIP. Aquò permet per exemple de forçar un calcul nòu de totei lei paginas
554 554
 s’avètz bravament modificat lo grafisme o l’estructura dau sit.',
555
-	'texte_sur_titre' => 'Subretítol',
556
-	'texte_table_ok' => ': aquesta taula es condrecha.',
557
-	'texte_tentative_recuperation' => 'Assai de reparacion',
558
-	'texte_tenter_reparation' => 'Assajar de reparar la basa de donadas',
559
-	'texte_test_proxy' => 'Per assajar aqueu proxy, indicatz aicí l’adreiça d’un sit web
555
+    'texte_sur_titre' => 'Subretítol',
556
+    'texte_table_ok' => ': aquesta taula es condrecha.',
557
+    'texte_tentative_recuperation' => 'Assai de reparacion',
558
+    'texte_tenter_reparation' => 'Assajar de reparar la basa de donadas',
559
+    'texte_test_proxy' => 'Per assajar aqueu proxy, indicatz aicí l’adreiça d’un sit web
560 560
     que lo voudriatz esprovar.',
561
-	'texte_titre_02' => 'Títol:',
562
-	'texte_titre_obligatoire' => '<b>Títol</b> [Obligatòri]',
563
-	'texte_travail_article' => '@nom_auteur_modif@ a trabalhat sus aquel article fa @date_diff@ minutas',
564
-	'texte_travail_collaboratif' => 'Quora es frequent que mai d’un redactor 
561
+    'texte_titre_02' => 'Títol:',
562
+    'texte_titre_obligatoire' => '<b>Títol</b> [Obligatòri]',
563
+    'texte_travail_article' => '@nom_auteur_modif@ a trabalhat sus aquel article fa @date_diff@ minutas',
564
+    'texte_travail_collaboratif' => 'Quora es frequent que mai d’un redactor 
565 565
   trabalhe sus lo meteis article, lo sistèma
566 566
   pòt afichar leis articles recentament "dobèrts"
567 567
   per fin d’evitar lei modificacions simultanèas.
568 568
   Aquela opcion es desactivada de maniera predefinida
569 569
   per fin d’evitar d’afichar de messatges d’avertiment
570 570
   intempestius.',
571
-	'texte_vide' => 'vuege',
572
-	'texte_vider_cache' => 'Vujar l’escondedor',
573
-	'titre_admin_tech' => 'Mantenença tecnica',
574
-	'titre_admin_vider' => 'Mantenença tecnica',
575
-	'titre_cadre_afficher_article' => 'Afichar leis articles',
576
-	'titre_cadre_afficher_traductions' => 'Afichar l’estat dei reviradas per aquela lenga',
577
-	'titre_cadre_ajouter_auteur' => 'APONDRE UN AUTOR:',
578
-	'titre_cadre_interieur_rubrique' => 'Dintre la rubrica',
579
-	'titre_cadre_numero_auteur' => 'AUTOR NUMÈRO',
580
-	'titre_cadre_signature_obligatoire' => '<b>Signatura</b> [Obligatòria]<br />',
581
-	'titre_config_fonctions' => 'Configuracion dau sit',
582
-	'titre_configuration' => 'Configuracion dau sit',
583
-	'titre_connexion_ldap' => 'Opcions: <b>Vòstra connexion LDAP</b>',
584
-	'titre_groupe_mots' => 'GROP DE MOTS:',
585
-	'titre_langue_article' => 'LENGA DE L’ARTICLE', # MODIF
586
-	'titre_langue_rubrique' => 'LENGA DE LA RUBRICA', # MODIF
587
-	'titre_langue_trad_article' => 'LENGA E REVIRADAS DE L’ARTICLE',
588
-	'titre_les_articles' => 'LEIS ARTICLES',
589
-	'titre_naviguer_dans_le_site' => 'Navigar per lo sit...',
590
-	'titre_nouvelle_rubrique' => 'Rubrica novèla',
591
-	'titre_numero_rubrique' => 'RUBRICA NUMÈRO:',
592
-	'titre_page_articles_edit' => 'Modificar: @titre@',
593
-	'titre_page_articles_page' => 'Leis articles',
594
-	'titre_page_articles_tous' => 'Tot lo sit',
595
-	'titre_page_calendrier' => 'Calendier @nom_mois@ de @annee@',
596
-	'titre_page_config_contenu' => 'Configuracion dau sit',
597
-	'titre_page_delete_all' => 'supression totala e irreversibla',
598
-	'titre_page_recherche' => 'Resultats de la cèrca @recherche@',
599
-	'titre_page_statistiques_referers' => 'Estadisticas (liames intrants)',
600
-	'titre_page_upgrade' => 'Mesa a nivèu d’SPIP',
601
-	'titre_publication_articles_post_dates' => 'Publicacion deis articles pòstdatats',
602
-	'titre_reparation' => 'Reparacion',
603
-	'titre_suivi_petition' => 'Seguit dei peticions',
604
-	'trad_article_traduction' => 'Totei lei versions d’aquel article:',
605
-	'trad_delier' => 'Cessar de liar aquest article a sei reviradas ', # MODIF
606
-	'trad_lier' => 'Aquest article es una revirada de l’article numèro:',
607
-	'trad_new' => 'Escriure una revirada novèla d’aquest article', # MODIF
571
+    'texte_vide' => 'vuege',
572
+    'texte_vider_cache' => 'Vujar l’escondedor',
573
+    'titre_admin_tech' => 'Mantenença tecnica',
574
+    'titre_admin_vider' => 'Mantenença tecnica',
575
+    'titre_cadre_afficher_article' => 'Afichar leis articles',
576
+    'titre_cadre_afficher_traductions' => 'Afichar l’estat dei reviradas per aquela lenga',
577
+    'titre_cadre_ajouter_auteur' => 'APONDRE UN AUTOR:',
578
+    'titre_cadre_interieur_rubrique' => 'Dintre la rubrica',
579
+    'titre_cadre_numero_auteur' => 'AUTOR NUMÈRO',
580
+    'titre_cadre_signature_obligatoire' => '<b>Signatura</b> [Obligatòria]<br />',
581
+    'titre_config_fonctions' => 'Configuracion dau sit',
582
+    'titre_configuration' => 'Configuracion dau sit',
583
+    'titre_connexion_ldap' => 'Opcions: <b>Vòstra connexion LDAP</b>',
584
+    'titre_groupe_mots' => 'GROP DE MOTS:',
585
+    'titre_langue_article' => 'LENGA DE L’ARTICLE', # MODIF
586
+    'titre_langue_rubrique' => 'LENGA DE LA RUBRICA', # MODIF
587
+    'titre_langue_trad_article' => 'LENGA E REVIRADAS DE L’ARTICLE',
588
+    'titre_les_articles' => 'LEIS ARTICLES',
589
+    'titre_naviguer_dans_le_site' => 'Navigar per lo sit...',
590
+    'titre_nouvelle_rubrique' => 'Rubrica novèla',
591
+    'titre_numero_rubrique' => 'RUBRICA NUMÈRO:',
592
+    'titre_page_articles_edit' => 'Modificar: @titre@',
593
+    'titre_page_articles_page' => 'Leis articles',
594
+    'titre_page_articles_tous' => 'Tot lo sit',
595
+    'titre_page_calendrier' => 'Calendier @nom_mois@ de @annee@',
596
+    'titre_page_config_contenu' => 'Configuracion dau sit',
597
+    'titre_page_delete_all' => 'supression totala e irreversibla',
598
+    'titre_page_recherche' => 'Resultats de la cèrca @recherche@',
599
+    'titre_page_statistiques_referers' => 'Estadisticas (liames intrants)',
600
+    'titre_page_upgrade' => 'Mesa a nivèu d’SPIP',
601
+    'titre_publication_articles_post_dates' => 'Publicacion deis articles pòstdatats',
602
+    'titre_reparation' => 'Reparacion',
603
+    'titre_suivi_petition' => 'Seguit dei peticions',
604
+    'trad_article_traduction' => 'Totei lei versions d’aquel article:',
605
+    'trad_delier' => 'Cessar de liar aquest article a sei reviradas ', # MODIF
606
+    'trad_lier' => 'Aquest article es una revirada de l’article numèro:',
607
+    'trad_new' => 'Escriure una revirada novèla d’aquest article', # MODIF
608 608
 
609
-	// V
610
-	'version' => 'Version :',
609
+    // V
610
+    'version' => 'Version :',
611 611
 ];
Please login to merge, or discard this patch.
ecrire/lang/public_da.php 1 patch
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -5,99 +5,99 @@
 block discarded – undo
5 5
 
6 6
 return [
7 7
 
8
-	// A
9
-	'accueil_site' => 'Hjemmeside', # MODIF
10
-	'articles' => 'Artikler',
11
-	'articles_auteur' => 'Denne forfatters artikler',
12
-	'articles_populaires' => 'De mest læste artikler',
13
-	'articles_rubrique' => 'Dette områdes artikler',
14
-	'aucun_article' => 'Der er ingen artikel på denne adresse',
15
-	'aucun_auteur' => 'Der er ingen forfatter på denne adresse',
16
-	'aucun_site' => 'Der er intet websted på denne adresse',
17
-	'aucune_breve' => 'Der er ingen nyhed på denne adresse',
18
-	'aucune_rubrique' => 'Der er ikke noget afsnit på denne adresse',
19
-	'autres_breves' => 'Andre nyheder',
20
-	'autres_groupes_mots_clefs' => 'Andre grupper af nøgleord',
21
-	'autres_sites' => 'Andre websteder',
8
+    // A
9
+    'accueil_site' => 'Hjemmeside', # MODIF
10
+    'articles' => 'Artikler',
11
+    'articles_auteur' => 'Denne forfatters artikler',
12
+    'articles_populaires' => 'De mest læste artikler',
13
+    'articles_rubrique' => 'Dette områdes artikler',
14
+    'aucun_article' => 'Der er ingen artikel på denne adresse',
15
+    'aucun_auteur' => 'Der er ingen forfatter på denne adresse',
16
+    'aucun_site' => 'Der er intet websted på denne adresse',
17
+    'aucune_breve' => 'Der er ingen nyhed på denne adresse',
18
+    'aucune_rubrique' => 'Der er ikke noget afsnit på denne adresse',
19
+    'autres_breves' => 'Andre nyheder',
20
+    'autres_groupes_mots_clefs' => 'Andre grupper af nøgleord',
21
+    'autres_sites' => 'Andre websteder',
22 22
 
23
-	// B
24
-	'bonjour' => 'Hej',
23
+    // B
24
+    'bonjour' => 'Hej',
25 25
 
26
-	// C
27
-	'commenter_site' => 'Kommentar til dette websted',
26
+    // C
27
+    'commenter_site' => 'Kommentar til dette websted',
28 28
 
29
-	// D
30
-	'date' => 'Dato',
31
-	'dernier_ajout' => 'Seneste tilføjelse',
32
-	'dernieres_breves' => 'Seneste nyhed',
33
-	'derniers_articles' => 'Seneste artikler',
34
-	'derniers_commentaires' => 'Seneste kommentarer',
35
-	'derniers_messages_forum' => 'Seneste indlæg offentliggjort i forummer',
29
+    // D
30
+    'date' => 'Dato',
31
+    'dernier_ajout' => 'Seneste tilføjelse',
32
+    'dernieres_breves' => 'Seneste nyhed',
33
+    'derniers_articles' => 'Seneste artikler',
34
+    'derniers_commentaires' => 'Seneste kommentarer',
35
+    'derniers_messages_forum' => 'Seneste indlæg offentliggjort i forummer',
36 36
 
37
-	// E
38
-	'edition_mode_texte' => 'Tekstudgave',
39
-	'en_reponse' => 'Svaradresse:',
40
-	'en_resume' => 'Opsummering',
41
-	'envoyer_message' => 'Lav indlæg',
42
-	'espace_prive' => 'Privat område',
37
+    // E
38
+    'edition_mode_texte' => 'Tekstudgave',
39
+    'en_reponse' => 'Svaradresse:',
40
+    'en_resume' => 'Opsummering',
41
+    'envoyer_message' => 'Lav indlæg',
42
+    'espace_prive' => 'Privat område',
43 43
 
44
-	// H
45
-	'hierarchie_site' => 'Webstedets struktur',
44
+    // H
45
+    'hierarchie_site' => 'Webstedets struktur',
46 46
 
47
-	// J
48
-	'jours' => 'dage',
47
+    // J
48
+    'jours' => 'dage',
49 49
 
50
-	// M
51
-	'meme_auteur' => 'Af samme forfatter',
52
-	'meme_rubrique' => 'I samme afsnit',
53
-	'memes_auteurs' => 'Af samme forfattere',
54
-	'message' => 'Indlæg',
55
-	'messages_forum' => 'Forumindlæg', # MODIF
56
-	'messages_recents' => 'Seneste forumindlæg',
57
-	'mots_clefs' => 'Nøgleord',
58
-	'mots_clefs_meme_groupe' => 'Nøgleord i samme gruppe',
50
+    // M
51
+    'meme_auteur' => 'Af samme forfatter',
52
+    'meme_rubrique' => 'I samme afsnit',
53
+    'memes_auteurs' => 'Af samme forfattere',
54
+    'message' => 'Indlæg',
55
+    'messages_forum' => 'Forumindlæg', # MODIF
56
+    'messages_recents' => 'Seneste forumindlæg',
57
+    'mots_clefs' => 'Nøgleord',
58
+    'mots_clefs_meme_groupe' => 'Nøgleord i samme gruppe',
59 59
 
60
-	// N
61
-	'navigation' => 'Navigering',
62
-	'nom' => 'Navn',
63
-	'nouveautes' => 'Hvad nyt',
64
-	'nouveautes_web' => 'Hvad nyt på Internettet',
65
-	'nouveaux_articles' => 'Nye artikler',
66
-	'nouvelles_breves' => 'Nyheder',
60
+    // N
61
+    'navigation' => 'Navigering',
62
+    'nom' => 'Navn',
63
+    'nouveautes' => 'Hvad nyt',
64
+    'nouveautes_web' => 'Hvad nyt på Internettet',
65
+    'nouveaux_articles' => 'Nye artikler',
66
+    'nouvelles_breves' => 'Nyheder',
67 67
 
68
-	// P
69
-	'page_precedente' => 'foregående side',
70
-	'page_suivante' => 'næste side',
71
-	'par_auteur' => 'af',
72
-	'participer_site' => 'Du kan deltage aktivt på dette websted og skrive dine egne artikler ved at tilmelde dig nedenfor. Du vil da straks modtage en email med en adgangskode til webstedets private område.',
73
-	'plan_site' => 'Indholdsoversigt',
74
-	'popularite' => 'Popularitet',
75
-	'poster_message' => 'Indlæg',
68
+    // P
69
+    'page_precedente' => 'foregående side',
70
+    'page_suivante' => 'næste side',
71
+    'par_auteur' => 'af',
72
+    'participer_site' => 'Du kan deltage aktivt på dette websted og skrive dine egne artikler ved at tilmelde dig nedenfor. Du vil da straks modtage en email med en adgangskode til webstedets private område.',
73
+    'plan_site' => 'Indholdsoversigt',
74
+    'popularite' => 'Popularitet',
75
+    'poster_message' => 'Indlæg',
76 76
 
77
-	// R
78
-	'repondre_article' => 'Lav et svar til denne artikel',
79
-	'repondre_breve' => 'Lav et svar på denne nyhed',
80
-	'resultats_recherche' => 'Søgeresultater',
81
-	'retour_debut_forums' => 'Tilbage til starten på forummet',
82
-	'rubrique' => 'Afsnit',
83
-	'rubriques' => 'Afsnit',
77
+    // R
78
+    'repondre_article' => 'Lav et svar til denne artikel',
79
+    'repondre_breve' => 'Lav et svar på denne nyhed',
80
+    'resultats_recherche' => 'Søgeresultater',
81
+    'retour_debut_forums' => 'Tilbage til starten på forummet',
82
+    'rubrique' => 'Afsnit',
83
+    'rubriques' => 'Afsnit',
84 84
 
85
-	// S
86
-	'signatures_petition' => 'Underskrifter',
87
-	'site_realise_avec_spip' => 'Websted lavet med SPIP',
88
-	'sites_web' => 'Websteder',
89
-	'sous_rubriques' => 'Underafsnit',
90
-	'suite' => 'fortsæt',
91
-	'sur_web' => 'På Internettet',
92
-	'syndiquer_rubrique' => 'Syndiker dette afsnit',
93
-	'syndiquer_site' => 'Syndiker hele webstedet',
85
+    // S
86
+    'signatures_petition' => 'Underskrifter',
87
+    'site_realise_avec_spip' => 'Websted lavet med SPIP',
88
+    'sites_web' => 'Websteder',
89
+    'sous_rubriques' => 'Underafsnit',
90
+    'suite' => 'fortsæt',
91
+    'sur_web' => 'På Internettet',
92
+    'syndiquer_rubrique' => 'Syndiker dette afsnit',
93
+    'syndiquer_site' => 'Syndiker hele webstedet',
94 94
 
95
-	// T
96
-	'texte_lettre_information' => 'Her er webstedets nyhedsbrev',
97
-	'texte_lettre_information_2' => 'Dette brev opsummerer artikler og nyheder offentlliggjort siden', # MODIF
95
+    // T
96
+    'texte_lettre_information' => 'Her er webstedets nyhedsbrev',
97
+    'texte_lettre_information_2' => 'Dette brev opsummerer artikler og nyheder offentlliggjort siden', # MODIF
98 98
 
99
-	// V
100
-	'ver_imprimer' => 'Printbar version',
101
-	'voir_en_ligne' => 'Se online',
102
-	'voir_squelette' => 'Hent skabelonen til denne side',
99
+    // V
100
+    'ver_imprimer' => 'Printbar version',
101
+    'voir_en_ligne' => 'Se online',
102
+    'voir_squelette' => 'Hent skabelonen til denne side',
103 103
 ];
Please login to merge, or discard this patch.
ecrire/lang/public_cpf_hat.php 1 patch
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -5,100 +5,100 @@
 block discarded – undo
5 5
 
6 6
 return [
7 7
 
8
-	// A
9
-	'accueil_site' => 'Akey sit la', # MODIF
10
-	'articles' => 'Atik yo',
11
-	'articles_auteur' => 'Tout atik lotè a',
12
-	'articles_populaires' => 'Atik yo ki plis popilè',
13
-	'articles_rubrique' => 'Atik yo nan ribrik sa-a',
14
-	'aucun_article' => 'Gen pa oken atik sou ladrès la',
15
-	'aucun_auteur' => 'Gen pa oken lotè sou ladrès la',
16
-	'aucun_site' => 'Gen pa oken sit sou ladrès la',
17
-	'aucune_breve' => 'Gen pa oken tinouvèl sou ladrès la',
18
-	'aucune_rubrique' => 'Gen pa oken ribrik sou ladrès la',
19
-	'autres_breves' => 'Lòt tinouvèl yo',
20
-	'autres_groupes_mots_clefs' => 'Lòt gwoup mokle yo',
21
-	'autres_sites' => 'Lòt sit yo',
8
+    // A
9
+    'accueil_site' => 'Akey sit la', # MODIF
10
+    'articles' => 'Atik yo',
11
+    'articles_auteur' => 'Tout atik lotè a',
12
+    'articles_populaires' => 'Atik yo ki plis popilè',
13
+    'articles_rubrique' => 'Atik yo nan ribrik sa-a',
14
+    'aucun_article' => 'Gen pa oken atik sou ladrès la',
15
+    'aucun_auteur' => 'Gen pa oken lotè sou ladrès la',
16
+    'aucun_site' => 'Gen pa oken sit sou ladrès la',
17
+    'aucune_breve' => 'Gen pa oken tinouvèl sou ladrès la',
18
+    'aucune_rubrique' => 'Gen pa oken ribrik sou ladrès la',
19
+    'autres_breves' => 'Lòt tinouvèl yo',
20
+    'autres_groupes_mots_clefs' => 'Lòt gwoup mokle yo',
21
+    'autres_sites' => 'Lòt sit yo',
22 22
 
23
-	// B
24
-	'bonjour' => 'Bonjou',
23
+    // B
24
+    'bonjour' => 'Bonjou',
25 25
 
26
-	// C
27
-	'commenter_site' => 'Lès yon komantè sou sit la',
26
+    // C
27
+    'commenter_site' => 'Lès yon komantè sou sit la',
28 28
 
29
-	// D
30
-	'date' => 'Dat',
31
-	'dernier_ajout' => 'Dènye bagay ki ajoute',
32
-	'dernieres_breves' => 'Dènye tinouvèl yo',
33
-	'derniers_articles' => 'Dènye atik yo',
34
-	'derniers_commentaires' => 'Dènye komantè yo',
35
-	'derniers_messages_forum' => 'Dènye mesaj yo ki te piblye nan fowom yo',
29
+    // D
30
+    'date' => 'Dat',
31
+    'dernier_ajout' => 'Dènye bagay ki ajoute',
32
+    'dernieres_breves' => 'Dènye tinouvèl yo',
33
+    'derniers_articles' => 'Dènye atik yo',
34
+    'derniers_commentaires' => 'Dènye komantè yo',
35
+    'derniers_messages_forum' => 'Dènye mesaj yo ki te piblye nan fowom yo',
36 36
 
37
-	// E
38
-	'edition_mode_texte' => 'Ledisyon modtèks pou',
39
-	'en_reponse' => 'Pou réponn a :',
40
-	'en_resume' => 'Nan kèk mo',
41
-	'envoyer_message' => 'Voye yon mesaj',
42
-	'espace_prive' => 'Espas privé',
37
+    // E
38
+    'edition_mode_texte' => 'Ledisyon modtèks pou',
39
+    'en_reponse' => 'Pou réponn a :',
40
+    'en_resume' => 'Nan kèk mo',
41
+    'envoyer_message' => 'Voye yon mesaj',
42
+    'espace_prive' => 'Espas privé',
43 43
 
44
-	// H
45
-	'hierarchie_site' => 'Estrikti sit sa-a',
44
+    // H
45
+    'hierarchie_site' => 'Estrikti sit sa-a',
46 46
 
47
-	// J
48
-	'jours' => 'jou yo',
47
+    // J
48
+    'jours' => 'jou yo',
49 49
 
50
-	// M
51
-	'meme_auteur' => 'Mèm lotè ki ekri ankò',
52
-	'meme_rubrique' => 'Andan mèm ribrik',
53
-	'memes_auteurs' => 'Mèm lotè yo ki ekri ankò',
54
-	'message' => 'Mesaj',
55
-	'messages_forum' => 'Mesaj yo nan fowom ', # MODIF
56
-	'messages_recents' => 'Mesaj yo nan fowom ki plis resan',
57
-	'mots_clefs' => 'Mokle yo',
58
-	'mots_clefs_meme_groupe' => 'Mokle yo nan mèm gwoup',
50
+    // M
51
+    'meme_auteur' => 'Mèm lotè ki ekri ankò',
52
+    'meme_rubrique' => 'Andan mèm ribrik',
53
+    'memes_auteurs' => 'Mèm lotè yo ki ekri ankò',
54
+    'message' => 'Mesaj',
55
+    'messages_forum' => 'Mesaj yo nan fowom ', # MODIF
56
+    'messages_recents' => 'Mesaj yo nan fowom ki plis resan',
57
+    'mots_clefs' => 'Mokle yo',
58
+    'mots_clefs_meme_groupe' => 'Mokle yo nan mèm gwoup',
59 59
 
60
-	// N
61
-	'navigation' => 'Toune-vire',
62
-	'nom' => 'Kouman rele',
63
-	'nouveautes' => 'Nouvèlté yo',
64
-	'nouveautes_web' => 'Kisa nouvo sou wèb la',
65
-	'nouveaux_articles' => 'Nouvo atik yo',
66
-	'nouvelles_breves' => 'Nouvo tinouvèl yo',
60
+    // N
61
+    'navigation' => 'Toune-vire',
62
+    'nom' => 'Kouman rele',
63
+    'nouveautes' => 'Nouvèlté yo',
64
+    'nouveautes_web' => 'Kisa nouvo sou wèb la',
65
+    'nouveaux_articles' => 'Nouvo atik yo',
66
+    'nouvelles_breves' => 'Nouvo tinouvèl yo',
67 67
 
68
-	// P
69
-	'page_precedente' => 'paj dèyè',
70
-	'page_suivante' => 'paj swivan',
71
-	'par_auteur' => 'pa',
72
-	'participer_site' => 'Ou se kapab soutni vi sit la ek pwopoze ou pwop atik aw. Pou soutni kon sa enskri a w isit anba. Ou ke gen touswit ou kod laksè nan espas privé sit la.',
73
-	'plan_site' => 'Kat sit la',
74
-	'popularite' => 'Kouman se popilè',
75
-	'poster_message' => 'Voye yon mesaj',
76
-	'proposer_site' => 'Ou se kapab pwopoze yon sit pou ajoute nan ribrik la :',
68
+    // P
69
+    'page_precedente' => 'paj dèyè',
70
+    'page_suivante' => 'paj swivan',
71
+    'par_auteur' => 'pa',
72
+    'participer_site' => 'Ou se kapab soutni vi sit la ek pwopoze ou pwop atik aw. Pou soutni kon sa enskri a w isit anba. Ou ke gen touswit ou kod laksè nan espas privé sit la.',
73
+    'plan_site' => 'Kat sit la',
74
+    'popularite' => 'Kouman se popilè',
75
+    'poster_message' => 'Voye yon mesaj',
76
+    'proposer_site' => 'Ou se kapab pwopoze yon sit pou ajoute nan ribrik la :',
77 77
 
78
-	// R
79
-	'repondre_article' => 'Reponn sou atik la',
80
-	'repondre_breve' => 'Reponn sou tinouvèl la',
81
-	'resultats_recherche' => 'Rezilta pou ou chèche',
82
-	'retour_debut_forums' => 'Tounyen nan koumansman fowom sa-yo',
83
-	'rubrique' => 'Ribrik',
84
-	'rubriques' => 'Ribrik yo',
78
+    // R
79
+    'repondre_article' => 'Reponn sou atik la',
80
+    'repondre_breve' => 'Reponn sou tinouvèl la',
81
+    'resultats_recherche' => 'Rezilta pou ou chèche',
82
+    'retour_debut_forums' => 'Tounyen nan koumansman fowom sa-yo',
83
+    'rubrique' => 'Ribrik',
84
+    'rubriques' => 'Ribrik yo',
85 85
 
86
-	// S
87
-	'signatures_petition' => 'Siyati yo',
88
-	'site_realise_avec_spip' => 'Sit la  se sit ki te fè ak SPIP',
89
-	'sites_web' => 'Sitwèb yo',
90
-	'sous_rubriques' => 'Souribrik yo',
91
-	'suite' => 'swit',
92
-	'sur_web' => 'Sou wèb',
93
-	'syndiquer_rubrique' => 'Sindike ribrik la',
94
-	'syndiquer_site' => 'Sindike tout sit la mèm',
86
+    // S
87
+    'signatures_petition' => 'Siyati yo',
88
+    'site_realise_avec_spip' => 'Sit la  se sit ki te fè ak SPIP',
89
+    'sites_web' => 'Sitwèb yo',
90
+    'sous_rubriques' => 'Souribrik yo',
91
+    'suite' => 'swit',
92
+    'sur_web' => 'Sou wèb',
93
+    'syndiquer_rubrique' => 'Sindike ribrik la',
94
+    'syndiquer_site' => 'Sindike tout sit la mèm',
95 95
 
96
-	// T
97
-	'texte_lettre_information' => 'Tala lèt-enfòmasyon sit la ',
98
-	'texte_lettre_information_2' => 'Lèt la ka ramase tout atik ek tinouvèl yo  te pibliye depi', # MODIF
96
+    // T
97
+    'texte_lettre_information' => 'Tala lèt-enfòmasyon sit la ',
98
+    'texte_lettre_information_2' => 'Lèt la ka ramase tout atik ek tinouvèl yo  te pibliye depi', # MODIF
99 99
 
100
-	// V
101
-	'ver_imprimer' => 'Vèsyon pou enprime',
102
-	'voir_en_ligne' => 'Gad an liy',
103
-	'voir_squelette' => 'kou je sou léskelèt paj-la',
100
+    // V
101
+    'ver_imprimer' => 'Vèsyon pou enprime',
102
+    'voir_en_ligne' => 'Gad an liy',
103
+    'voir_squelette' => 'kou je sou léskelèt paj-la',
104 104
 ];
Please login to merge, or discard this patch.