Completed
Push — master ( bcd628...6b340f )
by cam
08:24 queued 07:20
created
ecrire/public/debusquer.php 1 patch
Indentation   +695 added lines, -695 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 include_spip('public/decompiler');
@@ -68,133 +68,133 @@  discard block
 block discarded – undo
68 68
  *     - true si $opt 'erreurs' = 'reset'
69 69
  **/
70 70
 function public_debusquer_dist($message = '', $lieu = '', $opt = []) {
71
-	static $should_log;
72
-	static $tableau_des_erreurs = [];
73
-
74
-	// Pour des tests unitaires, pouvoir récupérer les erreurs générées
75
-	if (isset($opt['erreurs'])) {
76
-		if ($opt['erreurs'] == 'get') {
77
-			return $tableau_des_erreurs;
78
-		}
79
-		if ($opt['erreurs'] == 'reset') {
80
-			$tableau_des_erreurs = [];
81
-
82
-			return true;
83
-		}
84
-	}
85
-
86
-	if (is_null($should_log)) {
87
-		$should_log = (empty($GLOBALS['visiteur_session']) || !include_spip('inc/autoriser') || !autoriser('debug'));
88
-	}
89
-
90
-	// Erreur ou appel final ?
91
-	if ($message) {
92
-		$message = debusquer_compose_message($message);
93
-		$tableau_des_erreurs[] = [$message, $lieu];
94
-		set_request('var_mode', 'debug');
95
-		$GLOBALS['bouton_admin_debug'] = true;
96
-		// Permettre a la compil de continuer
97
-		if (is_object($lieu) and (!isset($lieu->code) or !$lieu->code)) {
98
-			$lieu->code = "''";
99
-		}
100
-		// loger si personne ne verra l'erreur
101
-		if ($should_log) {
102
-			debusquer_loger_erreur($message, $lieu);
103
-		}
104
-		// forcer l'appel au debusqueur en cas de boucles infernales
105
-		$urgence = (_DEBUG_MAX_SQUELETTE_ERREURS and (is_countable($tableau_des_erreurs) ? count($tableau_des_erreurs) : 0) > _DEBUG_MAX_SQUELETTE_ERREURS);
106
-		if (!$urgence) {
107
-			return;
108
-		}
109
-	}
110
-	if (empty($GLOBALS['debug_objets']['principal'])) {
111
-		// espace public ?
112
-		if (isset($GLOBALS['fond'])) {
113
-			$GLOBALS['debug_objets']['principal'] = $GLOBALS['fond'];
114
-		}
115
-	}
116
-
117
-	include_spip('inc/autoriser');
118
-	if (!autoriser('debug')) {
119
-		return;
120
-	}
121
-	include_spip('inc/headers');
122
-	include_spip('inc/filtres');
123
-
124
-	lang_select($GLOBALS['visiteur_session']['lang']);
125
-	$fonc = preg_replace(',\W,', '_', _request('var_mode_objet') ?? '');
126
-	$mode = preg_replace(',\W,', '_', _request('var_mode_affiche') ?? '');
127
-
128
-	$self = str_replace("\\'", ''', self());
129
-	$self = parametre_url($self, 'var_mode', 'debug');
130
-
131
-	$res = debusquer_bandeau($tableau_des_erreurs)
132
-		. '<br />'
133
-		. debusquer_squelette($fonc, $mode, $self);
134
-
135
-	if (!_DIR_RESTREINT or headers_sent()) {
136
-		return $res;
137
-	}
138
-	if ($tableau_des_erreurs) {
139
-		http_response_code(503);
140
-	}
141
-
142
-	http_no_cache();
143
-	if (isset($_GET['var_profile'])) {
144
-		$titre = parametre_url($GLOBALS['REQUEST_URI'], 'var_profile', '');
145
-		$titre = parametre_url($titre, 'var_mode', '');
146
-	} else {
147
-		if (!$fonc) {
148
-			$fonc = $GLOBALS['debug_objets']['principal'];
149
-		}
150
-		$titre = !$mode ? $fonc : ($mode . (isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? ' ' . $GLOBALS['debug_objets']['sourcefile'][$fonc] : ''));
151
-	}
152
-	if ($message === false) {
153
-		lang_select();
154
-
155
-		return debusquer_entete($titre, $res);
156
-	} else {
157
-		echo debusquer_entete($titre, $res);
158
-	}
159
-	exit;
71
+    static $should_log;
72
+    static $tableau_des_erreurs = [];
73
+
74
+    // Pour des tests unitaires, pouvoir récupérer les erreurs générées
75
+    if (isset($opt['erreurs'])) {
76
+        if ($opt['erreurs'] == 'get') {
77
+            return $tableau_des_erreurs;
78
+        }
79
+        if ($opt['erreurs'] == 'reset') {
80
+            $tableau_des_erreurs = [];
81
+
82
+            return true;
83
+        }
84
+    }
85
+
86
+    if (is_null($should_log)) {
87
+        $should_log = (empty($GLOBALS['visiteur_session']) || !include_spip('inc/autoriser') || !autoriser('debug'));
88
+    }
89
+
90
+    // Erreur ou appel final ?
91
+    if ($message) {
92
+        $message = debusquer_compose_message($message);
93
+        $tableau_des_erreurs[] = [$message, $lieu];
94
+        set_request('var_mode', 'debug');
95
+        $GLOBALS['bouton_admin_debug'] = true;
96
+        // Permettre a la compil de continuer
97
+        if (is_object($lieu) and (!isset($lieu->code) or !$lieu->code)) {
98
+            $lieu->code = "''";
99
+        }
100
+        // loger si personne ne verra l'erreur
101
+        if ($should_log) {
102
+            debusquer_loger_erreur($message, $lieu);
103
+        }
104
+        // forcer l'appel au debusqueur en cas de boucles infernales
105
+        $urgence = (_DEBUG_MAX_SQUELETTE_ERREURS and (is_countable($tableau_des_erreurs) ? count($tableau_des_erreurs) : 0) > _DEBUG_MAX_SQUELETTE_ERREURS);
106
+        if (!$urgence) {
107
+            return;
108
+        }
109
+    }
110
+    if (empty($GLOBALS['debug_objets']['principal'])) {
111
+        // espace public ?
112
+        if (isset($GLOBALS['fond'])) {
113
+            $GLOBALS['debug_objets']['principal'] = $GLOBALS['fond'];
114
+        }
115
+    }
116
+
117
+    include_spip('inc/autoriser');
118
+    if (!autoriser('debug')) {
119
+        return;
120
+    }
121
+    include_spip('inc/headers');
122
+    include_spip('inc/filtres');
123
+
124
+    lang_select($GLOBALS['visiteur_session']['lang']);
125
+    $fonc = preg_replace(',\W,', '_', _request('var_mode_objet') ?? '');
126
+    $mode = preg_replace(',\W,', '_', _request('var_mode_affiche') ?? '');
127
+
128
+    $self = str_replace("\\'", '&#39;', self());
129
+    $self = parametre_url($self, 'var_mode', 'debug');
130
+
131
+    $res = debusquer_bandeau($tableau_des_erreurs)
132
+        . '<br />'
133
+        . debusquer_squelette($fonc, $mode, $self);
134
+
135
+    if (!_DIR_RESTREINT or headers_sent()) {
136
+        return $res;
137
+    }
138
+    if ($tableau_des_erreurs) {
139
+        http_response_code(503);
140
+    }
141
+
142
+    http_no_cache();
143
+    if (isset($_GET['var_profile'])) {
144
+        $titre = parametre_url($GLOBALS['REQUEST_URI'], 'var_profile', '');
145
+        $titre = parametre_url($titre, 'var_mode', '');
146
+    } else {
147
+        if (!$fonc) {
148
+            $fonc = $GLOBALS['debug_objets']['principal'];
149
+        }
150
+        $titre = !$mode ? $fonc : ($mode . (isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? ' ' . $GLOBALS['debug_objets']['sourcefile'][$fonc] : ''));
151
+    }
152
+    if ($message === false) {
153
+        lang_select();
154
+
155
+        return debusquer_entete($titre, $res);
156
+    } else {
157
+        echo debusquer_entete($titre, $res);
158
+    }
159
+    exit;
160 160
 }
161 161
 
162 162
 function debusquer_compose_message($msg) {
163
-	if (is_array($msg)) {
164
-		// si c'est un texte, c'est une traduction a faire, mais
165
-		// sqlite renvoit aussi des erreurs alpha num (mais avec 3 arguments)
166
-		if (!is_numeric($msg[0]) and count($msg) == 2) {
167
-			// message avec argument: instancier
168
-			$msg = _T($msg[0], $msg[1], 'spip-debug-arg');
169
-		} else {
170
-			// message SQL: interpreter
171
-			$msg = debusquer_requete($msg);
172
-		}
173
-	}
174
-	// FIXME: le fond n'est pas la si on n'est pas dans un squelette
175
-	// cela dit, ca serait bien d'indiquer tout de meme d'ou vient l'erreur
176
-	$fond = $GLOBALS['fond'] ?? '';
177
-	// une erreur critique sort $message en array
178
-	$debug = is_array($msg) ? $msg[1] : $msg;
179
-	spip_log('Debug: ' . $debug . ' (' . $fond . ')');
180
-
181
-	return $msg;
163
+    if (is_array($msg)) {
164
+        // si c'est un texte, c'est une traduction a faire, mais
165
+        // sqlite renvoit aussi des erreurs alpha num (mais avec 3 arguments)
166
+        if (!is_numeric($msg[0]) and count($msg) == 2) {
167
+            // message avec argument: instancier
168
+            $msg = _T($msg[0], $msg[1], 'spip-debug-arg');
169
+        } else {
170
+            // message SQL: interpreter
171
+            $msg = debusquer_requete($msg);
172
+        }
173
+    }
174
+    // FIXME: le fond n'est pas la si on n'est pas dans un squelette
175
+    // cela dit, ca serait bien d'indiquer tout de meme d'ou vient l'erreur
176
+    $fond = $GLOBALS['fond'] ?? '';
177
+    // une erreur critique sort $message en array
178
+    $debug = is_array($msg) ? $msg[1] : $msg;
179
+    spip_log('Debug: ' . $debug . ' (' . $fond . ')');
180
+
181
+    return $msg;
182 182
 }
183 183
 
184 184
 function debusquer_bandeau($erreurs) {
185 185
 
186
-	if (!empty($erreurs)) {
187
-		$n = [(is_countable($erreurs) ? count($erreurs) : 0) . ' ' . _T('zbug_erreur_squelette')];
186
+    if (!empty($erreurs)) {
187
+        $n = [(is_countable($erreurs) ? count($erreurs) : 0) . ' ' . _T('zbug_erreur_squelette')];
188 188
 
189
-		return debusquer_navigation($erreurs, $n);
190
-	} elseif (!empty($GLOBALS['tableau_des_temps'])) {
191
-		include_spip('public/tracer');
192
-		[$temps, $nav] = chrono_requete($GLOBALS['tableau_des_temps']);
189
+        return debusquer_navigation($erreurs, $n);
190
+    } elseif (!empty($GLOBALS['tableau_des_temps'])) {
191
+        include_spip('public/tracer');
192
+        [$temps, $nav] = chrono_requete($GLOBALS['tableau_des_temps']);
193 193
 
194
-		return debusquer_navigation($temps, $nav, 'debug-profile');
195
-	} else {
196
-		return '';
197
-	}
194
+        return debusquer_navigation($temps, $nav, 'debug-profile');
195
+    } else {
196
+        return '';
197
+    }
198 198
 }
199 199
 
200 200
 /**
@@ -204,63 +204,63 @@  discard block
 block discarded – undo
204 204
  * @return string Code HTML
205 205
  **/
206 206
 function debusquer_contexte($env) {
207
-	if (is_string($env) and is_array($env_tab = @unserialize($env))) {
208
-		$env = $env_tab;
209
-	}
210
-
211
-	if (!$env) {
212
-		return '';
213
-	}
214
-	$res = '';
215
-	foreach ($env as $nom => $valeur) {
216
-		if (is_array($valeur)) {
217
-			$valeur_simple = [];
218
-			foreach ($valeur as $v) {
219
-				if (is_array($v)) {
220
-					$valeur_simple[] = 'array:' . count($v);
221
-				} elseif (is_object($v)) {
222
-					$valeur_simple[] = get_class($v);
223
-				} elseif (is_string($v)) {
224
-					$valeur_simple[] = "'" . $v . "'";
225
-				} else {
226
-					$valeur_simple[] = $v;
227
-				}
228
-			}
229
-			$n = count($valeur);
230
-			$valeur = (($n > 3) ? 'array:' . $n . ' ' : '');
231
-			$valeur .= '[' . join(', ', $valeur_simple) . ']';
232
-		} elseif (is_object($valeur)) {
233
-			$valeur = get_class($valeur);
234
-		} elseif (is_string($valeur)) {
235
-			$valeur = "'" . $valeur . "'";
236
-		}
237
-		$res .= "\n<tr><td><strong>" . nl2br((string) entites_html($nom))
238
-			. '</strong></td><td>:&nbsp;' . nl2br((string) entites_html($valeur))
239
-			. "</td></tr>\n";
240
-	}
241
-
242
-	return "<div class='spip-env'><fieldset><legend onclick=\"this.parentElement.classList.toggle('expanded');\">#ENV</legend>\n<div><table>$res</table></div></fieldset></div>\n";
207
+    if (is_string($env) and is_array($env_tab = @unserialize($env))) {
208
+        $env = $env_tab;
209
+    }
210
+
211
+    if (!$env) {
212
+        return '';
213
+    }
214
+    $res = '';
215
+    foreach ($env as $nom => $valeur) {
216
+        if (is_array($valeur)) {
217
+            $valeur_simple = [];
218
+            foreach ($valeur as $v) {
219
+                if (is_array($v)) {
220
+                    $valeur_simple[] = 'array:' . count($v);
221
+                } elseif (is_object($v)) {
222
+                    $valeur_simple[] = get_class($v);
223
+                } elseif (is_string($v)) {
224
+                    $valeur_simple[] = "'" . $v . "'";
225
+                } else {
226
+                    $valeur_simple[] = $v;
227
+                }
228
+            }
229
+            $n = count($valeur);
230
+            $valeur = (($n > 3) ? 'array:' . $n . ' ' : '');
231
+            $valeur .= '[' . join(', ', $valeur_simple) . ']';
232
+        } elseif (is_object($valeur)) {
233
+            $valeur = get_class($valeur);
234
+        } elseif (is_string($valeur)) {
235
+            $valeur = "'" . $valeur . "'";
236
+        }
237
+        $res .= "\n<tr><td><strong>" . nl2br((string) entites_html($nom))
238
+            . '</strong></td><td>:&nbsp;' . nl2br((string) entites_html($valeur))
239
+            . "</td></tr>\n";
240
+    }
241
+
242
+    return "<div class='spip-env'><fieldset><legend onclick=\"this.parentElement.classList.toggle('expanded');\">#ENV</legend>\n<div><table>$res</table></div></fieldset></div>\n";
243 243
 }
244 244
 
245 245
 
246 246
 function debusquer_loger_erreur($msg, $lieu) {
247
-	$boucle = $ligne = $skel = '';
248
-	if (is_object($lieu)) {
249
-		$ligne = ($lieu->ligne ?? '');
250
-		$boucle = ($lieu->id_boucle ?? '');
251
-		$skel = ($lieu->descr['sourcefile'] ?? '');
252
-	}
253
-	$msg = (is_array($msg) ? implode('', $msg) : $msg);
254
-	if ($skel) {
255
-		$msg .= " Squelette $skel";
256
-	}
257
-	if ($boucle) {
258
-		$msg .= " Boucle $boucle";
259
-	}
260
-	if ($ligne) {
261
-		$msg .= " L$ligne";
262
-	}
263
-	spip_log($msg, "debusquer" . _LOG_ERREUR);
247
+    $boucle = $ligne = $skel = '';
248
+    if (is_object($lieu)) {
249
+        $ligne = ($lieu->ligne ?? '');
250
+        $boucle = ($lieu->id_boucle ?? '');
251
+        $skel = ($lieu->descr['sourcefile'] ?? '');
252
+    }
253
+    $msg = (is_array($msg) ? implode('', $msg) : $msg);
254
+    if ($skel) {
255
+        $msg .= " Squelette $skel";
256
+    }
257
+    if ($boucle) {
258
+        $msg .= " Boucle $boucle";
259
+    }
260
+    if ($ligne) {
261
+        $msg .= " L$ligne";
262
+    }
263
+    spip_log($msg, "debusquer" . _LOG_ERREUR);
264 264
 }
265 265
 
266 266
 
@@ -269,66 +269,66 @@  discard block
 block discarded – undo
269 269
 
270 270
 function debusquer_navigation($tableau, $caption = [], $id = 'debug-nav') {
271 271
 
272
-	if (_request('exec') == 'valider_xml') {
273
-		return '';
274
-	}
275
-	$GLOBALS['bouton_admin_debug'] = true;
276
-	$res = '';
277
-	$href = quote_amp(parametre_url($GLOBALS['REQUEST_URI'], 'var_mode', 'debug'));
278
-	foreach ($tableau as $i => $err) {
279
-		$boucle = $ligne = $skel = '';
280
-		[$msg, $lieu] = $err;
281
-		if (is_object($lieu)) {
282
-			$ligne = $lieu->ligne;
283
-			$boucle = !empty($lieu->id_boucle) ? $lieu->id_boucle : '';
284
-			if (isset($lieu->descr['nom'])) {
285
-				$nom_code = $lieu->descr['nom'];
286
-				$skel = $lieu->descr['sourcefile'];
287
-				$h2 = parametre_url($href, 'var_mode_objet', $nom_code);
288
-				$h3 = parametre_url($h2, 'var_mode_affiche', 'squelette') . '#L' . $ligne;
289
-				$skel = "<a href='$h3'><b>$skel</b></a>";
290
-				if ($boucle) {
291
-					$h3 = parametre_url($h2 . $boucle, 'var_mode_affiche', 'boucle');
292
-					$boucle = "<a href='$h3'><b>$boucle</b></a>";
293
-				}
294
-			}
295
-		}
296
-
297
-		$j = ($i + 1);
298
-		$res .= "<tr id='req$j'><td style='text-align: right'>"
299
-			. $j
300
-			. "&nbsp;</td><td style='text-align: left'>"
301
-			. (is_array($msg) ? implode('', $msg) : $msg)
302
-			. "</td><td style='text-align: left'>"
303
-			. ($skel ?: '&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;')
304
-			. "</td><td class='spip-debug-arg' style='text-align: left'>"
305
-			. ($boucle ?: '&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;')
306
-			. "</td><td style='text-align: right'>"
307
-			. $ligne
308
-			. "</td></tr>\n";
309
-	}
310
-
311
-	return "\n<table id='$id'>"
312
-	. "<caption onclick=\"x = document.getElementById('$id'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\">"
313
-	. $caption[0]
272
+    if (_request('exec') == 'valider_xml') {
273
+        return '';
274
+    }
275
+    $GLOBALS['bouton_admin_debug'] = true;
276
+    $res = '';
277
+    $href = quote_amp(parametre_url($GLOBALS['REQUEST_URI'], 'var_mode', 'debug'));
278
+    foreach ($tableau as $i => $err) {
279
+        $boucle = $ligne = $skel = '';
280
+        [$msg, $lieu] = $err;
281
+        if (is_object($lieu)) {
282
+            $ligne = $lieu->ligne;
283
+            $boucle = !empty($lieu->id_boucle) ? $lieu->id_boucle : '';
284
+            if (isset($lieu->descr['nom'])) {
285
+                $nom_code = $lieu->descr['nom'];
286
+                $skel = $lieu->descr['sourcefile'];
287
+                $h2 = parametre_url($href, 'var_mode_objet', $nom_code);
288
+                $h3 = parametre_url($h2, 'var_mode_affiche', 'squelette') . '#L' . $ligne;
289
+                $skel = "<a href='$h3'><b>$skel</b></a>";
290
+                if ($boucle) {
291
+                    $h3 = parametre_url($h2 . $boucle, 'var_mode_affiche', 'boucle');
292
+                    $boucle = "<a href='$h3'><b>$boucle</b></a>";
293
+                }
294
+            }
295
+        }
296
+
297
+        $j = ($i + 1);
298
+        $res .= "<tr id='req$j'><td style='text-align: right'>"
299
+            . $j
300
+            . "&nbsp;</td><td style='text-align: left'>"
301
+            . (is_array($msg) ? implode('', $msg) : $msg)
302
+            . "</td><td style='text-align: left'>"
303
+            . ($skel ?: '&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;')
304
+            . "</td><td class='spip-debug-arg' style='text-align: left'>"
305
+            . ($boucle ?: '&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;')
306
+            . "</td><td style='text-align: right'>"
307
+            . $ligne
308
+            . "</td></tr>\n";
309
+    }
310
+
311
+    return "\n<table id='$id'>"
312
+    . "<caption onclick=\"x = document.getElementById('$id'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\">"
313
+    . $caption[0]
314 314
 ## aide locale courte a ecrire, avec lien vers une grosse page de documentation
315 315
 #		aider('erreur_compilation'),
316
-	. '</caption>'
317
-	//  fausse caption du chrono (mais vraie nav)
318
-	. (!empty($caption[1]) ? $caption[1] : '')
319
-	. '<tr><th>'
320
-	. _T('numero')
321
-	. '</th><th>'
322
-	. _T('public:message')
323
-	. '</th><th>'
324
-	. _T('squelette')
325
-	. '</th><th>'
326
-	. _T('zbug_boucle')
327
-	. '</th><th>'
328
-	. _T('ligne')
329
-	. '</th></tr>'
330
-	. $res
331
-	. '</table>';
316
+    . '</caption>'
317
+    //  fausse caption du chrono (mais vraie nav)
318
+    . (!empty($caption[1]) ? $caption[1] : '')
319
+    . '<tr><th>'
320
+    . _T('numero')
321
+    . '</th><th>'
322
+    . _T('public:message')
323
+    . '</th><th>'
324
+    . _T('squelette')
325
+    . '</th><th>'
326
+    . _T('zbug_boucle')
327
+    . '</th><th>'
328
+    . _T('ligne')
329
+    . '</th></tr>'
330
+    . $res
331
+    . '</table>';
332 332
 }
333 333
 
334 334
 
@@ -348,514 +348,514 @@  discard block
 block discarded – undo
348 348
  *    ou un tableau si l'erreur est critique
349 349
  **/
350 350
 function debusquer_requete($message) {
351
-	[$errno, $msg, $query] = $message;
352
-
353
-	// FIXME: ces écritures mélangent divers syntaxe des moteurs SQL
354
-	// il serait plus prudent certainement d'avoir une fonction d'analyse par moteur
355
-	if (preg_match(',err(no|code):?[[:space:]]*([0-9]+),i', $msg, $regs)) {
356
-		$errno = $regs[2];
357
-	} elseif (
358
-		is_numeric($errno) and ($errno == 1030 or $errno <= 1026)
359
-		and preg_match(',[^[:alnum:]]([0-9]+)[^[:alnum:]],', $msg, $regs)
360
-	) {
361
-		$errno = $regs[1];
362
-	}
363
-
364
-	// Erreur systeme
365
-	if (is_numeric($errno) and $errno > 0 and $errno < 200) {
366
-		$retour = '<tt><br /><br /><blink>'
367
-			. _T('info_erreur_systeme', ['errsys' => $errno])
368
-			. "</blink><br />\n<b>"
369
-			. _T(
370
-				'info_erreur_systeme2',
371
-				['script' => generer_url_ecrire('base_repair')]
372
-			)
373
-			. '</b><br />';
374
-		spip_log("Erreur systeme $errno");
375
-
376
-		return [$retour, ''];
377
-	}
378
-
379
-	// Requete erronee
380
-	$err = '<b>' . _T('avis_erreur_mysql') . " $errno</b><br /><tt>\n"
381
-		. spip_htmlspecialchars($msg)
382
-		. "\n<br /><span style='color: red'><b>"
383
-		. spip_htmlspecialchars($query)
384
-		. '</b></span></tt><br />';
385
-
386
-	//. aider('erreur_mysql');
387
-
388
-	return $err;
351
+    [$errno, $msg, $query] = $message;
352
+
353
+    // FIXME: ces écritures mélangent divers syntaxe des moteurs SQL
354
+    // il serait plus prudent certainement d'avoir une fonction d'analyse par moteur
355
+    if (preg_match(',err(no|code):?[[:space:]]*([0-9]+),i', $msg, $regs)) {
356
+        $errno = $regs[2];
357
+    } elseif (
358
+        is_numeric($errno) and ($errno == 1030 or $errno <= 1026)
359
+        and preg_match(',[^[:alnum:]]([0-9]+)[^[:alnum:]],', $msg, $regs)
360
+    ) {
361
+        $errno = $regs[1];
362
+    }
363
+
364
+    // Erreur systeme
365
+    if (is_numeric($errno) and $errno > 0 and $errno < 200) {
366
+        $retour = '<tt><br /><br /><blink>'
367
+            . _T('info_erreur_systeme', ['errsys' => $errno])
368
+            . "</blink><br />\n<b>"
369
+            . _T(
370
+                'info_erreur_systeme2',
371
+                ['script' => generer_url_ecrire('base_repair')]
372
+            )
373
+            . '</b><br />';
374
+        spip_log("Erreur systeme $errno");
375
+
376
+        return [$retour, ''];
377
+    }
378
+
379
+    // Requete erronee
380
+    $err = '<b>' . _T('avis_erreur_mysql') . " $errno</b><br /><tt>\n"
381
+        . spip_htmlspecialchars($msg)
382
+        . "\n<br /><span style='color: red'><b>"
383
+        . spip_htmlspecialchars($query)
384
+        . '</b></span></tt><br />';
385
+
386
+    //. aider('erreur_mysql');
387
+
388
+    return $err;
389 389
 }
390 390
 
391 391
 
392 392
 function trouve_boucle_debug($n, $nom, $debut = 0, $boucle = '') {
393 393
 
394
-	$id = $nom . $boucle;
395
-	if (is_array($GLOBALS['debug_objets']['sequence'][$id])) {
396
-		foreach ($GLOBALS['debug_objets']['sequence'][$id] as $v) {
397
-			if (!preg_match('/^(.*)(<\?.*\?>)(.*)$/s', $v[0], $r)) {
398
-				$y = substr_count($v[0], "\n");
399
-			} else {
400
-				if ($v[1][0] == '#') { // balise dynamique
401
-				$incl = $GLOBALS['debug_objets']['resultat'][$v[2]];
402
-				} else // inclusion
403
-				{
404
-					$incl = $GLOBALS['debug_objets']['squelette'][trouve_squelette_inclus($v[0])];
405
-				}
406
-				$y = substr_count($incl, "\n")
407
-					+ substr_count($r[1], "\n")
408
-					+ substr_count($r[3], "\n");
409
-			}
410
-			if ($n <= ($y + $debut)) {
411
-				if ($v[1][0] == '?') {
412
-					return trouve_boucle_debug($n, $nom, $debut, substr($v[1], 1));
413
-				} elseif ($v[1][0] == '!') {
414
-					if ($incl = trouve_squelette_inclus($v[1])) {
415
-						return trouve_boucle_debug($n, $incl, $debut);
416
-					}
417
-				}
418
-
419
-				return [$nom, $boucle, $v[2] - 1 + $n - $debut];
420
-			}
421
-			$debut += $y;
422
-		}
423
-	}
424
-
425
-	return [$nom, $boucle, $n - $debut];
394
+    $id = $nom . $boucle;
395
+    if (is_array($GLOBALS['debug_objets']['sequence'][$id])) {
396
+        foreach ($GLOBALS['debug_objets']['sequence'][$id] as $v) {
397
+            if (!preg_match('/^(.*)(<\?.*\?>)(.*)$/s', $v[0], $r)) {
398
+                $y = substr_count($v[0], "\n");
399
+            } else {
400
+                if ($v[1][0] == '#') { // balise dynamique
401
+                $incl = $GLOBALS['debug_objets']['resultat'][$v[2]];
402
+                } else // inclusion
403
+                {
404
+                    $incl = $GLOBALS['debug_objets']['squelette'][trouve_squelette_inclus($v[0])];
405
+                }
406
+                $y = substr_count($incl, "\n")
407
+                    + substr_count($r[1], "\n")
408
+                    + substr_count($r[3], "\n");
409
+            }
410
+            if ($n <= ($y + $debut)) {
411
+                if ($v[1][0] == '?') {
412
+                    return trouve_boucle_debug($n, $nom, $debut, substr($v[1], 1));
413
+                } elseif ($v[1][0] == '!') {
414
+                    if ($incl = trouve_squelette_inclus($v[1])) {
415
+                        return trouve_boucle_debug($n, $incl, $debut);
416
+                    }
417
+                }
418
+
419
+                return [$nom, $boucle, $v[2] - 1 + $n - $debut];
420
+            }
421
+            $debut += $y;
422
+        }
423
+    }
424
+
425
+    return [$nom, $boucle, $n - $debut];
426 426
 }
427 427
 
428 428
 function trouve_squelette_inclus($script) {
429 429
 
430
-	preg_match('/include\(.(.*).php3?.\);/', $script, $reg);
431
-	// si le script X.php n'est pas ecrire/public.php
432
-	// on suppose qu'il prend le squelette X.html (pas sur, mais y a pas mieux)
433
-	if ($reg[1] == 'ecrire/public') { // si c'est bien ecrire/public on cherche le param 'fond'
434
-	if (!preg_match("/'fond' => '([^']*)'/", $script, $reg)) { // a defaut on cherche le param 'page'
435
-		if (!preg_match("/'param' => '([^']*)'/", $script, $reg)) {
436
-				$reg[1] = 'inconnu';
437
-		}
438
-	}
439
-	}
440
-	$incl = ',' . $reg[1] . '[.]\w$,';
441
-
442
-	foreach ($GLOBALS['debug_objets']['sourcefile'] as $k => $v) {
443
-		if (preg_match($incl, $v)) {
444
-			return $k;
445
-		}
446
-	}
447
-
448
-	return '';
430
+    preg_match('/include\(.(.*).php3?.\);/', $script, $reg);
431
+    // si le script X.php n'est pas ecrire/public.php
432
+    // on suppose qu'il prend le squelette X.html (pas sur, mais y a pas mieux)
433
+    if ($reg[1] == 'ecrire/public') { // si c'est bien ecrire/public on cherche le param 'fond'
434
+    if (!preg_match("/'fond' => '([^']*)'/", $script, $reg)) { // a defaut on cherche le param 'page'
435
+        if (!preg_match("/'param' => '([^']*)'/", $script, $reg)) {
436
+                $reg[1] = 'inconnu';
437
+        }
438
+    }
439
+    }
440
+    $incl = ',' . $reg[1] . '[.]\w$,';
441
+
442
+    foreach ($GLOBALS['debug_objets']['sourcefile'] as $k => $v) {
443
+        if (preg_match($incl, $v)) {
444
+            return $k;
445
+        }
446
+    }
447
+
448
+    return '';
449 449
 }
450 450
 
451 451
 function reference_boucle_debug($n, $nom, $self) {
452
-	[$skel, $boucle, $ligne] = trouve_boucle_debug($n, $nom);
453
-
454
-	if (!$boucle) {
455
-		return !$ligne ? '' :
456
-			(' (' .
457
-				(($nom != $skel) ? _T('squelette_inclus_ligne') :
458
-					_T('squelette_ligne')) .
459
-				" <a href='$self&amp;var_mode_objet=$skel&amp;var_mode_affiche=squelette&amp;var_mode_ligne=$ligne#L$ligne'>$ligne</a>)");
460
-	} else {
461
-		$self .= "&amp;var_mode_objet=$skel$boucle&amp;var_mode_affiche=boucle";
462
-
463
-		return !$ligne ? " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)" :
464
-			" (boucle $boucle ligne\n<a href='$self&amp;var_mode_ligne=$ligne#L$ligne'>$ligne</a>)";
465
-	}
452
+    [$skel, $boucle, $ligne] = trouve_boucle_debug($n, $nom);
453
+
454
+    if (!$boucle) {
455
+        return !$ligne ? '' :
456
+            (' (' .
457
+                (($nom != $skel) ? _T('squelette_inclus_ligne') :
458
+                    _T('squelette_ligne')) .
459
+                " <a href='$self&amp;var_mode_objet=$skel&amp;var_mode_affiche=squelette&amp;var_mode_ligne=$ligne#L$ligne'>$ligne</a>)");
460
+    } else {
461
+        $self .= "&amp;var_mode_objet=$skel$boucle&amp;var_mode_affiche=boucle";
462
+
463
+        return !$ligne ? " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)" :
464
+            " (boucle $boucle ligne\n<a href='$self&amp;var_mode_ligne=$ligne#L$ligne'>$ligne</a>)";
465
+    }
466 466
 }
467 467
 
468 468
 // affiche un texte avec numero de ligne et ancre.
469 469
 
470 470
 function ancre_texte($texte, $fautifs = [], $nocpt = false) {
471 471
 
472
-	$var_mode_ligne = _request('var_mode_ligne');
473
-	if ($var_mode_ligne) {
474
-		$fautifs[] = [$var_mode_ligne];
475
-	}
476
-	$res = '';
477
-
478
-	$s = highlight_string($texte, true);
479
-	if (substr($s, 0, 6) == '<code>') {
480
-		$s = substr($s, 6);
481
-		$res = '<code>';
482
-	}
483
-
484
-	$s = preg_replace(
485
-		',<(\w[^<>]*)>([^<]*)<br />([^<]*)</\1>,',
486
-		'<\1>\2</\1><br />' . "\n" . '<\1>\3</\1>',
487
-		$s
488
-	);
489
-
490
-
491
-	$tableau = explode('<br />', $s);
492
-
493
-	$format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: " . ($nocpt ? 'hidden' : 'visible') . ";%s' href='#T%s' title=\"%s\">%0" . strval(@strlen(count($tableau))) . "d</a></span> %s<br />\n";
494
-
495
-	$format10 = str_replace('white', 'lightgrey', $format);
496
-	$formaterr = 'color: red;';
497
-	$i = 1;
498
-	$flignes = [];
499
-	$loc = [0, 0];
500
-	foreach ($fautifs as $lc) {
501
-		if (is_array($lc)) {
502
-			$l = array_shift($lc);
503
-			$flignes[$l] = $lc;
504
-		} else {
505
-			$flignes[$lc] = $loc;
506
-		}
507
-	}
508
-
509
-	$ancre = md5($texte);
510
-	foreach ($tableau as $ligne) {
511
-		if (isset($flignes[$i])) {
512
-			$ligne = str_replace('&nbsp;', ' ', $ligne);
513
-			$indexmesg = $flignes[$i][1];
514
-			$err = textebrut($flignes[$i][2]);
515
-			// tentative de pointer sur la colonne fautive;
516
-			// marche pas car highlight_string rajoute des entites. A revoir.
517
-			// $m = $flignes[$i][0];
518
-			// $ligne = substr($ligne, 0, $m-1) .
519
-			// sprintf($formaterr, substr($ligne,$m));
520
-			$bg = $formaterr;
521
-		} else {
522
-			$indexmesg = $ancre;
523
-			$err = $bg = '';
524
-		}
525
-		$res .= sprintf((($i % 10) ? $format : $format10), $i, $bg, $indexmesg, $err, $i, $ligne);
526
-		$i++;
527
-	}
528
-
529
-	return "<div id='T$ancre'>"
530
-	. '<div onclick="'
531
-	. "jQuery(this).parent().find('a').toggle();"
532
-	. '" title="'
533
-	. _T('masquer_colonne')
534
-	. '" style="cursor: pointer;">'
535
-	. ($nocpt ? '' : _T('info_numero_abbreviation'))
536
-	. '</div>
472
+    $var_mode_ligne = _request('var_mode_ligne');
473
+    if ($var_mode_ligne) {
474
+        $fautifs[] = [$var_mode_ligne];
475
+    }
476
+    $res = '';
477
+
478
+    $s = highlight_string($texte, true);
479
+    if (substr($s, 0, 6) == '<code>') {
480
+        $s = substr($s, 6);
481
+        $res = '<code>';
482
+    }
483
+
484
+    $s = preg_replace(
485
+        ',<(\w[^<>]*)>([^<]*)<br />([^<]*)</\1>,',
486
+        '<\1>\2</\1><br />' . "\n" . '<\1>\3</\1>',
487
+        $s
488
+    );
489
+
490
+
491
+    $tableau = explode('<br />', $s);
492
+
493
+    $format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: " . ($nocpt ? 'hidden' : 'visible') . ";%s' href='#T%s' title=\"%s\">%0" . strval(@strlen(count($tableau))) . "d</a></span> %s<br />\n";
494
+
495
+    $format10 = str_replace('white', 'lightgrey', $format);
496
+    $formaterr = 'color: red;';
497
+    $i = 1;
498
+    $flignes = [];
499
+    $loc = [0, 0];
500
+    foreach ($fautifs as $lc) {
501
+        if (is_array($lc)) {
502
+            $l = array_shift($lc);
503
+            $flignes[$l] = $lc;
504
+        } else {
505
+            $flignes[$lc] = $loc;
506
+        }
507
+    }
508
+
509
+    $ancre = md5($texte);
510
+    foreach ($tableau as $ligne) {
511
+        if (isset($flignes[$i])) {
512
+            $ligne = str_replace('&nbsp;', ' ', $ligne);
513
+            $indexmesg = $flignes[$i][1];
514
+            $err = textebrut($flignes[$i][2]);
515
+            // tentative de pointer sur la colonne fautive;
516
+            // marche pas car highlight_string rajoute des entites. A revoir.
517
+            // $m = $flignes[$i][0];
518
+            // $ligne = substr($ligne, 0, $m-1) .
519
+            // sprintf($formaterr, substr($ligne,$m));
520
+            $bg = $formaterr;
521
+        } else {
522
+            $indexmesg = $ancre;
523
+            $err = $bg = '';
524
+        }
525
+        $res .= sprintf((($i % 10) ? $format : $format10), $i, $bg, $indexmesg, $err, $i, $ligne);
526
+        $i++;
527
+    }
528
+
529
+    return "<div id='T$ancre'>"
530
+    . '<div onclick="'
531
+    . "jQuery(this).parent().find('a').toggle();"
532
+    . '" title="'
533
+    . _T('masquer_colonne')
534
+    . '" style="cursor: pointer;">'
535
+    . ($nocpt ? '' : _T('info_numero_abbreviation'))
536
+    . '</div>
537 537
 	' . $res . "</div>\n";
538 538
 }
539 539
 
540 540
 // l'environnement graphique du debuggueur
541 541
 
542 542
 function debusquer_squelette($fonc, $mode, $self) {
543
-	$legend = null;
544
-	$texte = '';
545
-
546
-	if ($mode !== 'validation') {
547
-		if (isset($GLOBALS['debug_objets']['sourcefile']) and $GLOBALS['debug_objets']['sourcefile']) {
548
-			$res = "<div id='spip-boucles'>\n"
549
-				. debusquer_navigation_squelettes($self)
550
-				. '</div>';
551
-		} else {
552
-			$res = '';
553
-		}
554
-		if ($fonc) {
555
-			$id = " id='$fonc'";
556
-			if (!empty($GLOBALS['debug_objets'][$mode][$fonc])) {
557
-				[$legend, $texte, $res2] = debusquer_source($fonc, $mode);
558
-				$texte .= $res2;
559
-			} elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc . 'tout'])) {
560
-				$legend = _T('zbug_' . $mode);
561
-				$texte = $GLOBALS['debug_objets'][$mode][$fonc . 'tout'];
562
-				$texte = ancre_texte($texte, ['', '']);
563
-			}
564
-		} else {
565
-			if (strlen(trim($res))) {
566
-				return "<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>";
567
-			} else {
568
-				// cas de l'appel sur erreur: montre la page
569
-				return $GLOBALS['debug_objets']['resultat']['tout'] ?? '';
570
-			}
571
-		}
572
-	} else {
573
-		$valider = charger_fonction('valider', 'xml');
574
-		$val = $valider($GLOBALS['debug_objets']['validation'][$fonc . 'tout']);
575
-		// Si erreur, signaler leur nombre dans le formulaire admin
576
-		$GLOBALS['debug_objets']['validation'] = $val->err ? count($val->err) : '';
577
-		[$texte, $err] = emboite_texte($val, $fonc, $self);
578
-		if ($err === false) {
579
-			$err = _T('impossible');
580
-		} elseif ($err === true) {
581
-			$err = _T('correcte');
582
-		} else {
583
-			$err = ": $err";
584
-		}
585
-		$legend = _T('validation') . ' ' . $err;
586
-		$res = $id = '';
587
-	}
588
-
589
-	return !trim($texte) ? '' : (
590
-		"<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res"
591
-		. "<div id='debug_boucle'><fieldset$id><legend>"
592
-		. "<a href='" . $self . '#f_' . substr($fonc, 0, 37) . "'> &#8593; "
593
-		. ($legend ?: $mode)
594
-		. '</a></legend>'
595
-		. $texte
596
-		. '</fieldset></div>'
597
-		. '</div>');
543
+    $legend = null;
544
+    $texte = '';
545
+
546
+    if ($mode !== 'validation') {
547
+        if (isset($GLOBALS['debug_objets']['sourcefile']) and $GLOBALS['debug_objets']['sourcefile']) {
548
+            $res = "<div id='spip-boucles'>\n"
549
+                . debusquer_navigation_squelettes($self)
550
+                . '</div>';
551
+        } else {
552
+            $res = '';
553
+        }
554
+        if ($fonc) {
555
+            $id = " id='$fonc'";
556
+            if (!empty($GLOBALS['debug_objets'][$mode][$fonc])) {
557
+                [$legend, $texte, $res2] = debusquer_source($fonc, $mode);
558
+                $texte .= $res2;
559
+            } elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc . 'tout'])) {
560
+                $legend = _T('zbug_' . $mode);
561
+                $texte = $GLOBALS['debug_objets'][$mode][$fonc . 'tout'];
562
+                $texte = ancre_texte($texte, ['', '']);
563
+            }
564
+        } else {
565
+            if (strlen(trim($res))) {
566
+                return "<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>";
567
+            } else {
568
+                // cas de l'appel sur erreur: montre la page
569
+                return $GLOBALS['debug_objets']['resultat']['tout'] ?? '';
570
+            }
571
+        }
572
+    } else {
573
+        $valider = charger_fonction('valider', 'xml');
574
+        $val = $valider($GLOBALS['debug_objets']['validation'][$fonc . 'tout']);
575
+        // Si erreur, signaler leur nombre dans le formulaire admin
576
+        $GLOBALS['debug_objets']['validation'] = $val->err ? count($val->err) : '';
577
+        [$texte, $err] = emboite_texte($val, $fonc, $self);
578
+        if ($err === false) {
579
+            $err = _T('impossible');
580
+        } elseif ($err === true) {
581
+            $err = _T('correcte');
582
+        } else {
583
+            $err = ": $err";
584
+        }
585
+        $legend = _T('validation') . ' ' . $err;
586
+        $res = $id = '';
587
+    }
588
+
589
+    return !trim($texte) ? '' : (
590
+        "<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res"
591
+        . "<div id='debug_boucle'><fieldset$id><legend>"
592
+        . "<a href='" . $self . '#f_' . substr($fonc, 0, 37) . "'> &#8593; "
593
+        . ($legend ?: $mode)
594
+        . '</a></legend>'
595
+        . $texte
596
+        . '</fieldset></div>'
597
+        . '</div>');
598 598
 }
599 599
 
600 600
 
601 601
 function emboite_texte($res, $fonc = '', $self = '') {
602
-	$errs = $res->err;
603
-	$texte = $res->entete . ($errs ? '' : $res->page);
604
-
605
-	if (!$texte and !$errs) {
606
-		return [ancre_texte('', ['', '']), false];
607
-	}
608
-	if (!$errs) {
609
-		return [ancre_texte($texte, ['', '']), true];
610
-	}
611
-
612
-	if (!isset($GLOBALS['debug_objets'])) {
613
-		$colors = ['#e0e0f0', '#f8f8ff'];
614
-		$encore = count_occ($errs);
615
-		$encore2 = [];
616
-		$fautifs = [];
617
-
618
-		$err = '<tr><th>'
619
-			. _T('numero')
620
-			. '</th><th>'
621
-			. _T('occurence')
622
-			. '</th><th>'
623
-			. _T('ligne')
624
-			. '</th><th>'
625
-			. _T('colonne')
626
-			. '</th><th>'
627
-			. _T('erreur')
628
-			. '</th></tr>';
629
-
630
-		$i = 0;
631
-		$style = "style='text-align: right; padding-right: 5px'";
632
-		foreach ($errs as $r) {
633
-			$i++;
634
-			[$msg, $ligne, $col] = $r;
635
-			#spip_log("$r = list($msg, $ligne, $col");
636
-			if (isset($encore2[$msg])) {
637
-				$ref = ++$encore2[$msg];
638
-			} else {
639
-				$encore2[$msg] = $ref = 1;
640
-			}
641
-			$err .= "<tr  style='background-color: "
642
-				. $colors[$i % 2]
643
-				. "'><td $style><a href='#debut_err'>"
644
-				. $i
645
-				. "</a></td><td $style>"
646
-				. "$ref/$encore[$msg]</td>"
647
-				. "<td $style><a href='#L"
648
-				. $ligne
649
-				. "' id='T$i'>"
650
-				. $ligne
651
-				. "</a></td><td $style>"
652
-				. $col
653
-				. "</td><td>$msg</td></tr>\n";
654
-			$fautifs[] = [$ligne, $col, $i, $msg];
655
-		}
656
-		$err = "<h2 style='text-align: center'>"
657
-			. $i
658
-			. "<a href='#fin_err'>"
659
-			. ' ' . _T('erreur_texte')
660
-			. "</a></h2><table id='debut_err' style='width: 100%'>"
661
-			. $err
662
-			. " </table><a id='fin_err'></a>";
663
-
664
-		return [ancre_texte($texte, $fautifs), $err];
665
-	} else {
666
-		[$msg, $fermant, $ouvrant] = $errs[0];
667
-		$rf = reference_boucle_debug($fermant, $fonc, $self);
668
-		$ro = reference_boucle_debug($ouvrant, $fonc, $self);
669
-		$err = $msg .
670
-			"<a href='#L" . $fermant . "'>$fermant</a>$rf<br />" .
671
-			"<a href='#L" . $ouvrant . "'>$ouvrant</a>$ro";
672
-
673
-		return [ancre_texte($texte, [[$ouvrant], [$fermant]]), $err];
674
-	}
602
+    $errs = $res->err;
603
+    $texte = $res->entete . ($errs ? '' : $res->page);
604
+
605
+    if (!$texte and !$errs) {
606
+        return [ancre_texte('', ['', '']), false];
607
+    }
608
+    if (!$errs) {
609
+        return [ancre_texte($texte, ['', '']), true];
610
+    }
611
+
612
+    if (!isset($GLOBALS['debug_objets'])) {
613
+        $colors = ['#e0e0f0', '#f8f8ff'];
614
+        $encore = count_occ($errs);
615
+        $encore2 = [];
616
+        $fautifs = [];
617
+
618
+        $err = '<tr><th>'
619
+            . _T('numero')
620
+            . '</th><th>'
621
+            . _T('occurence')
622
+            . '</th><th>'
623
+            . _T('ligne')
624
+            . '</th><th>'
625
+            . _T('colonne')
626
+            . '</th><th>'
627
+            . _T('erreur')
628
+            . '</th></tr>';
629
+
630
+        $i = 0;
631
+        $style = "style='text-align: right; padding-right: 5px'";
632
+        foreach ($errs as $r) {
633
+            $i++;
634
+            [$msg, $ligne, $col] = $r;
635
+            #spip_log("$r = list($msg, $ligne, $col");
636
+            if (isset($encore2[$msg])) {
637
+                $ref = ++$encore2[$msg];
638
+            } else {
639
+                $encore2[$msg] = $ref = 1;
640
+            }
641
+            $err .= "<tr  style='background-color: "
642
+                . $colors[$i % 2]
643
+                . "'><td $style><a href='#debut_err'>"
644
+                . $i
645
+                . "</a></td><td $style>"
646
+                . "$ref/$encore[$msg]</td>"
647
+                . "<td $style><a href='#L"
648
+                . $ligne
649
+                . "' id='T$i'>"
650
+                . $ligne
651
+                . "</a></td><td $style>"
652
+                . $col
653
+                . "</td><td>$msg</td></tr>\n";
654
+            $fautifs[] = [$ligne, $col, $i, $msg];
655
+        }
656
+        $err = "<h2 style='text-align: center'>"
657
+            . $i
658
+            . "<a href='#fin_err'>"
659
+            . ' ' . _T('erreur_texte')
660
+            . "</a></h2><table id='debut_err' style='width: 100%'>"
661
+            . $err
662
+            . " </table><a id='fin_err'></a>";
663
+
664
+        return [ancre_texte($texte, $fautifs), $err];
665
+    } else {
666
+        [$msg, $fermant, $ouvrant] = $errs[0];
667
+        $rf = reference_boucle_debug($fermant, $fonc, $self);
668
+        $ro = reference_boucle_debug($ouvrant, $fonc, $self);
669
+        $err = $msg .
670
+            "<a href='#L" . $fermant . "'>$fermant</a>$rf<br />" .
671
+            "<a href='#L" . $ouvrant . "'>$ouvrant</a>$ro";
672
+
673
+        return [ancre_texte($texte, [[$ouvrant], [$fermant]]), $err];
674
+    }
675 675
 }
676 676
 
677 677
 function count_occ($regs) {
678
-	$encore = [];
679
-	foreach ($regs as $r) {
680
-		if (isset($encore[$r[0]])) {
681
-			$encore[$r[0]]++;
682
-		} else {
683
-			$encore[$r[0]] = 1;
684
-		}
685
-	}
686
-
687
-	return $encore;
678
+    $encore = [];
679
+    foreach ($regs as $r) {
680
+        if (isset($encore[$r[0]])) {
681
+            $encore[$r[0]]++;
682
+        } else {
683
+            $encore[$r[0]] = 1;
684
+        }
685
+    }
686
+
687
+    return $encore;
688 688
 }
689 689
 
690 690
 function debusquer_navigation_squelettes($self) {
691 691
 
692
-	$res = '';
693
-	$boucles = !empty($GLOBALS['debug_objets']['boucle']) ? $GLOBALS['debug_objets']['boucle'] : '';
694
-	$contexte = $GLOBALS['debug_objets']['contexte'];
695
-	$t_skel = _T('squelette');
696
-	foreach ($GLOBALS['debug_objets']['sourcefile'] as $nom => $sourcefile) {
697
-		$self2 = parametre_url($self, 'var_mode_objet', $nom);
698
-		$nav = !$boucles ? '' : debusquer_navigation_boucles($boucles, $nom, $self, $sourcefile);
699
-		$temps = !isset($GLOBALS['debug_objets']['profile'][$sourcefile]) ? '' : _T(
700
-			'zbug_profile',
701
-			['time' => $GLOBALS['debug_objets']['profile'][$sourcefile]]
702
-		);
703
-
704
-		$res .= "<fieldset id='f_" . $nom . "'><legend>"
705
-			. $t_skel
706
-			. ' '
707
-			. $sourcefile
708
-			. "&nbsp;:\n<a href='$self2&amp;var_mode_affiche=squelette#f_$nom'>"
709
-			. $t_skel
710
-			. "</a>\n<a href='$self2&amp;var_mode_affiche=resultat#f_$nom'>"
711
-			. _T('zbug_resultat')
712
-			. "</a>\n<a href='$self2&amp;var_mode_affiche=code#f_$nom'>"
713
-			. _T('zbug_code')
714
-			. "</a>\n<a href='"
715
-			. str_replace('var_mode=debug', 'var_profile=1&amp;var_mode=recalcul', $self)
716
-			. "'>"
717
-			. _T('zbug_calcul')
718
-			. '</a></legend>'
719
-			. (!$temps ? '' : ("\n<span style='display:block;float:" . $GLOBALS['spip_lang_right'] . "'>$temps</span><br />"))
720
-			. debusquer_contexte($contexte[$sourcefile])
721
-		. (!$nav ? '' : ("<table width='100%'>\n$nav</table>\n"))
722
-		. "</fieldset>\n";
723
-	}
724
-
725
-	return $res;
692
+    $res = '';
693
+    $boucles = !empty($GLOBALS['debug_objets']['boucle']) ? $GLOBALS['debug_objets']['boucle'] : '';
694
+    $contexte = $GLOBALS['debug_objets']['contexte'];
695
+    $t_skel = _T('squelette');
696
+    foreach ($GLOBALS['debug_objets']['sourcefile'] as $nom => $sourcefile) {
697
+        $self2 = parametre_url($self, 'var_mode_objet', $nom);
698
+        $nav = !$boucles ? '' : debusquer_navigation_boucles($boucles, $nom, $self, $sourcefile);
699
+        $temps = !isset($GLOBALS['debug_objets']['profile'][$sourcefile]) ? '' : _T(
700
+            'zbug_profile',
701
+            ['time' => $GLOBALS['debug_objets']['profile'][$sourcefile]]
702
+        );
703
+
704
+        $res .= "<fieldset id='f_" . $nom . "'><legend>"
705
+            . $t_skel
706
+            . ' '
707
+            . $sourcefile
708
+            . "&nbsp;:\n<a href='$self2&amp;var_mode_affiche=squelette#f_$nom'>"
709
+            . $t_skel
710
+            . "</a>\n<a href='$self2&amp;var_mode_affiche=resultat#f_$nom'>"
711
+            . _T('zbug_resultat')
712
+            . "</a>\n<a href='$self2&amp;var_mode_affiche=code#f_$nom'>"
713
+            . _T('zbug_code')
714
+            . "</a>\n<a href='"
715
+            . str_replace('var_mode=debug', 'var_profile=1&amp;var_mode=recalcul', $self)
716
+            . "'>"
717
+            . _T('zbug_calcul')
718
+            . '</a></legend>'
719
+            . (!$temps ? '' : ("\n<span style='display:block;float:" . $GLOBALS['spip_lang_right'] . "'>$temps</span><br />"))
720
+            . debusquer_contexte($contexte[$sourcefile])
721
+        . (!$nav ? '' : ("<table width='100%'>\n$nav</table>\n"))
722
+        . "</fieldset>\n";
723
+    }
724
+
725
+    return $res;
726 726
 }
727 727
 
728 728
 function debusquer_navigation_boucles($boucles, $nom_skel, $self, $nom_source) {
729
-	$i = 0;
730
-	$res = '';
731
-	$var_mode_objet = _request('var_mode_objet');
732
-	$gram = preg_match('/[.](\w+)$/', $nom_source, $r) ? $r[1] : '';
733
-
734
-	foreach ($boucles as $objet => $boucle) {
735
-		if (substr($objet, 0, strlen($nom_skel)) == $nom_skel) {
736
-			$i++;
737
-			$nom = $boucle->id_boucle;
738
-			$req = $boucle->type_requete;
739
-			$crit = public_decompiler($boucle, $gram, 0, 'criteres');
740
-			$self2 = $self . '&amp;var_mode_objet=' . $objet;
741
-
742
-			$res .= "\n<tr style='background-color: " .
743
-				($i % 2 ? '#e0e0f0' : '#f8f8ff') .
744
-				"'><td  align='right'>$i</td><td>\n" .
745
-				"<a  class='debug_link_boucle' href='" .
746
-				$self2 .
747
-				"&amp;var_mode_affiche=boucle#f_$nom_skel'>" .
748
-				_T('zbug_boucle') .
749
-				"</a></td><td>\n<a class='debug_link_boucle' href='" .
750
-				$self2 .
751
-				"&amp;var_mode_affiche=resultat#f_$nom_skel'>" .
752
-				_T('zbug_resultat') .
753
-				"</a></td><td>\n<a class='debug_link_resultat' href='" .
754
-				$self2 .
755
-				"&amp;var_mode_affiche=code#f_$nom_skel'>" .
756
-				_T('zbug_code') .
757
-				"</a></td><td>\n<a class='debug_link_resultat' href='" .
758
-				str_replace('var_mode=', 'var_profile=', $self2) .
759
-				"'>" .
760
-				_T('zbug_calcul') .
761
-				"</a></td><td>\n" .
762
-				(($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom) .
763
-				"</td><td>\n" .
764
-				$req .
765
-				"</td><td>\n" .
766
-				spip_htmlspecialchars($crit) .
767
-				'</td></tr>';
768
-		}
769
-	}
770
-
771
-	return $res;
729
+    $i = 0;
730
+    $res = '';
731
+    $var_mode_objet = _request('var_mode_objet');
732
+    $gram = preg_match('/[.](\w+)$/', $nom_source, $r) ? $r[1] : '';
733
+
734
+    foreach ($boucles as $objet => $boucle) {
735
+        if (substr($objet, 0, strlen($nom_skel)) == $nom_skel) {
736
+            $i++;
737
+            $nom = $boucle->id_boucle;
738
+            $req = $boucle->type_requete;
739
+            $crit = public_decompiler($boucle, $gram, 0, 'criteres');
740
+            $self2 = $self . '&amp;var_mode_objet=' . $objet;
741
+
742
+            $res .= "\n<tr style='background-color: " .
743
+                ($i % 2 ? '#e0e0f0' : '#f8f8ff') .
744
+                "'><td  align='right'>$i</td><td>\n" .
745
+                "<a  class='debug_link_boucle' href='" .
746
+                $self2 .
747
+                "&amp;var_mode_affiche=boucle#f_$nom_skel'>" .
748
+                _T('zbug_boucle') .
749
+                "</a></td><td>\n<a class='debug_link_boucle' href='" .
750
+                $self2 .
751
+                "&amp;var_mode_affiche=resultat#f_$nom_skel'>" .
752
+                _T('zbug_resultat') .
753
+                "</a></td><td>\n<a class='debug_link_resultat' href='" .
754
+                $self2 .
755
+                "&amp;var_mode_affiche=code#f_$nom_skel'>" .
756
+                _T('zbug_code') .
757
+                "</a></td><td>\n<a class='debug_link_resultat' href='" .
758
+                str_replace('var_mode=', 'var_profile=', $self2) .
759
+                "'>" .
760
+                _T('zbug_calcul') .
761
+                "</a></td><td>\n" .
762
+                (($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom) .
763
+                "</td><td>\n" .
764
+                $req .
765
+                "</td><td>\n" .
766
+                spip_htmlspecialchars($crit) .
767
+                '</td></tr>';
768
+        }
769
+    }
770
+
771
+    return $res;
772 772
 }
773 773
 
774 774
 function debusquer_source($objet, $affiche) {
775
-	$quoi = $GLOBALS['debug_objets'][$affiche][$objet];
776
-	if (!empty($GLOBALS['debug_objets']['boucle'][$objet]->id_boucle)) {
777
-		$nom = $GLOBALS['debug_objets']['boucle'][$objet]->id_boucle;
778
-	} else {
779
-		$nom = $GLOBALS['debug_objets']['sourcefile'][$objet];
780
-	}
781
-	$res2 = '';
782
-
783
-	if ($affiche == 'resultat') {
784
-		$legend = $nom;
785
-		$req = $GLOBALS['debug_objets']['requete'][$objet];
786
-		if (function_exists('_mysql_traite_query')) {
787
-			$c = strtolower(_request('connect') ?? '');
788
-			$c = $GLOBALS['connexions'][$c ?: 0]['prefixe'];
789
-			$req = _mysql_traite_query($req, '', $c);
790
-		}
791
-		//  permettre le copier/coller facile
792
-		// $res = ancre_texte($req, array(), true);
793
-		$res = "<div id='T" . md5($req) . "'>\n<pre>\n" . $req . "</pre>\n</div>\n";
794
-		//  formatage et affichage des resultats bruts de la requete
795
-		$ress_req = spip_query($req);
796
-		$brut_sql = '';
797
-		$num = 1;
798
-		//  eviter l'affichage de milliers de lignes
799
-		//  personnalisation possible dans mes_options
800
-		$max_aff = defined('_MAX_DEBUG_AFF') ? _MAX_DEBUG_AFF : 50;
801
-		while ($retours_sql = sql_fetch($ress_req)) {
802
-			if ($num <= $max_aff) {
803
-				$brut_sql .= '<h3>' . ($num == 1 ? $num . ' sur ' . sql_count($ress_req) : $num) . '</h3>';
804
-				$brut_sql .= '<p>';
805
-				foreach ($retours_sql as $key => $val) {
806
-					$brut_sql .= '<strong>' . $key . '</strong> => ' . spip_htmlspecialchars(couper($val, 150)) . "<br />\n";
807
-				}
808
-				$brut_sql .= '</p>';
809
-			}
810
-			$num++;
811
-		}
812
-		$res2 = interdire_scripts($brut_sql);
813
-		foreach ($quoi as $view) {
814
-			//  ne pas afficher les $contexte_inclus
815
-			$view = preg_replace(',<\?php.+\?[>],Uims', '', $view);
816
-			if ($view) {
817
-				$res2 .= "\n<br /><fieldset>" . interdire_scripts($view) . '</fieldset>';
818
-			}
819
-		}
820
-	} elseif ($affiche == 'code') {
821
-		$legend = $nom;
822
-		$res = ancre_texte('<' . "?php\n" . $quoi . "\n?" . '>');
823
-	} elseif ($affiche == 'boucle') {
824
-		$legend = _T('zbug_boucle') . ' ' . $nom;
825
-		// Le compilateur prefixe le nom des boucles par l'extension du fichier source.
826
-		$gram = preg_match('/^([^_]+)_/', $objet, $r) ? $r[1] : '';
827
-		$res = ancre_texte(public_decompiler($quoi, $gram, 0, 'boucle'));
828
-	} elseif ($affiche == 'squelette') {
829
-		$legend = $GLOBALS['debug_objets']['sourcefile'][$objet];
830
-		$res = ancre_texte($GLOBALS['debug_objets']['squelette'][$objet]);
831
-	}
832
-
833
-	return [$legend, $res, $res2];
775
+    $quoi = $GLOBALS['debug_objets'][$affiche][$objet];
776
+    if (!empty($GLOBALS['debug_objets']['boucle'][$objet]->id_boucle)) {
777
+        $nom = $GLOBALS['debug_objets']['boucle'][$objet]->id_boucle;
778
+    } else {
779
+        $nom = $GLOBALS['debug_objets']['sourcefile'][$objet];
780
+    }
781
+    $res2 = '';
782
+
783
+    if ($affiche == 'resultat') {
784
+        $legend = $nom;
785
+        $req = $GLOBALS['debug_objets']['requete'][$objet];
786
+        if (function_exists('_mysql_traite_query')) {
787
+            $c = strtolower(_request('connect') ?? '');
788
+            $c = $GLOBALS['connexions'][$c ?: 0]['prefixe'];
789
+            $req = _mysql_traite_query($req, '', $c);
790
+        }
791
+        //  permettre le copier/coller facile
792
+        // $res = ancre_texte($req, array(), true);
793
+        $res = "<div id='T" . md5($req) . "'>\n<pre>\n" . $req . "</pre>\n</div>\n";
794
+        //  formatage et affichage des resultats bruts de la requete
795
+        $ress_req = spip_query($req);
796
+        $brut_sql = '';
797
+        $num = 1;
798
+        //  eviter l'affichage de milliers de lignes
799
+        //  personnalisation possible dans mes_options
800
+        $max_aff = defined('_MAX_DEBUG_AFF') ? _MAX_DEBUG_AFF : 50;
801
+        while ($retours_sql = sql_fetch($ress_req)) {
802
+            if ($num <= $max_aff) {
803
+                $brut_sql .= '<h3>' . ($num == 1 ? $num . ' sur ' . sql_count($ress_req) : $num) . '</h3>';
804
+                $brut_sql .= '<p>';
805
+                foreach ($retours_sql as $key => $val) {
806
+                    $brut_sql .= '<strong>' . $key . '</strong> => ' . spip_htmlspecialchars(couper($val, 150)) . "<br />\n";
807
+                }
808
+                $brut_sql .= '</p>';
809
+            }
810
+            $num++;
811
+        }
812
+        $res2 = interdire_scripts($brut_sql);
813
+        foreach ($quoi as $view) {
814
+            //  ne pas afficher les $contexte_inclus
815
+            $view = preg_replace(',<\?php.+\?[>],Uims', '', $view);
816
+            if ($view) {
817
+                $res2 .= "\n<br /><fieldset>" . interdire_scripts($view) . '</fieldset>';
818
+            }
819
+        }
820
+    } elseif ($affiche == 'code') {
821
+        $legend = $nom;
822
+        $res = ancre_texte('<' . "?php\n" . $quoi . "\n?" . '>');
823
+    } elseif ($affiche == 'boucle') {
824
+        $legend = _T('zbug_boucle') . ' ' . $nom;
825
+        // Le compilateur prefixe le nom des boucles par l'extension du fichier source.
826
+        $gram = preg_match('/^([^_]+)_/', $objet, $r) ? $r[1] : '';
827
+        $res = ancre_texte(public_decompiler($quoi, $gram, 0, 'boucle'));
828
+    } elseif ($affiche == 'squelette') {
829
+        $legend = $GLOBALS['debug_objets']['sourcefile'][$objet];
830
+        $res = ancre_texte($GLOBALS['debug_objets']['squelette'][$objet]);
831
+    }
832
+
833
+    return [$legend, $res, $res2];
834 834
 }
835 835
 
836 836
 function debusquer_entete($titre, $corps) {
837 837
 
838
-	include_spip('balise/formulaire_admin');
839
-	include_spip('public/assembler'); // pour inclure_balise_dynamique
840
-	include_spip('inc/texte'); // pour corriger_typo
841
-
842
-	return _DOCTYPE_ECRIRE .
843
-	html_lang_attributes() .
844
-	"<head>\n<title>" .
845
-	('SPIP ' . $GLOBALS['spip_version_affichee'] . ' ' .
846
-		_T('admin_debug') . ' ' . spip_htmlspecialchars($titre) . ' (' .
847
-		supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))) .
848
-	")</title>\n" .
849
-	"<meta http-equiv='Content-Type' content='text/html" .
850
-	(($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') .
851
-	"' />\n" .
852
-	http_script('', 'jquery.js')
853
-	. "<link rel='stylesheet' href='" . url_absolue(find_in_path('spip_admin.css'))
854
-	. "' type='text/css' />" .
855
-	"</head>\n" .
856
-	"<body style='margin:0 10px;'>\n" .
857
-	"<div id='spip-debug-header'>" .
858
-	$corps .
859
-	inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false) .
860
-	'</div></body></html>';
838
+    include_spip('balise/formulaire_admin');
839
+    include_spip('public/assembler'); // pour inclure_balise_dynamique
840
+    include_spip('inc/texte'); // pour corriger_typo
841
+
842
+    return _DOCTYPE_ECRIRE .
843
+    html_lang_attributes() .
844
+    "<head>\n<title>" .
845
+    ('SPIP ' . $GLOBALS['spip_version_affichee'] . ' ' .
846
+        _T('admin_debug') . ' ' . spip_htmlspecialchars($titre) . ' (' .
847
+        supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))) .
848
+    ")</title>\n" .
849
+    "<meta http-equiv='Content-Type' content='text/html" .
850
+    (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') .
851
+    "' />\n" .
852
+    http_script('', 'jquery.js')
853
+    . "<link rel='stylesheet' href='" . url_absolue(find_in_path('spip_admin.css'))
854
+    . "' type='text/css' />" .
855
+    "</head>\n" .
856
+    "<body style='margin:0 10px;'>\n" .
857
+    "<div id='spip-debug-header'>" .
858
+    $corps .
859
+    inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false) .
860
+    '</div></body></html>';
861 861
 }
Please login to merge, or discard this patch.
ecrire/action/editer_logo.php 1 patch
Indentation   +223 added lines, -223 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 
@@ -30,36 +30,36 @@  discard block
 block discarded – undo
30 30
  *     `on` ou `off`
31 31
  */
32 32
 function logo_supprimer($objet, $id_objet, $etat) {
33
-	$chercher_logo = charger_fonction('chercher_logo', 'inc');
34
-	$objet = objet_type($objet);
35
-	$primary = id_table_objet($objet);
36
-	include_spip('inc/chercher_logo');
37
-
38
-	// existe-t-il deja un logo ?
39
-	$logo = $chercher_logo($id_objet, $primary, $etat);
40
-	if ($logo) {
41
-		# TODO : deprecated, a supprimer -> anciens logos IMG/artonxx.png pas en base
42
-		if ((is_countable($logo) ? count($logo) : 0) < 6) {
43
-			spip_log('Supprimer ancien logo ' . json_encode($logo, JSON_THROW_ON_ERROR), 'logo');
44
-			spip_unlink($logo[0]);
45
-		}
46
-		elseif (
47
-			$doc = $logo[5]
48
-			and isset($doc['id_document'])
49
-			and $id_document = $doc['id_document']
50
-		) {
51
-			include_spip('action/editer_liens');
52
-			// supprimer le lien dans la base
53
-			objet_dissocier(['document' => $id_document], [$objet => $id_objet], ['role' => '*']);
54
-
55
-			// verifier si il reste des liens avec d'autres objets et sinon supprimer
56
-			$liens = objet_trouver_liens(['document' => $id_document], '*');
57
-			if (!count($liens)) {
58
-				$supprimer_document = charger_fonction('supprimer_document', 'action');
59
-				$supprimer_document($doc['id_document']);
60
-			}
61
-		}
62
-	}
33
+    $chercher_logo = charger_fonction('chercher_logo', 'inc');
34
+    $objet = objet_type($objet);
35
+    $primary = id_table_objet($objet);
36
+    include_spip('inc/chercher_logo');
37
+
38
+    // existe-t-il deja un logo ?
39
+    $logo = $chercher_logo($id_objet, $primary, $etat);
40
+    if ($logo) {
41
+        # TODO : deprecated, a supprimer -> anciens logos IMG/artonxx.png pas en base
42
+        if ((is_countable($logo) ? count($logo) : 0) < 6) {
43
+            spip_log('Supprimer ancien logo ' . json_encode($logo, JSON_THROW_ON_ERROR), 'logo');
44
+            spip_unlink($logo[0]);
45
+        }
46
+        elseif (
47
+            $doc = $logo[5]
48
+            and isset($doc['id_document'])
49
+            and $id_document = $doc['id_document']
50
+        ) {
51
+            include_spip('action/editer_liens');
52
+            // supprimer le lien dans la base
53
+            objet_dissocier(['document' => $id_document], [$objet => $id_objet], ['role' => '*']);
54
+
55
+            // verifier si il reste des liens avec d'autres objets et sinon supprimer
56
+            $liens = objet_trouver_liens(['document' => $id_document], '*');
57
+            if (!count($liens)) {
58
+                $supprimer_document = charger_fonction('supprimer_document', 'action');
59
+                $supprimer_document($doc['id_document']);
60
+            }
61
+        }
62
+    }
63 63
 }
64 64
 
65 65
 /**
@@ -76,200 +76,200 @@  discard block
 block discarded – undo
76 76
  *     Erreur, sinon ''
77 77
  */
78 78
 function logo_modifier($objet, $id_objet, $etat, $source) {
79
-	$chercher_logo = charger_fonction('chercher_logo', 'inc');
80
-	$objet = objet_type($objet);
81
-	$primary = id_table_objet($objet);
82
-	include_spip('inc/chercher_logo');
83
-
84
-	$mode = preg_replace(',\W,', '', $etat);
85
-	if (!$mode) {
86
-		spip_log("logo_modifier : etat $etat invalide", 'logo');
87
-		$erreur = 'etat invalide';
88
-
89
-		return $erreur;
90
-	}
91
-	// chercher dans la base
92
-	$mode_document = 'logo' . $mode;
93
-
94
-	include_spip('inc/documents');
95
-	$erreur = '';
96
-
97
-	if (!$source) {
98
-		spip_log('spip_image_ajouter : source inconnue', 'logo');
99
-		$erreur = 'source inconnue';
100
-
101
-		return $erreur;
102
-	}
103
-
104
-	// fichier dans upload/
105
-	if (is_string($source)) {
106
-		$tmp_name = false;
107
-		if (file_exists($source)) {
108
-			$tmp_name = $source;
109
-		} elseif (file_exists($f = determine_upload() . $source)) {
110
-			$tmp_name = $f;
111
-		}
112
-		if (!$tmp_name) {
113
-			spip_log('spip_image_ajouter : source inconnue', 'logo');
114
-			$erreur = 'source inconnue';
115
-
116
-			return $erreur;
117
-		}
118
-		$source = [
119
-			'tmp_name' => $tmp_name,
120
-			'name' => basename($tmp_name),
121
-		];
122
-	} elseif ($erreur = check_upload_error($source['error'], '', true)) {
123
-		return $erreur;
124
-	}
125
-
126
-	// supprimer le logo eventueel existant
127
-	// TODO : si un logo existe, le modifier plutot que supprimer + reinserer (mais il faut gerer le cas ou il est utilise par plusieurs objets, donc pas si simple)
128
-	// mais de toute facon l'interface actuelle oblige a supprimer + reinserer
129
-	if (empty($GLOBALS['logo_migrer_en_base'])) {
130
-		logo_supprimer($objet, $id_objet, $etat);
131
-	}
132
-
133
-
134
-	include_spip('inc/autoriser');
135
-	$source['mode'] = $mode_document;
136
-	$ajouter_documents = charger_fonction('ajouter_documents', 'action');
137
-	autoriser_exception('associerdocuments', $objet, $id_objet);
138
-	$ajoutes = $ajouter_documents('new', [$source], $objet, $id_objet, $mode_document);
139
-	autoriser_exception('associerdocuments', $objet, $id_objet, false);
140
-
141
-	$id_document = reset($ajoutes);
142
-
143
-	if (!is_numeric($id_document)) {
144
-		$erreur = ($id_document ?: 'Erreur inconnue');
145
-		spip_log("Erreur ajout logo : $erreur pour source=" . json_encode($source, JSON_THROW_ON_ERROR), 'logo');
146
-		return $erreur;
147
-	}
148
-
149
-	return ''; // tout est bon, pas d'erreur
79
+    $chercher_logo = charger_fonction('chercher_logo', 'inc');
80
+    $objet = objet_type($objet);
81
+    $primary = id_table_objet($objet);
82
+    include_spip('inc/chercher_logo');
83
+
84
+    $mode = preg_replace(',\W,', '', $etat);
85
+    if (!$mode) {
86
+        spip_log("logo_modifier : etat $etat invalide", 'logo');
87
+        $erreur = 'etat invalide';
88
+
89
+        return $erreur;
90
+    }
91
+    // chercher dans la base
92
+    $mode_document = 'logo' . $mode;
93
+
94
+    include_spip('inc/documents');
95
+    $erreur = '';
96
+
97
+    if (!$source) {
98
+        spip_log('spip_image_ajouter : source inconnue', 'logo');
99
+        $erreur = 'source inconnue';
100
+
101
+        return $erreur;
102
+    }
103
+
104
+    // fichier dans upload/
105
+    if (is_string($source)) {
106
+        $tmp_name = false;
107
+        if (file_exists($source)) {
108
+            $tmp_name = $source;
109
+        } elseif (file_exists($f = determine_upload() . $source)) {
110
+            $tmp_name = $f;
111
+        }
112
+        if (!$tmp_name) {
113
+            spip_log('spip_image_ajouter : source inconnue', 'logo');
114
+            $erreur = 'source inconnue';
115
+
116
+            return $erreur;
117
+        }
118
+        $source = [
119
+            'tmp_name' => $tmp_name,
120
+            'name' => basename($tmp_name),
121
+        ];
122
+    } elseif ($erreur = check_upload_error($source['error'], '', true)) {
123
+        return $erreur;
124
+    }
125
+
126
+    // supprimer le logo eventueel existant
127
+    // TODO : si un logo existe, le modifier plutot que supprimer + reinserer (mais il faut gerer le cas ou il est utilise par plusieurs objets, donc pas si simple)
128
+    // mais de toute facon l'interface actuelle oblige a supprimer + reinserer
129
+    if (empty($GLOBALS['logo_migrer_en_base'])) {
130
+        logo_supprimer($objet, $id_objet, $etat);
131
+    }
132
+
133
+
134
+    include_spip('inc/autoriser');
135
+    $source['mode'] = $mode_document;
136
+    $ajouter_documents = charger_fonction('ajouter_documents', 'action');
137
+    autoriser_exception('associerdocuments', $objet, $id_objet);
138
+    $ajoutes = $ajouter_documents('new', [$source], $objet, $id_objet, $mode_document);
139
+    autoriser_exception('associerdocuments', $objet, $id_objet, false);
140
+
141
+    $id_document = reset($ajoutes);
142
+
143
+    if (!is_numeric($id_document)) {
144
+        $erreur = ($id_document ?: 'Erreur inconnue');
145
+        spip_log("Erreur ajout logo : $erreur pour source=" . json_encode($source, JSON_THROW_ON_ERROR), 'logo');
146
+        return $erreur;
147
+    }
148
+
149
+    return ''; // tout est bon, pas d'erreur
150 150
 }
151 151
 
152 152
 function logo_migrer_en_base($objet, $time_limit) {
153 153
 
154
-	$dir_logos_erreurs = sous_repertoire(_DIR_IMG, 'logo_erreurs');
155
-	$dir_logos = sous_repertoire(_DIR_IMG, 'logo');
156
-	$formats_logos = ['jpg', 'png', 'svg', 'gif'];
157
-	if (isset($GLOBALS['formats_logos'])) {
158
-		$formats_logos = $GLOBALS['formats_logos'];
159
-	}
160
-
161
-
162
-	$trouver_table = charger_fonction('trouver_table', 'base');
163
-	$chercher_logo = charger_fonction('chercher_logo', 'inc');
164
-	include_spip('inc/chercher_logo');
165
-	$_id_objet = id_table_objet($objet);
166
-	$table = table_objet_sql($objet);
167
-	$type = type_du_logo($_id_objet);
168
-	$desc = $trouver_table($table);
169
-
170
-	// on desactive les revisions
171
-	$liste_objets_versionnes = $GLOBALS['meta']['objets_versions'] ?? '';
172
-	unset($GLOBALS['meta']['objets_versions']);
173
-	// et le signalement des editions
174
-	$articles_modif = $GLOBALS['meta']['articles_modif'] ?? '';
175
-	$GLOBALS['meta']['articles_modif'] = 'non';
176
-
177
-	foreach (['on', 'off'] as $mode) {
178
-		$nom_base = $type . $mode;
179
-		$dir = (defined('_DIR_LOGOS') ? _DIR_LOGOS : _DIR_IMG);
180
-
181
-		$files = glob($dir . $nom_base . '*');
182
-		// est-ce que c'est une nouvelle tentative de migration ?
183
-		// dans ce cas les logos sont deja dans IMG/logo/
184
-		if (!(is_countable($files) ? count($files) : 0)) {
185
-			$files = glob($dir_logos . $nom_base . '*');
186
-			if (is_countable($files) ? count($files) : 0) {
187
-				// mais il faut verifier si ils ont pas deja ete migres pour tout ou partie
188
-				$filescheck = [];
189
-				foreach ($files as $file) {
190
-					$short = basename(dirname($file)) . DIRECTORY_SEPARATOR . basename($file);
191
-					$filescheck[$short] = $file;
192
-				}
193
-				// trouver ceux deja migres
194
-				$deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck)) . " AND mode LIKE 'logo%'");
195
-				if (is_countable($deja) ? count($deja) : 0) {
196
-					$deja = array_column($deja, 'fichier');
197
-					$restant = array_diff(array_keys($filescheck), $deja);
198
-					$files = [];
199
-					if (count($restant)) {
200
-						foreach ($restant as $r) {
201
-							$files[] = $filescheck[$r];
202
-						}
203
-					}
204
-				}
205
-				// et si il en reste on peut y aller...
206
-				// mais il faut modifier $dir qui sert de base dans la suite
207
-				if (is_countable($files) ? count($files) : 0) {
208
-					$dir = $dir_logos;
209
-				}
210
-			}
211
-		}
212
-
213
-		$count = (is_countable($files) ? count($files) : 0);
214
-		spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
215
-
216
-		$deja = [];
217
-		foreach ($files as $file) {
218
-			$logo = substr($file, strlen($dir . $nom_base));
219
-			$logo = explode('.', $logo);
220
-			if (
221
-				is_numeric($logo[0])
222
-				and ($id_objet = intval($logo[0]) or in_array($objet, ['site', 'rubrique']))
223
-			) {
224
-				if (!isset($deja[$id_objet])) {
225
-					$logo = $chercher_logo($id_objet, $_id_objet, $mode);
226
-					// if no logo in base
227
-					if (!$logo or (is_countable($logo) ? count($logo) : 0) < 6) {
228
-						foreach ($formats_logos as $format) {
229
-							if (@file_exists($d = ($dir . ($nom = $nom_base . intval($id_objet) . '.' . $format)))) {
230
-								if (isset($desc['field']['date_modif'])) {
231
-									$date_modif = sql_getfetsel('date_modif', $table, "$_id_objet=$id_objet");
232
-								} else {
233
-									$date_modif = null;
234
-								}
235
-								// s'assurer que le logo a les bon droits au passage (evite un echec en cas de sanitization d'un svg)
236
-								@chmod($d, _SPIP_CHMOD & 0666);
237
-								// logo_modifier commence par supprimer le logo existant, donc on le deplace pour pas le perdre
238
-								@rename($d, $dir_logos . $nom);
239
-								// et on le declare comme nouveau logo
240
-								logo_modifier($objet, $id_objet, $mode, $dir_logos . $nom);
241
-								if ($date_modif) {
242
-									sql_updateq($table, ['date_modif' => $date_modif], "$_id_objet=$id_objet");
243
-								}
244
-								break;
245
-							}
246
-						}
247
-					}
248
-					$deja[$id_objet] = true;
249
-				}
250
-			}
251
-			// si le fichier est encore la on le move : rien a faire ici
252
-			// (sauf si c'est une re-migration : il est deja dans logo/ donc il bouge pas)
253
-			if ($dir !== $dir_logos and file_exists($file)) {
254
-				@rename($file, $dir_logos_erreurs . basename($file));
255
-			}
256
-
257
-			$count--;
258
-			if ($count % 250 === 0) {
259
-				spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
260
-			}
261
-
262
-			if ($time_limit and time() > $time_limit) {
263
-				effacer_meta('drapeau_edition');
264
-				return;
265
-			}
266
-		}
267
-	}
268
-
269
-	if ($liste_objets_versionnes) {
270
-		$GLOBALS['meta']['objets_versions'] = $liste_objets_versionnes;
271
-	}
272
-	$GLOBALS['meta']['articles_modif'] = $articles_modif;
273
-
274
-	effacer_meta('drapeau_edition');
154
+    $dir_logos_erreurs = sous_repertoire(_DIR_IMG, 'logo_erreurs');
155
+    $dir_logos = sous_repertoire(_DIR_IMG, 'logo');
156
+    $formats_logos = ['jpg', 'png', 'svg', 'gif'];
157
+    if (isset($GLOBALS['formats_logos'])) {
158
+        $formats_logos = $GLOBALS['formats_logos'];
159
+    }
160
+
161
+
162
+    $trouver_table = charger_fonction('trouver_table', 'base');
163
+    $chercher_logo = charger_fonction('chercher_logo', 'inc');
164
+    include_spip('inc/chercher_logo');
165
+    $_id_objet = id_table_objet($objet);
166
+    $table = table_objet_sql($objet);
167
+    $type = type_du_logo($_id_objet);
168
+    $desc = $trouver_table($table);
169
+
170
+    // on desactive les revisions
171
+    $liste_objets_versionnes = $GLOBALS['meta']['objets_versions'] ?? '';
172
+    unset($GLOBALS['meta']['objets_versions']);
173
+    // et le signalement des editions
174
+    $articles_modif = $GLOBALS['meta']['articles_modif'] ?? '';
175
+    $GLOBALS['meta']['articles_modif'] = 'non';
176
+
177
+    foreach (['on', 'off'] as $mode) {
178
+        $nom_base = $type . $mode;
179
+        $dir = (defined('_DIR_LOGOS') ? _DIR_LOGOS : _DIR_IMG);
180
+
181
+        $files = glob($dir . $nom_base . '*');
182
+        // est-ce que c'est une nouvelle tentative de migration ?
183
+        // dans ce cas les logos sont deja dans IMG/logo/
184
+        if (!(is_countable($files) ? count($files) : 0)) {
185
+            $files = glob($dir_logos . $nom_base . '*');
186
+            if (is_countable($files) ? count($files) : 0) {
187
+                // mais il faut verifier si ils ont pas deja ete migres pour tout ou partie
188
+                $filescheck = [];
189
+                foreach ($files as $file) {
190
+                    $short = basename(dirname($file)) . DIRECTORY_SEPARATOR . basename($file);
191
+                    $filescheck[$short] = $file;
192
+                }
193
+                // trouver ceux deja migres
194
+                $deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck)) . " AND mode LIKE 'logo%'");
195
+                if (is_countable($deja) ? count($deja) : 0) {
196
+                    $deja = array_column($deja, 'fichier');
197
+                    $restant = array_diff(array_keys($filescheck), $deja);
198
+                    $files = [];
199
+                    if (count($restant)) {
200
+                        foreach ($restant as $r) {
201
+                            $files[] = $filescheck[$r];
202
+                        }
203
+                    }
204
+                }
205
+                // et si il en reste on peut y aller...
206
+                // mais il faut modifier $dir qui sert de base dans la suite
207
+                if (is_countable($files) ? count($files) : 0) {
208
+                    $dir = $dir_logos;
209
+                }
210
+            }
211
+        }
212
+
213
+        $count = (is_countable($files) ? count($files) : 0);
214
+        spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
215
+
216
+        $deja = [];
217
+        foreach ($files as $file) {
218
+            $logo = substr($file, strlen($dir . $nom_base));
219
+            $logo = explode('.', $logo);
220
+            if (
221
+                is_numeric($logo[0])
222
+                and ($id_objet = intval($logo[0]) or in_array($objet, ['site', 'rubrique']))
223
+            ) {
224
+                if (!isset($deja[$id_objet])) {
225
+                    $logo = $chercher_logo($id_objet, $_id_objet, $mode);
226
+                    // if no logo in base
227
+                    if (!$logo or (is_countable($logo) ? count($logo) : 0) < 6) {
228
+                        foreach ($formats_logos as $format) {
229
+                            if (@file_exists($d = ($dir . ($nom = $nom_base . intval($id_objet) . '.' . $format)))) {
230
+                                if (isset($desc['field']['date_modif'])) {
231
+                                    $date_modif = sql_getfetsel('date_modif', $table, "$_id_objet=$id_objet");
232
+                                } else {
233
+                                    $date_modif = null;
234
+                                }
235
+                                // s'assurer que le logo a les bon droits au passage (evite un echec en cas de sanitization d'un svg)
236
+                                @chmod($d, _SPIP_CHMOD & 0666);
237
+                                // logo_modifier commence par supprimer le logo existant, donc on le deplace pour pas le perdre
238
+                                @rename($d, $dir_logos . $nom);
239
+                                // et on le declare comme nouveau logo
240
+                                logo_modifier($objet, $id_objet, $mode, $dir_logos . $nom);
241
+                                if ($date_modif) {
242
+                                    sql_updateq($table, ['date_modif' => $date_modif], "$_id_objet=$id_objet");
243
+                                }
244
+                                break;
245
+                            }
246
+                        }
247
+                    }
248
+                    $deja[$id_objet] = true;
249
+                }
250
+            }
251
+            // si le fichier est encore la on le move : rien a faire ici
252
+            // (sauf si c'est une re-migration : il est deja dans logo/ donc il bouge pas)
253
+            if ($dir !== $dir_logos and file_exists($file)) {
254
+                @rename($file, $dir_logos_erreurs . basename($file));
255
+            }
256
+
257
+            $count--;
258
+            if ($count % 250 === 0) {
259
+                spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
260
+            }
261
+
262
+            if ($time_limit and time() > $time_limit) {
263
+                effacer_meta('drapeau_edition');
264
+                return;
265
+            }
266
+        }
267
+    }
268
+
269
+    if ($liste_objets_versionnes) {
270
+        $GLOBALS['meta']['objets_versions'] = $liste_objets_versionnes;
271
+    }
272
+    $GLOBALS['meta']['articles_modif'] = $articles_modif;
273
+
274
+    effacer_meta('drapeau_edition');
275 275
 }
Please login to merge, or discard this patch.
ecrire/inc/autoriser.php 1 patch
Indentation   +683 added lines, -683 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Autorisations
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 include_spip('base/abstract_sql');
@@ -38,89 +38,89 @@  discard block
 block discarded – undo
38 38
 
39 39
 
40 40
 if (!function_exists('autoriser')) {
41
-	/**
42
-	 * Autoriser une action
43
-	 *
44
-	 * Teste si une personne (par défaut le visiteur en cours) peut effectuer
45
-	 * une certaine action. Cette fonction est le point d'entrée de toutes
46
-	 * les autorisations.
47
-	 *
48
-	 * La fonction se charge d'appeler des fonctions d'autorisations spécifiques
49
-	 * aux actions demandées si elles existent. Elle cherche donc les fonctions
50
-	 * dans cet ordre :
51
-	 *
52
-	 * - autoriser_{type}_{faire}, sinon avec _dist
53
-	 * - autoriser_{type}, sinon avec _dist
54
-	 * - autoriser_{faire}, sinon avec _dist
55
-	 * - autoriser_{defaut}, sinon avec _dist
56
-	 *
57
-	 * Seul le premier argument est obligatoire.
58
-	 *
59
-	 * @note
60
-	 *     Le paramètre `$type` attend par défaut un type d'objet éditorial, et à ce titre,
61
-	 *     la valeur transmise se verra appliquer la fonction 'objet_type' pour uniformiser
62
-	 *     cette valeur.
63
-	 *
64
-	 *     Si ce paramètre n'a rien n'a voir avec un objet éditorial, par exemple
65
-	 *     'statistiques', un souligné avant le terme est ajouté afin d'indiquer
66
-	 *     explicitement à la fonction autoriser de ne pas transformer la chaîne en type
67
-	 *     d'objet. Cela donne pour cet exemple : `autoriser('detruire', '_statistiques')`
68
-	 *
69
-	 * @note
70
-	 *     Le paramètre `$type`, en plus de l'uniformisation en type d'objet, se voit retirer
71
-	 *     tous les soulignés du terme. Ainsi le type d'objet `livre_art` deviendra `livreart`
72
-	 *     et SPIP cherchera une fonction `autoriser_livreart_{faire}`. Ceci permet
73
-	 *     d'éviter une possible confusion si une fonction `autoriser_livre_art` existait :
74
-	 *     quel serait le type, quel serait l'action ?
75
-	 *
76
-	 *     Pour résumer, si le type d'objet éditorial a un souligné, tel que 'livre_art',
77
-	 *     la fonction d'autorisation correspondante ne l'aura pas.
78
-	 *     Exemple : `function autoriser_livreart_modifier_dist(...){...}`
79
-	 *
80
-	 * @api
81
-	 * @see autoriser_dist()
82
-	 * @see objet_type()
83
-	 *
84
-	 * @param string $faire
85
-	 *   une action ('modifier', 'publier'...)
86
-	 * @param string|null $type
87
-	 *   Type d’objet ou élément sur lequel appliquer l’action.
88
-	 *   - null: indifférent à tout type d’élément ou objet éditorial
89
-	 *   - string: objet éditorial (objet_type() est appliqué pour homogénéiser l’entrée)
90
-	 *   - _string: autre élément (avec un souligné en premier caractère, désactive objet_type()).
91
-	 *   Les soulignés seront retirés (cf. la note).
92
-	 * @param string|int|null $id
93
-	 *   id de l'objet ou élément sur lequel on veut agir, si pertinent.
94
-	 *   - null: non utile pour l’autorisation
95
-	 *   - int: identifiant numérique (cas de tous les objets éditoriaux de SPIP)
96
-	 *   - string: identifiant textuel
97
-	 * @param null|int|array $qui
98
-	 *   - si null on prend alors visiteur_session
99
-	 *   - un id_auteur (on regarde dans la base)
100
-	 *   - un tableau auteur complet, y compris [restreint]
101
-	 * @param array $opt
102
-	 *   options sous forme de tableau associatif
103
-	 * @return bool
104
-	 *   true si la personne peut effectuer l'action
105
-	 */
106
-	function autoriser(string $faire, ?string $type = '', $id = null, $qui = null, array $opt = []): bool {
107
-		// Charger les fonctions d'autorisation supplementaires
108
-		static $pipe;
109
-		if (!isset($pipe)) {
110
-			$pipe = 1;
111
-			pipeline('autoriser');
112
-		}
113
-
114
-		return autoriser_dist($faire, $type, $id, $qui, $opt);
115
-	}
41
+    /**
42
+     * Autoriser une action
43
+     *
44
+     * Teste si une personne (par défaut le visiteur en cours) peut effectuer
45
+     * une certaine action. Cette fonction est le point d'entrée de toutes
46
+     * les autorisations.
47
+     *
48
+     * La fonction se charge d'appeler des fonctions d'autorisations spécifiques
49
+     * aux actions demandées si elles existent. Elle cherche donc les fonctions
50
+     * dans cet ordre :
51
+     *
52
+     * - autoriser_{type}_{faire}, sinon avec _dist
53
+     * - autoriser_{type}, sinon avec _dist
54
+     * - autoriser_{faire}, sinon avec _dist
55
+     * - autoriser_{defaut}, sinon avec _dist
56
+     *
57
+     * Seul le premier argument est obligatoire.
58
+     *
59
+     * @note
60
+     *     Le paramètre `$type` attend par défaut un type d'objet éditorial, et à ce titre,
61
+     *     la valeur transmise se verra appliquer la fonction 'objet_type' pour uniformiser
62
+     *     cette valeur.
63
+     *
64
+     *     Si ce paramètre n'a rien n'a voir avec un objet éditorial, par exemple
65
+     *     'statistiques', un souligné avant le terme est ajouté afin d'indiquer
66
+     *     explicitement à la fonction autoriser de ne pas transformer la chaîne en type
67
+     *     d'objet. Cela donne pour cet exemple : `autoriser('detruire', '_statistiques')`
68
+     *
69
+     * @note
70
+     *     Le paramètre `$type`, en plus de l'uniformisation en type d'objet, se voit retirer
71
+     *     tous les soulignés du terme. Ainsi le type d'objet `livre_art` deviendra `livreart`
72
+     *     et SPIP cherchera une fonction `autoriser_livreart_{faire}`. Ceci permet
73
+     *     d'éviter une possible confusion si une fonction `autoriser_livre_art` existait :
74
+     *     quel serait le type, quel serait l'action ?
75
+     *
76
+     *     Pour résumer, si le type d'objet éditorial a un souligné, tel que 'livre_art',
77
+     *     la fonction d'autorisation correspondante ne l'aura pas.
78
+     *     Exemple : `function autoriser_livreart_modifier_dist(...){...}`
79
+     *
80
+     * @api
81
+     * @see autoriser_dist()
82
+     * @see objet_type()
83
+     *
84
+     * @param string $faire
85
+     *   une action ('modifier', 'publier'...)
86
+     * @param string|null $type
87
+     *   Type d’objet ou élément sur lequel appliquer l’action.
88
+     *   - null: indifférent à tout type d’élément ou objet éditorial
89
+     *   - string: objet éditorial (objet_type() est appliqué pour homogénéiser l’entrée)
90
+     *   - _string: autre élément (avec un souligné en premier caractère, désactive objet_type()).
91
+     *   Les soulignés seront retirés (cf. la note).
92
+     * @param string|int|null $id
93
+     *   id de l'objet ou élément sur lequel on veut agir, si pertinent.
94
+     *   - null: non utile pour l’autorisation
95
+     *   - int: identifiant numérique (cas de tous les objets éditoriaux de SPIP)
96
+     *   - string: identifiant textuel
97
+     * @param null|int|array $qui
98
+     *   - si null on prend alors visiteur_session
99
+     *   - un id_auteur (on regarde dans la base)
100
+     *   - un tableau auteur complet, y compris [restreint]
101
+     * @param array $opt
102
+     *   options sous forme de tableau associatif
103
+     * @return bool
104
+     *   true si la personne peut effectuer l'action
105
+     */
106
+    function autoriser(string $faire, ?string $type = '', $id = null, $qui = null, array $opt = []): bool {
107
+        // Charger les fonctions d'autorisation supplementaires
108
+        static $pipe;
109
+        if (!isset($pipe)) {
110
+            $pipe = 1;
111
+            pipeline('autoriser');
112
+        }
113
+
114
+        return autoriser_dist($faire, $type, $id, $qui, $opt);
115
+    }
116 116
 }
117 117
 
118 118
 
119 119
 // mes_fonctions peut aussi declarer des autorisations, il faut donc le charger
120 120
 // mais apres la fonction autoriser()
121 121
 if ($f = find_in_path('mes_fonctions.php')) {
122
-	global $dossier_squelettes;
123
-	include_once(_ROOT_CWD . $f);
122
+    global $dossier_squelettes;
123
+    include_once(_ROOT_CWD . $f);
124 124
 }
125 125
 
126 126
 
@@ -151,85 +151,85 @@  discard block
 block discarded – undo
151 151
  */
152 152
 function autoriser_dist(string $faire, ?string $type = '', $id = null, $qui = null, array $opt = []): bool {
153 153
 
154
-	if ($type === null) {
155
-		$type = '';
156
-	}
157
-
158
-	// Qui ? visiteur_session ?
159
-	// si null ou '' (appel depuis #AUTORISER) on prend l'auteur loge
160
-	if ($qui === null or $qui === '') {
161
-		$qui = $GLOBALS['visiteur_session'] ?: [];
162
-		$qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui);
163
-	} elseif (is_numeric($qui)) {
164
-		$qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui);
165
-		if (!$qui) {
166
-			return false;
167
-		}
168
-	}
169
-
170
-	// Admins restreints, on construit ici (pas generique mais...)
171
-	// le tableau de toutes leurs rubriques (y compris les sous-rubriques)
172
-	if (_ADMINS_RESTREINTS and is_array($qui)) {
173
-		$qui['restreint'] = isset($qui['id_auteur']) ? liste_rubriques_auteur($qui['id_auteur']) : [];
174
-	}
175
-
176
-	spip_log(
177
-		"autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?',
178
-		'autoriser' . _LOG_DEBUG
179
-	);
180
-
181
-	// passer par objet_type pour avoir les alias
182
-	// sauf si _ est le premier caractère.
183
-	if ($type and $type[0] !== '_') {
184
-		$type = objet_type($type, false);
185
-	}
186
-	// et supprimer les _
187
-	$type = str_replace('_', '', (string) $type);
188
-
189
-	// Si une exception a ete decretee plus haut dans le code, l'appliquer
190
-	if (
191
-		(isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) and autoriser_exception($faire, $type, $id, 'verifier'))
192
-		or (isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) and autoriser_exception($faire, $type, '*', 'verifier'))
193
-	) {
194
-		spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG);
195
-		return true;
196
-	}
197
-
198
-	// Chercher une fonction d'autorisation
199
-	// Dans l'ordre on va chercher autoriser_type_faire[_dist], autoriser_type[_dist],
200
-	// autoriser_faire[_dist], autoriser_defaut[_dist]
201
-	$fonctions = $type
202
-		? [
203
-			'autoriser_' . $type . '_' . $faire,
204
-			'autoriser_' . $type . '_' . $faire . '_dist',
205
-			'autoriser_' . $type,
206
-			'autoriser_' . $type . '_dist',
207
-			'autoriser_' . $faire,
208
-			'autoriser_' . $faire . '_dist',
209
-			'autoriser_defaut',
210
-			'autoriser_defaut_dist'
211
-		]
212
-		: [
213
-			'autoriser_' . $faire,
214
-			'autoriser_' . $faire . '_dist',
215
-			'autoriser_defaut',
216
-			'autoriser_defaut_dist'
217
-		];
218
-
219
-	$a = false;
220
-	foreach ($fonctions as $f) {
221
-		if (function_exists($f)) {
222
-			$a = $f($faire, $type, $id, $qui, $opt);
223
-			break;
224
-		}
225
-	}
226
-
227
-	spip_log(
228
-		"$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'),
229
-		'autoriser' . _LOG_DEBUG
230
-	);
231
-
232
-	return $a;
154
+    if ($type === null) {
155
+        $type = '';
156
+    }
157
+
158
+    // Qui ? visiteur_session ?
159
+    // si null ou '' (appel depuis #AUTORISER) on prend l'auteur loge
160
+    if ($qui === null or $qui === '') {
161
+        $qui = $GLOBALS['visiteur_session'] ?: [];
162
+        $qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui);
163
+    } elseif (is_numeric($qui)) {
164
+        $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui);
165
+        if (!$qui) {
166
+            return false;
167
+        }
168
+    }
169
+
170
+    // Admins restreints, on construit ici (pas generique mais...)
171
+    // le tableau de toutes leurs rubriques (y compris les sous-rubriques)
172
+    if (_ADMINS_RESTREINTS and is_array($qui)) {
173
+        $qui['restreint'] = isset($qui['id_auteur']) ? liste_rubriques_auteur($qui['id_auteur']) : [];
174
+    }
175
+
176
+    spip_log(
177
+        "autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?',
178
+        'autoriser' . _LOG_DEBUG
179
+    );
180
+
181
+    // passer par objet_type pour avoir les alias
182
+    // sauf si _ est le premier caractère.
183
+    if ($type and $type[0] !== '_') {
184
+        $type = objet_type($type, false);
185
+    }
186
+    // et supprimer les _
187
+    $type = str_replace('_', '', (string) $type);
188
+
189
+    // Si une exception a ete decretee plus haut dans le code, l'appliquer
190
+    if (
191
+        (isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) and autoriser_exception($faire, $type, $id, 'verifier'))
192
+        or (isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) and autoriser_exception($faire, $type, '*', 'verifier'))
193
+    ) {
194
+        spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG);
195
+        return true;
196
+    }
197
+
198
+    // Chercher une fonction d'autorisation
199
+    // Dans l'ordre on va chercher autoriser_type_faire[_dist], autoriser_type[_dist],
200
+    // autoriser_faire[_dist], autoriser_defaut[_dist]
201
+    $fonctions = $type
202
+        ? [
203
+            'autoriser_' . $type . '_' . $faire,
204
+            'autoriser_' . $type . '_' . $faire . '_dist',
205
+            'autoriser_' . $type,
206
+            'autoriser_' . $type . '_dist',
207
+            'autoriser_' . $faire,
208
+            'autoriser_' . $faire . '_dist',
209
+            'autoriser_defaut',
210
+            'autoriser_defaut_dist'
211
+        ]
212
+        : [
213
+            'autoriser_' . $faire,
214
+            'autoriser_' . $faire . '_dist',
215
+            'autoriser_defaut',
216
+            'autoriser_defaut_dist'
217
+        ];
218
+
219
+    $a = false;
220
+    foreach ($fonctions as $f) {
221
+        if (function_exists($f)) {
222
+            $a = $f($faire, $type, $id, $qui, $opt);
223
+            break;
224
+        }
225
+    }
226
+
227
+    spip_log(
228
+        "$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'),
229
+        'autoriser' . _LOG_DEBUG
230
+    );
231
+
232
+    return $a;
233 233
 }
234 234
 
235 235
 // une globale pour aller au plus vite dans la fonction generique ci dessus
@@ -249,33 +249,33 @@  discard block
 block discarded – undo
249 249
  * @return bool
250 250
  */
251 251
 function autoriser_exception(string $faire, ?string $type = '', $id = null, $autoriser = true): bool {
252
-	// une static innaccessible par url pour verifier que la globale est positionnee a bon escient
253
-	static $autorisation;
254
-	// Tolérance avec certains appels
255
-	if ($type === null) {
256
-		$type = '';
257
-	}
258
-	if ($id === null) {
259
-		$id = 0;
260
-	}
261
-	if ($autoriser === 'verifier') {
262
-		return isset($autorisation[$faire][$type][$id]);
263
-	}
264
-	if ($autoriser === true) {
265
-		$GLOBALS['autoriser_exception'][$faire][$type][$id] = $autorisation[$faire][$type][$id] = true;
266
-	}
267
-	if ($autoriser === false) {
268
-		if ($id === '*') {
269
-			unset($GLOBALS['autoriser_exception'][$faire][$type]);
270
-			unset($autorisation[$faire][$type]);
271
-		}
272
-		else {
273
-			unset($GLOBALS['autoriser_exception'][$faire][$type][$id]);
274
-			unset($autorisation[$faire][$type][$id]);
275
-		}
276
-	}
277
-
278
-	return false;
252
+    // une static innaccessible par url pour verifier que la globale est positionnee a bon escient
253
+    static $autorisation;
254
+    // Tolérance avec certains appels
255
+    if ($type === null) {
256
+        $type = '';
257
+    }
258
+    if ($id === null) {
259
+        $id = 0;
260
+    }
261
+    if ($autoriser === 'verifier') {
262
+        return isset($autorisation[$faire][$type][$id]);
263
+    }
264
+    if ($autoriser === true) {
265
+        $GLOBALS['autoriser_exception'][$faire][$type][$id] = $autorisation[$faire][$type][$id] = true;
266
+    }
267
+    if ($autoriser === false) {
268
+        if ($id === '*') {
269
+            unset($GLOBALS['autoriser_exception'][$faire][$type]);
270
+            unset($autorisation[$faire][$type]);
271
+        }
272
+        else {
273
+            unset($GLOBALS['autoriser_exception'][$faire][$type][$id]);
274
+            unset($autorisation[$faire][$type][$id]);
275
+        }
276
+    }
277
+
278
+    return false;
279 279
 }
280 280
 
281 281
 
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
  * @return bool true s'il a le droit, false sinon
295 295
  **/
296 296
 function autoriser_defaut_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
297
-	return
298
-		$qui['statut'] === '0minirezo'
299
-		and !$qui['restreint'];
297
+    return
298
+        $qui['statut'] === '0minirezo'
299
+        and !$qui['restreint'];
300 300
 }
301 301
 
302 302
 /**
@@ -316,10 +316,10 @@  discard block
 block discarded – undo
316 316
  * @return bool true s'il a le droit, false sinon
317 317
  */
318 318
 function autoriser_loger_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
319
-	if ($qui['statut'] === '5poubelle') {
320
-		return false;
321
-	}
322
-	return true;
319
+    if ($qui['statut'] === '5poubelle') {
320
+        return false;
321
+    }
322
+    return true;
323 323
 }
324 324
 
325 325
 /**
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
  * @return bool true s'il a le droit, false sinon
336 336
  **/
337 337
 function autoriser_ecrire_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
338
-	return isset($qui['statut']) and in_array($qui['statut'], ['0minirezo', '1comite']);
338
+    return isset($qui['statut']) and in_array($qui['statut'], ['0minirezo', '1comite']);
339 339
 }
340 340
 
341 341
 /**
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
  * @return bool true s'il a le droit, false sinon
355 355
  **/
356 356
 function autoriser_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
357
-	return in_array($qui['statut'], ['0minirezo', '1comite']);
357
+    return in_array($qui['statut'], ['0minirezo', '1comite']);
358 358
 }
359 359
 
360 360
 /**
@@ -374,18 +374,18 @@  discard block
 block discarded – undo
374 374
  **/
375 375
 function autoriser_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
376 376
 
377
-	// Le visiteur a-t-il un statut prevu par la config ?
378
-	if (strpos($GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',') !== false) {
379
-		return test_previsualiser_objet_champ($type, $id, $qui, $opt);
380
-	}
377
+    // Le visiteur a-t-il un statut prevu par la config ?
378
+    if (strpos($GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',') !== false) {
379
+        return test_previsualiser_objet_champ($type, $id, $qui, $opt);
380
+    }
381 381
 
382
-	// A-t-on un token de prévisualisation valable ?
383
-	include_spip('inc/securiser_action');
384
-	if (decrire_token_previsu()) {
385
-		return true;
386
-	}
382
+    // A-t-on un token de prévisualisation valable ?
383
+    include_spip('inc/securiser_action');
384
+    if (decrire_token_previsu()) {
385
+        return true;
386
+    }
387 387
 
388
-	return false;
388
+    return false;
389 389
 }
390 390
 
391 391
 /**
@@ -414,58 +414,58 @@  discard block
 block discarded – undo
414 414
  */
415 415
 function test_previsualiser_objet_champ(string $type = '', $id = null, array $qui = [], array $opt = []): bool {
416 416
 
417
-	// si pas de type et statut fourni, c'est une autorisation generale => OK
418
-	if (!$type) {
419
-		return true;
420
-	}
421
-
422
-	include_spip('base/objets');
423
-	$infos = lister_tables_objets_sql(table_objet_sql($type));
424
-	if (isset($infos['statut'])) {
425
-		foreach ($infos['statut'] as $c) {
426
-			if (isset($c['publie'])) {
427
-				if (!isset($c['previsu'])) {
428
-					return false;
429
-				} // pas de previsu definie => NIET
430
-				$champ = $c['champ'];
431
-				if (!isset($opt[$champ])) {
432
-					return false;
433
-				} // pas de champ passe a la demande => NIET
434
-				$previsu = explode(',', $c['previsu']);
435
-				// regarder si ce statut est autorise pour l'auteur
436
-				if (in_array($opt[$champ] . '/auteur', $previsu)) {
437
-					// retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
438
-					// sinon l’auteur en session
439
-					include_spip('inc/securiser_action');
440
-					if ($desc = decrire_token_previsu()) {
441
-						$id_auteur = $desc['id_auteur'];
442
-					} elseif (isset($GLOBALS['visiteur_session']['id_auteur'])) {
443
-						$id_auteur = intval($GLOBALS['visiteur_session']['id_auteur']);
444
-					} else {
445
-						$id_auteur = null;
446
-					}
447
-
448
-					if (!$id_auteur) {
449
-						return false;
450
-					} elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) {
451
-						// dans ce cas (admin en general), pas de filtrage sur ce statut
452
-					} elseif (
453
-						!sql_countsel(
454
-							'spip_auteurs_liens',
455
-							'id_auteur=' . intval($id_auteur) . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . intval($id)
456
-						)
457
-					) {
458
-						return false;
459
-					} // pas auteur de cet objet => NIET
460
-				} elseif (!in_array($opt[$champ], $previsu)) {
461
-					// le statut n'est pas dans ceux definis par la previsu => NIET
462
-					return false;
463
-				}
464
-			}
465
-		}
466
-	}
467
-
468
-	return true;
417
+    // si pas de type et statut fourni, c'est une autorisation generale => OK
418
+    if (!$type) {
419
+        return true;
420
+    }
421
+
422
+    include_spip('base/objets');
423
+    $infos = lister_tables_objets_sql(table_objet_sql($type));
424
+    if (isset($infos['statut'])) {
425
+        foreach ($infos['statut'] as $c) {
426
+            if (isset($c['publie'])) {
427
+                if (!isset($c['previsu'])) {
428
+                    return false;
429
+                } // pas de previsu definie => NIET
430
+                $champ = $c['champ'];
431
+                if (!isset($opt[$champ])) {
432
+                    return false;
433
+                } // pas de champ passe a la demande => NIET
434
+                $previsu = explode(',', $c['previsu']);
435
+                // regarder si ce statut est autorise pour l'auteur
436
+                if (in_array($opt[$champ] . '/auteur', $previsu)) {
437
+                    // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
438
+                    // sinon l’auteur en session
439
+                    include_spip('inc/securiser_action');
440
+                    if ($desc = decrire_token_previsu()) {
441
+                        $id_auteur = $desc['id_auteur'];
442
+                    } elseif (isset($GLOBALS['visiteur_session']['id_auteur'])) {
443
+                        $id_auteur = intval($GLOBALS['visiteur_session']['id_auteur']);
444
+                    } else {
445
+                        $id_auteur = null;
446
+                    }
447
+
448
+                    if (!$id_auteur) {
449
+                        return false;
450
+                    } elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) {
451
+                        // dans ce cas (admin en general), pas de filtrage sur ce statut
452
+                    } elseif (
453
+                        !sql_countsel(
454
+                            'spip_auteurs_liens',
455
+                            'id_auteur=' . intval($id_auteur) . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . intval($id)
456
+                        )
457
+                    ) {
458
+                        return false;
459
+                    } // pas auteur de cet objet => NIET
460
+                } elseif (!in_array($opt[$champ], $previsu)) {
461
+                    // le statut n'est pas dans ceux definis par la previsu => NIET
462
+                    return false;
463
+                }
464
+            }
465
+        }
466
+    }
467
+
468
+    return true;
469 469
 }
470 470
 
471 471
 /**
@@ -481,51 +481,51 @@  discard block
 block discarded – undo
481 481
  * @return bool true s'il a le droit, false sinon
482 482
  **/
483 483
 function autoriser_changerlangue_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
484
-	$multi_objets = explode(',', lire_config('multi_objets'));
485
-	$gerer_trad_objets = explode(',', lire_config('gerer_trad_objets'));
486
-	$table = table_objet_sql($type);
487
-	if (
488
-		in_array($table, $multi_objets)
489
-		or in_array($table, $gerer_trad_objets)
490
-	) { // affichage du formulaire si la configuration l'accepte
491
-		$multi_secteurs = lire_config('multi_secteurs');
492
-		$champs = objet_info($type, 'field');
493
-		if (
494
-			$multi_secteurs === 'oui'
495
-			and array_key_exists('id_rubrique', $champs)
496
-		) {
497
-			// multilinguisme par secteur et objet rattaché à une rubrique
498
-			$primary = id_table_objet($type);
499
-			if ($table != 'spip_rubriques') {
500
-				$id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=" . intval($id));
501
-			} else {
502
-				$id_rubrique = $id;
503
-			}
504
-			$id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
505
-			if (!$id_secteur > 0) {
506
-				$id_secteur = $id_rubrique;
507
-			}
508
-			$langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_secteur));
509
-			$langue_objet = sql_getfetsel('lang', "$table", "$primary=" . intval($id));
510
-			if ($langue_secteur != $langue_objet) {
511
-				// configuration incohérente, on laisse l'utilisateur corriger la situation
512
-				return true;
513
-			}
514
-			if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques
515
-				return false;
516
-			} else {
517
-				$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id));
518
-				if ($id_parent != 0) {
519
-					// sous-rubriques : pas de choix de langue
520
-					return false;
521
-				}
522
-			}
523
-		}
524
-	} else {
525
-		return false;
526
-	}
527
-
528
-	return autoriser('modifier', $type, $id, $qui, $opt);
484
+    $multi_objets = explode(',', lire_config('multi_objets'));
485
+    $gerer_trad_objets = explode(',', lire_config('gerer_trad_objets'));
486
+    $table = table_objet_sql($type);
487
+    if (
488
+        in_array($table, $multi_objets)
489
+        or in_array($table, $gerer_trad_objets)
490
+    ) { // affichage du formulaire si la configuration l'accepte
491
+        $multi_secteurs = lire_config('multi_secteurs');
492
+        $champs = objet_info($type, 'field');
493
+        if (
494
+            $multi_secteurs === 'oui'
495
+            and array_key_exists('id_rubrique', $champs)
496
+        ) {
497
+            // multilinguisme par secteur et objet rattaché à une rubrique
498
+            $primary = id_table_objet($type);
499
+            if ($table != 'spip_rubriques') {
500
+                $id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=" . intval($id));
501
+            } else {
502
+                $id_rubrique = $id;
503
+            }
504
+            $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
505
+            if (!$id_secteur > 0) {
506
+                $id_secteur = $id_rubrique;
507
+            }
508
+            $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_secteur));
509
+            $langue_objet = sql_getfetsel('lang', "$table", "$primary=" . intval($id));
510
+            if ($langue_secteur != $langue_objet) {
511
+                // configuration incohérente, on laisse l'utilisateur corriger la situation
512
+                return true;
513
+            }
514
+            if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques
515
+                return false;
516
+            } else {
517
+                $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id));
518
+                if ($id_parent != 0) {
519
+                    // sous-rubriques : pas de choix de langue
520
+                    return false;
521
+                }
522
+            }
523
+        }
524
+    } else {
525
+        return false;
526
+    }
527
+
528
+    return autoriser('modifier', $type, $id, $qui, $opt);
529 529
 }
530 530
 
531 531
 /**
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
  * @return bool true s'il a le droit, false sinon
542 542
  **/
543 543
 function autoriser_changertraduction_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
544
-	return autoriser('modifier', $type, $id, $qui, $opt);
544
+    return autoriser('modifier', $type, $id, $qui, $opt);
545 545
 }
546 546
 
547 547
 /**
@@ -557,41 +557,41 @@  discard block
 block discarded – undo
557 557
  * @return bool true s'il a le droit, false sinon
558 558
  **/
559 559
 function autoriser_dater_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
560
-	$table = table_objet($type);
561
-	$trouver_table = charger_fonction('trouver_table', 'base');
562
-	$desc = $trouver_table($table);
563
-	if (!$desc) {
564
-		return false;
565
-	}
566
-
567
-	if (!isset($opt['statut'])) {
568
-		if (isset($desc['field']['statut'])) {
569
-			$statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . intval($id));
570
-		} else {
571
-			$statut = 'publie';
572
-		} // pas de statut => publie
573
-	} else {
574
-		$statut = $opt['statut'];
575
-	}
576
-
577
-	// Liste des statuts publiés pour cet objet
578
-	if (isset($desc['statut'][0]['publie'])) {
579
-		$statuts_publies = explode(',', $desc['statut'][0]['publie']);
580
-	}
581
-	// Sinon en dur le statut "publie"
582
-	else {
583
-		$statuts_publies = ['publie'];
584
-	}
585
-
586
-	if (
587
-		in_array($statut, $statuts_publies)
588
-		// Ou cas particulier géré en dur ici pour les articles
589
-		or ($statut === 'prop' and $type === 'article' and $GLOBALS['meta']['post_dates'] === 'non')
590
-	) {
591
-		return autoriser('modifier', $type, $id);
592
-	}
593
-
594
-	return false;
560
+    $table = table_objet($type);
561
+    $trouver_table = charger_fonction('trouver_table', 'base');
562
+    $desc = $trouver_table($table);
563
+    if (!$desc) {
564
+        return false;
565
+    }
566
+
567
+    if (!isset($opt['statut'])) {
568
+        if (isset($desc['field']['statut'])) {
569
+            $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . intval($id));
570
+        } else {
571
+            $statut = 'publie';
572
+        } // pas de statut => publie
573
+    } else {
574
+        $statut = $opt['statut'];
575
+    }
576
+
577
+    // Liste des statuts publiés pour cet objet
578
+    if (isset($desc['statut'][0]['publie'])) {
579
+        $statuts_publies = explode(',', $desc['statut'][0]['publie']);
580
+    }
581
+    // Sinon en dur le statut "publie"
582
+    else {
583
+        $statuts_publies = ['publie'];
584
+    }
585
+
586
+    if (
587
+        in_array($statut, $statuts_publies)
588
+        // Ou cas particulier géré en dur ici pour les articles
589
+        or ($statut === 'prop' and $type === 'article' and $GLOBALS['meta']['post_dates'] === 'non')
590
+    ) {
591
+        return autoriser('modifier', $type, $id);
592
+    }
593
+
594
+    return false;
595 595
 }
596 596
 
597 597
 /**
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
  * @return bool true s'il a le droit, false sinon
611 611
  **/
612 612
 function autoriser_instituer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
613
-	return autoriser('modifier', $type, $id, $qui, $opt);
613
+    return autoriser('modifier', $type, $id, $qui, $opt);
614 614
 }
615 615
 
616 616
 /**
@@ -628,12 +628,12 @@  discard block
 block discarded – undo
628 628
  * @return bool true s'il a le droit, false sinon
629 629
  **/
630 630
 function autoriser_rubrique_publierdans_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
631
-	return
632
-		($qui['statut'] === '0minirezo')
633
-		and (
634
-			!$qui['restreint'] or !$id
635
-			or in_array($id, $qui['restreint'])
636
-		);
631
+    return
632
+        ($qui['statut'] === '0minirezo')
633
+        and (
634
+            !$qui['restreint'] or !$id
635
+            or in_array($id, $qui['restreint'])
636
+        );
637 637
 }
638 638
 
639 639
 /**
@@ -651,12 +651,12 @@  discard block
 block discarded – undo
651 651
  * @return bool true s'il a le droit, false sinon
652 652
  **/
653 653
 function autoriser_rubrique_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
654
-	if (!empty($opt['id_parent'])) {
655
-		return autoriser('creerrubriquedans', 'rubrique', $opt['id_parent'], $qui);
656
-	}
657
-	else {
658
-		return autoriser('defaut', null, 0, $qui, $opt);
659
-	}
654
+    if (!empty($opt['id_parent'])) {
655
+        return autoriser('creerrubriquedans', 'rubrique', $opt['id_parent'], $qui);
656
+    }
657
+    else {
658
+        return autoriser('defaut', null, 0, $qui, $opt);
659
+    }
660 660
 }
661 661
 
662 662
 /**
@@ -674,10 +674,10 @@  discard block
 block discarded – undo
674 674
  * @return bool true s'il a le droit, false sinon
675 675
  **/
676 676
 function autoriser_rubrique_creerrubriquedans_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
677
-	return
678
-		($id or ($qui['statut'] === '0minirezo' and !$qui['restreint']))
679
-		and autoriser('voir', 'rubrique', $id)
680
-		and autoriser('publierdans', 'rubrique', $id);
677
+    return
678
+        ($id or ($qui['statut'] === '0minirezo' and !$qui['restreint']))
679
+        and autoriser('voir', 'rubrique', $id)
680
+        and autoriser('publierdans', 'rubrique', $id);
681 681
 }
682 682
 
683 683
 /**
@@ -695,10 +695,10 @@  discard block
 block discarded – undo
695 695
  * @return bool true s'il a le droit, false sinon
696 696
  **/
697 697
 function autoriser_rubrique_creerarticledans_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
698
-	return
699
-		$id
700
-		and autoriser('voir', 'rubrique', $id)
701
-		and autoriser('creer', 'article');
698
+    return
699
+        $id
700
+        and autoriser('voir', 'rubrique', $id)
701
+        and autoriser('creer', 'article');
702 702
 }
703 703
 
704 704
 
@@ -717,8 +717,8 @@  discard block
 block discarded – undo
717 717
  * @return bool true s'il a le droit, false sinon
718 718
  **/
719 719
 function autoriser_rubrique_modifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
720
-	return
721
-		autoriser('publierdans', 'rubrique', $id, $qui, $opt);
720
+    return
721
+        autoriser('publierdans', 'rubrique', $id, $qui, $opt);
722 722
 }
723 723
 
724 724
 /**
@@ -736,29 +736,29 @@  discard block
 block discarded – undo
736 736
  * @return bool true s'il a le droit, false sinon
737 737
  **/
738 738
 function autoriser_rubrique_supprimer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
739
-	if (!$id = intval($id)) {
740
-		return false;
741
-	}
739
+    if (!$id = intval($id)) {
740
+        return false;
741
+    }
742 742
 
743
-	if (sql_countsel('spip_rubriques', 'id_parent=' . intval($id))) {
744
-		return false;
745
-	}
743
+    if (sql_countsel('spip_rubriques', 'id_parent=' . intval($id))) {
744
+        return false;
745
+    }
746 746
 
747
-	if (sql_countsel('spip_articles', 'id_rubrique=' . intval($id) . " AND (statut<>'poubelle')")) {
748
-		return false;
749
-	}
747
+    if (sql_countsel('spip_articles', 'id_rubrique=' . intval($id) . " AND (statut<>'poubelle')")) {
748
+        return false;
749
+    }
750 750
 
751
-	$compte = pipeline(
752
-		'objet_compte_enfants',
753
-		['args' => ['objet' => 'rubrique', 'id_objet' => $id], 'data' => []]
754
-	);
755
-	foreach ($compte as $objet => $n) {
756
-		if ($n) {
757
-			return false;
758
-		}
759
-	}
751
+    $compte = pipeline(
752
+        'objet_compte_enfants',
753
+        ['args' => ['objet' => 'rubrique', 'id_objet' => $id], 'data' => []]
754
+    );
755
+    foreach ($compte as $objet => $n) {
756
+        if ($n) {
757
+            return false;
758
+        }
759
+    }
760 760
 
761
-	return autoriser('modifier', 'rubrique', $id);
761
+    return autoriser('modifier', 'rubrique', $id);
762 762
 }
763 763
 
764 764
 
@@ -778,23 +778,23 @@  discard block
 block discarded – undo
778 778
  * @return bool true s'il a le droit, false sinon
779 779
  **/
780 780
 function autoriser_article_modifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
781
-	if (!$id) {
782
-		return false;
783
-	}
784
-	$r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id));
785
-
786
-	return
787
-		$r
788
-		and
789
-		(
790
-			autoriser('publierdans', 'rubrique', $r['id_rubrique'], $qui, $opt)
791
-			or (
792
-				(!isset($opt['statut']) or !in_array($opt['statut'], ['publie', 'refuse'], true))
793
-				and in_array($qui['statut'], ['0minirezo', '1comite'])
794
-				and in_array($r['statut'], ['prop', 'prepa', 'poubelle'])
795
-				and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])
796
-			)
797
-		);
781
+    if (!$id) {
782
+        return false;
783
+    }
784
+    $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id));
785
+
786
+    return
787
+        $r
788
+        and
789
+        (
790
+            autoriser('publierdans', 'rubrique', $r['id_rubrique'], $qui, $opt)
791
+            or (
792
+                (!isset($opt['statut']) or !in_array($opt['statut'], ['publie', 'refuse'], true))
793
+                and in_array($qui['statut'], ['0minirezo', '1comite'])
794
+                and in_array($r['statut'], ['prop', 'prepa', 'poubelle'])
795
+                and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])
796
+            )
797
+        );
798 798
 }
799 799
 
800 800
 /**
@@ -812,13 +812,13 @@  discard block
 block discarded – undo
812 812
  * @return bool true s'il a le droit, false sinon
813 813
  **/
814 814
 function autoriser_article_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
815
-	if (!empty($opt['id_parent'])) {
816
-		// creerarticledans rappelle autoriser(creer,article) sans id, donc on verifiera condition du else aussi
817
-		return autoriser('creerarticledans', 'rubrique', $opt['id_parent'], $qui);
818
-	}
819
-	else {
820
-		return (sql_countsel('spip_rubriques') > 0 and in_array($qui['statut'], ['0minirezo', '1comite']));
821
-	}
815
+    if (!empty($opt['id_parent'])) {
816
+        // creerarticledans rappelle autoriser(creer,article) sans id, donc on verifiera condition du else aussi
817
+        return autoriser('creerarticledans', 'rubrique', $opt['id_parent'], $qui);
818
+    }
819
+    else {
820
+        return (sql_countsel('spip_rubriques') > 0 and in_array($qui['statut'], ['0minirezo', '1comite']));
821
+    }
822 822
 }
823 823
 
824 824
 /**
@@ -840,28 +840,28 @@  discard block
 block discarded – undo
840 840
  * @return bool true s'il a le droit, false sinon
841 841
  */
842 842
 function autoriser_article_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
843
-	if ($qui['statut'] === '0minirezo') {
844
-		return true;
845
-	}
846
-	// cas des articles : depend du statut de l'article et de l'auteur
847
-	if (isset($opt['statut'])) {
848
-		$statut = $opt['statut'];
849
-	} else {
850
-		if (!$id) {
851
-			return false;
852
-		}
853
-		$statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id));
854
-	}
855
-
856
-	return
857
-		// si on est pas auteur de l'article,
858
-		// seuls les propose et publies sont visibles
859
-		in_array($statut, ['prop', 'publie'])
860
-		// sinon si on est auteur, on a le droit de le voir, evidemment !
861
-		or
862
-		($id
863
-			and $qui['id_auteur']
864
-			and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']));
843
+    if ($qui['statut'] === '0minirezo') {
844
+        return true;
845
+    }
846
+    // cas des articles : depend du statut de l'article et de l'auteur
847
+    if (isset($opt['statut'])) {
848
+        $statut = $opt['statut'];
849
+    } else {
850
+        if (!$id) {
851
+            return false;
852
+        }
853
+        $statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id));
854
+    }
855
+
856
+    return
857
+        // si on est pas auteur de l'article,
858
+        // seuls les propose et publies sont visibles
859
+        in_array($statut, ['prop', 'publie'])
860
+        // sinon si on est auteur, on a le droit de le voir, evidemment !
861
+        or
862
+        ($id
863
+            and $qui['id_auteur']
864
+            and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']));
865 865
 }
866 866
 
867 867
 
@@ -880,24 +880,24 @@  discard block
 block discarded – undo
880 880
  * @return bool true s'il a le droit, false sinon
881 881
  **/
882 882
 function autoriser_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
883
-	# securite, mais on aurait pas du arriver ici !
884
-	if (
885
-		function_exists($f = 'autoriser_' . $type . '_voir')
886
-		or function_exists($f = 'autoriser_' . $type . '_voir_dist')
887
-	) {
888
-		return $f($faire, $type, $id, $qui, $opt);
889
-	}
883
+    # securite, mais on aurait pas du arriver ici !
884
+    if (
885
+        function_exists($f = 'autoriser_' . $type . '_voir')
886
+        or function_exists($f = 'autoriser_' . $type . '_voir_dist')
887
+    ) {
888
+        return $f($faire, $type, $id, $qui, $opt);
889
+    }
890 890
 
891
-	if ($qui['statut'] === '0minirezo') {
892
-		return true;
893
-	}
894
-	// admins et redacteurs peuvent voir un auteur
895
-	if ($type === 'auteur') {
896
-		return in_array($qui['statut'], ['0minirezo', '1comite']);
897
-	}
898
-	// sinon par defaut tout est visible
899
-	// sauf cas particuliers traites separemment (ie article)
900
-	return true;
891
+    if ($qui['statut'] === '0minirezo') {
892
+        return true;
893
+    }
894
+    // admins et redacteurs peuvent voir un auteur
895
+    if ($type === 'auteur') {
896
+        return in_array($qui['statut'], ['0minirezo', '1comite']);
897
+    }
898
+    // sinon par defaut tout est visible
899
+    // sauf cas particuliers traites separemment (ie article)
900
+    return true;
901 901
 }
902 902
 
903 903
 
@@ -920,12 +920,12 @@  discard block
 block discarded – undo
920 920
  * @return bool true s'il a le droit, false sinon
921 921
  **/
922 922
 function autoriser_webmestre_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
923
-	return
924
-		(defined('_ID_WEBMESTRES') ?
925
-			in_array($qui['id_auteur'], explode(':', _ID_WEBMESTRES))
926
-			: $qui['webmestre'] === 'oui')
927
-		and $qui['statut'] === '0minirezo'
928
-		and !$qui['restreint'];
923
+    return
924
+        (defined('_ID_WEBMESTRES') ?
925
+            in_array($qui['id_auteur'], explode(':', _ID_WEBMESTRES))
926
+            : $qui['webmestre'] === 'oui')
927
+        and $qui['statut'] === '0minirezo'
928
+        and !$qui['restreint'];
929 929
 }
930 930
 
931 931
 /**
@@ -943,9 +943,9 @@  discard block
 block discarded – undo
943 943
  * @return bool true s'il a le droit, false sinon
944 944
  **/
945 945
 function autoriser_configurer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
946
-	return
947
-		$qui['statut'] === '0minirezo'
948
-		and !$qui['restreint'];
946
+    return
947
+        $qui['statut'] === '0minirezo'
948
+        and !$qui['restreint'];
949 949
 }
950 950
 
951 951
 /**
@@ -963,8 +963,8 @@  discard block
 block discarded – undo
963 963
  * @return bool true s'il a le droit, false sinon
964 964
  **/
965 965
 function autoriser_sauvegarder_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
966
-	return
967
-		$qui['statut'] === '0minirezo';
966
+    return
967
+        $qui['statut'] === '0minirezo';
968 968
 }
969 969
 
970 970
 /**
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
  * @return bool true s'il a le droit, false sinon
983 983
  **/
984 984
 function autoriser_detruire_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
985
-	return autoriser('webmestre', null, 0, $qui, $opt);
985
+    return autoriser('webmestre', null, 0, $qui, $opt);
986 986
 }
987 987
 
988 988
 /**
@@ -1001,23 +1001,23 @@  discard block
 block discarded – undo
1001 1001
  * @return bool true s'il a le droit, false sinon
1002 1002
  **/
1003 1003
 function autoriser_auteur_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1004
-	// les admins peuvent "previsualiser" une page auteur
1005
-	if (
1006
-		$qui['statut'] === '0minirezo'
1007
-		and !$qui['restreint']
1008
-	) {
1009
-		return true;
1010
-	} elseif ($id === 0) {
1011
-		return false;
1012
-	}
1013
-	// "Voir en ligne" si l'auteur a un article publie
1014
-	$n = sql_fetsel(
1015
-		'A.id_article',
1016
-		'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)',
1017
-		"A.statut='publie' AND L.id_auteur=" . sql_quote($id)
1018
-	);
1004
+    // les admins peuvent "previsualiser" une page auteur
1005
+    if (
1006
+        $qui['statut'] === '0minirezo'
1007
+        and !$qui['restreint']
1008
+    ) {
1009
+        return true;
1010
+    } elseif ($id === 0) {
1011
+        return false;
1012
+    }
1013
+    // "Voir en ligne" si l'auteur a un article publie
1014
+    $n = sql_fetsel(
1015
+        'A.id_article',
1016
+        'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)',
1017
+        "A.statut='publie' AND L.id_auteur=" . sql_quote($id)
1018
+    );
1019 1019
 
1020
-	return $n ? true : false;
1020
+    return $n ? true : false;
1021 1021
 }
1022 1022
 
1023 1023
 
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
  * @return bool true s'il a le droit, false sinon
1047 1047
  **/
1048 1048
 function autoriser_auteur_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1049
-	return ($qui['statut'] === '0minirezo');
1049
+    return ($qui['statut'] === '0minirezo');
1050 1050
 }
1051 1051
 
1052 1052
 
@@ -1067,75 +1067,75 @@  discard block
 block discarded – undo
1067 1067
  * @return bool true s'il a le droit, false sinon
1068 1068
  **/
1069 1069
 function autoriser_auteur_modifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1070
-	$id = intval($id);
1071
-
1072
-	// Si pas admin : seulement le droit de modifier ses donnees perso, mais pas statut ni login
1073
-	// la modif de l'email doit etre verifiee ou notifiee si possible, mais c'est a l'interface de gerer ca
1074
-	if (!in_array($qui['statut'], ['0minirezo'])) {
1075
-		if (
1076
-			$id == $qui['id_auteur']
1077
-			&& empty($opt['statut'])
1078
-			&& empty($opt['webmestre'])
1079
-			&& empty($opt['restreintes'])
1080
-			&& empty($opt['login'])
1081
-		) {
1082
-			return true;
1083
-		}
1084
-		return false;
1085
-	}
1086
-
1087
-	// Un admin restreint peut modifier/creer un auteur non-admin mais il
1088
-	// n'a le droit ni de le promouvoir admin, ni de changer les rubriques
1089
-	if ($qui['restreint']) {
1090
-		if (isset($opt['webmestre']) and $opt['webmestre']) {
1091
-			return false;
1092
-		} elseif (
1093
-			(isset($opt['statut']) and ($opt['statut'] === '0minirezo'))
1094
-			or (isset($opt['restreintes']) and $opt['restreintes'])
1095
-		) {
1096
-			return false;
1097
-		} else {
1098
-			if ($id == $qui['id_auteur']) {
1099
-				if (isset($opt['statut']) and $opt['statut']) {
1100
-					return false;
1101
-				} else {
1102
-					return true;
1103
-				}
1104
-			} else {
1105
-				if ($id_auteur = intval($id)) {
1106
-					$t = sql_fetsel('statut', 'spip_auteurs', "id_auteur=$id_auteur");
1107
-					if ($t and $t['statut'] != '0minirezo') {
1108
-						return true;
1109
-					} else {
1110
-						return false;
1111
-					}
1112
-				} // id = 0 => creation
1113
-				else {
1114
-					return true;
1115
-				}
1116
-			}
1117
-		}
1118
-	}
1119
-
1120
-	// Un admin complet fait ce qu'il veut
1121
-	// sauf se degrader
1122
-	if ($id == $qui['id_auteur'] && (isset($opt['statut']) and $opt['statut'])) {
1123
-		return false;
1124
-	} elseif (
1125
-		isset($opt['webmestre'])
1126
-				and $opt['webmestre']
1127
-				and (defined('_ID_WEBMESTRES')
1128
-				or !autoriser('webmestre'))
1129
-	) {
1130
-		// et toucher au statut webmestre si il ne l'est pas lui meme
1131
-		// ou si les webmestres sont fixes par constante (securite)
1132
-		return false;
1133
-	} // et modifier un webmestre si il ne l'est pas lui meme
1134
-	elseif (intval($id) and !autoriser('webmestre') and autoriser('webmestre', '', 0, $id)) {
1135
-		return false;
1136
-	} else {
1137
-		return true;
1138
-	}
1070
+    $id = intval($id);
1071
+
1072
+    // Si pas admin : seulement le droit de modifier ses donnees perso, mais pas statut ni login
1073
+    // la modif de l'email doit etre verifiee ou notifiee si possible, mais c'est a l'interface de gerer ca
1074
+    if (!in_array($qui['statut'], ['0minirezo'])) {
1075
+        if (
1076
+            $id == $qui['id_auteur']
1077
+            && empty($opt['statut'])
1078
+            && empty($opt['webmestre'])
1079
+            && empty($opt['restreintes'])
1080
+            && empty($opt['login'])
1081
+        ) {
1082
+            return true;
1083
+        }
1084
+        return false;
1085
+    }
1086
+
1087
+    // Un admin restreint peut modifier/creer un auteur non-admin mais il
1088
+    // n'a le droit ni de le promouvoir admin, ni de changer les rubriques
1089
+    if ($qui['restreint']) {
1090
+        if (isset($opt['webmestre']) and $opt['webmestre']) {
1091
+            return false;
1092
+        } elseif (
1093
+            (isset($opt['statut']) and ($opt['statut'] === '0minirezo'))
1094
+            or (isset($opt['restreintes']) and $opt['restreintes'])
1095
+        ) {
1096
+            return false;
1097
+        } else {
1098
+            if ($id == $qui['id_auteur']) {
1099
+                if (isset($opt['statut']) and $opt['statut']) {
1100
+                    return false;
1101
+                } else {
1102
+                    return true;
1103
+                }
1104
+            } else {
1105
+                if ($id_auteur = intval($id)) {
1106
+                    $t = sql_fetsel('statut', 'spip_auteurs', "id_auteur=$id_auteur");
1107
+                    if ($t and $t['statut'] != '0minirezo') {
1108
+                        return true;
1109
+                    } else {
1110
+                        return false;
1111
+                    }
1112
+                } // id = 0 => creation
1113
+                else {
1114
+                    return true;
1115
+                }
1116
+            }
1117
+        }
1118
+    }
1119
+
1120
+    // Un admin complet fait ce qu'il veut
1121
+    // sauf se degrader
1122
+    if ($id == $qui['id_auteur'] && (isset($opt['statut']) and $opt['statut'])) {
1123
+        return false;
1124
+    } elseif (
1125
+        isset($opt['webmestre'])
1126
+                and $opt['webmestre']
1127
+                and (defined('_ID_WEBMESTRES')
1128
+                or !autoriser('webmestre'))
1129
+    ) {
1130
+        // et toucher au statut webmestre si il ne l'est pas lui meme
1131
+        // ou si les webmestres sont fixes par constante (securite)
1132
+        return false;
1133
+    } // et modifier un webmestre si il ne l'est pas lui meme
1134
+    elseif (intval($id) and !autoriser('webmestre') and autoriser('webmestre', '', 0, $id)) {
1135
+        return false;
1136
+    } else {
1137
+        return true;
1138
+    }
1139 1139
 }
1140 1140
 
1141 1141
 
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
  * @return bool true s'il a le droit, false sinon
1155 1155
  **/
1156 1156
 function autoriser_associerauteurs_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1157
-	return autoriser('modifier', $type, $id, $qui, $opt);
1157
+    return autoriser('modifier', $type, $id, $qui, $opt);
1158 1158
 }
1159 1159
 
1160 1160
 
@@ -1173,7 +1173,7 @@  discard block
 block discarded – undo
1173 1173
  * @return bool true s'il a le droit, false sinon
1174 1174
  **/
1175 1175
 function autoriser_chargerftp_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1176
-	return $qui['statut'] === '0minirezo';
1176
+    return $qui['statut'] === '0minirezo';
1177 1177
 }
1178 1178
 
1179 1179
 /**
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
  * @return bool true s'il a le droit, false sinon
1192 1192
  **/
1193 1193
 function autoriser_debug_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1194
-	return $qui['statut'] === '0minirezo';
1194
+    return $qui['statut'] === '0minirezo';
1195 1195
 }
1196 1196
 
1197 1197
 /**
@@ -1208,54 +1208,54 @@  discard block
 block discarded – undo
1208 1208
  * @return array          Liste des rubriques
1209 1209
  **/
1210 1210
 function liste_rubriques_auteur($id_auteur, $raz = false) {
1211
-	static $restreint = [];
1212
-
1213
-	if (!$id_auteur = intval($id_auteur)) {
1214
-		return [];
1215
-	}
1216
-	if ($raz) {
1217
-		unset($restreint[$id_auteur]);
1218
-	} elseif (isset($restreint[$id_auteur])) {
1219
-		return $restreint[$id_auteur];
1220
-	}
1221
-
1222
-	$rubriques = [];
1223
-	if (
1224
-		(!isset($GLOBALS['meta']['version_installee'])
1225
-		or $GLOBALS['meta']['version_installee'] > 16428)
1226
-		and $r = sql_allfetsel(
1227
-			'id_objet',
1228
-			'spip_auteurs_liens',
1229
-			'id_auteur=' . intval($id_auteur) . " AND objet='rubrique' AND id_objet!=0"
1230
-		)
1231
-		and is_countable($r) ? count($r) : 0
1232
-	) {
1233
-		$r = array_column($r, 'id_objet');
1234
-
1235
-		// recuperer toute la branche, au format chaine enumeration
1236
-		include_spip('inc/rubriques');
1237
-		$r = calcul_branche_in($r);
1238
-		$r = explode(',', $r);
1239
-
1240
-		// passer les rubriques en index, elimine les doublons
1241
-		$r = array_flip($r);
1242
-		// recuperer les index seuls
1243
-		$r = array_keys($r);
1244
-		// combiner pour avoir un tableau id_rubrique=>id_rubrique
1245
-		// est-ce vraiment utile ? (on preserve la forme donnee par le code precedent)
1246
-		$rubriques = array_combine($r, $r);
1247
-	}
1248
-
1249
-	// Affecter l'auteur session le cas echeant
1250
-	if (
1251
-		isset($GLOBALS['visiteur_session']['id_auteur'])
1252
-		and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
1253
-	) {
1254
-		$GLOBALS['visiteur_session']['restreint'] = $rubriques;
1255
-	}
1256
-
1257
-
1258
-	return $restreint[$id_auteur] = $rubriques;
1211
+    static $restreint = [];
1212
+
1213
+    if (!$id_auteur = intval($id_auteur)) {
1214
+        return [];
1215
+    }
1216
+    if ($raz) {
1217
+        unset($restreint[$id_auteur]);
1218
+    } elseif (isset($restreint[$id_auteur])) {
1219
+        return $restreint[$id_auteur];
1220
+    }
1221
+
1222
+    $rubriques = [];
1223
+    if (
1224
+        (!isset($GLOBALS['meta']['version_installee'])
1225
+        or $GLOBALS['meta']['version_installee'] > 16428)
1226
+        and $r = sql_allfetsel(
1227
+            'id_objet',
1228
+            'spip_auteurs_liens',
1229
+            'id_auteur=' . intval($id_auteur) . " AND objet='rubrique' AND id_objet!=0"
1230
+        )
1231
+        and is_countable($r) ? count($r) : 0
1232
+    ) {
1233
+        $r = array_column($r, 'id_objet');
1234
+
1235
+        // recuperer toute la branche, au format chaine enumeration
1236
+        include_spip('inc/rubriques');
1237
+        $r = calcul_branche_in($r);
1238
+        $r = explode(',', $r);
1239
+
1240
+        // passer les rubriques en index, elimine les doublons
1241
+        $r = array_flip($r);
1242
+        // recuperer les index seuls
1243
+        $r = array_keys($r);
1244
+        // combiner pour avoir un tableau id_rubrique=>id_rubrique
1245
+        // est-ce vraiment utile ? (on preserve la forme donnee par le code precedent)
1246
+        $rubriques = array_combine($r, $r);
1247
+    }
1248
+
1249
+    // Affecter l'auteur session le cas echeant
1250
+    if (
1251
+        isset($GLOBALS['visiteur_session']['id_auteur'])
1252
+        and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
1253
+    ) {
1254
+        $GLOBALS['visiteur_session']['restreint'] = $rubriques;
1255
+    }
1256
+
1257
+
1258
+    return $restreint[$id_auteur] = $rubriques;
1259 1259
 }
1260 1260
 
1261 1261
 /**
@@ -1273,7 +1273,7 @@  discard block
 block discarded – undo
1273 1273
  * @return bool true s'il a le droit, false sinon
1274 1274
  **/
1275 1275
 function autoriser_rubrique_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1276
-	return autoriser('previsualiser');
1276
+    return autoriser('previsualiser');
1277 1277
 }
1278 1278
 
1279 1279
 /**
@@ -1291,7 +1291,7 @@  discard block
 block discarded – undo
1291 1291
  * @return bool true s'il a le droit, false sinon
1292 1292
  **/
1293 1293
 function autoriser_rubrique_iconifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1294
-	return autoriser('publierdans', 'rubrique', $id, $qui, $opt);
1294
+    return autoriser('publierdans', 'rubrique', $id, $qui, $opt);
1295 1295
 }
1296 1296
 
1297 1297
 /**
@@ -1309,9 +1309,9 @@  discard block
 block discarded – undo
1309 1309
  * @return bool true s'il a le droit, false sinon
1310 1310
  **/
1311 1311
 function autoriser_auteur_iconifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1312
-	$id = intval($id);
1313
-	return (($id == $qui['id_auteur']) or
1314
-		(($qui['statut'] === '0minirezo') and !$qui['restreint']));
1312
+    $id = intval($id);
1313
+    return (($id == $qui['id_auteur']) or
1314
+        (($qui['statut'] === '0minirezo') and !$qui['restreint']));
1315 1315
 }
1316 1316
 
1317 1317
 /**
@@ -1329,8 +1329,8 @@  discard block
 block discarded – undo
1329 1329
  * @return bool true s'il a le droit, false sinon
1330 1330
  **/
1331 1331
 function autoriser_iconifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1332
-	// par defaut, on a le droit d'iconifier si on a le droit de modifier
1333
-	return autoriser('modifier', $type, $id, $qui, $opt);
1332
+    // par defaut, on a le droit d'iconifier si on a le droit de modifier
1333
+    return autoriser('modifier', $type, $id, $qui, $opt);
1334 1334
 }
1335 1335
 
1336 1336
 
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
  * @return true
1351 1351
  **/
1352 1352
 function autoriser_ok_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1353
-	return true;
1353
+    return true;
1354 1354
 }
1355 1355
 
1356 1356
 /**
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
  * @return false
1370 1370
  **/
1371 1371
 function autoriser_niet_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1372
-	return false;
1372
+    return false;
1373 1373
 }
1374 1374
 
1375 1375
 /**
@@ -1387,11 +1387,11 @@  discard block
 block discarded – undo
1387 1387
  * @return bool true s'il a le droit, false sinon
1388 1388
  **/
1389 1389
 function autoriser_base_reparer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1390
-	if (!autoriser('detruire') or _request('reinstall')) {
1391
-		return false;
1392
-	}
1390
+    if (!autoriser('detruire') or _request('reinstall')) {
1391
+        return false;
1392
+    }
1393 1393
 
1394
-	return true;
1394
+    return true;
1395 1395
 }
1396 1396
 
1397 1397
 /**
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
  * @return true
1410 1410
  **/
1411 1411
 function autoriser_infosperso_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1412
-	return true;
1412
+    return true;
1413 1413
 }
1414 1414
 
1415 1415
 /**
@@ -1427,7 +1427,7 @@  discard block
 block discarded – undo
1427 1427
  * @return true
1428 1428
  **/
1429 1429
 function autoriser_langage_configurer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1430
-	return true;
1430
+    return true;
1431 1431
 }
1432 1432
 
1433 1433
 /**
@@ -1445,7 +1445,7 @@  discard block
 block discarded – undo
1445 1445
  * @return bool true s'il a le droit, false sinon
1446 1446
  **/
1447 1447
 function autoriser_configurerlangage_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1448
-	return autoriser('configurer', '_langage', $id, $qui, $opt);
1448
+    return autoriser('configurer', '_langage', $id, $qui, $opt);
1449 1449
 }
1450 1450
 
1451 1451
 /**
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
  * @return true
1464 1464
  **/
1465 1465
 function autoriser_preferences_configurer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1466
-	return true;
1466
+    return true;
1467 1467
 }
1468 1468
 
1469 1469
 /**
@@ -1481,7 +1481,7 @@  discard block
 block discarded – undo
1481 1481
  * @return bool true s'il a le droit, false sinon
1482 1482
  **/
1483 1483
 function autoriser_configurerpreferences_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1484
-	return autoriser('configurer', '_preferences', $id, $qui, $opt);
1484
+    return autoriser('configurer', '_preferences', $id, $qui, $opt);
1485 1485
 }
1486 1486
 
1487 1487
 /**
@@ -1499,8 +1499,8 @@  discard block
 block discarded – undo
1499 1499
  * @return bool true s'il a le droit, false sinon
1500 1500
  **/
1501 1501
 function autoriser_menudeveloppement_menugrandeentree_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1502
-	return (isset($GLOBALS['visiteur_session']['prefs']['activer_menudev'])
1503
-		and $GLOBALS['visiteur_session']['prefs']['activer_menudev'] === 'oui');
1502
+    return (isset($GLOBALS['visiteur_session']['prefs']['activer_menudev'])
1503
+        and $GLOBALS['visiteur_session']['prefs']['activer_menudev'] === 'oui');
1504 1504
 }
1505 1505
 
1506 1506
 /**
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
  * @return true
1520 1520
  **/
1521 1521
 function autoriser_menugrandeentree_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1522
-	return true;
1522
+    return true;
1523 1523
 }
1524 1524
 
1525 1525
 /**
@@ -1537,7 +1537,7 @@  discard block
 block discarded – undo
1537 1537
  * @return true
1538 1538
  **/
1539 1539
 function autoriser_auteurs_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1540
-	return true;
1540
+    return true;
1541 1541
 }
1542 1542
 
1543 1543
 /**
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
  * @return bool true s'il a le droit, false sinon
1556 1556
  **/
1557 1557
 function autoriser_auteurs_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1558
-	return autoriser('voir', '_auteurs', $id, $qui, $opt);
1558
+    return autoriser('voir', '_auteurs', $id, $qui, $opt);
1559 1559
 }
1560 1560
 
1561 1561
 /**
@@ -1573,7 +1573,7 @@  discard block
 block discarded – undo
1573 1573
  * @return true
1574 1574
  **/
1575 1575
 function autoriser_articles_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1576
-	return true;
1576
+    return true;
1577 1577
 }
1578 1578
 
1579 1579
 /**
@@ -1591,7 +1591,7 @@  discard block
 block discarded – undo
1591 1591
  * @return bool true s'il a le droit, false sinon
1592 1592
  **/
1593 1593
 function autoriser_articles_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1594
-	return autoriser('voir', '_articles', $id, $qui, $opt);
1594
+    return autoriser('voir', '_articles', $id, $qui, $opt);
1595 1595
 }
1596 1596
 
1597 1597
 /**
@@ -1609,7 +1609,7 @@  discard block
 block discarded – undo
1609 1609
  * @return true
1610 1610
  **/
1611 1611
 function autoriser_rubriques_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1612
-	return true;
1612
+    return true;
1613 1613
 }
1614 1614
 
1615 1615
 /**
@@ -1627,7 +1627,7 @@  discard block
 block discarded – undo
1627 1627
  * @return bool true s'il a le droit, false sinon
1628 1628
  **/
1629 1629
 function autoriser_rubriques_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1630
-	return autoriser('voir', '_rubriques', $id, $qui, $opt);
1630
+    return autoriser('voir', '_rubriques', $id, $qui, $opt);
1631 1631
 }
1632 1632
 
1633 1633
 /**
@@ -1645,7 +1645,7 @@  discard block
 block discarded – undo
1645 1645
  * @return bool true s'il a le droit, false sinon
1646 1646
  **/
1647 1647
 function autoriser_articlecreer_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1648
-	return verifier_table_non_vide();
1648
+    return verifier_table_non_vide();
1649 1649
 }
1650 1650
 
1651 1651
 
@@ -1666,7 +1666,7 @@  discard block
 block discarded – undo
1666 1666
  * @return bool true s'il a le droit, false sinon
1667 1667
  **/
1668 1668
 function autoriser_auteurcreer_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1669
-	return autoriser('creer', 'auteur', $id, $qui, $opt);
1669
+    return autoriser('creer', 'auteur', $id, $qui, $opt);
1670 1670
 }
1671 1671
 
1672 1672
 /**
@@ -1684,13 +1684,13 @@  discard block
 block discarded – undo
1684 1684
  * @return bool true s'il a le droit, false sinon
1685 1685
  **/
1686 1686
 function autoriser_visiteurs_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1687
-	include_spip('base/abstract_sql');
1688
-	return
1689
-		$qui['statut'] === '0minirezo' and !$qui['restreint']
1690
-		and (
1691
-			$GLOBALS['meta']['accepter_visiteurs'] != 'non'
1692
-			or sql_countsel('spip_auteurs', 'statut in ("6forum", "nouveau")') > 0
1693
-		);
1687
+    include_spip('base/abstract_sql');
1688
+    return
1689
+        $qui['statut'] === '0minirezo' and !$qui['restreint']
1690
+        and (
1691
+            $GLOBALS['meta']['accepter_visiteurs'] != 'non'
1692
+            or sql_countsel('spip_auteurs', 'statut in ("6forum", "nouveau")') > 0
1693
+        );
1694 1694
 }
1695 1695
 
1696 1696
 /**
@@ -1708,7 +1708,7 @@  discard block
 block discarded – undo
1708 1708
  * @return bool true s'il a le droit, false sinon
1709 1709
  **/
1710 1710
 function autoriser_suiviedito_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1711
-	return $qui['statut'] === '0minirezo';
1711
+    return $qui['statut'] === '0minirezo';
1712 1712
 }
1713 1713
 
1714 1714
 /**
@@ -1726,7 +1726,7 @@  discard block
 block discarded – undo
1726 1726
  * @return bool true s'il a le droit, false sinon
1727 1727
  **/
1728 1728
 function autoriser_synchro_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1729
-	return $qui['statut'] === '0minirezo';
1729
+    return $qui['statut'] === '0minirezo';
1730 1730
 }
1731 1731
 
1732 1732
 /**
@@ -1744,7 +1744,7 @@  discard block
 block discarded – undo
1744 1744
  * @return bool true s'il a le droit, false sinon
1745 1745
  **/
1746 1746
 function autoriser_configurerinteractions_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1747
-	return autoriser('configurer', '_interactions', $id, $qui, $opt);
1747
+    return autoriser('configurer', '_interactions', $id, $qui, $opt);
1748 1748
 }
1749 1749
 
1750 1750
 /**
@@ -1762,7 +1762,7 @@  discard block
 block discarded – undo
1762 1762
  * @return bool true s'il a le droit, false sinon
1763 1763
  **/
1764 1764
 function autoriser_configurerlangue_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1765
-	return autoriser('configurer', '_langue', $id, $qui, $opt);
1765
+    return autoriser('configurer', '_langue', $id, $qui, $opt);
1766 1766
 }
1767 1767
 
1768 1768
 /**
@@ -1780,7 +1780,7 @@  discard block
 block discarded – undo
1780 1780
  * @return bool true s'il a le droit, false sinon
1781 1781
  **/
1782 1782
 function autoriser_configurermultilinguisme_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1783
-	return autoriser('configurer', '_multilinguisme', $id, $qui, $opt);
1783
+    return autoriser('configurer', '_multilinguisme', $id, $qui, $opt);
1784 1784
 }
1785 1785
 
1786 1786
 /**
@@ -1798,7 +1798,7 @@  discard block
 block discarded – undo
1798 1798
  * @return bool true s'il a le droit, false sinon
1799 1799
  **/
1800 1800
 function autoriser_configurercontenu_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1801
-	return autoriser('configurer', '_contenu', $id, $qui, $opt);
1801
+    return autoriser('configurer', '_contenu', $id, $qui, $opt);
1802 1802
 }
1803 1803
 
1804 1804
 /**
@@ -1816,7 +1816,7 @@  discard block
 block discarded – undo
1816 1816
  * @return bool true s'il a le droit, false sinon
1817 1817
  **/
1818 1818
 function autoriser_configureravancees_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1819
-	return autoriser('configurer', '_avancees', $id, $qui, $opt);
1819
+    return autoriser('configurer', '_avancees', $id, $qui, $opt);
1820 1820
 }
1821 1821
 
1822 1822
 /**
@@ -1834,7 +1834,7 @@  discard block
 block discarded – undo
1834 1834
  * @return bool true s'il a le droit, false sinon
1835 1835
  **/
1836 1836
 function autoriser_adminplugin_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1837
-	return autoriser('configurer', '_plugins', $id, $qui, $opt);
1837
+    return autoriser('configurer', '_plugins', $id, $qui, $opt);
1838 1838
 }
1839 1839
 
1840 1840
 /**
@@ -1852,7 +1852,7 @@  discard block
 block discarded – undo
1852 1852
  * @return bool true s'il a le droit, false sinon
1853 1853
  **/
1854 1854
 function autoriser_admintech_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1855
-	return autoriser('detruire', $type, $id, $qui, $opt);
1855
+    return autoriser('detruire', $type, $id, $qui, $opt);
1856 1856
 }
1857 1857
 
1858 1858
 /**
@@ -1870,7 +1870,7 @@  discard block
 block discarded – undo
1870 1870
  * @return bool true s'il a le droit, false sinon
1871 1871
  **/
1872 1872
 function autoriser_queue_purger_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1873
-	return autoriser('webmestre');
1873
+    return autoriser('webmestre');
1874 1874
 }
1875 1875
 
1876 1876
 
@@ -1890,11 +1890,11 @@  discard block
 block discarded – undo
1890 1890
  * @return bool true s'il a le droit, false sinon
1891 1891
  **/
1892 1892
 function autoriser_echafauder_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
1893
-	if (test_espace_prive()) {
1894
-		return intval($qui['id_auteur']) ? true : false;
1895
-	} else {
1896
-		return autoriser('webmestre', '', $id, $qui, $opt);
1897
-	}
1893
+    if (test_espace_prive()) {
1894
+        return intval($qui['id_auteur']) ? true : false;
1895
+    } else {
1896
+        return autoriser('webmestre', '', $id, $qui, $opt);
1897
+    }
1898 1898
 }
1899 1899
 
1900 1900
 
@@ -1909,27 +1909,27 @@  discard block
 block discarded – undo
1909 1909
  *     Identifiants d'auteurs
1910 1910
  */
1911 1911
 function auteurs_objet($objet, $id_objet, $cond = '') {
1912
-	$objet = objet_type($objet);
1913
-	$where = [
1914
-		'objet=' . sql_quote($objet),
1915
-		'id_objet=' . intval($id_objet)
1916
-	];
1917
-	if (!empty($cond)) {
1918
-		if (is_array($cond)) {
1919
-			$where = array_merge($where, $cond);
1920
-		} else {
1921
-			$where[] = $cond;
1922
-		}
1923
-	}
1924
-	$auteurs = sql_allfetsel(
1925
-		'id_auteur',
1926
-		'spip_auteurs_liens',
1927
-		$where
1928
-	);
1929
-	if (is_array($auteurs)) {
1930
-		return array_column($auteurs, 'id_auteur');
1931
-	}
1932
-	return [];
1912
+    $objet = objet_type($objet);
1913
+    $where = [
1914
+        'objet=' . sql_quote($objet),
1915
+        'id_objet=' . intval($id_objet)
1916
+    ];
1917
+    if (!empty($cond)) {
1918
+        if (is_array($cond)) {
1919
+            $where = array_merge($where, $cond);
1920
+        } else {
1921
+            $where[] = $cond;
1922
+        }
1923
+    }
1924
+    $auteurs = sql_allfetsel(
1925
+        'id_auteur',
1926
+        'spip_auteurs_liens',
1927
+        $where
1928
+    );
1929
+    if (is_array($auteurs)) {
1930
+        return array_column($auteurs, 'id_auteur');
1931
+    }
1932
+    return [];
1933 1933
 }
1934 1934
 
1935 1935
 /**
@@ -1944,11 +1944,11 @@  discard block
 block discarded – undo
1944 1944
  *     - false : serveur SQL indisponible
1945 1945
  */
1946 1946
 function auteurs_article($id_article, $cond = '') {
1947
-	return sql_allfetsel(
1948
-		'id_auteur',
1949
-		'spip_auteurs_liens',
1950
-		"objet='article' AND id_objet=" . intval($id_article) . ($cond ? " AND $cond" : '')
1951
-	);
1947
+    return sql_allfetsel(
1948
+        'id_auteur',
1949
+        'spip_auteurs_liens',
1950
+        "objet='article' AND id_objet=" . intval($id_article) . ($cond ? " AND $cond" : '')
1951
+    );
1952 1952
 }
1953 1953
 
1954 1954
 
@@ -1962,7 +1962,7 @@  discard block
 block discarded – undo
1962 1962
  */
1963 1963
 function acces_restreint_rubrique($id_rubrique) {
1964 1964
 
1965
-	return (isset($GLOBALS['connect_id_rubrique'][$id_rubrique]));
1965
+    return (isset($GLOBALS['connect_id_rubrique'][$id_rubrique]));
1966 1966
 }
1967 1967
 
1968 1968
 
@@ -1975,12 +1975,12 @@  discard block
 block discarded – undo
1975 1975
  * @return bool             true si un parent existe
1976 1976
  */
1977 1977
 function verifier_table_non_vide($table = 'spip_rubriques') {
1978
-	static $done = [];
1979
-	if (!isset($done[$table])) {
1980
-		$done[$table] = sql_countsel($table) > 0;
1981
-	}
1978
+    static $done = [];
1979
+    if (!isset($done[$table])) {
1980
+        $done[$table] = sql_countsel($table) > 0;
1981
+    }
1982 1982
 
1983
-	return $done[$table];
1983
+    return $done[$table];
1984 1984
 }
1985 1985
 
1986 1986
 /**
@@ -2007,15 +2007,15 @@  discard block
 block discarded – undo
2007 2007
  */
2008 2008
 function autoriser_inscrireauteur_dist($faire, $quoi, $id, $qui, $opt) {
2009 2009
 
2010
-	$s = array_search($quoi, $GLOBALS['liste_des_statuts']);
2011
-	switch ($s) {
2012
-		case 'info_redacteurs':
2013
-			return ($GLOBALS['meta']['accepter_inscriptions'] === 'oui');
2014
-		case 'info_visiteurs':
2015
-			return ($GLOBALS['meta']['accepter_visiteurs'] === 'oui' or $GLOBALS['meta']['forums_publics'] === 'abo');
2016
-	}
2010
+    $s = array_search($quoi, $GLOBALS['liste_des_statuts']);
2011
+    switch ($s) {
2012
+        case 'info_redacteurs':
2013
+            return ($GLOBALS['meta']['accepter_inscriptions'] === 'oui');
2014
+        case 'info_visiteurs':
2015
+            return ($GLOBALS['meta']['accepter_visiteurs'] === 'oui' or $GLOBALS['meta']['forums_publics'] === 'abo');
2016
+    }
2017 2017
 
2018
-	return false;
2018
+    return false;
2019 2019
 }
2020 2020
 
2021 2021
 /**
@@ -2033,7 +2033,7 @@  discard block
 block discarded – undo
2033 2033
  * @return bool true s'il a le droit, false sinon
2034 2034
  **/
2035 2035
 function autoriser_inscription_relancer_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
2036
-	return $qui['statut'] === '0minirezo' and !$qui['restreint'];
2036
+    return $qui['statut'] === '0minirezo' and !$qui['restreint'];
2037 2037
 }
2038 2038
 
2039 2039
 /**
@@ -2051,5 +2051,5 @@  discard block
 block discarded – undo
2051 2051
  * @return bool true s'il a le droit, false sinon
2052 2052
  **/
2053 2053
 function autoriser_phpinfos_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
2054
-	return autoriser('webmestre');
2054
+    return autoriser('webmestre');
2055 2055
 }
Please login to merge, or discard this patch.
ecrire/lang/ecrire_sv.php 1 patch
Indentation   +539 added lines, -539 removed lines patch added patch discarded remove patch
@@ -4,585 +4,585 @@
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'activer_plugin' => 'Aktivera insticksmodulen',
14
-	'affichage' => 'Visa',
15
-	'aide_non_disponible' => 'Den här delen av direkthjälpen finns inte i det aktuella språket',
16
-	'auteur' => 'Redaktör',
17
-	'avis_acces_interdit' => 'Tillträde förbjudet.',
18
-	'avis_article_modifie' => 'Varning, @nom_auteur_modif@ har arbetat på den här artikeln för @date_diff@ minuter sen',
19
-	'avis_aucun_resultat' => 'Hittade inga resultat',
20
-	'avis_chemin_invalide_1' => 'Sökvägen du har angett',
21
-	'avis_chemin_invalide_2' => 'är ogiltig. Återgå till den föregående sidan och kontrollera den angivna informationen',
22
-	'avis_connexion_echec_1' => 'Anslutningen till SQL-servern misslyckades.',
23
-	'avis_connexion_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.',
24
-	'avis_connexion_echec_3' => '<b>OBS</b> På många servrar måste du  <b>begära</b> aktivering av din databas innan du kan använda den. Om du inte lyckas med uppkopplingen, se till att den är aktiverad.',
25
-	'avis_connexion_ldap_echec_1' => 'Anslutning till LDAP-server misslyckades.',
26
-	'avis_connexion_ldap_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.',
27
-	'avis_connexion_ldap_echec_3' => 'Alternativt kan du välja att inte använda LDAP stöd för att importera användare.',
28
-	'avis_deplacement_rubrique' => 'Varning! Den här avdelningen innehåller @contient_breves@ notiser@scb@: om du flyttar den, markera i kryssrutan för att bekräfta.',
29
-	'avis_erreur_connexion_mysql' => 'Fel på SQL-förbindelsen',
30
-	'avis_espace_interdit' => '<b>Förbjudet område</b><p>SPIP är redan installerat.', # MODIF
31
-	'avis_lecture_noms_bases_1' => 'Installerings-scriptet kunde inte läsa namnen på de installerade databaserna.',
32
-	'avis_lecture_noms_bases_2' => 'Antingen finns det ingen tillgänglig databas eller så är funktionen som listar
12
+    // A
13
+    'activer_plugin' => 'Aktivera insticksmodulen',
14
+    'affichage' => 'Visa',
15
+    'aide_non_disponible' => 'Den här delen av direkthjälpen finns inte i det aktuella språket',
16
+    'auteur' => 'Redaktör',
17
+    'avis_acces_interdit' => 'Tillträde förbjudet.',
18
+    'avis_article_modifie' => 'Varning, @nom_auteur_modif@ har arbetat på den här artikeln för @date_diff@ minuter sen',
19
+    'avis_aucun_resultat' => 'Hittade inga resultat',
20
+    'avis_chemin_invalide_1' => 'Sökvägen du har angett',
21
+    'avis_chemin_invalide_2' => 'är ogiltig. Återgå till den föregående sidan och kontrollera den angivna informationen',
22
+    'avis_connexion_echec_1' => 'Anslutningen till SQL-servern misslyckades.',
23
+    'avis_connexion_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.',
24
+    'avis_connexion_echec_3' => '<b>OBS</b> På många servrar måste du  <b>begära</b> aktivering av din databas innan du kan använda den. Om du inte lyckas med uppkopplingen, se till att den är aktiverad.',
25
+    'avis_connexion_ldap_echec_1' => 'Anslutning till LDAP-server misslyckades.',
26
+    'avis_connexion_ldap_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.',
27
+    'avis_connexion_ldap_echec_3' => 'Alternativt kan du välja att inte använda LDAP stöd för att importera användare.',
28
+    'avis_deplacement_rubrique' => 'Varning! Den här avdelningen innehåller @contient_breves@ notiser@scb@: om du flyttar den, markera i kryssrutan för att bekräfta.',
29
+    'avis_erreur_connexion_mysql' => 'Fel på SQL-förbindelsen',
30
+    'avis_espace_interdit' => '<b>Förbjudet område</b><p>SPIP är redan installerat.', # MODIF
31
+    'avis_lecture_noms_bases_1' => 'Installerings-scriptet kunde inte läsa namnen på de installerade databaserna.',
32
+    'avis_lecture_noms_bases_2' => 'Antingen finns det ingen tillgänglig databas eller så är funktionen som listar
33 33
  databaser inaktiverad av säkerhetsskäl (det är fallet hos många webbvärdar).',
34
-	'avis_lecture_noms_bases_3' => 'I fråga om det andra alternativet är det möjligt att en databas med ditt användarnamn kan användas:',
35
-	'avis_non_acces_page' => 'Du har inte tillgång till den här sidan.',
36
-	'avis_operation_echec' => 'Operationen misslyckades.',
37
-	'avis_operation_impossible' => 'Operationen omöjlig att genomföra',
38
-	'avis_suppression_base' => 'OBS! Radering av data är permanent och kan inte göras ogjord.',
34
+    'avis_lecture_noms_bases_3' => 'I fråga om det andra alternativet är det möjligt att en databas med ditt användarnamn kan användas:',
35
+    'avis_non_acces_page' => 'Du har inte tillgång till den här sidan.',
36
+    'avis_operation_echec' => 'Operationen misslyckades.',
37
+    'avis_operation_impossible' => 'Operationen omöjlig att genomföra',
38
+    'avis_suppression_base' => 'OBS! Radering av data är permanent och kan inte göras ogjord.',
39 39
 
40
-	// B
41
-	'bouton_acces_ldap' => 'Lägg till en LDAP-katalog >>',
42
-	'bouton_ajouter' => 'Lägg till',
43
-	'bouton_annuler' => 'Avbryt',
44
-	'bouton_demande_publication' => 'Begär att den här artikeln ska publiceras',
45
-	'bouton_desactive_tout' => 'Avaktivera alla',
46
-	'bouton_desinstaller' => 'Avinstallera',
47
-	'bouton_effacer_tout' => 'Radera ALLA',
48
-	'bouton_envoyer_message' => 'Färdigt meddelande: skicka',
49
-	'bouton_modifier' => 'Ändra',
50
-	'bouton_radio_afficher' => 'Visa',
51
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Synas i listan över anslutna redaktörere',
52
-	'bouton_radio_envoi_annonces_adresse' => 'Skicka meddelanden till adressen:',
53
-	'bouton_radio_envoi_liste_nouveautes' => 'Skicka lista över senaste notiser',
54
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Inte synas i listan över anslutna redaktörere',
55
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Skicka inga redaktionella meddelanden',
56
-	'bouton_redirection' => 'OMPEKA',
57
-	'bouton_relancer_installation' => 'Kör installationen igen',
58
-	'bouton_suivant' => 'Nästa',
59
-	'bouton_tenter_recuperation' => 'Försök till reparation',
60
-	'bouton_test_proxy' => 'Testa proxyn',
61
-	'bouton_vider_cache' => 'Töm cachen',
40
+    // B
41
+    'bouton_acces_ldap' => 'Lägg till en LDAP-katalog >>',
42
+    'bouton_ajouter' => 'Lägg till',
43
+    'bouton_annuler' => 'Avbryt',
44
+    'bouton_demande_publication' => 'Begär att den här artikeln ska publiceras',
45
+    'bouton_desactive_tout' => 'Avaktivera alla',
46
+    'bouton_desinstaller' => 'Avinstallera',
47
+    'bouton_effacer_tout' => 'Radera ALLA',
48
+    'bouton_envoyer_message' => 'Färdigt meddelande: skicka',
49
+    'bouton_modifier' => 'Ändra',
50
+    'bouton_radio_afficher' => 'Visa',
51
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Synas i listan över anslutna redaktörere',
52
+    'bouton_radio_envoi_annonces_adresse' => 'Skicka meddelanden till adressen:',
53
+    'bouton_radio_envoi_liste_nouveautes' => 'Skicka lista över senaste notiser',
54
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Inte synas i listan över anslutna redaktörere',
55
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Skicka inga redaktionella meddelanden',
56
+    'bouton_redirection' => 'OMPEKA',
57
+    'bouton_relancer_installation' => 'Kör installationen igen',
58
+    'bouton_suivant' => 'Nästa',
59
+    'bouton_tenter_recuperation' => 'Försök till reparation',
60
+    'bouton_test_proxy' => 'Testa proxyn',
61
+    'bouton_vider_cache' => 'Töm cachen',
62 62
 
63
-	// C
64
-	'cache_modifiable_webmestre' => 'Den här parametern kan ändras av den webbansvariga.',
65
-	'calendrier_synchro' => 'Om du använder ett kalenderprogram som är kompatibelt med <b>iCal</b> kan du synkronisera det med informationen på den här webbplatsen.',
66
-	'config_activer_champs' => 'Aktivera följande fält',
67
-	'config_choix_base_sup' => 'Ge namnet på en databas på servern',
68
-	'config_erreur_base_sup' => 'SPIP har inte tillgång till de existerande databaserna',
69
-	'config_info_base_sup_disponibles' => 'Ytterligare databaser dit databasfrågor kan skickas:',
70
-	'config_info_logos' => 'Alla objekt på sajten kan kan ha sin egen logotype och dessutom en "mouseover" logotype',
71
-	'config_info_logos_utiliser' => 'Använd logotyper',
72
-	'config_info_logos_utiliser_non' => 'Använd inte logotyper',
73
-	'config_info_logos_utiliser_survol' => 'Använd "mouseover" logotyper',
74
-	'config_info_logos_utiliser_survol_non' => 'Använd inte "mouseover" logotyper',
75
-	'config_info_redirection' => 'Genom att aktivera det här valet kan du skapa virtuella artiklar, som enbart är länkar till artiklar som publicerats på andra sajter oavsett om det är SPIP-sajter eller ej.',
76
-	'config_redirection' => 'Virtuella artiklar',
77
-	'config_titre_base_sup' => 'Konfigurera ytterligare en databas',
78
-	'config_titre_base_sup_choix' => 'Välj ytterligare en databas',
79
-	'connexion_ldap' => 'ldapuppkoppling:',
63
+    // C
64
+    'cache_modifiable_webmestre' => 'Den här parametern kan ändras av den webbansvariga.',
65
+    'calendrier_synchro' => 'Om du använder ett kalenderprogram som är kompatibelt med <b>iCal</b> kan du synkronisera det med informationen på den här webbplatsen.',
66
+    'config_activer_champs' => 'Aktivera följande fält',
67
+    'config_choix_base_sup' => 'Ge namnet på en databas på servern',
68
+    'config_erreur_base_sup' => 'SPIP har inte tillgång till de existerande databaserna',
69
+    'config_info_base_sup_disponibles' => 'Ytterligare databaser dit databasfrågor kan skickas:',
70
+    'config_info_logos' => 'Alla objekt på sajten kan kan ha sin egen logotype och dessutom en "mouseover" logotype',
71
+    'config_info_logos_utiliser' => 'Använd logotyper',
72
+    'config_info_logos_utiliser_non' => 'Använd inte logotyper',
73
+    'config_info_logos_utiliser_survol' => 'Använd "mouseover" logotyper',
74
+    'config_info_logos_utiliser_survol_non' => 'Använd inte "mouseover" logotyper',
75
+    'config_info_redirection' => 'Genom att aktivera det här valet kan du skapa virtuella artiklar, som enbart är länkar till artiklar som publicerats på andra sajter oavsett om det är SPIP-sajter eller ej.',
76
+    'config_redirection' => 'Virtuella artiklar',
77
+    'config_titre_base_sup' => 'Konfigurera ytterligare en databas',
78
+    'config_titre_base_sup_choix' => 'Välj ytterligare en databas',
79
+    'connexion_ldap' => 'ldapuppkoppling:',
80 80
 
81
-	// D
82
-	'date_mot_heures' => 'h',
81
+    // D
82
+    'date_mot_heures' => 'h',
83 83
 
84
-	// E
85
-	'email' => 'e-post',
86
-	'email_2' => 'e-post:',
87
-	'entree_adresse_annuaire' => 'Katalogens adress',
88
-	'entree_adresse_email' => 'Din e-postadress',
89
-	'entree_base_donnee_1' => 'Adress till databasen',
90
-	'entree_base_donnee_2' => '(Ofta är det samma adress som till din webbplats, ibland är det "localhost" och ibland lämnas det helt tomt.)',
91
-	'entree_biographie' => 'Kort biografi med några få ord.',
92
-	'entree_chemin_acces' => '<b>Fyll i</b> sökvägen:',
93
-	'entree_cle_pgp' => 'Din PGP-nyckel',
94
-	'entree_contenu_rubrique' => '(Några få ord som beskriver innehållet i avdelningen)',
95
-	'entree_identifiants_connexion' => 'Dina anslutningsuppgifter',
96
-	'entree_informations_connexion_ldap' => 'Fyll i det här formuläret med uppgifter om din anslutning till LDAP. Din system eller nätverks administratör kan ge dig dessa.',
97
-	'entree_infos_perso' => 'Vem är du?',
98
-	'entree_interieur_rubrique' => 'I avdelning:',
99
-	'entree_liens_sites' => '<b>Hyperlänk</b> (referens, sajt att besöka...)',
100
-	'entree_login' => 'Dina användaruppgifter',
101
-	'entree_login_connexion_1' => 'Användarupgifter för anslutningen',
102
-	'entree_login_connexion_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)',
103
-	'entree_mot_passe' => 'Ditt lösenord',
104
-	'entree_mot_passe_1' => 'Lösenord för anslutningen',
105
-	'entree_mot_passe_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)',
106
-	'entree_nom_fichier' => 'Skriv in filnamnet @texte_compresse@',
107
-	'entree_nom_pseudo' => 'Ditt namn eller alias',
108
-	'entree_nom_pseudo_1' => '(Ditt namn eller alias)',
109
-	'entree_nom_site' => 'Din webbplats namn',
110
-	'entree_nouveau_passe' => 'Nytt lösenord',
111
-	'entree_passe_ldap' => 'Lösenord',
112
-	'entree_port_annuaire' => 'Katalogens portnummer',
113
-	'entree_signature' => 'Signatur',
114
-	'entree_titre_obligatoire' => '<b>Title</b> [Krävs]<br />',
115
-	'entree_url' => 'Din webbplats URL',
116
-	'erreur_plugin_fichier_absent' => 'Filen saknas',
117
-	'erreur_plugin_fichier_def_absent' => 'Definitionsfilen saknas',
118
-	'erreur_plugin_nom_fonction_interdit' => 'Förbjudet namn för funktionen',
119
-	'erreur_plugin_nom_manquant' => 'plugin-namnet saknas',
120
-	'erreur_plugin_prefix_manquant' => 'Pluginens prefix odefinierad',
121
-	'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; saknas i definitionsfilen',
122
-	'erreur_plugin_version_manquant' => 'Denna plugin saknar version.',
84
+    // E
85
+    'email' => 'e-post',
86
+    'email_2' => 'e-post:',
87
+    'entree_adresse_annuaire' => 'Katalogens adress',
88
+    'entree_adresse_email' => 'Din e-postadress',
89
+    'entree_base_donnee_1' => 'Adress till databasen',
90
+    'entree_base_donnee_2' => '(Ofta är det samma adress som till din webbplats, ibland är det "localhost" och ibland lämnas det helt tomt.)',
91
+    'entree_biographie' => 'Kort biografi med några få ord.',
92
+    'entree_chemin_acces' => '<b>Fyll i</b> sökvägen:',
93
+    'entree_cle_pgp' => 'Din PGP-nyckel',
94
+    'entree_contenu_rubrique' => '(Några få ord som beskriver innehållet i avdelningen)',
95
+    'entree_identifiants_connexion' => 'Dina anslutningsuppgifter',
96
+    'entree_informations_connexion_ldap' => 'Fyll i det här formuläret med uppgifter om din anslutning till LDAP. Din system eller nätverks administratör kan ge dig dessa.',
97
+    'entree_infos_perso' => 'Vem är du?',
98
+    'entree_interieur_rubrique' => 'I avdelning:',
99
+    'entree_liens_sites' => '<b>Hyperlänk</b> (referens, sajt att besöka...)',
100
+    'entree_login' => 'Dina användaruppgifter',
101
+    'entree_login_connexion_1' => 'Användarupgifter för anslutningen',
102
+    'entree_login_connexion_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)',
103
+    'entree_mot_passe' => 'Ditt lösenord',
104
+    'entree_mot_passe_1' => 'Lösenord för anslutningen',
105
+    'entree_mot_passe_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)',
106
+    'entree_nom_fichier' => 'Skriv in filnamnet @texte_compresse@',
107
+    'entree_nom_pseudo' => 'Ditt namn eller alias',
108
+    'entree_nom_pseudo_1' => '(Ditt namn eller alias)',
109
+    'entree_nom_site' => 'Din webbplats namn',
110
+    'entree_nouveau_passe' => 'Nytt lösenord',
111
+    'entree_passe_ldap' => 'Lösenord',
112
+    'entree_port_annuaire' => 'Katalogens portnummer',
113
+    'entree_signature' => 'Signatur',
114
+    'entree_titre_obligatoire' => '<b>Title</b> [Krävs]<br />',
115
+    'entree_url' => 'Din webbplats URL',
116
+    'erreur_plugin_fichier_absent' => 'Filen saknas',
117
+    'erreur_plugin_fichier_def_absent' => 'Definitionsfilen saknas',
118
+    'erreur_plugin_nom_fonction_interdit' => 'Förbjudet namn för funktionen',
119
+    'erreur_plugin_nom_manquant' => 'plugin-namnet saknas',
120
+    'erreur_plugin_prefix_manquant' => 'Pluginens prefix odefinierad',
121
+    'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; saknas i definitionsfilen',
122
+    'erreur_plugin_version_manquant' => 'Denna plugin saknar version.',
123 123
 
124
-	// I
125
-	'ical_info1' => 'Denna sida visar flera metoder att hålla dig informerad om aktiviteter på sajten.',
126
-	'ical_info2' => 'För mer information, tveka inte om att besöka <a href="@spipnet@">SPIP’s dokumentation</a>.', # MODIF
127
-	'ical_info_calendrier' => 'Du kan använda två kalendrar. En är en sajtkarta med alla publicerade artiklar. Den andra innehåller redaktionella meddelanden och dina senaste privata meddelanden: Den är personlig, tack vare en genererad nyckel som du kan förändra när som helst genom att byta lösenord.',
128
-	'ical_methode_http' => 'Nerladdning',
129
-	'ical_methode_webcal' => 'Synkronisering (webcal://)', # MODIF
130
-	'ical_texte_prive' => 'Den här kalendern som är personlig, innnehåller dina egna redaktionella händelser på den här sajten (uppgifter, egna möten, inlämnade artiklar och nyheter...).',
131
-	'ical_texte_public' => 'Den här kalendern låter dig följa den publika aktiviteten på sajten (publicerade artiklar och nyheter).',
132
-	'ical_texte_rss' => 'Du kan syndikerar de senaste nyheterna på den är sajten i vilken XML/RSS-läsare som helst. Det är samma format som gör det möjligt att läsa de senaste nyheterna på andra sajter som använder ett kompatibelt format. (syndikerade sajter).',
133
-	'ical_titre_js' => 'Javascript',
134
-	'ical_titre_mailing' => 'E-postlista',
135
-	'ical_titre_rss' => 'Syndikeringsfiler',
136
-	'icone_activer_cookie' => 'Sätt en cookie',
137
-	'icone_admin_plugin' => 'Hantera plugin’s',
138
-	'icone_afficher_auteurs' => 'Visa redaktörer',
139
-	'icone_afficher_visiteurs' => 'Visa besökare',
140
-	'icone_arret_discussion' => 'Avsluta diskussionen',
141
-	'icone_calendrier' => 'Kalender',
142
-	'icone_creer_auteur' => 'Skapa en ny redaktör och koppla honom (henne) till den här artikeln',
143
-	'icone_creer_mot_cle' => 'Skapa ett nytt nyckelord och länka det till artikeln',
144
-	'icone_creer_rubrique_2' => 'Skapa en ny avdelning',
145
-	'icone_modifier_article' => 'Editera artikeln',
146
-	'icone_modifier_rubrique' => 'Editera avdelningen',
147
-	'icone_relancer_signataire' => 'Kontakta personen igen',
148
-	'icone_retour' => 'Tillbaka',
149
-	'icone_retour_article' => 'Tillbaka till artikeln',
150
-	'icone_supprimer_cookie' => 'Radera cookien',
151
-	'icone_supprimer_rubrique' => 'Radera den här avdelningen',
152
-	'icone_supprimer_signature' => 'Radera den här signaturen',
153
-	'icone_valider_signature' => 'Validera signaturen',
154
-	'image_administrer_rubrique' => 'Du kan hantera den här avdelningen',
155
-	'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
156
-	'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
157
-	'info_1_article' => '1 artikel',
158
-	'info_activer_cookie' => 'Du kan aktivera en <b>administrationscookie</b>, som tillåter dig
124
+    // I
125
+    'ical_info1' => 'Denna sida visar flera metoder att hålla dig informerad om aktiviteter på sajten.',
126
+    'ical_info2' => 'För mer information, tveka inte om att besöka <a href="@spipnet@">SPIP’s dokumentation</a>.', # MODIF
127
+    'ical_info_calendrier' => 'Du kan använda två kalendrar. En är en sajtkarta med alla publicerade artiklar. Den andra innehåller redaktionella meddelanden och dina senaste privata meddelanden: Den är personlig, tack vare en genererad nyckel som du kan förändra när som helst genom att byta lösenord.',
128
+    'ical_methode_http' => 'Nerladdning',
129
+    'ical_methode_webcal' => 'Synkronisering (webcal://)', # MODIF
130
+    'ical_texte_prive' => 'Den här kalendern som är personlig, innnehåller dina egna redaktionella händelser på den här sajten (uppgifter, egna möten, inlämnade artiklar och nyheter...).',
131
+    'ical_texte_public' => 'Den här kalendern låter dig följa den publika aktiviteten på sajten (publicerade artiklar och nyheter).',
132
+    'ical_texte_rss' => 'Du kan syndikerar de senaste nyheterna på den är sajten i vilken XML/RSS-läsare som helst. Det är samma format som gör det möjligt att läsa de senaste nyheterna på andra sajter som använder ett kompatibelt format. (syndikerade sajter).',
133
+    'ical_titre_js' => 'Javascript',
134
+    'ical_titre_mailing' => 'E-postlista',
135
+    'ical_titre_rss' => 'Syndikeringsfiler',
136
+    'icone_activer_cookie' => 'Sätt en cookie',
137
+    'icone_admin_plugin' => 'Hantera plugin’s',
138
+    'icone_afficher_auteurs' => 'Visa redaktörer',
139
+    'icone_afficher_visiteurs' => 'Visa besökare',
140
+    'icone_arret_discussion' => 'Avsluta diskussionen',
141
+    'icone_calendrier' => 'Kalender',
142
+    'icone_creer_auteur' => 'Skapa en ny redaktör och koppla honom (henne) till den här artikeln',
143
+    'icone_creer_mot_cle' => 'Skapa ett nytt nyckelord och länka det till artikeln',
144
+    'icone_creer_rubrique_2' => 'Skapa en ny avdelning',
145
+    'icone_modifier_article' => 'Editera artikeln',
146
+    'icone_modifier_rubrique' => 'Editera avdelningen',
147
+    'icone_relancer_signataire' => 'Kontakta personen igen',
148
+    'icone_retour' => 'Tillbaka',
149
+    'icone_retour_article' => 'Tillbaka till artikeln',
150
+    'icone_supprimer_cookie' => 'Radera cookien',
151
+    'icone_supprimer_rubrique' => 'Radera den här avdelningen',
152
+    'icone_supprimer_signature' => 'Radera den här signaturen',
153
+    'icone_valider_signature' => 'Validera signaturen',
154
+    'image_administrer_rubrique' => 'Du kan hantera den här avdelningen',
155
+    'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
156
+    'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
157
+    'info_1_article' => '1 artikel',
158
+    'info_activer_cookie' => 'Du kan aktivera en <b>administrationscookie</b>, som tillåter dig
159 159
  att enkelt växla mellan den publika och den privata delen.',
160
-	'info_administrateur' => 'Administratör',
161
-	'info_administrateur_1' => 'Administratör',
162
-	'info_administrateur_2' => 'på sajten (<i>använd med försiktighet</i>)',
163
-	'info_administrateur_site_01' => 'Om du är en sajt-administratör, var vänlig',
164
-	'info_administrateur_site_02' => 'klicka på den här länken',
165
-	'info_administrateurs' => 'Administratörer',
166
-	'info_administrer_rubrique' => 'Du kan hantera den här avdelningen',
167
-	'info_adresse' => 'till adressen:',
168
-	'info_adresse_url' => 'Din sajts publika URL',
169
-	'info_aide_en_ligne' => 'SPIP Online Hjälp',
170
-	'info_ajout_image' => 'När du lägget till filer som bifogade dokument till en artikel,
160
+    'info_administrateur' => 'Administratör',
161
+    'info_administrateur_1' => 'Administratör',
162
+    'info_administrateur_2' => 'på sajten (<i>använd med försiktighet</i>)',
163
+    'info_administrateur_site_01' => 'Om du är en sajt-administratör, var vänlig',
164
+    'info_administrateur_site_02' => 'klicka på den här länken',
165
+    'info_administrateurs' => 'Administratörer',
166
+    'info_administrer_rubrique' => 'Du kan hantera den här avdelningen',
167
+    'info_adresse' => 'till adressen:',
168
+    'info_adresse_url' => 'Din sajts publika URL',
169
+    'info_aide_en_ligne' => 'SPIP Online Hjälp',
170
+    'info_ajout_image' => 'När du lägget till filer som bifogade dokument till en artikel,
171 171
   kan SPIP automatiskt skapa miniatyrer av de
172 172
   inlagda bilderna. Det tillåter till exempel
173 173
   att man automatiskt skapar ett galleri eller en portfolio.',
174
-	'info_ajouter_rubrique' => 'lägg till en annan avdelning:',
175
-	'info_annonce_nouveautes' => 'Senaste nyheterna',
176
-	'info_article' => 'artikel',
177
-	'info_article_2' => 'artiklar',
178
-	'info_article_a_paraitre' => 'Fördaterade artiklar som kommer att publiceras',
179
-	'info_articles_02' => 'artiklar',
180
-	'info_articles_2' => 'Artiklar',
181
-	'info_articles_auteur' => 'Den här redaktörens artiklar',
182
-	'info_articles_trouves' => 'Artiklar hittade',
183
-	'info_attente_validation' => 'Dina artiklar som väntar på validering',
184
-	'info_aujourdhui' => 'idag:',
185
-	'info_auteurs' => 'Redaktörer',
186
-	'info_auteurs_par_tri' => 'Redaktörer@partri@',
187
-	'info_auteurs_trouves' => 'Redaktörer funna',
188
-	'info_authentification_externe' => 'Extern autentifiering',
189
-	'info_avertissement' => 'Varning',
190
-	'info_barre_outils' => 'med dess verktygsfält?',
191
-	'info_base_installee' => 'Databasen är skapad',
192
-	'info_chapeau' => 'Ingress',
193
-	'info_chapeau_2' => 'Introduktion:',
194
-	'info_chemin_acces_1' => 'inställningar: <b>sökväg i katalogen</b>',
195
-	'info_chemin_acces_2' => 'Från och med nu måste du konfigurera sökvägen till katalogen information. Det är nödvändigt för att kunna läsa användarprofilerna som är sparade i katalogen.',
196
-	'info_chemin_acces_annuaire' => 'Inställningar: <b>Sökväg i katalogen</b>',
197
-	'info_choix_base' => 'Tredje steget:',
198
-	'info_code_acces' => 'Glöm inte ditt eget lösenord!',
199
-	'info_config_suivi' => 'Om den här adressen är en mailing lista, kan du under adressen visa var man kan registrera sig. Det kan vara en URL (till exempel en webbsida där man kan registrera sig), eller en e-postadress med en speciell ärenderad (till exempel: <tt>@adresse_suivi@?subject=subscribe</tt>):',
200
-	'info_config_suivi_explication' => 'Du kan anmäla dig till sajtens nyhetsbrev. Du kommer då att automatiskt få meddelanden om artiklar och nyheter som laddats upp för publicering.',
201
-	'info_confirmer_passe' => 'Bekräfta ditt nya lösenord:',
202
-	'info_connexion_base' => 'Försöker att ansluta till databasen',
203
-	'info_connexion_ldap_ok' => 'Din förbindelse till LDAP-servern lyckades.</b><p> Du kan gå vidare till nästa steg.</p>', # MODIF
204
-	'info_connexion_mysql' => 'Din databasförbindelse',
205
-	'info_connexion_ok' => 'Förbindelsen lyckades.',
206
-	'info_contact' => 'Kontakt',
207
-	'info_contenu_articles' => 'Innehåll i artiklarna',
208
-	'info_creation_paragraphe' => '(För att skapa stycken, räcker det att lämna tomma rader.)', # MODIF
209
-	'info_creation_rubrique' => 'Innan du kan skriva artiklar,<br /> måste du skapa åtminstone en avdelning.<br />',
210
-	'info_creation_tables' => 'Skapar databastabeller',
211
-	'info_creer_base' => '<b>Skapa</b> en ny databas:',
212
-	'info_dans_rubrique' => 'I avdelningen:',
213
-	'info_date_publication_anterieure' => 'Datum för tidigare publicering:',
214
-	'info_date_referencement' => 'DATUM DÅ SAJTEN LÄNKADES:',
215
-	'info_derniere_etape' => 'Klart!',
216
-	'info_descriptif' => 'Beskrivning:',
217
-	'info_desinstaller_plugin' => 'raderar data och avaktiverar tillägget',
218
-	'info_discussion_cours' => 'Pågående diskussion',
219
-	'info_ecrire_article' => 'Innan du kan skriva artiklar, ymåste du skapa minst en avdelning.',
220
-	'info_email_envoi' => 'Avsändaren mailadress (frivilligt)',
221
-	'info_email_envoi_txt' => 'Skriv in avsändarens e-postadress som används när man sänder mejlen (som default används mottagarens adress som avsändaradress) :',
222
-	'info_email_webmestre' => 'Webmasterns mejladress (frivillig)', # MODIF
223
-	'info_envoi_email_automatique' => 'Automatisk e-post',
224
-	'info_envoyer_maintenant' => 'Skicka nu',
225
-	'info_etape_suivante' => 'Gå till nästa steg',
226
-	'info_etape_suivante_1' => 'Du kan fortsätta till nästa steg.',
227
-	'info_etape_suivante_2' => 'Du kan fortsätta till nästa steg.',
228
-	'info_exportation_base' => 'Exportera databasen till @archive@',
229
-	'info_facilite_suivi_activite' => 'För att underlätta att följa de redaktionella;
174
+    'info_ajouter_rubrique' => 'lägg till en annan avdelning:',
175
+    'info_annonce_nouveautes' => 'Senaste nyheterna',
176
+    'info_article' => 'artikel',
177
+    'info_article_2' => 'artiklar',
178
+    'info_article_a_paraitre' => 'Fördaterade artiklar som kommer att publiceras',
179
+    'info_articles_02' => 'artiklar',
180
+    'info_articles_2' => 'Artiklar',
181
+    'info_articles_auteur' => 'Den här redaktörens artiklar',
182
+    'info_articles_trouves' => 'Artiklar hittade',
183
+    'info_attente_validation' => 'Dina artiklar som väntar på validering',
184
+    'info_aujourdhui' => 'idag:',
185
+    'info_auteurs' => 'Redaktörer',
186
+    'info_auteurs_par_tri' => 'Redaktörer@partri@',
187
+    'info_auteurs_trouves' => 'Redaktörer funna',
188
+    'info_authentification_externe' => 'Extern autentifiering',
189
+    'info_avertissement' => 'Varning',
190
+    'info_barre_outils' => 'med dess verktygsfält?',
191
+    'info_base_installee' => 'Databasen är skapad',
192
+    'info_chapeau' => 'Ingress',
193
+    'info_chapeau_2' => 'Introduktion:',
194
+    'info_chemin_acces_1' => 'inställningar: <b>sökväg i katalogen</b>',
195
+    'info_chemin_acces_2' => 'Från och med nu måste du konfigurera sökvägen till katalogen information. Det är nödvändigt för att kunna läsa användarprofilerna som är sparade i katalogen.',
196
+    'info_chemin_acces_annuaire' => 'Inställningar: <b>Sökväg i katalogen</b>',
197
+    'info_choix_base' => 'Tredje steget:',
198
+    'info_code_acces' => 'Glöm inte ditt eget lösenord!',
199
+    'info_config_suivi' => 'Om den här adressen är en mailing lista, kan du under adressen visa var man kan registrera sig. Det kan vara en URL (till exempel en webbsida där man kan registrera sig), eller en e-postadress med en speciell ärenderad (till exempel: <tt>@adresse_suivi@?subject=subscribe</tt>):',
200
+    'info_config_suivi_explication' => 'Du kan anmäla dig till sajtens nyhetsbrev. Du kommer då att automatiskt få meddelanden om artiklar och nyheter som laddats upp för publicering.',
201
+    'info_confirmer_passe' => 'Bekräfta ditt nya lösenord:',
202
+    'info_connexion_base' => 'Försöker att ansluta till databasen',
203
+    'info_connexion_ldap_ok' => 'Din förbindelse till LDAP-servern lyckades.</b><p> Du kan gå vidare till nästa steg.</p>', # MODIF
204
+    'info_connexion_mysql' => 'Din databasförbindelse',
205
+    'info_connexion_ok' => 'Förbindelsen lyckades.',
206
+    'info_contact' => 'Kontakt',
207
+    'info_contenu_articles' => 'Innehåll i artiklarna',
208
+    'info_creation_paragraphe' => '(För att skapa stycken, räcker det att lämna tomma rader.)', # MODIF
209
+    'info_creation_rubrique' => 'Innan du kan skriva artiklar,<br /> måste du skapa åtminstone en avdelning.<br />',
210
+    'info_creation_tables' => 'Skapar databastabeller',
211
+    'info_creer_base' => '<b>Skapa</b> en ny databas:',
212
+    'info_dans_rubrique' => 'I avdelningen:',
213
+    'info_date_publication_anterieure' => 'Datum för tidigare publicering:',
214
+    'info_date_referencement' => 'DATUM DÅ SAJTEN LÄNKADES:',
215
+    'info_derniere_etape' => 'Klart!',
216
+    'info_descriptif' => 'Beskrivning:',
217
+    'info_desinstaller_plugin' => 'raderar data och avaktiverar tillägget',
218
+    'info_discussion_cours' => 'Pågående diskussion',
219
+    'info_ecrire_article' => 'Innan du kan skriva artiklar, ymåste du skapa minst en avdelning.',
220
+    'info_email_envoi' => 'Avsändaren mailadress (frivilligt)',
221
+    'info_email_envoi_txt' => 'Skriv in avsändarens e-postadress som används när man sänder mejlen (som default används mottagarens adress som avsändaradress) :',
222
+    'info_email_webmestre' => 'Webmasterns mejladress (frivillig)', # MODIF
223
+    'info_envoi_email_automatique' => 'Automatisk e-post',
224
+    'info_envoyer_maintenant' => 'Skicka nu',
225
+    'info_etape_suivante' => 'Gå till nästa steg',
226
+    'info_etape_suivante_1' => 'Du kan fortsätta till nästa steg.',
227
+    'info_etape_suivante_2' => 'Du kan fortsätta till nästa steg.',
228
+    'info_exportation_base' => 'Exportera databasen till @archive@',
229
+    'info_facilite_suivi_activite' => 'För att underlätta att följa de redaktionella;
230 230
   aktiviteterna, kan SPIP skicka medddelanden via e-post, exempelvis till en maillista för redaktörer,
231 231
   angående publiceringar och godkännanden.', # MODIF
232
-	'info_fichiers_authent' => 'Lösenordsfil ".htpasswd"',
233
-	'info_gauche_auteurs' => 'Här hittar du alla redaktörer på sajten.
232
+    'info_fichiers_authent' => 'Lösenordsfil ".htpasswd"',
233
+    'info_gauche_auteurs' => 'Här hittar du alla redaktörer på sajten.
234 234
  Status på var och en av dem visas av färgen på ikonen (administratör = grön; redaktör = gul).',
235
-	'info_gauche_auteurs_exterieurs' => 'Externa redaktörer utan behörighet på sajten, visas med en blå ikon; raderade redaktörer med en soptunna.', # MODIF
236
-	'info_generation_miniatures_images' => 'Skapande av tumnagelbilder.',
237
-	'info_hebergeur_desactiver_envoi_email' => 'Vissa webhotell avaktiverar automatisk mejl
235
+    'info_gauche_auteurs_exterieurs' => 'Externa redaktörer utan behörighet på sajten, visas med en blå ikon; raderade redaktörer med en soptunna.', # MODIF
236
+    'info_generation_miniatures_images' => 'Skapande av tumnagelbilder.',
237
+    'info_hebergeur_desactiver_envoi_email' => 'Vissa webhotell avaktiverar automatisk mejl
238 238
 på deras servrar. Om så är fallet kan följande
239 239
 funktioner hos SPIP inte användas.',
240
-	'info_hier' => 'I går:',
241
-	'info_identification_publique' => 'Din publika identitet...',
242
-	'info_image_process' => 'Välj den bästa metoden för att skapa miniatyrer genom att klicka på motsvarande bild.',
243
-	'info_image_process2' => '<b>OBS!.</b> <i>Om du inte kan se någon bild, så är din server inte konfigurerad för att använda sådana verktyg. Om du vill använda dessa finesser så kontakta din leverantörs tekniska support och be dem installera utökningarna för «GD» eller «Imagick».</i>', # MODIF
244
-	'info_informations_personnelles' => 'Personlig information',
245
-	'info_inscription_automatique' => 'Automatisk registreing av nya redaktörer',
246
-	'info_jeu_caractere' => 'Sajtens teckenuppsättning',
247
-	'info_jours' => 'dagar',
248
-	'info_laisser_champs_vides' => 'Lämna dessa fält tomma)',
249
-	'info_langues' => 'Sajtens språk',
250
-	'info_lien_hypertexte' => 'Hyperlänk:',
251
-	'info_liste_redacteurs_connectes' => 'Inlogggade redaktörer',
252
-	'info_login_existant' => 'Användarnamnet finns redan.',
253
-	'info_login_trop_court' => 'Användarnamnet är för kort.',
254
-	'info_logos' => 'Logotyperna',
255
-	'info_maximum' => 'maximum:',
256
-	'info_meme_rubrique' => 'I samma avdelning',
257
-	'info_message_en_redaction' => 'utkorg',
258
-	'info_message_technique' => 'Tekniskt meddelande:',
259
-	'info_messagerie_interne' => 'Internmeddelande',
260
-	'info_mise_a_niveau_base' => 'SQL database upgradering',
261
-	'info_mise_a_niveau_base_2' => '{{Warning!}} Du har installerat {äldre} 
240
+    'info_hier' => 'I går:',
241
+    'info_identification_publique' => 'Din publika identitet...',
242
+    'info_image_process' => 'Välj den bästa metoden för att skapa miniatyrer genom att klicka på motsvarande bild.',
243
+    'info_image_process2' => '<b>OBS!.</b> <i>Om du inte kan se någon bild, så är din server inte konfigurerad för att använda sådana verktyg. Om du vill använda dessa finesser så kontakta din leverantörs tekniska support och be dem installera utökningarna för «GD» eller «Imagick».</i>', # MODIF
244
+    'info_informations_personnelles' => 'Personlig information',
245
+    'info_inscription_automatique' => 'Automatisk registreing av nya redaktörer',
246
+    'info_jeu_caractere' => 'Sajtens teckenuppsättning',
247
+    'info_jours' => 'dagar',
248
+    'info_laisser_champs_vides' => 'Lämna dessa fält tomma)',
249
+    'info_langues' => 'Sajtens språk',
250
+    'info_lien_hypertexte' => 'Hyperlänk:',
251
+    'info_liste_redacteurs_connectes' => 'Inlogggade redaktörer',
252
+    'info_login_existant' => 'Användarnamnet finns redan.',
253
+    'info_login_trop_court' => 'Användarnamnet är för kort.',
254
+    'info_logos' => 'Logotyperna',
255
+    'info_maximum' => 'maximum:',
256
+    'info_meme_rubrique' => 'I samma avdelning',
257
+    'info_message_en_redaction' => 'utkorg',
258
+    'info_message_technique' => 'Tekniskt meddelande:',
259
+    'info_messagerie_interne' => 'Internmeddelande',
260
+    'info_mise_a_niveau_base' => 'SQL database upgradering',
261
+    'info_mise_a_niveau_base_2' => '{{Warning!}} Du har installerat {äldre} 
262 262
   SPIP filer än de som redan
263 263
   varit installerade på sajten: Du riskerar att förlora databasen
264 264
   och ha en sajt som inte längre fungerar.<br />{{återinstallera
265 265
   SPIP filerna.}}',
266
-	'info_modifier_auteur' => 'Editera detaljer för redaktören:',
267
-	'info_modifier_rubrique' => 'Editera avdelningen:',
268
-	'info_modifier_titre' => 'Editera: @titre@',
269
-	'info_mon_site_spip' => 'Min SPIP-sajt',
270
-	'info_moyenne' => 'genomsnitt:',
271
-	'info_multi_cet_article' => 'Den här artikelns språk:',
272
-	'info_multi_langues_choisies' => 'Var vänlig, välj tillgängliga språk för redaktörerna bland språken nedan.
266
+    'info_modifier_auteur' => 'Editera detaljer för redaktören:',
267
+    'info_modifier_rubrique' => 'Editera avdelningen:',
268
+    'info_modifier_titre' => 'Editera: @titre@',
269
+    'info_mon_site_spip' => 'Min SPIP-sajt',
270
+    'info_moyenne' => 'genomsnitt:',
271
+    'info_multi_cet_article' => 'Den här artikelns språk:',
272
+    'info_multi_langues_choisies' => 'Var vänlig, välj tillgängliga språk för redaktörerna bland språken nedan.
273 273
   Språk som redan används på din sajt (högst upp på listan) kan inte avaktiveras.',
274
-	'info_multi_secteurs' => '... bara för avdelningarna i roten?',
275
-	'info_nom' => 'Namn',
276
-	'info_nom_destinataire' => 'Mottagarens namn',
277
-	'info_nom_site' => 'Din sajts namn',
278
-	'info_nombre_articles' => '@nb_articles@ artiklar,',
279
-	'info_nombre_rubriques' => '@nb_rubriques@ avdelningar,',
280
-	'info_nombre_sites' => '@nb_sites@ sajter,',
281
-	'info_non_deplacer' => 'Flytta inte...',
282
-	'info_non_envoi_liste_nouveautes' => 'Skicka inte listan med senaste nyheterna',
283
-	'info_non_modifiable' => 'kan inte förändras',
284
-	'info_non_suppression_mot_cle' => 'Jag vill inte radera nyckelordet.',
285
-	'info_notes' => 'Fotnoter',
286
-	'info_nouvel_article' => 'Ny artikel',
287
-	'info_nouvelle_traduction' => 'Ny översättning:',
288
-	'info_numero_article' => 'ARTIKEL NUMMER:',
289
-	'info_obligatoire_02' => '[Krävs]', # MODIF
290
-	'info_option_accepter_visiteurs' => 'Tillåt besökare registrera sig på den publika delen',
291
-	'info_option_ne_pas_accepter_visiteurs' => 'Avvisa besökarregistrering',
292
-	'info_options_avancees' => 'AVANCERADE INSTÄLLNINGAR',
293
-	'info_ou' => 'eller...',
294
-	'info_page_interdite' => 'Förbjuden sida',
295
-	'info_par_nom' => 'efter namn',
296
-	'info_par_nombre_article' => 'efter antal artiklar',
297
-	'info_par_statut' => 'efter status',
298
-	'info_par_tri' => '’(efter @tri@)’',
299
-	'info_passe_trop_court' => 'lösenordet är för kort.',
300
-	'info_passes_identiques' => 'De två lösenorden är inte identiska.',
301
-	'info_plus_cinq_car' => 'mer än 5 tecken',
302
-	'info_plus_cinq_car_2' => '(Mer än 5 tecken)',
303
-	'info_plus_trois_car' => '(Mer än 3 tecken)',
304
-	'info_popularite' => 'popularitet: @popularite@; besök: @visites@',
305
-	'info_post_scriptum' => 'Postscript',
306
-	'info_post_scriptum_2' => 'PS:',
307
-	'info_pour' => 'för',
308
-	'info_procedez_par_etape' => 'Var vänlig, fortsätt steg för steg',
309
-	'info_procedure_maj_version' => 'Uppdateringsproceduren skall köras för att
274
+    'info_multi_secteurs' => '... bara för avdelningarna i roten?',
275
+    'info_nom' => 'Namn',
276
+    'info_nom_destinataire' => 'Mottagarens namn',
277
+    'info_nom_site' => 'Din sajts namn',
278
+    'info_nombre_articles' => '@nb_articles@ artiklar,',
279
+    'info_nombre_rubriques' => '@nb_rubriques@ avdelningar,',
280
+    'info_nombre_sites' => '@nb_sites@ sajter,',
281
+    'info_non_deplacer' => 'Flytta inte...',
282
+    'info_non_envoi_liste_nouveautes' => 'Skicka inte listan med senaste nyheterna',
283
+    'info_non_modifiable' => 'kan inte förändras',
284
+    'info_non_suppression_mot_cle' => 'Jag vill inte radera nyckelordet.',
285
+    'info_notes' => 'Fotnoter',
286
+    'info_nouvel_article' => 'Ny artikel',
287
+    'info_nouvelle_traduction' => 'Ny översättning:',
288
+    'info_numero_article' => 'ARTIKEL NUMMER:',
289
+    'info_obligatoire_02' => '[Krävs]', # MODIF
290
+    'info_option_accepter_visiteurs' => 'Tillåt besökare registrera sig på den publika delen',
291
+    'info_option_ne_pas_accepter_visiteurs' => 'Avvisa besökarregistrering',
292
+    'info_options_avancees' => 'AVANCERADE INSTÄLLNINGAR',
293
+    'info_ou' => 'eller...',
294
+    'info_page_interdite' => 'Förbjuden sida',
295
+    'info_par_nom' => 'efter namn',
296
+    'info_par_nombre_article' => 'efter antal artiklar',
297
+    'info_par_statut' => 'efter status',
298
+    'info_par_tri' => '’(efter @tri@)’',
299
+    'info_passe_trop_court' => 'lösenordet är för kort.',
300
+    'info_passes_identiques' => 'De två lösenorden är inte identiska.',
301
+    'info_plus_cinq_car' => 'mer än 5 tecken',
302
+    'info_plus_cinq_car_2' => '(Mer än 5 tecken)',
303
+    'info_plus_trois_car' => '(Mer än 3 tecken)',
304
+    'info_popularite' => 'popularitet: @popularite@; besök: @visites@',
305
+    'info_post_scriptum' => 'Postscript',
306
+    'info_post_scriptum_2' => 'PS:',
307
+    'info_pour' => 'för',
308
+    'info_procedez_par_etape' => 'Var vänlig, fortsätt steg för steg',
309
+    'info_procedure_maj_version' => 'Uppdateringsproceduren skall köras för att
310 310
  anpassa databasen till den nya versionen av SPIP.',
311
-	'info_proxy_ok' => 'Testen av proxy lyckades.',
312
-	'info_ps' => 'P.S.',
313
-	'info_publier' => 'publicera',
314
-	'info_publies' => 'Dina onlinepublicerade artiklar',
315
-	'info_question_accepter_visiteurs' => 'Om sajtens template tillåter besökare att registrera sig utan att gå in i den privata delen, var vänlig och aktivera följande option:',
316
-	'info_racine_site' => 'Sajtens bas',
317
-	'info_recharger_page' => 'Var vänlig och uppdatera sidan om en liten stund.',
318
-	'info_recherche_auteur_zero' => 'Inga resultat hittades för "@cherche_auteur@".',
319
-	'info_recommencer' => 'Var vänlig och försök igen.',
320
-	'info_redacteur_1' => 'Redaktör',
321
-	'info_redacteur_2' => 'för tillgång till den privata delen (<i>rekommenderas</i>)',
322
-	'info_redacteurs' => 'Redaktörer',
323
-	'info_redaction_en_cours' => 'UNDER ARBETE',
324
-	'info_redirection' => 'Ompekning',
325
-	'info_refuses' => 'Refuserade artiklar',
326
-	'info_reglage_ldap' => 'inställningar: <b>anpassar LDAP import</b>',
327
-	'info_renvoi_article' => '<b>Ompekning.</b> Den här artikeln pekar om till:',
328
-	'info_reserve_admin' => 'Enbart administratörer kan förändra adressen.',
329
-	'info_restreindre_rubrique' => 'Begränsa administrationen till avdelningen:',
330
-	'info_resultat_recherche' => 'Sökresultat:',
331
-	'info_rubriques' => 'Avdelningar',
332
-	'info_rubriques_02' => 'avdelningar',
333
-	'info_rubriques_trouvees' => 'Hittade avdelningar',
334
-	'info_sans_titre' => 'Utan titel',
335
-	'info_selection_chemin_acces' => '<b>Välj</b> åtkomstväg i katalogen:',
336
-	'info_signatures' => 'underskrifter',
337
-	'info_site' => 'Sajt',
338
-	'info_site_2' => 'sajt:',
339
-	'info_site_min' => 'sajt',
340
-	'info_site_reference_2' => 'Länkad sajt',
341
-	'info_site_web' => 'WEBBSAJT:', # MODIF
342
-	'info_sites' => 'sajter',
343
-	'info_sites_lies_mot' => 'Länkade sajter knutna till detta nyckelord',
344
-	'info_sites_proxy' => 'Använder en proxy',
345
-	'info_sites_trouves' => 'Hittade sajter',
346
-	'info_sous_titre' => 'Undertitel:',
347
-	'info_statut_administrateur' => 'Administratör',
348
-	'info_statut_auteur' => 'Redaktörens status:', # MODIF
349
-	'info_statut_auteur_a_confirmer' => 'Registreringar som skall godkännas',
350
-	'info_statut_auteur_autre' => 'Annan status:',
351
-	'info_statut_redacteur' => 'Redaktör',
352
-	'info_statut_utilisateurs_1' => 'Startinställningar för importerade användare',
353
-	'info_suivi_activite' => 'Följ upp aktiviteten på sajten',
354
-	'info_surtitre' => 'Övertitel:',
355
-	'info_syndication_integrale_1' => 'Din sajt publiceras RSS-filer för syndikering (Se “<a href="@url@">@titre@</a>”).',
356
-	'info_syndication_integrale_2' => 'Vill du skicka hela artiklar eller bara en sammanfattning på ett par hundra tecken?',
357
-	'info_table_prefix' => 'Det är möjligt att byta prefix i databastabellernas namn. (Du behöver göra det om di installerar flera sajter i samma databas). Prefixet måste skrivas utan accenter, med versaler utan mellanslag.',
358
-	'info_taille_maximale_vignette' => 'Maximal storlek på miniatyrer som skapats av systemet:',
359
-	'info_terminer_installation' => 'Du kan nu avsluta installationsprocessen.',
360
-	'info_texte' => 'Text',
361
-	'info_texte_explicatif' => 'Förklarande text',
362
-	'info_texte_long' => '(Texten är lång: Den kommer att synas i flera delar som sedan sammanfogas efter validering.)',
363
-	'info_texte_message' => 'Texten i ditt meddelande:', # MODIF
364
-	'info_texte_message_02' => 'Texten i ditt meddelande',
365
-	'info_titre' => 'Titel:',
366
-	'info_total' => 'total:',
367
-	'info_tous_articles_en_redaction' => 'Alla artiklar under arbete',
368
-	'info_tous_articles_presents' => 'Alla artiklar som publicerats i den här avdelningen',
369
-	'info_tous_les' => 'alla:',
370
-	'info_tout_site' => 'Hela sajten',
371
-	'info_tout_site2' => 'Artikeln har inte blivit översatt till det här språket.',
372
-	'info_tout_site3' => 'Artikeln har blivit översatt till det hör språket men vissa förändringar har gjorts senare i orginalartikeln. Översättningen behöver uppdateras.',
373
-	'info_tout_site4' => 'Artikeln har blivit översatt till det här språket och översättningen är aktuell.',
374
-	'info_tout_site5' => 'Orginalartikeln.',
375
-	'info_tout_site6' => '<b>OBS:</b> bara orginalartiklarna visas.
311
+    'info_proxy_ok' => 'Testen av proxy lyckades.',
312
+    'info_ps' => 'P.S.',
313
+    'info_publier' => 'publicera',
314
+    'info_publies' => 'Dina onlinepublicerade artiklar',
315
+    'info_question_accepter_visiteurs' => 'Om sajtens template tillåter besökare att registrera sig utan att gå in i den privata delen, var vänlig och aktivera följande option:',
316
+    'info_racine_site' => 'Sajtens bas',
317
+    'info_recharger_page' => 'Var vänlig och uppdatera sidan om en liten stund.',
318
+    'info_recherche_auteur_zero' => 'Inga resultat hittades för "@cherche_auteur@".',
319
+    'info_recommencer' => 'Var vänlig och försök igen.',
320
+    'info_redacteur_1' => 'Redaktör',
321
+    'info_redacteur_2' => 'för tillgång till den privata delen (<i>rekommenderas</i>)',
322
+    'info_redacteurs' => 'Redaktörer',
323
+    'info_redaction_en_cours' => 'UNDER ARBETE',
324
+    'info_redirection' => 'Ompekning',
325
+    'info_refuses' => 'Refuserade artiklar',
326
+    'info_reglage_ldap' => 'inställningar: <b>anpassar LDAP import</b>',
327
+    'info_renvoi_article' => '<b>Ompekning.</b> Den här artikeln pekar om till:',
328
+    'info_reserve_admin' => 'Enbart administratörer kan förändra adressen.',
329
+    'info_restreindre_rubrique' => 'Begränsa administrationen till avdelningen:',
330
+    'info_resultat_recherche' => 'Sökresultat:',
331
+    'info_rubriques' => 'Avdelningar',
332
+    'info_rubriques_02' => 'avdelningar',
333
+    'info_rubriques_trouvees' => 'Hittade avdelningar',
334
+    'info_sans_titre' => 'Utan titel',
335
+    'info_selection_chemin_acces' => '<b>Välj</b> åtkomstväg i katalogen:',
336
+    'info_signatures' => 'underskrifter',
337
+    'info_site' => 'Sajt',
338
+    'info_site_2' => 'sajt:',
339
+    'info_site_min' => 'sajt',
340
+    'info_site_reference_2' => 'Länkad sajt',
341
+    'info_site_web' => 'WEBBSAJT:', # MODIF
342
+    'info_sites' => 'sajter',
343
+    'info_sites_lies_mot' => 'Länkade sajter knutna till detta nyckelord',
344
+    'info_sites_proxy' => 'Använder en proxy',
345
+    'info_sites_trouves' => 'Hittade sajter',
346
+    'info_sous_titre' => 'Undertitel:',
347
+    'info_statut_administrateur' => 'Administratör',
348
+    'info_statut_auteur' => 'Redaktörens status:', # MODIF
349
+    'info_statut_auteur_a_confirmer' => 'Registreringar som skall godkännas',
350
+    'info_statut_auteur_autre' => 'Annan status:',
351
+    'info_statut_redacteur' => 'Redaktör',
352
+    'info_statut_utilisateurs_1' => 'Startinställningar för importerade användare',
353
+    'info_suivi_activite' => 'Följ upp aktiviteten på sajten',
354
+    'info_surtitre' => 'Övertitel:',
355
+    'info_syndication_integrale_1' => 'Din sajt publiceras RSS-filer för syndikering (Se “<a href="@url@">@titre@</a>”).',
356
+    'info_syndication_integrale_2' => 'Vill du skicka hela artiklar eller bara en sammanfattning på ett par hundra tecken?',
357
+    'info_table_prefix' => 'Det är möjligt att byta prefix i databastabellernas namn. (Du behöver göra det om di installerar flera sajter i samma databas). Prefixet måste skrivas utan accenter, med versaler utan mellanslag.',
358
+    'info_taille_maximale_vignette' => 'Maximal storlek på miniatyrer som skapats av systemet:',
359
+    'info_terminer_installation' => 'Du kan nu avsluta installationsprocessen.',
360
+    'info_texte' => 'Text',
361
+    'info_texte_explicatif' => 'Förklarande text',
362
+    'info_texte_long' => '(Texten är lång: Den kommer att synas i flera delar som sedan sammanfogas efter validering.)',
363
+    'info_texte_message' => 'Texten i ditt meddelande:', # MODIF
364
+    'info_texte_message_02' => 'Texten i ditt meddelande',
365
+    'info_titre' => 'Titel:',
366
+    'info_total' => 'total:',
367
+    'info_tous_articles_en_redaction' => 'Alla artiklar under arbete',
368
+    'info_tous_articles_presents' => 'Alla artiklar som publicerats i den här avdelningen',
369
+    'info_tous_les' => 'alla:',
370
+    'info_tout_site' => 'Hela sajten',
371
+    'info_tout_site2' => 'Artikeln har inte blivit översatt till det här språket.',
372
+    'info_tout_site3' => 'Artikeln har blivit översatt till det hör språket men vissa förändringar har gjorts senare i orginalartikeln. Översättningen behöver uppdateras.',
373
+    'info_tout_site4' => 'Artikeln har blivit översatt till det här språket och översättningen är aktuell.',
374
+    'info_tout_site5' => 'Orginalartikeln.',
375
+    'info_tout_site6' => '<b>OBS:</b> bara orginalartiklarna visas.
376 376
 Översättningarna är länkade till orginalet
377 377
 med en färg som visar deras status:',
378
-	'info_travail_colaboratif' => 'Gemensamt arbete på artiklar',
379
-	'info_un_article' => 'en artikel,',
380
-	'info_un_site' => 'En sajt,',
381
-	'info_une_rubrique' => 'en avdelning,',
382
-	'info_une_rubrique_02' => '1 avdelning',
383
-	'info_url' => 'URL:',
384
-	'info_urlref' => 'Hyperlänk:',
385
-	'info_utilisation_spip' => 'SPIP är nu färdig att användas..',
386
-	'info_visites_par_mois' => 'Besökare per månad:',
387
-	'info_visiteur_1' => 'Besökare',
388
-	'info_visiteur_2' => 'på den publika delen',
389
-	'info_visiteurs' => 'Besökare',
390
-	'info_visiteurs_02' => 'Beökare på den publika delen',
391
-	'install_adresse_base_hebergeur' => 'Databasadress tillhandahållen av webbhotellet',
392
-	'install_echec_annonce' => 'Den här installationen kommer förmodligen inte att fungera, alternativt resulterar den i en sajt med reducerad funktionalitet ...',
393
-	'install_extension_mbstring' => 'SPIP fungerar inte med:',
394
-	'install_extension_php_obligatoire' => 'SPIP kräver ett tillägg till php:',
395
-	'install_login_base_hebergeur' => 'Login tilldelat av leverantören',
396
-	'install_nom_base_hebergeur' => 'Databasnamn tilldelat av leverantören:',
397
-	'install_pas_table' => 'Databasen har inga tabeller',
398
-	'install_pass_base_hebergeur' => 'Lösenord till databasen tilldelat av leverantören',
399
-	'install_php_version' => 'Versionen av PHP, @version@ är för gammal (minimum = @minimum@)',
400
-	'install_select_langue' => 'Välj ett språk, klicka sedan på knappen "fortsätt" för att starta installationen.',
401
-	'install_select_type_db' => 'Välj typ av databas :',
402
-	'install_select_type_mysql' => 'MySQL',
403
-	'install_select_type_sqlite2' => 'SQLite 2',
404
-	'install_select_type_sqlite3' => 'SQLite 3',
405
-	'install_tables_base' => 'Databasens tabeller',
406
-	'intem_redacteur' => 'redaktör',
407
-	'intitule_licence' => 'Licens',
408
-	'item_accepter_inscriptions' => 'Tillåt registreringar',
409
-	'item_activer_messages_avertissement' => 'Aktivera varningsmeddelanden',
410
-	'item_administrateur_2' => 'administratör',
411
-	'item_afficher_calendrier' => 'Visa i kalendern',
412
-	'item_autoriser_syndication_integrale' => 'Inkludera hela artiklar i syndikeringsfilerna',
413
-	'item_choix_administrateurs' => 'administratörer',
414
-	'item_choix_generation_miniature' => 'Generera miniatyrer automatiskt.',
415
-	'item_choix_non_generation_miniature' => 'Generera inte miniatyrer.',
416
-	'item_choix_redacteurs' => 'redaktörer',
417
-	'item_choix_visiteurs' => 'besökare till den publika delen',
418
-	'item_creer_fichiers_authent' => 'Skapa .htpasswd filer',
419
-	'item_login' => 'Login',
420
-	'item_messagerie_agenda' => 'Aktivera meddelandesystemet och kalendern',
421
-	'item_mots_cles_association_articles' => 'artiklar',
422
-	'item_mots_cles_association_rubriques' => 'avdelningar',
423
-	'item_mots_cles_association_sites' => 'länkade eller syndikerade sajter.',
424
-	'item_non' => 'Nej',
425
-	'item_non_accepter_inscriptions' => 'Tillåt inte registreringar',
426
-	'item_non_activer_messages_avertissement' => 'Inga varningsmeddelanden',
427
-	'item_non_afficher_calendrier' => 'Visa inte i kalendern',
428
-	'item_non_autoriser_syndication_integrale' => 'Skicka bara en sammanfattning',
429
-	'item_non_creer_fichiers_authent' => 'Skapa inte dessa filer',
430
-	'item_non_messagerie_agenda' => 'Avaktivera meddelandesystemet och kalendern',
431
-	'item_non_publier_articles' => 'Publicera inte artiklar innan deras publiceringsdatum.',
432
-	'item_nouvel_auteur' => 'Ny redaktör',
433
-	'item_nouvelle_rubrique' => 'Ny avdelning',
434
-	'item_oui' => 'Ja',
435
-	'item_publier_articles' => 'Publicera artiklarna utan att ta hänsyn till publiceringsdatum.',
436
-	'item_reponse_article' => 'Svara på artikeln',
437
-	'item_visiteur' => 'besökare',
378
+    'info_travail_colaboratif' => 'Gemensamt arbete på artiklar',
379
+    'info_un_article' => 'en artikel,',
380
+    'info_un_site' => 'En sajt,',
381
+    'info_une_rubrique' => 'en avdelning,',
382
+    'info_une_rubrique_02' => '1 avdelning',
383
+    'info_url' => 'URL:',
384
+    'info_urlref' => 'Hyperlänk:',
385
+    'info_utilisation_spip' => 'SPIP är nu färdig att användas..',
386
+    'info_visites_par_mois' => 'Besökare per månad:',
387
+    'info_visiteur_1' => 'Besökare',
388
+    'info_visiteur_2' => 'på den publika delen',
389
+    'info_visiteurs' => 'Besökare',
390
+    'info_visiteurs_02' => 'Beökare på den publika delen',
391
+    'install_adresse_base_hebergeur' => 'Databasadress tillhandahållen av webbhotellet',
392
+    'install_echec_annonce' => 'Den här installationen kommer förmodligen inte att fungera, alternativt resulterar den i en sajt med reducerad funktionalitet ...',
393
+    'install_extension_mbstring' => 'SPIP fungerar inte med:',
394
+    'install_extension_php_obligatoire' => 'SPIP kräver ett tillägg till php:',
395
+    'install_login_base_hebergeur' => 'Login tilldelat av leverantören',
396
+    'install_nom_base_hebergeur' => 'Databasnamn tilldelat av leverantören:',
397
+    'install_pas_table' => 'Databasen har inga tabeller',
398
+    'install_pass_base_hebergeur' => 'Lösenord till databasen tilldelat av leverantören',
399
+    'install_php_version' => 'Versionen av PHP, @version@ är för gammal (minimum = @minimum@)',
400
+    'install_select_langue' => 'Välj ett språk, klicka sedan på knappen "fortsätt" för att starta installationen.',
401
+    'install_select_type_db' => 'Välj typ av databas :',
402
+    'install_select_type_mysql' => 'MySQL',
403
+    'install_select_type_sqlite2' => 'SQLite 2',
404
+    'install_select_type_sqlite3' => 'SQLite 3',
405
+    'install_tables_base' => 'Databasens tabeller',
406
+    'intem_redacteur' => 'redaktör',
407
+    'intitule_licence' => 'Licens',
408
+    'item_accepter_inscriptions' => 'Tillåt registreringar',
409
+    'item_activer_messages_avertissement' => 'Aktivera varningsmeddelanden',
410
+    'item_administrateur_2' => 'administratör',
411
+    'item_afficher_calendrier' => 'Visa i kalendern',
412
+    'item_autoriser_syndication_integrale' => 'Inkludera hela artiklar i syndikeringsfilerna',
413
+    'item_choix_administrateurs' => 'administratörer',
414
+    'item_choix_generation_miniature' => 'Generera miniatyrer automatiskt.',
415
+    'item_choix_non_generation_miniature' => 'Generera inte miniatyrer.',
416
+    'item_choix_redacteurs' => 'redaktörer',
417
+    'item_choix_visiteurs' => 'besökare till den publika delen',
418
+    'item_creer_fichiers_authent' => 'Skapa .htpasswd filer',
419
+    'item_login' => 'Login',
420
+    'item_messagerie_agenda' => 'Aktivera meddelandesystemet och kalendern',
421
+    'item_mots_cles_association_articles' => 'artiklar',
422
+    'item_mots_cles_association_rubriques' => 'avdelningar',
423
+    'item_mots_cles_association_sites' => 'länkade eller syndikerade sajter.',
424
+    'item_non' => 'Nej',
425
+    'item_non_accepter_inscriptions' => 'Tillåt inte registreringar',
426
+    'item_non_activer_messages_avertissement' => 'Inga varningsmeddelanden',
427
+    'item_non_afficher_calendrier' => 'Visa inte i kalendern',
428
+    'item_non_autoriser_syndication_integrale' => 'Skicka bara en sammanfattning',
429
+    'item_non_creer_fichiers_authent' => 'Skapa inte dessa filer',
430
+    'item_non_messagerie_agenda' => 'Avaktivera meddelandesystemet och kalendern',
431
+    'item_non_publier_articles' => 'Publicera inte artiklar innan deras publiceringsdatum.',
432
+    'item_nouvel_auteur' => 'Ny redaktör',
433
+    'item_nouvelle_rubrique' => 'Ny avdelning',
434
+    'item_oui' => 'Ja',
435
+    'item_publier_articles' => 'Publicera artiklarna utan att ta hänsyn till publiceringsdatum.',
436
+    'item_reponse_article' => 'Svara på artikeln',
437
+    'item_visiteur' => 'besökare',
438 438
 
439
-	// J
440
-	'jour_non_connu_nc' => 'okänd',
439
+    // J
440
+    'jour_non_connu_nc' => 'okänd',
441 441
 
442
-	// L
443
-	'lien_ajouter_auteur' => 'Lätt till redaktören',
444
-	'lien_email' => 'e-post',
445
-	'lien_nom_site' => 'SAJTENS NAMN:',
446
-	'lien_retirer_auteur' => 'Ta bort redaktören',
447
-	'lien_site' => 'sajt',
448
-	'lien_tout_deplier' => 'Expandera alla',
449
-	'lien_tout_replier' => 'Kollapsa alla',
450
-	'lien_tout_supprimer' => 'Radera alla',
451
-	'lien_trier_nom' => 'Sortera efter namn',
452
-	'lien_trier_nombre_articles' => 'Sortera efter artikelnummer',
453
-	'lien_trier_statut' => 'Sortera efter status',
454
-	'lien_voir_en_ligne' => 'SE ONLINE:',
455
-	'logo_article' => 'ARTIKELNS LOGOTYPE', # MODIF
456
-	'logo_auteur' => 'REDAKTÖRENS LOGOTYPE', # MODIF
457
-	'logo_rubrique' => 'Avdelningens logotype', # MODIF
458
-	'logo_site' => 'SAJTENS LOGOTYPE', # MODIF
459
-	'logo_standard_rubrique' => 'STANDARDLOGOTYPE FÖR AVDELNINGAR', # MODIF
460
-	'logo_survol' => 'LOGOTYPE FÖR MUS-ÖVER', # MODIF
442
+    // L
443
+    'lien_ajouter_auteur' => 'Lätt till redaktören',
444
+    'lien_email' => 'e-post',
445
+    'lien_nom_site' => 'SAJTENS NAMN:',
446
+    'lien_retirer_auteur' => 'Ta bort redaktören',
447
+    'lien_site' => 'sajt',
448
+    'lien_tout_deplier' => 'Expandera alla',
449
+    'lien_tout_replier' => 'Kollapsa alla',
450
+    'lien_tout_supprimer' => 'Radera alla',
451
+    'lien_trier_nom' => 'Sortera efter namn',
452
+    'lien_trier_nombre_articles' => 'Sortera efter artikelnummer',
453
+    'lien_trier_statut' => 'Sortera efter status',
454
+    'lien_voir_en_ligne' => 'SE ONLINE:',
455
+    'logo_article' => 'ARTIKELNS LOGOTYPE', # MODIF
456
+    'logo_auteur' => 'REDAKTÖRENS LOGOTYPE', # MODIF
457
+    'logo_rubrique' => 'Avdelningens logotype', # MODIF
458
+    'logo_site' => 'SAJTENS LOGOTYPE', # MODIF
459
+    'logo_standard_rubrique' => 'STANDARDLOGOTYPE FÖR AVDELNINGAR', # MODIF
460
+    'logo_survol' => 'LOGOTYPE FÖR MUS-ÖVER', # MODIF
461 461
 
462
-	// M
463
-	'menu_aide_installation_choix_base' => 'Välj din databas',
464
-	'module_fichier_langue' => 'Språkfiler',
465
-	'module_raccourci' => 'Genväg',
466
-	'module_texte_affiche' => 'Visad text',
467
-	'module_texte_traduction' => 'Språkfilen « @module@ » finns i:',
462
+    // M
463
+    'menu_aide_installation_choix_base' => 'Välj din databas',
464
+    'module_fichier_langue' => 'Språkfiler',
465
+    'module_raccourci' => 'Genväg',
466
+    'module_texte_affiche' => 'Visad text',
467
+    'module_texte_traduction' => 'Språkfilen « @module@ » finns i:',
468 468
 
469
-	// O
470
-	'onglet_contenu' => 'Innehåll',
471
-	'onglet_declarer_une_autre_base' => 'Ange en annan databas',
472
-	'onglet_discuter' => 'Diskutera',
473
-	'onglet_interactivite' => 'Interaktivitet',
474
-	'onglet_proprietes' => 'Egenskaper',
475
-	'onglet_repartition_actuelle' => 'nu',
469
+    // O
470
+    'onglet_contenu' => 'Innehåll',
471
+    'onglet_declarer_une_autre_base' => 'Ange en annan databas',
472
+    'onglet_discuter' => 'Diskutera',
473
+    'onglet_interactivite' => 'Interaktivitet',
474
+    'onglet_proprietes' => 'Egenskaper',
475
+    'onglet_repartition_actuelle' => 'nu',
476 476
 
477
-	// P
478
-	'plugin_etat_developpement' => 'Under utveckling',
479
-	'plugin_etat_experimental' => 'exprimentell',
480
-	'plugin_etat_stable' => 'Stabil',
481
-	'plugin_etat_test' => 'under test',
482
-	'plugin_impossible_activer' => 'Omöjligt att aktivera pluginen @plugin@',
483
-	'plugin_necessite_plugin' => 'Version @version@ eller nyare av pluginen @plugin@ krävs.', # MODIF
484
-	'plugin_zip_active' => 'Fortsätt för att aktivera',
485
-	'plugin_zip_installe_finie' => 'Filen @zip@ har packats upp och installerats.',
486
-	'plugin_zip_installe_rep_finie' => 'Filen @zip@ har packats upp och installerats i katalogen @rep@',
487
-	'plugin_zip_installer' => 'Du kan installera nu.',
488
-	'plugins_actifs' => '@count@ aktiva plugins.',
489
-	'plugins_compte' => '@count@ plugins',
490
-	'plugins_disponibles' => '@count@ tillgängliga plugins.',
491
-	'plugins_erreur' => 'Fel i följande plugin: @plugins@',
492
-	'plugins_liste' => 'Lista över plugins',
477
+    // P
478
+    'plugin_etat_developpement' => 'Under utveckling',
479
+    'plugin_etat_experimental' => 'exprimentell',
480
+    'plugin_etat_stable' => 'Stabil',
481
+    'plugin_etat_test' => 'under test',
482
+    'plugin_impossible_activer' => 'Omöjligt att aktivera pluginen @plugin@',
483
+    'plugin_necessite_plugin' => 'Version @version@ eller nyare av pluginen @plugin@ krävs.', # MODIF
484
+    'plugin_zip_active' => 'Fortsätt för att aktivera',
485
+    'plugin_zip_installe_finie' => 'Filen @zip@ har packats upp och installerats.',
486
+    'plugin_zip_installe_rep_finie' => 'Filen @zip@ har packats upp och installerats i katalogen @rep@',
487
+    'plugin_zip_installer' => 'Du kan installera nu.',
488
+    'plugins_actifs' => '@count@ aktiva plugins.',
489
+    'plugins_compte' => '@count@ plugins',
490
+    'plugins_disponibles' => '@count@ tillgängliga plugins.',
491
+    'plugins_erreur' => 'Fel i följande plugin: @plugins@',
492
+    'plugins_liste' => 'Lista över plugins',
493 493
 
494
-	// R
495
-	'required' => '[Krävs]', # MODIF
494
+    // R
495
+    'required' => '[Krävs]', # MODIF
496 496
 
497
-	// T
498
-	'taille_cache_vide' => 'Cachen är tom.',
499
-	'text_article_propose_publication' => 'Artikel inlämnad för publicering. tveka inte att säga din mening i forumet längst ned på sidan.', # MODIF
500
-	'texte_admin_effacer_01' => 'Detta kommando raderar <i>all</i> information i databasen,
497
+    // T
498
+    'taille_cache_vide' => 'Cachen är tom.',
499
+    'text_article_propose_publication' => 'Artikel inlämnad för publicering. tveka inte att säga din mening i forumet längst ned på sidan.', # MODIF
500
+    'texte_admin_effacer_01' => 'Detta kommando raderar <i>all</i> information i databasen,
501 501
 inklusive <i>alla</i> uppgifter om användare. Efter att du använt det, måste du 
502 502
 installera om SPIP för att skapa en ny databas och den första administratören.',
503
-	'texte_adresse_annuaire_1' => '( Om din katalog är installerad på samma dator som din websajt, är det troligen «localhost».)',
504
-	'texte_ajout_auteur' => 'Följande redaktör lades till artikeln:',
505
-	'texte_annuaire_ldap_1' => 'Om du har tillgång till en LDAP-katalog kan du använda den för att importera användare till SPIP.',
506
-	'texte_article_statut' => 'Artikelns status:',
507
-	'texte_article_virtuel' => 'Virtuell artikel',
508
-	'texte_article_virtuel_reference' => '<b>Virtuell Artikel:</b> länkad artikel i din SPIP site, men ompekad till en annan URL. För att ta bort ompekningen, radera denna URL.',
509
-	'texte_aucun_resultat_auteur' => 'Inga resultat för "@cherche_auteur@".',
510
-	'texte_auteurs' => 'REDAKTÖRERNA',
511
-	'texte_choix_base_1' => 'Välj din databas:',
512
-	'texte_choix_base_2' => 'Databasservern innehåller flera databaser.',
513
-	'texte_choix_base_3' => '<b>Välj</b> den som din leverantör har gett dig:',
514
-	'texte_choix_table_prefix' => 'Prefix för tabeller:',
515
-	'texte_compte_element' => '@count@ objekt',
516
-	'texte_compte_elements' => '@count@ element',
517
-	'texte_jeu_caractere_3' => 'Din sajt använder följande teckenuppsättning:',
518
-	'texte_mise_a_niveau_base_1' => 'Du har just uppdaterat filerna i SPIP.
503
+    'texte_adresse_annuaire_1' => '( Om din katalog är installerad på samma dator som din websajt, är det troligen «localhost».)',
504
+    'texte_ajout_auteur' => 'Följande redaktör lades till artikeln:',
505
+    'texte_annuaire_ldap_1' => 'Om du har tillgång till en LDAP-katalog kan du använda den för att importera användare till SPIP.',
506
+    'texte_article_statut' => 'Artikelns status:',
507
+    'texte_article_virtuel' => 'Virtuell artikel',
508
+    'texte_article_virtuel_reference' => '<b>Virtuell Artikel:</b> länkad artikel i din SPIP site, men ompekad till en annan URL. För att ta bort ompekningen, radera denna URL.',
509
+    'texte_aucun_resultat_auteur' => 'Inga resultat för "@cherche_auteur@".',
510
+    'texte_auteurs' => 'REDAKTÖRERNA',
511
+    'texte_choix_base_1' => 'Välj din databas:',
512
+    'texte_choix_base_2' => 'Databasservern innehåller flera databaser.',
513
+    'texte_choix_base_3' => '<b>Välj</b> den som din leverantör har gett dig:',
514
+    'texte_choix_table_prefix' => 'Prefix för tabeller:',
515
+    'texte_compte_element' => '@count@ objekt',
516
+    'texte_compte_elements' => '@count@ element',
517
+    'texte_jeu_caractere_3' => 'Din sajt använder följande teckenuppsättning:',
518
+    'texte_mise_a_niveau_base_1' => 'Du har just uppdaterat filerna i SPIP.
519 519
  Nu måste du uppgradera sajtens databas.',
520
-	'texte_modifier_article' => 'Redigera artikeln:',
521
-	'texte_multilinguisme' => 'Om du vill hantera artiklar på flera språk, med en avancerad navigering, kan du lägga till en option för språkval i artiklar och avdelningar, i enlighet med sajtens struktur.', # MODIF
522
-	'texte_multilinguisme_trad' => 'Dessutom kan du aktivera ett system för länkhantering av de olika översättningarna av en artikel.', # MODIF
523
-	'texte_non_compresse' => '<i>okomprimerad</i> (din server stöder inte denna funktion)',
524
-	'texte_nouvelle_version_spip_1' => 'Du har installerat en ny version av SPIP.',
525
-	'texte_plus_trois_car' => 'mer än tre tecken',
526
-	'texte_plusieurs_articles' => 'Flera redaktörer hittades för  "@cherche_auteur@":',
527
-	'texte_recalcul_page' => 'Om du vill uppdatera
520
+    'texte_modifier_article' => 'Redigera artikeln:',
521
+    'texte_multilinguisme' => 'Om du vill hantera artiklar på flera språk, med en avancerad navigering, kan du lägga till en option för språkval i artiklar och avdelningar, i enlighet med sajtens struktur.', # MODIF
522
+    'texte_multilinguisme_trad' => 'Dessutom kan du aktivera ett system för länkhantering av de olika översättningarna av en artikel.', # MODIF
523
+    'texte_non_compresse' => '<i>okomprimerad</i> (din server stöder inte denna funktion)',
524
+    'texte_nouvelle_version_spip_1' => 'Du har installerat en ny version av SPIP.',
525
+    'texte_plus_trois_car' => 'mer än tre tecken',
526
+    'texte_plusieurs_articles' => 'Flera redaktörer hittades för  "@cherche_auteur@":',
527
+    'texte_recalcul_page' => 'Om du vill uppdatera
528 528
 enbart en sida, är det bäst att göra det från den publika delen genom att klicka på « Ladda om sidan ».',
529
-	'texte_recuperer_base' => 'Reparera databasen',
530
-	'texte_sous_titre' => 'Undertitel',
531
-	'texte_statistiques_visites' => '(mörka staplar:  Söndag / mörk linje: genomsnittlig nivå)',
532
-	'texte_statut_attente_validation' => 'väntar på godkännande',
533
-	'texte_statut_publies' => 'publicerad online',
534
-	'texte_statut_refuses' => 'avvisad',
535
-	'texte_suppression_fichiers' => 'Använd detta kommando för att radera alla filer
529
+    'texte_recuperer_base' => 'Reparera databasen',
530
+    'texte_sous_titre' => 'Undertitel',
531
+    'texte_statistiques_visites' => '(mörka staplar:  Söndag / mörk linje: genomsnittlig nivå)',
532
+    'texte_statut_attente_validation' => 'väntar på godkännande',
533
+    'texte_statut_publies' => 'publicerad online',
534
+    'texte_statut_refuses' => 'avvisad',
535
+    'texte_suppression_fichiers' => 'Använd detta kommando för att radera alla filer
536 536
 i SPIP’s cache. Det gör det möjligt att tvinga fram en uppdatering av alla sidor om du
537 537
 gjort viktiga förändringar i sajtens utseende eller struktur.',
538
-	'texte_sur_titre' => 'Övertitel',
539
-	'texte_table_ok' => ': den här tabellen är OK.',
540
-	'texte_tentative_recuperation' => 'Reparationsförsök',
541
-	'texte_tenter_reparation' => 'Försök att reparera databasen',
542
-	'texte_titre_02' => 'Ärenderad:',
543
-	'texte_titre_obligatoire' => '<b>Titel</b> [Krävs]',
544
-	'texte_travail_article' => '@nom_auteur_modif@ arbetade med den här artikeln för @date_diff@ minuter sedan',
545
-	'texte_vide' => 'tom',
546
-	'texte_vider_cache' => 'töm cachen',
547
-	'titre_admin_tech' => 'Tekniskt underhåll',
548
-	'titre_admin_vider' => 'Tekniskt underhåll',
549
-	'titre_cadre_afficher_article' => 'Visa artiklarna:',
550
-	'titre_cadre_afficher_traductions' => 'Visa status för översättningen för följande språk:',
551
-	'titre_cadre_ajouter_auteur' => 'LÄGG TILL EN REDAKTÖR:',
552
-	'titre_cadre_interieur_rubrique' => 'I Avdelningen',
553
-	'titre_cadre_numero_auteur' => 'Redaktör nummer',
554
-	'titre_cadre_signature_obligatoire' => '<b>Signatur</b> [krävs]<br />',
555
-	'titre_config_fonctions' => 'Sajtens konfiguration',
556
-	'titre_configuration' => 'Sajtens konfiguration',
557
-	'titre_connexion_ldap' => 'Optioner: <b>Din LDAP koppling</b>',
558
-	'titre_groupe_mots' => 'NYCKELORDSGRUPP:',
559
-	'titre_langue_article' => 'ARTIKELNS SPRÅK', # MODIF
560
-	'titre_langue_rubrique' => 'AVDELNINGENS SPRÅK', # MODIF
561
-	'titre_langue_trad_article' => 'ARTIKESPRÅK OCH ÖVERSÄTTNINGAR',
562
-	'titre_les_articles' => 'ARTIKLAR',
563
-	'titre_naviguer_dans_le_site' => 'Navigera i sajten...',
564
-	'titre_nouvelle_rubrique' => 'Ny avdelning',
565
-	'titre_numero_rubrique' => 'AVDELNING NUMMER:',
566
-	'titre_page_articles_edit' => 'Editera: @titre@',
567
-	'titre_page_articles_page' => 'Artiklar',
568
-	'titre_page_articles_tous' => 'Hela sajten',
569
-	'titre_page_calendrier' => 'Kalender @nom_mois@ @annee@',
570
-	'titre_page_config_contenu' => 'Sajtens inställningar',
571
-	'titre_page_delete_all' => 'total och oåterkallelig radering',
572
-	'titre_page_recherche' => 'Sökresultat @recherche@',
573
-	'titre_page_statistiques_referers' => 'Statistik (inkommande länkar)',
574
-	'titre_page_upgrade' => 'Uppgradera SPIP',
575
-	'titre_publication_articles_post_dates' => 'Tidsstyrd publicering av artiklar',
576
-	'titre_reparation' => 'Reparera',
577
-	'titre_suivi_petition' => 'Uppföljning av namninasamlingar',
578
-	'trad_article_traduction' => 'Alla versioner av den här artikeln:',
579
-	'trad_delier' => 'Sluta länka den här artikeln till dess översättningar', # MODIF
580
-	'trad_lier' => 'Den här artikeln är en översättning av artikel nummer:',
581
-	'trad_new' => 'Skriv en ny översättning av den här artikeln', # MODIF
538
+    'texte_sur_titre' => 'Övertitel',
539
+    'texte_table_ok' => ': den här tabellen är OK.',
540
+    'texte_tentative_recuperation' => 'Reparationsförsök',
541
+    'texte_tenter_reparation' => 'Försök att reparera databasen',
542
+    'texte_titre_02' => 'Ärenderad:',
543
+    'texte_titre_obligatoire' => '<b>Titel</b> [Krävs]',
544
+    'texte_travail_article' => '@nom_auteur_modif@ arbetade med den här artikeln för @date_diff@ minuter sedan',
545
+    'texte_vide' => 'tom',
546
+    'texte_vider_cache' => 'töm cachen',
547
+    'titre_admin_tech' => 'Tekniskt underhåll',
548
+    'titre_admin_vider' => 'Tekniskt underhåll',
549
+    'titre_cadre_afficher_article' => 'Visa artiklarna:',
550
+    'titre_cadre_afficher_traductions' => 'Visa status för översättningen för följande språk:',
551
+    'titre_cadre_ajouter_auteur' => 'LÄGG TILL EN REDAKTÖR:',
552
+    'titre_cadre_interieur_rubrique' => 'I Avdelningen',
553
+    'titre_cadre_numero_auteur' => 'Redaktör nummer',
554
+    'titre_cadre_signature_obligatoire' => '<b>Signatur</b> [krävs]<br />',
555
+    'titre_config_fonctions' => 'Sajtens konfiguration',
556
+    'titre_configuration' => 'Sajtens konfiguration',
557
+    'titre_connexion_ldap' => 'Optioner: <b>Din LDAP koppling</b>',
558
+    'titre_groupe_mots' => 'NYCKELORDSGRUPP:',
559
+    'titre_langue_article' => 'ARTIKELNS SPRÅK', # MODIF
560
+    'titre_langue_rubrique' => 'AVDELNINGENS SPRÅK', # MODIF
561
+    'titre_langue_trad_article' => 'ARTIKESPRÅK OCH ÖVERSÄTTNINGAR',
562
+    'titre_les_articles' => 'ARTIKLAR',
563
+    'titre_naviguer_dans_le_site' => 'Navigera i sajten...',
564
+    'titre_nouvelle_rubrique' => 'Ny avdelning',
565
+    'titre_numero_rubrique' => 'AVDELNING NUMMER:',
566
+    'titre_page_articles_edit' => 'Editera: @titre@',
567
+    'titre_page_articles_page' => 'Artiklar',
568
+    'titre_page_articles_tous' => 'Hela sajten',
569
+    'titre_page_calendrier' => 'Kalender @nom_mois@ @annee@',
570
+    'titre_page_config_contenu' => 'Sajtens inställningar',
571
+    'titre_page_delete_all' => 'total och oåterkallelig radering',
572
+    'titre_page_recherche' => 'Sökresultat @recherche@',
573
+    'titre_page_statistiques_referers' => 'Statistik (inkommande länkar)',
574
+    'titre_page_upgrade' => 'Uppgradera SPIP',
575
+    'titre_publication_articles_post_dates' => 'Tidsstyrd publicering av artiklar',
576
+    'titre_reparation' => 'Reparera',
577
+    'titre_suivi_petition' => 'Uppföljning av namninasamlingar',
578
+    'trad_article_traduction' => 'Alla versioner av den här artikeln:',
579
+    'trad_delier' => 'Sluta länka den här artikeln till dess översättningar', # MODIF
580
+    'trad_lier' => 'Den här artikeln är en översättning av artikel nummer:',
581
+    'trad_new' => 'Skriv en ny översättning av den här artikeln', # MODIF
582 582
 
583
-	// U
584
-	'utf8_convert_erreur_orig' => 'Fel: teckenkodningen @charset@ stöds inte.',
583
+    // U
584
+    'utf8_convert_erreur_orig' => 'Fel: teckenkodningen @charset@ stöds inte.',
585 585
 
586
-	// V
587
-	'version' => 'Version:'
586
+    // V
587
+    'version' => 'Version:'
588 588
 );
Please login to merge, or discard this patch.
ecrire/lang/ecrire_da.php 1 patch
Indentation   +492 added lines, -492 removed lines patch added patch discarded remove patch
@@ -4,496 +4,496 @@  discard block
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'aide_non_disponible' => 'Denne del af online-hjælpen er endnu ikke tilgængelig på dansk.',
14
-	'avis_acces_interdit' => 'Ingen adgang',
15
-	'avis_article_modifie' => 'Advarsel, @nom_auteur_modif@ har arbejdet på denne artikel for @date_diff@ minutter siden',
16
-	'avis_aucun_resultat' => 'Ingen resultater fundet.',
17
-	'avis_chemin_invalide_1' => 'Den sti som du har valgt',
18
-	'avis_chemin_invalide_2' => 'ser ikke ud til at være gyldig. Gå tilbage til sidste side og kontroller de oplysninger, du har indtastet.',
19
-	'avis_connexion_echec_1' => 'Ingen forbindelse til SQL-serveren', # MODIF
20
-	'avis_connexion_echec_2' => 'Gå tilbage til sidste side og kontroller de oplysninger, du har indtastet',
21
-	'avis_connexion_echec_3' => '<b>NB:</b> På mange servere skal du <b>anmode om</b> at få åbnet adgang til en SQL-database, før du kan bruge den. Hvis du ikke kan etablere en forbindelse, så kontroller venligst at du har indgivet denne anmodning.', # MODIF
22
-	'avis_connexion_ldap_echec_1' => 'Ingen forbindelse til LDAP-serveren',
23
-	'avis_connexion_ldap_echec_2' => 'Gå tilbage til sidste side og kontroller de oplysninger, du har indtastet.',
24
-	'avis_connexion_ldap_echec_3' => 'Alternativt kan du vælge ikke at benytte LDAP til at importere brugere.',
25
-	'avis_deplacement_rubrique' => 'Advarsel! Dette afsnit indeholder @contient_breves@ nyheder@scb@: Hvis du vil flytte den, så afkryds venligst her for at bekræfte.',
26
-	'avis_erreur_connexion_mysql' => 'Fejl i forbindelse til SQL',
27
-	'avis_espace_interdit' => '<b>Forbudt område</b><p>SPIP er allerede installeret.', # MODIF
28
-	'avis_lecture_noms_bases_1' => 'Installationsprogrammet kunne ikke læse navnene på de installerede databaser.',
29
-	'avis_lecture_noms_bases_2' => 'Enten er databasen ikke tilgængelig, eller også er funktionen, som giver oversigt
12
+    // A
13
+    'aide_non_disponible' => 'Denne del af online-hjælpen er endnu ikke tilgængelig på dansk.',
14
+    'avis_acces_interdit' => 'Ingen adgang',
15
+    'avis_article_modifie' => 'Advarsel, @nom_auteur_modif@ har arbejdet på denne artikel for @date_diff@ minutter siden',
16
+    'avis_aucun_resultat' => 'Ingen resultater fundet.',
17
+    'avis_chemin_invalide_1' => 'Den sti som du har valgt',
18
+    'avis_chemin_invalide_2' => 'ser ikke ud til at være gyldig. Gå tilbage til sidste side og kontroller de oplysninger, du har indtastet.',
19
+    'avis_connexion_echec_1' => 'Ingen forbindelse til SQL-serveren', # MODIF
20
+    'avis_connexion_echec_2' => 'Gå tilbage til sidste side og kontroller de oplysninger, du har indtastet',
21
+    'avis_connexion_echec_3' => '<b>NB:</b> På mange servere skal du <b>anmode om</b> at få åbnet adgang til en SQL-database, før du kan bruge den. Hvis du ikke kan etablere en forbindelse, så kontroller venligst at du har indgivet denne anmodning.', # MODIF
22
+    'avis_connexion_ldap_echec_1' => 'Ingen forbindelse til LDAP-serveren',
23
+    'avis_connexion_ldap_echec_2' => 'Gå tilbage til sidste side og kontroller de oplysninger, du har indtastet.',
24
+    'avis_connexion_ldap_echec_3' => 'Alternativt kan du vælge ikke at benytte LDAP til at importere brugere.',
25
+    'avis_deplacement_rubrique' => 'Advarsel! Dette afsnit indeholder @contient_breves@ nyheder@scb@: Hvis du vil flytte den, så afkryds venligst her for at bekræfte.',
26
+    'avis_erreur_connexion_mysql' => 'Fejl i forbindelse til SQL',
27
+    'avis_espace_interdit' => '<b>Forbudt område</b><p>SPIP er allerede installeret.', # MODIF
28
+    'avis_lecture_noms_bases_1' => 'Installationsprogrammet kunne ikke læse navnene på de installerede databaser.',
29
+    'avis_lecture_noms_bases_2' => 'Enten er databasen ikke tilgængelig, eller også er funktionen, som giver oversigt
30 30
 		over databaser, sat ud af kraft af sikkerhedsårsager (hvilket er tilfældet på mange servere).',
31
-	'avis_lecture_noms_bases_3' => 'Hvis det sidstnævnte er tilfældet, er det muligt at en database, som er navngivet efter dit login, kan anvendes:',
32
-	'avis_non_acces_page' => 'Du har ikke adgang til denne side.',
33
-	'avis_operation_echec' => 'Opgaven mislykkedes.',
34
-	'avis_suppression_base' => 'ADVARSEL, sletning kan ikke omgøres',
31
+    'avis_lecture_noms_bases_3' => 'Hvis det sidstnævnte er tilfældet, er det muligt at en database, som er navngivet efter dit login, kan anvendes:',
32
+    'avis_non_acces_page' => 'Du har ikke adgang til denne side.',
33
+    'avis_operation_echec' => 'Opgaven mislykkedes.',
34
+    'avis_suppression_base' => 'ADVARSEL, sletning kan ikke omgøres',
35 35
 
36
-	// B
37
-	'bouton_acces_ldap' => 'Tilføj adgang til LDAP >>',
38
-	'bouton_ajouter' => 'Tilføj',
39
-	'bouton_demande_publication' => 'Anmod om at få offentliggjort denne artikel',
40
-	'bouton_effacer_tout' => 'Slet alt',
41
-	'bouton_envoyer_message' => 'Send færdig meddelelse',
42
-	'bouton_modifier' => 'Ret',
43
-	'bouton_radio_afficher' => 'Vis',
44
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Medtag i listen over tilknyttede redaktører',
45
-	'bouton_radio_envoi_annonces_adresse' => 'Send nyheder til adressen:',
46
-	'bouton_radio_envoi_liste_nouveautes' => 'Send seneste nyhedsliste',
47
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Medtag ikke i listen over tilknyttede redaktører',
48
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Send ingen redaktionelle nyheder',
49
-	'bouton_redirection' => 'VIDERESTIL',
50
-	'bouton_relancer_installation' => 'Gentag installationen',
51
-	'bouton_suivant' => 'Næste',
52
-	'bouton_tenter_recuperation' => 'Reparationsforsøg',
53
-	'bouton_test_proxy' => 'Test proxy',
54
-	'bouton_vider_cache' => 'Tøm cache',
36
+    // B
37
+    'bouton_acces_ldap' => 'Tilføj adgang til LDAP >>',
38
+    'bouton_ajouter' => 'Tilføj',
39
+    'bouton_demande_publication' => 'Anmod om at få offentliggjort denne artikel',
40
+    'bouton_effacer_tout' => 'Slet alt',
41
+    'bouton_envoyer_message' => 'Send færdig meddelelse',
42
+    'bouton_modifier' => 'Ret',
43
+    'bouton_radio_afficher' => 'Vis',
44
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Medtag i listen over tilknyttede redaktører',
45
+    'bouton_radio_envoi_annonces_adresse' => 'Send nyheder til adressen:',
46
+    'bouton_radio_envoi_liste_nouveautes' => 'Send seneste nyhedsliste',
47
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Medtag ikke i listen over tilknyttede redaktører',
48
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Send ingen redaktionelle nyheder',
49
+    'bouton_redirection' => 'VIDERESTIL',
50
+    'bouton_relancer_installation' => 'Gentag installationen',
51
+    'bouton_suivant' => 'Næste',
52
+    'bouton_tenter_recuperation' => 'Reparationsforsøg',
53
+    'bouton_test_proxy' => 'Test proxy',
54
+    'bouton_vider_cache' => 'Tøm cache',
55 55
 
56
-	// C
57
-	'calendrier_synchro' => 'Hvis du benytter en kalenderapplikation, der er kompatibel med <b>iCal</b>, kan du synkronisere med information på dette websted.',
56
+    // C
57
+    'calendrier_synchro' => 'Hvis du benytter en kalenderapplikation, der er kompatibel med <b>iCal</b>, kan du synkronisere med information på dette websted.',
58 58
 
59
-	// D
60
-	'date_mot_heures' => 'timer',
59
+    // D
60
+    'date_mot_heures' => 'timer',
61 61
 
62
-	// E
63
-	'email' => 'e-mail',
64
-	'email_2' => 'e-mail:',
65
-	'entree_adresse_annuaire' => 'Adresse på kataloget',
66
-	'entree_adresse_email' => 'Din e-mail-adresse',
67
-	'entree_base_donnee_1' => 'Adresse på database',
68
-	'entree_base_donnee_2' => '(Ofte svarer denne adresse til adressen på webstedet, undertiden er den navngivet «localhost», og undertiden skal den være blank.)',
69
-	'entree_biographie' => 'Kort præsentation.',
70
-	'entree_chemin_acces' => '<b>Angiv</b> stien:',
71
-	'entree_cle_pgp' => 'Din PGP nøgle',
72
-	'entree_contenu_rubrique' => '(Kort beskrivelse af afsnittets indhold.)',
73
-	'entree_identifiants_connexion' => 'Dine opkoblingsinformationer...',
74
-	'entree_informations_connexion_ldap' => 'Udfyld denne side med LDAP opkoblingsinformation. Du kan indhente oplysningerne hos din system- eller netværskadministrator.',
75
-	'entree_infos_perso' => 'Hvem er du?',
76
-	'entree_interieur_rubrique' => 'I afsnit:',
77
-	'entree_liens_sites' => '<b>Hypertekst link</b> (henvisning, websted...)',
78
-	'entree_login' => 'Dit login',
79
-	'entree_login_connexion_1' => 'Tilkoblingslogin',
80
-	'entree_login_connexion_2' => '(Undertiden identisk med dit FTP-login, andre gange blank)',
81
-	'entree_mot_passe' => 'Din adgangskode',
82
-	'entree_mot_passe_1' => 'Tilkoblingsadgangskode',
83
-	'entree_mot_passe_2' => '(Undertiden identisk med dit FTP-login, andre gange blank)',
84
-	'entree_nom_fichier' => 'Indtast filnavn @texte_compresse@:',
85
-	'entree_nom_pseudo' => 'Dit navn eller alias',
86
-	'entree_nom_pseudo_1' => '(navn eller kaldenavn)',
87
-	'entree_nom_site' => 'Dit websteds navn',
88
-	'entree_nouveau_passe' => 'Ny adgangskode',
89
-	'entree_passe_ldap' => 'Adgangskode',
90
-	'entree_port_annuaire' => 'Portnummer på kataloget',
91
-	'entree_signature' => 'Signatur',
92
-	'entree_titre_obligatoire' => '<b>Titel</b> [Skal oplyses]<br />',
93
-	'entree_url' => 'Dit websteds URL',
62
+    // E
63
+    'email' => 'e-mail',
64
+    'email_2' => 'e-mail:',
65
+    'entree_adresse_annuaire' => 'Adresse på kataloget',
66
+    'entree_adresse_email' => 'Din e-mail-adresse',
67
+    'entree_base_donnee_1' => 'Adresse på database',
68
+    'entree_base_donnee_2' => '(Ofte svarer denne adresse til adressen på webstedet, undertiden er den navngivet «localhost», og undertiden skal den være blank.)',
69
+    'entree_biographie' => 'Kort præsentation.',
70
+    'entree_chemin_acces' => '<b>Angiv</b> stien:',
71
+    'entree_cle_pgp' => 'Din PGP nøgle',
72
+    'entree_contenu_rubrique' => '(Kort beskrivelse af afsnittets indhold.)',
73
+    'entree_identifiants_connexion' => 'Dine opkoblingsinformationer...',
74
+    'entree_informations_connexion_ldap' => 'Udfyld denne side med LDAP opkoblingsinformation. Du kan indhente oplysningerne hos din system- eller netværskadministrator.',
75
+    'entree_infos_perso' => 'Hvem er du?',
76
+    'entree_interieur_rubrique' => 'I afsnit:',
77
+    'entree_liens_sites' => '<b>Hypertekst link</b> (henvisning, websted...)',
78
+    'entree_login' => 'Dit login',
79
+    'entree_login_connexion_1' => 'Tilkoblingslogin',
80
+    'entree_login_connexion_2' => '(Undertiden identisk med dit FTP-login, andre gange blank)',
81
+    'entree_mot_passe' => 'Din adgangskode',
82
+    'entree_mot_passe_1' => 'Tilkoblingsadgangskode',
83
+    'entree_mot_passe_2' => '(Undertiden identisk med dit FTP-login, andre gange blank)',
84
+    'entree_nom_fichier' => 'Indtast filnavn @texte_compresse@:',
85
+    'entree_nom_pseudo' => 'Dit navn eller alias',
86
+    'entree_nom_pseudo_1' => '(navn eller kaldenavn)',
87
+    'entree_nom_site' => 'Dit websteds navn',
88
+    'entree_nouveau_passe' => 'Ny adgangskode',
89
+    'entree_passe_ldap' => 'Adgangskode',
90
+    'entree_port_annuaire' => 'Portnummer på kataloget',
91
+    'entree_signature' => 'Signatur',
92
+    'entree_titre_obligatoire' => '<b>Titel</b> [Skal oplyses]<br />',
93
+    'entree_url' => 'Dit websteds URL',
94 94
 
95
-	// I
96
-	'ical_info1' => 'Denne side viser flere måder til at følge med i aktiviteter på dette websted.',
97
-	'ical_info2' => 'For mere information, besøg <a href="@spipnet@">SPIP dokumentation</a>.', # MODIF
98
-	'ical_info_calendrier' => 'To kalendere står til rådighed. Den første er en oversigt over webstedet, der viser alle offentliggjorte artikler.Den anden indeholder både redaktionelle annonceringer og dine seneste private meddelelser. Den er forbeholdt dig i kraft af en personlig nøgle, som du kan ændre når som helst ved at forny din adgangskode.',
99
-	'ical_methode_http' => 'Filhentning',
100
-	'ical_methode_webcal' => 'Synkronisering (webcal://)', # MODIF
101
-	'ical_texte_prive' => 'Denne strengt personlige kalender holder dig underrettet om private redaktionelle aktiviteter på webstedet (opgaver, personlige aftaler, indsendte artikler, nyheder ...).',
102
-	'ical_texte_public' => 'Med denne kalender kan du følge de offentlige aktiviteter på webstedet (offentliggjorte artikler og nyheder).',
103
-	'ical_texte_rss' => 'Du kan syndikere de seneste nyheder på dette websted i en hvilken som helst XML/RSS (Rich Site Summary) fillæser. Dette format tillader også SPIP at læse de seneste nyheder offenliggjort af andre websteder i et kompatibelt udvekslingsformat.',
104
-	'ical_titre_js' => 'Javascript',
105
-	'ical_titre_mailing' => 'Postliste',
106
-	'ical_titre_rss' => '«Backend» filer',
107
-	'icone_activer_cookie' => 'Opret administrationscookie',
108
-	'icone_afficher_auteurs' => 'Vis forfattere',
109
-	'icone_afficher_visiteurs' => 'Vis besøgende',
110
-	'icone_arret_discussion' => 'Stop deltagelse i denne diskussion',
111
-	'icone_calendrier' => 'Kalender',
112
-	'icone_creer_auteur' => 'Opret ny forfatter og tilknyt til denne artikel',
113
-	'icone_creer_mot_cle' => 'Opret nyt nøgleord og tilknyt til denne artikel',
114
-	'icone_creer_rubrique_2' => 'Opret nyt afsnit',
115
-	'icone_modifier_article' => 'Ret denne artikel',
116
-	'icone_modifier_rubrique' => 'Ret dette afsnit',
117
-	'icone_retour' => 'Tilbage',
118
-	'icone_retour_article' => 'Tilbage til artikel',
119
-	'icone_supprimer_cookie' => 'Slet cookier',
120
-	'icone_supprimer_rubrique' => 'Slet dette afsnit',
121
-	'icone_supprimer_signature' => 'Slet denne signatur',
122
-	'icone_valider_signature' => 'Godkend signatur',
123
-	'image_administrer_rubrique' => 'Du kan administrere dette afsnit',
124
-	'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
125
-	'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
126
-	'info_1_article' => '1 artikel',
127
-	'info_activer_cookie' => 'Du kan installere en <b>administrationscookie</b>, som tillader dig at skifte nemt mellem det offentlige websted og dit private afsnit.',
128
-	'info_administrateur' => 'Administrator',
129
-	'info_administrateur_1' => 'Administrator',
130
-	'info_administrateur_2' => 'af webstedet (<i>anvend med forsigtighed</i>)',
131
-	'info_administrateur_site_01' => 'Hvis du er webstedsadministrator, så',
132
-	'info_administrateur_site_02' => 'klik på dette link',
133
-	'info_administrateurs' => 'Administratorer',
134
-	'info_administrer_rubrique' => 'Du kan administrere dette afsnit',
135
-	'info_adresse' => 'til adressen:',
136
-	'info_adresse_url' => 'Dit offentlige websteds URL',
137
-	'info_aide_en_ligne' => 'SPIP online hjælp',
138
-	'info_ajout_image' => 'Når du vedhæfter billeder til en artikel, kan
95
+    // I
96
+    'ical_info1' => 'Denne side viser flere måder til at følge med i aktiviteter på dette websted.',
97
+    'ical_info2' => 'For mere information, besøg <a href="@spipnet@">SPIP dokumentation</a>.', # MODIF
98
+    'ical_info_calendrier' => 'To kalendere står til rådighed. Den første er en oversigt over webstedet, der viser alle offentliggjorte artikler.Den anden indeholder både redaktionelle annonceringer og dine seneste private meddelelser. Den er forbeholdt dig i kraft af en personlig nøgle, som du kan ændre når som helst ved at forny din adgangskode.',
99
+    'ical_methode_http' => 'Filhentning',
100
+    'ical_methode_webcal' => 'Synkronisering (webcal://)', # MODIF
101
+    'ical_texte_prive' => 'Denne strengt personlige kalender holder dig underrettet om private redaktionelle aktiviteter på webstedet (opgaver, personlige aftaler, indsendte artikler, nyheder ...).',
102
+    'ical_texte_public' => 'Med denne kalender kan du følge de offentlige aktiviteter på webstedet (offentliggjorte artikler og nyheder).',
103
+    'ical_texte_rss' => 'Du kan syndikere de seneste nyheder på dette websted i en hvilken som helst XML/RSS (Rich Site Summary) fillæser. Dette format tillader også SPIP at læse de seneste nyheder offenliggjort af andre websteder i et kompatibelt udvekslingsformat.',
104
+    'ical_titre_js' => 'Javascript',
105
+    'ical_titre_mailing' => 'Postliste',
106
+    'ical_titre_rss' => '«Backend» filer',
107
+    'icone_activer_cookie' => 'Opret administrationscookie',
108
+    'icone_afficher_auteurs' => 'Vis forfattere',
109
+    'icone_afficher_visiteurs' => 'Vis besøgende',
110
+    'icone_arret_discussion' => 'Stop deltagelse i denne diskussion',
111
+    'icone_calendrier' => 'Kalender',
112
+    'icone_creer_auteur' => 'Opret ny forfatter og tilknyt til denne artikel',
113
+    'icone_creer_mot_cle' => 'Opret nyt nøgleord og tilknyt til denne artikel',
114
+    'icone_creer_rubrique_2' => 'Opret nyt afsnit',
115
+    'icone_modifier_article' => 'Ret denne artikel',
116
+    'icone_modifier_rubrique' => 'Ret dette afsnit',
117
+    'icone_retour' => 'Tilbage',
118
+    'icone_retour_article' => 'Tilbage til artikel',
119
+    'icone_supprimer_cookie' => 'Slet cookier',
120
+    'icone_supprimer_rubrique' => 'Slet dette afsnit',
121
+    'icone_supprimer_signature' => 'Slet denne signatur',
122
+    'icone_valider_signature' => 'Godkend signatur',
123
+    'image_administrer_rubrique' => 'Du kan administrere dette afsnit',
124
+    'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
125
+    'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
126
+    'info_1_article' => '1 artikel',
127
+    'info_activer_cookie' => 'Du kan installere en <b>administrationscookie</b>, som tillader dig at skifte nemt mellem det offentlige websted og dit private afsnit.',
128
+    'info_administrateur' => 'Administrator',
129
+    'info_administrateur_1' => 'Administrator',
130
+    'info_administrateur_2' => 'af webstedet (<i>anvend med forsigtighed</i>)',
131
+    'info_administrateur_site_01' => 'Hvis du er webstedsadministrator, så',
132
+    'info_administrateur_site_02' => 'klik på dette link',
133
+    'info_administrateurs' => 'Administratorer',
134
+    'info_administrer_rubrique' => 'Du kan administrere dette afsnit',
135
+    'info_adresse' => 'til adressen:',
136
+    'info_adresse_url' => 'Dit offentlige websteds URL',
137
+    'info_aide_en_ligne' => 'SPIP online hjælp',
138
+    'info_ajout_image' => 'Når du vedhæfter billeder til en artikel, kan
139 139
 		SPIP automatisk lave miniatureudgaver af billederne.
140 140
 		Dette muliggør f.eks. automatisk oprettelse af et
141 141
 		galleri eller et album.',
142
-	'info_ajouter_rubrique' => 'Tilføj endnu et afsnit at administrere:',
143
-	'info_annonce_nouveautes' => 'Seneste annonceringer',
144
-	'info_article' => 'artikel',
145
-	'info_article_2' => 'artikler',
146
-	'info_article_a_paraitre' => 'Fremdaterede artikler der skal offentliggøres',
147
-	'info_articles_02' => 'artikler',
148
-	'info_articles_2' => 'Artikler',
149
-	'info_articles_auteur' => 'Denne forfatters artikler',
150
-	'info_articles_trouves' => 'Fundne artikler',
151
-	'info_attente_validation' => 'Dine artikler som afventer godkendelse',
152
-	'info_aujourdhui' => 'i dag:',
153
-	'info_auteurs' => 'Forfattere',
154
-	'info_auteurs_par_tri' => 'Forfattere@partri@',
155
-	'info_auteurs_trouves' => 'Forfattere fundet',
156
-	'info_authentification_externe' => 'Ekstern adgangskontrol',
157
-	'info_avertissement' => 'Advarsel',
158
-	'info_base_installee' => 'Din databasestruktur er installeret.',
159
-	'info_chapeau' => 'Hoved',
160
-	'info_chapeau_2' => 'Indledning:',
161
-	'info_chemin_acces_1' => 'Valgmuligheder: <b>Adgangsvej til katalog</b>',
162
-	'info_chemin_acces_2' => 'Du skal nu konfigurere adgangsvejen til kataloginformationen. Dette er vigtigt for at kunne læse de brugerprofiler, som ligger i kataloget.',
163
-	'info_chemin_acces_annuaire' => 'Valgmuligheder: <b>Adgangsvej til katalog</b>',
164
-	'info_choix_base' => 'Tredje skrift:',
165
-	'info_classement_1' => '<sup>.</sup> af @liste@',
166
-	'info_classement_2' => '<sup>.</sup> af @liste@',
167
-	'info_code_acces' => 'Glem ikke dine egne adgangsoplysninger!',
168
-	'info_config_suivi' => 'Hvis denne adresse svarer til en postliste, kan du nedefor angive, hvor webstedets besøgende kan lade sig registrere. Denne adresse kan være en  URL (f.eks. siden med tilmelding til listen via web), eller en e-mail adresse med et særligt emne tilknyttet (f.eks.: <tt>@adresse_suivi@?subject=abonner</tt>):',
169
-	'info_config_suivi_explication' => 'Du kan abonnere på dette websteds postliste. Du vil så via e-mail modtage annonceringer vedrørende artikler og nyheder, der er indsendt til offentliggørelse.',
170
-	'info_confirmer_passe' => 'Bekræft ny adgangskode:',
171
-	'info_connexion_base' => 'Andet skrift: <b>Forsøg på opkobling til databasen</b>',
172
-	'info_connexion_ldap_ok' => '<b>Din LDAP-opkobling lykkedes.</b><p> Du kan gå til næste skridt.', # MODIF
173
-	'info_connexion_mysql' => 'Første skridt: <b>Din SQL opkobling</b>',
174
-	'info_connexion_ok' => 'Opkoblingen lykkedes.',
175
-	'info_contact' => 'Kontakt',
176
-	'info_contenu_articles' => 'Artiklens bestanddele',
177
-	'info_creation_paragraphe' => '(For at lave afsnit skal du indsætte blanke linier.)', # MODIF
178
-	'info_creation_rubrique' => 'Før du kan skrive artikler<br /> skal du lave mindst et afsnit.<br />',
179
-	'info_creation_tables' => 'Fjerde skridt: <b>Oprettelse af databasetabeller</b>',
180
-	'info_creer_base' => '<b>Opret</b> en ny database:',
181
-	'info_dans_rubrique' => 'I afsnit:',
182
-	'info_date_publication_anterieure' => 'Dato for tidligere offentliggørelse:',
183
-	'info_date_referencement' => 'DATO FOR HENVISNING TIL DETTE WEBSTED:',
184
-	'info_derniere_etape' => 'Sidste skridt: <b>Det er overstået!',
185
-	'info_descriptif' => 'Beskrivelse:',
186
-	'info_discussion_cours' => 'Igangværende diskussioner',
187
-	'info_ecrire_article' => 'Før du kan lave artikler, skal du oprette mindst et afsnit.',
188
-	'info_email_envoi' => 'Afsenderens e-mail adresse (valgfri)',
189
-	'info_email_envoi_txt' => 'Indtast afsenderens e-mail adresse ved afsendelse af e-mails (som standard bruges modtagerens adresse som afsenderadresse) :',
190
-	'info_email_webmestre' => 'E-mail-adresse på webmaster (valgfrit)', # MODIF
191
-	'info_envoi_email_automatique' => 'Automatisk e-mail-forsendelse',
192
-	'info_envoyer_maintenant' => 'Send nu',
193
-	'info_etape_suivante' => 'Gå til næste trin',
194
-	'info_etape_suivante_1' => 'Du kan gå til næste trin.',
195
-	'info_etape_suivante_2' => 'Du kan gå til næste trin.',
196
-	'info_exportation_base' => 'eksporter database til @archive@',
197
-	'info_facilite_suivi_activite' => 'For at lette opfølgning på webstedets redaktionelle aktiviteter sender SPIP e-mails med anmodning om offentliggørelse og godkendelse til f.eks. redaktørens adresseliste.', # MODIF
198
-	'info_fichiers_authent' => 'Adgangskontrolfil ".htpasswd"',
199
-	'info_gauche_admin_tech' => '<b>Kun administratorer har adgang til denne side.</b><p> Den giver adgang til forskellige tekniske vedligeholdelsesopgaver. Nogle af dem giver anledning til en særlig adgangskontrol, der kræver FTP-adgang til siden.', # MODIF
200
-	'info_gauche_admin_vider' => '<b>Kun administratorer har adgang til denne side.</b><p> Den giver adgang til forskellige tekniske vedligeholdelsesopgaver. Nogle af dem giver anledning til en særlig adgangskontrol, der kræver FTP-adgang til siden.', # MODIF
201
-	'info_gauche_auteurs' => 'Her finder du alle webstedets forfattere. Status på hver enkelt fremgår af farven på ikonet (redaktør = grøn, administrator = gul).',
202
-	'info_gauche_auteurs_exterieurs' => 'Udenforstående forfattere uden adgang til webstedet vises med et blåt symbol; slettede forfattere repræsenteres af en papirkurv.', # MODIF
203
-	'info_gauche_messagerie' => 'Meddelelsessystemet giver mulighed for at udveksle meddelelser mellem redaktører, for at gemme huskesedler (til personlig brug) 
142
+    'info_ajouter_rubrique' => 'Tilføj endnu et afsnit at administrere:',
143
+    'info_annonce_nouveautes' => 'Seneste annonceringer',
144
+    'info_article' => 'artikel',
145
+    'info_article_2' => 'artikler',
146
+    'info_article_a_paraitre' => 'Fremdaterede artikler der skal offentliggøres',
147
+    'info_articles_02' => 'artikler',
148
+    'info_articles_2' => 'Artikler',
149
+    'info_articles_auteur' => 'Denne forfatters artikler',
150
+    'info_articles_trouves' => 'Fundne artikler',
151
+    'info_attente_validation' => 'Dine artikler som afventer godkendelse',
152
+    'info_aujourdhui' => 'i dag:',
153
+    'info_auteurs' => 'Forfattere',
154
+    'info_auteurs_par_tri' => 'Forfattere@partri@',
155
+    'info_auteurs_trouves' => 'Forfattere fundet',
156
+    'info_authentification_externe' => 'Ekstern adgangskontrol',
157
+    'info_avertissement' => 'Advarsel',
158
+    'info_base_installee' => 'Din databasestruktur er installeret.',
159
+    'info_chapeau' => 'Hoved',
160
+    'info_chapeau_2' => 'Indledning:',
161
+    'info_chemin_acces_1' => 'Valgmuligheder: <b>Adgangsvej til katalog</b>',
162
+    'info_chemin_acces_2' => 'Du skal nu konfigurere adgangsvejen til kataloginformationen. Dette er vigtigt for at kunne læse de brugerprofiler, som ligger i kataloget.',
163
+    'info_chemin_acces_annuaire' => 'Valgmuligheder: <b>Adgangsvej til katalog</b>',
164
+    'info_choix_base' => 'Tredje skrift:',
165
+    'info_classement_1' => '<sup>.</sup> af @liste@',
166
+    'info_classement_2' => '<sup>.</sup> af @liste@',
167
+    'info_code_acces' => 'Glem ikke dine egne adgangsoplysninger!',
168
+    'info_config_suivi' => 'Hvis denne adresse svarer til en postliste, kan du nedefor angive, hvor webstedets besøgende kan lade sig registrere. Denne adresse kan være en  URL (f.eks. siden med tilmelding til listen via web), eller en e-mail adresse med et særligt emne tilknyttet (f.eks.: <tt>@adresse_suivi@?subject=abonner</tt>):',
169
+    'info_config_suivi_explication' => 'Du kan abonnere på dette websteds postliste. Du vil så via e-mail modtage annonceringer vedrørende artikler og nyheder, der er indsendt til offentliggørelse.',
170
+    'info_confirmer_passe' => 'Bekræft ny adgangskode:',
171
+    'info_connexion_base' => 'Andet skrift: <b>Forsøg på opkobling til databasen</b>',
172
+    'info_connexion_ldap_ok' => '<b>Din LDAP-opkobling lykkedes.</b><p> Du kan gå til næste skridt.', # MODIF
173
+    'info_connexion_mysql' => 'Første skridt: <b>Din SQL opkobling</b>',
174
+    'info_connexion_ok' => 'Opkoblingen lykkedes.',
175
+    'info_contact' => 'Kontakt',
176
+    'info_contenu_articles' => 'Artiklens bestanddele',
177
+    'info_creation_paragraphe' => '(For at lave afsnit skal du indsætte blanke linier.)', # MODIF
178
+    'info_creation_rubrique' => 'Før du kan skrive artikler<br /> skal du lave mindst et afsnit.<br />',
179
+    'info_creation_tables' => 'Fjerde skridt: <b>Oprettelse af databasetabeller</b>',
180
+    'info_creer_base' => '<b>Opret</b> en ny database:',
181
+    'info_dans_rubrique' => 'I afsnit:',
182
+    'info_date_publication_anterieure' => 'Dato for tidligere offentliggørelse:',
183
+    'info_date_referencement' => 'DATO FOR HENVISNING TIL DETTE WEBSTED:',
184
+    'info_derniere_etape' => 'Sidste skridt: <b>Det er overstået!',
185
+    'info_descriptif' => 'Beskrivelse:',
186
+    'info_discussion_cours' => 'Igangværende diskussioner',
187
+    'info_ecrire_article' => 'Før du kan lave artikler, skal du oprette mindst et afsnit.',
188
+    'info_email_envoi' => 'Afsenderens e-mail adresse (valgfri)',
189
+    'info_email_envoi_txt' => 'Indtast afsenderens e-mail adresse ved afsendelse af e-mails (som standard bruges modtagerens adresse som afsenderadresse) :',
190
+    'info_email_webmestre' => 'E-mail-adresse på webmaster (valgfrit)', # MODIF
191
+    'info_envoi_email_automatique' => 'Automatisk e-mail-forsendelse',
192
+    'info_envoyer_maintenant' => 'Send nu',
193
+    'info_etape_suivante' => 'Gå til næste trin',
194
+    'info_etape_suivante_1' => 'Du kan gå til næste trin.',
195
+    'info_etape_suivante_2' => 'Du kan gå til næste trin.',
196
+    'info_exportation_base' => 'eksporter database til @archive@',
197
+    'info_facilite_suivi_activite' => 'For at lette opfølgning på webstedets redaktionelle aktiviteter sender SPIP e-mails med anmodning om offentliggørelse og godkendelse til f.eks. redaktørens adresseliste.', # MODIF
198
+    'info_fichiers_authent' => 'Adgangskontrolfil ".htpasswd"',
199
+    'info_gauche_admin_tech' => '<b>Kun administratorer har adgang til denne side.</b><p> Den giver adgang til forskellige tekniske vedligeholdelsesopgaver. Nogle af dem giver anledning til en særlig adgangskontrol, der kræver FTP-adgang til siden.', # MODIF
200
+    'info_gauche_admin_vider' => '<b>Kun administratorer har adgang til denne side.</b><p> Den giver adgang til forskellige tekniske vedligeholdelsesopgaver. Nogle af dem giver anledning til en særlig adgangskontrol, der kræver FTP-adgang til siden.', # MODIF
201
+    'info_gauche_auteurs' => 'Her finder du alle webstedets forfattere. Status på hver enkelt fremgår af farven på ikonet (redaktør = grøn, administrator = gul).',
202
+    'info_gauche_auteurs_exterieurs' => 'Udenforstående forfattere uden adgang til webstedet vises med et blåt symbol; slettede forfattere repræsenteres af en papirkurv.', # MODIF
203
+    'info_gauche_messagerie' => 'Meddelelsessystemet giver mulighed for at udveksle meddelelser mellem redaktører, for at gemme huskesedler (til personlig brug) 
204 204
 	eller for at vise annonceringer i det private område (hvis du er administrator).',
205
-	'info_gauche_statistiques_referers' => 'Denne side viser en oversigt over <i>henvisende sider</i>, dvs. websteder der har linket til dit websted alene i dag. Faktisk nulstilles oversigten med 24 timers mellemrum.',
206
-	'info_gauche_visiteurs_enregistres' => 'Her finder du de besøgende, der er tilmeldt til webstedets offentlige afsnit (fora med tilmelding).',
207
-	'info_generation_miniatures_images' => 'Dannelse af piktogrammer',
208
-	'info_hebergeur_desactiver_envoi_email' => 'Nogle webhoteller tillader ikke automatisk udsendelse af e-mails. I så fald kan følgende funktioner i SPIP ikke benyttes.',
209
-	'info_hier' => 'i går:',
210
-	'info_identification_publique' => 'Din offentlige identitet...',
211
-	'info_image_process' => 'Vælg den bedste metode til at skabe miniaturebilleder ved at klikke på det korresponderende billede.',
212
-	'info_image_process2' => '<b>N.B.</b> <i>If you can’t see any image, then your server is not configured to use such tools. If you want to use these features, contact your provider’s technical support and ask for the «GD» or «Imagick» extensions to be installed.</i>', # MODIF
213
-	'info_informations_personnelles' => 'Femte trin: <b>Personlig information</b>',
214
-	'info_inscription_automatique' => 'Automatisk registrering af nye redaktører',
215
-	'info_jeu_caractere' => 'Webstedets tegnsæt',
216
-	'info_jours' => 'dage',
217
-	'info_laisser_champs_vides' => 'efterlad disse felter tomme)',
218
-	'info_langues' => 'Webstedets sprog',
219
-	'info_ldap_ok' => 'LDAP adgangskontrol er installeret.',
220
-	'info_lien_hypertexte' => 'Hypertekst link:',
221
-	'info_liste_redacteurs_connectes' => 'Oversigt over tilknyttede reaktører',
222
-	'info_login_existant' => 'Dette login findes allerede.',
223
-	'info_login_trop_court' => 'Login for kort.',
224
-	'info_maximum' => 'maksimum:',
225
-	'info_message_en_redaction' => 'Dine meddelelser under redaktion',
226
-	'info_message_technique' => 'Teknisk meddelelse:',
227
-	'info_messagerie_interne' => 'Interne meddelelser',
228
-	'info_mise_a_niveau_base' => 'SQL databaseopgradering',
229
-	'info_mise_a_niveau_base_2' => '{{Advarsel!}} Du har installeret en version af SPIP-filer, der er ældre end dem, der var på webstedet i forvejen. Du risikerer at miste databasen og webstedet vil ikke fungere ordentligt mere.<br />{{Geninstraller SPIP-filerne.}}',
230
-	'info_modifier_rubrique' => 'Ret afsnit:',
231
-	'info_modifier_titre' => 'Ret: @titre@',
232
-	'info_mon_site_spip' => 'Mit SPIP-websted',
233
-	'info_moyenne' => 'gennemsnit:',
234
-	'info_multi_cet_article' => 'Denne artikel er på:',
235
-	'info_multi_langues_choisies' => 'Vælg de sprog der skal være til rådighed for redaktører på webstedet.
205
+    'info_gauche_statistiques_referers' => 'Denne side viser en oversigt over <i>henvisende sider</i>, dvs. websteder der har linket til dit websted alene i dag. Faktisk nulstilles oversigten med 24 timers mellemrum.',
206
+    'info_gauche_visiteurs_enregistres' => 'Her finder du de besøgende, der er tilmeldt til webstedets offentlige afsnit (fora med tilmelding).',
207
+    'info_generation_miniatures_images' => 'Dannelse af piktogrammer',
208
+    'info_hebergeur_desactiver_envoi_email' => 'Nogle webhoteller tillader ikke automatisk udsendelse af e-mails. I så fald kan følgende funktioner i SPIP ikke benyttes.',
209
+    'info_hier' => 'i går:',
210
+    'info_identification_publique' => 'Din offentlige identitet...',
211
+    'info_image_process' => 'Vælg den bedste metode til at skabe miniaturebilleder ved at klikke på det korresponderende billede.',
212
+    'info_image_process2' => '<b>N.B.</b> <i>If you can’t see any image, then your server is not configured to use such tools. If you want to use these features, contact your provider’s technical support and ask for the «GD» or «Imagick» extensions to be installed.</i>', # MODIF
213
+    'info_informations_personnelles' => 'Femte trin: <b>Personlig information</b>',
214
+    'info_inscription_automatique' => 'Automatisk registrering af nye redaktører',
215
+    'info_jeu_caractere' => 'Webstedets tegnsæt',
216
+    'info_jours' => 'dage',
217
+    'info_laisser_champs_vides' => 'efterlad disse felter tomme)',
218
+    'info_langues' => 'Webstedets sprog',
219
+    'info_ldap_ok' => 'LDAP adgangskontrol er installeret.',
220
+    'info_lien_hypertexte' => 'Hypertekst link:',
221
+    'info_liste_redacteurs_connectes' => 'Oversigt over tilknyttede reaktører',
222
+    'info_login_existant' => 'Dette login findes allerede.',
223
+    'info_login_trop_court' => 'Login for kort.',
224
+    'info_maximum' => 'maksimum:',
225
+    'info_message_en_redaction' => 'Dine meddelelser under redaktion',
226
+    'info_message_technique' => 'Teknisk meddelelse:',
227
+    'info_messagerie_interne' => 'Interne meddelelser',
228
+    'info_mise_a_niveau_base' => 'SQL databaseopgradering',
229
+    'info_mise_a_niveau_base_2' => '{{Advarsel!}} Du har installeret en version af SPIP-filer, der er ældre end dem, der var på webstedet i forvejen. Du risikerer at miste databasen og webstedet vil ikke fungere ordentligt mere.<br />{{Geninstraller SPIP-filerne.}}',
230
+    'info_modifier_rubrique' => 'Ret afsnit:',
231
+    'info_modifier_titre' => 'Ret: @titre@',
232
+    'info_mon_site_spip' => 'Mit SPIP-websted',
233
+    'info_moyenne' => 'gennemsnit:',
234
+    'info_multi_cet_article' => 'Denne artikel er på:',
235
+    'info_multi_langues_choisies' => 'Vælg de sprog der skal være til rådighed for redaktører på webstedet.
236 236
   Sprog der allerede er i brug på webstedet (de øverste på listen) kan ikke fravælges.
237 237
  ',
238
-	'info_multi_secteurs' => 'Kun for afsnit placeret i roden ?',
239
-	'info_nom' => 'Navn',
240
-	'info_nom_destinataire' => 'Navn på modtager',
241
-	'info_nom_site' => 'Dit websteds navn',
242
-	'info_nombre_articles' => '@nb_articles@ artikler,',
243
-	'info_nombre_rubriques' => '@nb_rubriques@ afsnit',
244
-	'info_nombre_sites' => '@nb_sites@ websteder,',
245
-	'info_non_deplacer' => 'Flyt ikke...',
246
-	'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP kan udsende webstedets seneste indlæg regelmæssigt.
238
+    'info_multi_secteurs' => 'Kun for afsnit placeret i roden ?',
239
+    'info_nom' => 'Navn',
240
+    'info_nom_destinataire' => 'Navn på modtager',
241
+    'info_nom_site' => 'Dit websteds navn',
242
+    'info_nombre_articles' => '@nb_articles@ artikler,',
243
+    'info_nombre_rubriques' => '@nb_rubriques@ afsnit',
244
+    'info_nombre_sites' => '@nb_sites@ websteder,',
245
+    'info_non_deplacer' => 'Flyt ikke...',
246
+    'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP kan udsende webstedets seneste indlæg regelmæssigt.
247 247
 		(nyligt offentliggjorte artikler og nyheder).',
248
-	'info_non_envoi_liste_nouveautes' => 'Send ikke oversigt over seneste nyheder',
249
-	'info_non_modifiable' => 'kan ikke ændres',
250
-	'info_non_suppression_mot_cle' => 'Jeg ønsker ikke at slette dette nøgleord.',
251
-	'info_notes' => 'Fodnoter',
252
-	'info_nouvel_article' => 'Ny artikel',
253
-	'info_nouvelle_traduction' => 'Ny oversættelse:',
254
-	'info_numero_article' => 'ARTIKEL NUMMER:',
255
-	'info_obligatoire_02' => '[Skal udfyldes]', # MODIF
256
-	'info_options_avancees' => 'AVANCEREDE INDSTILLINGER',
257
-	'info_ou' => 'eller...',
258
-	'info_page_interdite' => 'Forbudt side',
259
-	'info_par_nombre_article' => '(efter antal artiker)',
260
-	'info_passe_trop_court' => 'Adgangskode for kort.',
261
-	'info_passes_identiques' => 'De to adgangskoder er ikke ens.',
262
-	'info_plus_cinq_car' => 'mere end 5 tegn',
263
-	'info_plus_cinq_car_2' => '(Mere end 5 tegn)',
264
-	'info_plus_trois_car' => '(Mere end 3 tegn)',
265
-	'info_popularite' => 'popularitet: @popularite@; besøg: @visites@',
266
-	'info_post_scriptum' => 'Efterskrift',
267
-	'info_post_scriptum_2' => 'Efterskrift:',
268
-	'info_pour' => 'til',
269
-	'info_procedez_par_etape' => 'gå frem skridt for skridt',
270
-	'info_procedure_maj_version' => 'opgraderingsprocdeduren bør følges for at tilpasse databasen til den nye version af SPIP.',
271
-	'info_ps' => 'P.S.',
272
-	'info_publies' => 'Dine offentliggjorte artikler',
273
-	'info_question_inscription_nouveaux_redacteurs' => 'Vil du tillade, at nye redaktører tilmelder sig
248
+    'info_non_envoi_liste_nouveautes' => 'Send ikke oversigt over seneste nyheder',
249
+    'info_non_modifiable' => 'kan ikke ændres',
250
+    'info_non_suppression_mot_cle' => 'Jeg ønsker ikke at slette dette nøgleord.',
251
+    'info_notes' => 'Fodnoter',
252
+    'info_nouvel_article' => 'Ny artikel',
253
+    'info_nouvelle_traduction' => 'Ny oversættelse:',
254
+    'info_numero_article' => 'ARTIKEL NUMMER:',
255
+    'info_obligatoire_02' => '[Skal udfyldes]', # MODIF
256
+    'info_options_avancees' => 'AVANCEREDE INDSTILLINGER',
257
+    'info_ou' => 'eller...',
258
+    'info_page_interdite' => 'Forbudt side',
259
+    'info_par_nombre_article' => '(efter antal artiker)',
260
+    'info_passe_trop_court' => 'Adgangskode for kort.',
261
+    'info_passes_identiques' => 'De to adgangskoder er ikke ens.',
262
+    'info_plus_cinq_car' => 'mere end 5 tegn',
263
+    'info_plus_cinq_car_2' => '(Mere end 5 tegn)',
264
+    'info_plus_trois_car' => '(Mere end 3 tegn)',
265
+    'info_popularite' => 'popularitet: @popularite@; besøg: @visites@',
266
+    'info_post_scriptum' => 'Efterskrift',
267
+    'info_post_scriptum_2' => 'Efterskrift:',
268
+    'info_pour' => 'til',
269
+    'info_procedez_par_etape' => 'gå frem skridt for skridt',
270
+    'info_procedure_maj_version' => 'opgraderingsprocdeduren bør følges for at tilpasse databasen til den nye version af SPIP.',
271
+    'info_ps' => 'P.S.',
272
+    'info_publies' => 'Dine offentliggjorte artikler',
273
+    'info_question_inscription_nouveaux_redacteurs' => 'Vil du tillade, at nye redaktører tilmelder sig
274 274
 		på det offentligt tilgængelige websted? Ja betyder, at besøgende kan tilmelde sig på en automatisk dannet formular,
275 275
 		og derefter få adgang til det private område, hvor de kan vedligeholde deres egne artikler.
276 276
 		<blockquote><i>Under tilmeldingen modtager brugerne en automatisk dannet e-mail med deres adgangskode til det
277 277
 		private websted. Nogle webhoteller tillader ikke at der sendes e-mails fra deres servere. I så fald kan automatisk
278 278
 		tilmelding ikke finde sted.', # MODIF
279
-	'info_qui_edite' => '@nom_auteur_modif@ a travaillé sur ce contenu il y a @date_diff@ minutes', # MODIF
280
-	'info_racine_site' => 'Top',
281
-	'info_recharger_page' => 'Vær venlig at genindlæse denne side om et øjeblik.',
282
-	'info_recherche_auteur_zero' => '<b>Ingen resultater fundet til "@cherche_auteur@".',
283
-	'info_recommencer' => 'Vær venlig at forsøge igen.',
284
-	'info_redacteur_1' => 'Redaktør',
285
-	'info_redacteur_2' => 'med adgang til det private område (<i>anbefalet</i>)',
286
-	'info_redacteurs' => 'Redaktører',
287
-	'info_redaction_en_cours' => 'REDIGERING ER IGANG',
288
-	'info_redirection' => 'Viderestilling',
289
-	'info_refuses' => 'Dine artikler er afvist',
290
-	'info_reglage_ldap' => 'Muligheder: <b>Konfigurere LDAP understøttelse</b>',
291
-	'info_renvoi_article' => '<b>Viderestilling.</b> Denne artikel henviser til siden:',
292
-	'info_reserve_admin' => 'Kun administratorer kan ændre denne adresse.',
293
-	'info_restreindre_rubrique' => 'Begræns administrationsrettigheder til dette afsnit:',
294
-	'info_resultat_recherche' => 'Søgeresultater:',
295
-	'info_rubriques' => 'Afsnit',
296
-	'info_rubriques_02' => 'afsnit',
297
-	'info_rubriques_trouvees' => 'Afsnit fundet',
298
-	'info_sans_titre' => 'Uden overskrift',
299
-	'info_selection_chemin_acces' => '<b>Vælg</b> nedenfor stien til kataloget:',
300
-	'info_signatures' => 'underskrifter',
301
-	'info_site' => 'Websted',
302
-	'info_site_2' => 'websted:',
303
-	'info_site_min' => 'websted',
304
-	'info_site_reference_2' => 'Henvisning',
305
-	'info_site_web' => 'WEBSTED:', # MODIF
306
-	'info_sites' => 'websteder',
307
-	'info_sites_lies_mot' => 'Links til websteder knyttet til dette nøgleord',
308
-	'info_sites_proxy' => 'Brug proxy',
309
-	'info_sites_trouves' => 'Websteder fundet',
310
-	'info_sous_titre' => 'Underrubrik:',
311
-	'info_statut_administrateur' => 'Administrator',
312
-	'info_statut_auteur' => 'Denne forfatters status:', # MODIF
313
-	'info_statut_redacteur' => 'Redaktør',
314
-	'info_statut_utilisateurs_1' => 'Importerede brugeres standardstatus',
315
-	'info_statut_utilisateurs_2' => 'Vælg den status som skal tildeles personerne i LDAP kataloget, når de logger ind første gang. Senere kan du ændre værdien for hver forfatter fra sag til sag.',
316
-	'info_suivi_activite' => 'Opfølgning på redaktionelle aktiviteter',
317
-	'info_surtitre' => 'Hovedoverskrift:',
318
-	'info_taille_maximale_vignette' => 'Max. størrelse på piktogram dannet af systemet:',
319
-	'info_terminer_installation' => 'Du kan nu afslutte standardinstallationen.',
320
-	'info_texte' => 'Tekst',
321
-	'info_texte_explicatif' => 'Forklarende tekst',
322
-	'info_texte_long' => '(teksten er for lang: den vil blive opdelt i flere dele, som vil blive sat sammen efter godkendelse.)',
323
-	'info_texte_message' => 'Meddelelsens tekst:', # MODIF
324
-	'info_texte_message_02' => 'Meddelelsens tekst',
325
-	'info_titre' => 'Overskrift:',
326
-	'info_total' => 'ialt:',
327
-	'info_tous_articles_en_redaction' => 'Alle artikler undervejs',
328
-	'info_tous_articles_presents' => 'Alle artikler offentliggjort i dette afsnit',
329
-	'info_tous_les' => 'for hver:',
330
-	'info_tout_site' => 'Hele webstedet',
331
-	'info_tout_site2' => 'Artiklen er ikke blevet oversat til dette sprog.',
332
-	'info_tout_site3' => 'Artiklen er blevet oversat til dette sprig, men nogle ændringer er senere blevet tilføjet til referenceartiklen. Oversættelsen skal opdateres.   ',
333
-	'info_tout_site4' => 'Artiklen er blevet oversat til dette sprog og oversættelsen er opdateret.',
334
-	'info_tout_site5' => 'Den oprindelige artikel.',
335
-	'info_tout_site6' => '<b>Advarsel:</b> kun de oprindelige artikler vises.
279
+    'info_qui_edite' => '@nom_auteur_modif@ a travaillé sur ce contenu il y a @date_diff@ minutes', # MODIF
280
+    'info_racine_site' => 'Top',
281
+    'info_recharger_page' => 'Vær venlig at genindlæse denne side om et øjeblik.',
282
+    'info_recherche_auteur_zero' => '<b>Ingen resultater fundet til "@cherche_auteur@".',
283
+    'info_recommencer' => 'Vær venlig at forsøge igen.',
284
+    'info_redacteur_1' => 'Redaktør',
285
+    'info_redacteur_2' => 'med adgang til det private område (<i>anbefalet</i>)',
286
+    'info_redacteurs' => 'Redaktører',
287
+    'info_redaction_en_cours' => 'REDIGERING ER IGANG',
288
+    'info_redirection' => 'Viderestilling',
289
+    'info_refuses' => 'Dine artikler er afvist',
290
+    'info_reglage_ldap' => 'Muligheder: <b>Konfigurere LDAP understøttelse</b>',
291
+    'info_renvoi_article' => '<b>Viderestilling.</b> Denne artikel henviser til siden:',
292
+    'info_reserve_admin' => 'Kun administratorer kan ændre denne adresse.',
293
+    'info_restreindre_rubrique' => 'Begræns administrationsrettigheder til dette afsnit:',
294
+    'info_resultat_recherche' => 'Søgeresultater:',
295
+    'info_rubriques' => 'Afsnit',
296
+    'info_rubriques_02' => 'afsnit',
297
+    'info_rubriques_trouvees' => 'Afsnit fundet',
298
+    'info_sans_titre' => 'Uden overskrift',
299
+    'info_selection_chemin_acces' => '<b>Vælg</b> nedenfor stien til kataloget:',
300
+    'info_signatures' => 'underskrifter',
301
+    'info_site' => 'Websted',
302
+    'info_site_2' => 'websted:',
303
+    'info_site_min' => 'websted',
304
+    'info_site_reference_2' => 'Henvisning',
305
+    'info_site_web' => 'WEBSTED:', # MODIF
306
+    'info_sites' => 'websteder',
307
+    'info_sites_lies_mot' => 'Links til websteder knyttet til dette nøgleord',
308
+    'info_sites_proxy' => 'Brug proxy',
309
+    'info_sites_trouves' => 'Websteder fundet',
310
+    'info_sous_titre' => 'Underrubrik:',
311
+    'info_statut_administrateur' => 'Administrator',
312
+    'info_statut_auteur' => 'Denne forfatters status:', # MODIF
313
+    'info_statut_redacteur' => 'Redaktør',
314
+    'info_statut_utilisateurs_1' => 'Importerede brugeres standardstatus',
315
+    'info_statut_utilisateurs_2' => 'Vælg den status som skal tildeles personerne i LDAP kataloget, når de logger ind første gang. Senere kan du ændre værdien for hver forfatter fra sag til sag.',
316
+    'info_suivi_activite' => 'Opfølgning på redaktionelle aktiviteter',
317
+    'info_surtitre' => 'Hovedoverskrift:',
318
+    'info_taille_maximale_vignette' => 'Max. størrelse på piktogram dannet af systemet:',
319
+    'info_terminer_installation' => 'Du kan nu afslutte standardinstallationen.',
320
+    'info_texte' => 'Tekst',
321
+    'info_texte_explicatif' => 'Forklarende tekst',
322
+    'info_texte_long' => '(teksten er for lang: den vil blive opdelt i flere dele, som vil blive sat sammen efter godkendelse.)',
323
+    'info_texte_message' => 'Meddelelsens tekst:', # MODIF
324
+    'info_texte_message_02' => 'Meddelelsens tekst',
325
+    'info_titre' => 'Overskrift:',
326
+    'info_total' => 'ialt:',
327
+    'info_tous_articles_en_redaction' => 'Alle artikler undervejs',
328
+    'info_tous_articles_presents' => 'Alle artikler offentliggjort i dette afsnit',
329
+    'info_tous_les' => 'for hver:',
330
+    'info_tout_site' => 'Hele webstedet',
331
+    'info_tout_site2' => 'Artiklen er ikke blevet oversat til dette sprog.',
332
+    'info_tout_site3' => 'Artiklen er blevet oversat til dette sprig, men nogle ændringer er senere blevet tilføjet til referenceartiklen. Oversættelsen skal opdateres.   ',
333
+    'info_tout_site4' => 'Artiklen er blevet oversat til dette sprog og oversættelsen er opdateret.',
334
+    'info_tout_site5' => 'Den oprindelige artikel.',
335
+    'info_tout_site6' => '<b>Advarsel:</b> kun de oprindelige artikler vises.
336 336
 Oversættelserne er tilknyttet den oprindelige artikel 
337 337
 i en farve, der angiver deres status:',
338
-	'info_travail_colaboratif' => 'Samarbejde om artikler',
339
-	'info_un_article' => 'en artikel,',
340
-	'info_un_site' => 'et websted,',
341
-	'info_une_rubrique' => 'et afsnit,',
342
-	'info_une_rubrique_02' => '1 afsnit',
343
-	'info_url' => 'URL:',
344
-	'info_urlref' => 'Hyperlink:',
345
-	'info_utilisation_spip' => 'SPIP er nu klar til brug...',
346
-	'info_visites_par_mois' => 'Besøg pr. måned:',
347
-	'info_visiteur_1' => 'Besøgende',
348
-	'info_visiteur_2' => 'på den offentligt tilgængelige websted',
349
-	'info_visiteurs' => 'Besøgende',
350
-	'info_visiteurs_02' => 'Besøgende på offentligt websted',
351
-	'install_select_langue' => 'Vælg et sprog og klik derefter på knappen «næste» for at igangsætte installationen.',
352
-	'intem_redacteur' => 'redaktør',
353
-	'item_accepter_inscriptions' => 'Tillad tilmeldinger',
354
-	'item_activer_messages_avertissement' => 'Tillad advarselsmeddelelser',
355
-	'item_administrateur_2' => 'administrator',
356
-	'item_afficher_calendrier' => 'Vis i kalenderen',
357
-	'item_choix_administrateurs' => 'administratorer',
358
-	'item_choix_generation_miniature' => 'Dan miniaturepiktogrammer automatisk.',
359
-	'item_choix_non_generation_miniature' => 'Dan ikke miniaturebilleder.',
360
-	'item_choix_redacteurs' => 'redaktører',
361
-	'item_choix_visiteurs' => 'besøgende på den offentlige websted',
362
-	'item_creer_fichiers_authent' => 'Dan .htpasswd filer',
363
-	'item_login' => 'Login',
364
-	'item_mots_cles_association_articles' => 'artiklerne',
365
-	'item_mots_cles_association_rubriques' => 'afsnittene',
366
-	'item_mots_cles_association_sites' => 'de linkede eller syndikerede websteder.',
367
-	'item_non' => 'Nej',
368
-	'item_non_accepter_inscriptions' => 'Tillad ikke tilmelding',
369
-	'item_non_activer_messages_avertissement' => 'Ingen advarselsmeddelelser',
370
-	'item_non_afficher_calendrier' => 'Vis ikke i kalender',
371
-	'item_non_creer_fichiers_authent' => 'Dan ikke disse filer',
372
-	'item_non_publier_articles' => 'Vent med at offentliggøre artikler til deres publiceringsdato.',
373
-	'item_nouvel_auteur' => 'Ny forfatter',
374
-	'item_nouvelle_rubrique' => 'Nyt afsnit',
375
-	'item_oui' => 'Ja',
376
-	'item_publier_articles' => 'Offentliggør artikler uden hensyn til deres publiceringsdato.',
377
-	'item_reponse_article' => 'Kommenter artiklen',
378
-	'item_visiteur' => 'besøgende',
338
+    'info_travail_colaboratif' => 'Samarbejde om artikler',
339
+    'info_un_article' => 'en artikel,',
340
+    'info_un_site' => 'et websted,',
341
+    'info_une_rubrique' => 'et afsnit,',
342
+    'info_une_rubrique_02' => '1 afsnit',
343
+    'info_url' => 'URL:',
344
+    'info_urlref' => 'Hyperlink:',
345
+    'info_utilisation_spip' => 'SPIP er nu klar til brug...',
346
+    'info_visites_par_mois' => 'Besøg pr. måned:',
347
+    'info_visiteur_1' => 'Besøgende',
348
+    'info_visiteur_2' => 'på den offentligt tilgængelige websted',
349
+    'info_visiteurs' => 'Besøgende',
350
+    'info_visiteurs_02' => 'Besøgende på offentligt websted',
351
+    'install_select_langue' => 'Vælg et sprog og klik derefter på knappen «næste» for at igangsætte installationen.',
352
+    'intem_redacteur' => 'redaktør',
353
+    'item_accepter_inscriptions' => 'Tillad tilmeldinger',
354
+    'item_activer_messages_avertissement' => 'Tillad advarselsmeddelelser',
355
+    'item_administrateur_2' => 'administrator',
356
+    'item_afficher_calendrier' => 'Vis i kalenderen',
357
+    'item_choix_administrateurs' => 'administratorer',
358
+    'item_choix_generation_miniature' => 'Dan miniaturepiktogrammer automatisk.',
359
+    'item_choix_non_generation_miniature' => 'Dan ikke miniaturebilleder.',
360
+    'item_choix_redacteurs' => 'redaktører',
361
+    'item_choix_visiteurs' => 'besøgende på den offentlige websted',
362
+    'item_creer_fichiers_authent' => 'Dan .htpasswd filer',
363
+    'item_login' => 'Login',
364
+    'item_mots_cles_association_articles' => 'artiklerne',
365
+    'item_mots_cles_association_rubriques' => 'afsnittene',
366
+    'item_mots_cles_association_sites' => 'de linkede eller syndikerede websteder.',
367
+    'item_non' => 'Nej',
368
+    'item_non_accepter_inscriptions' => 'Tillad ikke tilmelding',
369
+    'item_non_activer_messages_avertissement' => 'Ingen advarselsmeddelelser',
370
+    'item_non_afficher_calendrier' => 'Vis ikke i kalender',
371
+    'item_non_creer_fichiers_authent' => 'Dan ikke disse filer',
372
+    'item_non_publier_articles' => 'Vent med at offentliggøre artikler til deres publiceringsdato.',
373
+    'item_nouvel_auteur' => 'Ny forfatter',
374
+    'item_nouvelle_rubrique' => 'Nyt afsnit',
375
+    'item_oui' => 'Ja',
376
+    'item_publier_articles' => 'Offentliggør artikler uden hensyn til deres publiceringsdato.',
377
+    'item_reponse_article' => 'Kommenter artiklen',
378
+    'item_visiteur' => 'besøgende',
379 379
 
380
-	// J
381
-	'jour_non_connu_nc' => ' ',
380
+    // J
381
+    'jour_non_connu_nc' => ' ',
382 382
 
383
-	// L
384
-	'lien_ajouter_auteur' => 'Tilføj denne forfatter',
385
-	'lien_email' => 'e-mail',
386
-	'lien_nom_site' => 'WEBSTEDETS NAVN:',
387
-	'lien_retirer_auteur' => 'Fjern forfatter',
388
-	'lien_site' => 'websted',
389
-	'lien_tout_deplier' => 'Udfold alle',
390
-	'lien_tout_replier' => 'Sammenfold alle',
391
-	'lien_trier_nom' => 'Sorter efter navn',
392
-	'lien_trier_nombre_articles' => 'Sorter efter antal artikler',
393
-	'lien_trier_statut' => 'Sorter efter status',
394
-	'lien_voir_en_ligne' => 'SE ONLINE:',
395
-	'logo_article' => 'LOGO TIL ARTIKLEN', # MODIF
396
-	'logo_auteur' => 'LOGO TIL FORFATTEREN', # MODIF
397
-	'logo_rubrique' => 'LOGO TIL AFSNITTETS', # MODIF
398
-	'logo_site' => 'LOGO TIL WEBSTEDETS', # MODIF
399
-	'logo_standard_rubrique' => 'STANDARDLOGO TIL AFSNIT', # MODIF
400
-	'logo_survol' => 'PEGEFØLSOMT LOGO', # MODIF
383
+    // L
384
+    'lien_ajouter_auteur' => 'Tilføj denne forfatter',
385
+    'lien_email' => 'e-mail',
386
+    'lien_nom_site' => 'WEBSTEDETS NAVN:',
387
+    'lien_retirer_auteur' => 'Fjern forfatter',
388
+    'lien_site' => 'websted',
389
+    'lien_tout_deplier' => 'Udfold alle',
390
+    'lien_tout_replier' => 'Sammenfold alle',
391
+    'lien_trier_nom' => 'Sorter efter navn',
392
+    'lien_trier_nombre_articles' => 'Sorter efter antal artikler',
393
+    'lien_trier_statut' => 'Sorter efter status',
394
+    'lien_voir_en_ligne' => 'SE ONLINE:',
395
+    'logo_article' => 'LOGO TIL ARTIKLEN', # MODIF
396
+    'logo_auteur' => 'LOGO TIL FORFATTEREN', # MODIF
397
+    'logo_rubrique' => 'LOGO TIL AFSNITTETS', # MODIF
398
+    'logo_site' => 'LOGO TIL WEBSTEDETS', # MODIF
399
+    'logo_standard_rubrique' => 'STANDARDLOGO TIL AFSNIT', # MODIF
400
+    'logo_survol' => 'PEGEFØLSOMT LOGO', # MODIF
401 401
 
402
-	// M
403
-	'menu_aide_installation_choix_base' => 'Valg af database',
404
-	'module_fichier_langue' => 'Sprogfil',
405
-	'module_raccourci' => 'Genvej',
406
-	'module_texte_affiche' => 'Vist tekst',
407
-	'module_texte_explicatif' => 'Du kan indsætte følgende genveje i dit websteds skabeloner. De vil automatisk blive oversat til de forskellige sprog, som der findes sprogfiler til.',
408
-	'module_texte_traduction' => 'Sprogfilen « @module@ » findes på:',
409
-	'mois_non_connu' => 'ukendt',
402
+    // M
403
+    'menu_aide_installation_choix_base' => 'Valg af database',
404
+    'module_fichier_langue' => 'Sprogfil',
405
+    'module_raccourci' => 'Genvej',
406
+    'module_texte_affiche' => 'Vist tekst',
407
+    'module_texte_explicatif' => 'Du kan indsætte følgende genveje i dit websteds skabeloner. De vil automatisk blive oversat til de forskellige sprog, som der findes sprogfiler til.',
408
+    'module_texte_traduction' => 'Sprogfilen « @module@ » findes på:',
409
+    'mois_non_connu' => 'ukendt',
410 410
 
411
-	// O
412
-	'onglet_repartition_actuelle' => 'nu',
411
+    // O
412
+    'onglet_repartition_actuelle' => 'nu',
413 413
 
414
-	// R
415
-	'required' => '[Skal udfyldes]', # MODIF
414
+    // R
415
+    'required' => '[Skal udfyldes]', # MODIF
416 416
 
417
-	// S
418
-	'statut_admin_restreint' => '(begrænset admin)', # MODIF
417
+    // S
418
+    'statut_admin_restreint' => '(begrænset admin)', # MODIF
419 419
 
420
-	// T
421
-	'text_article_propose_publication' => 'Artiklen er sendt til offentliggørelse. Hold dig ikke tilbage fra at give din mening til kende gennem det forum, der er tilknyttet artiklen (nederst på siden).', # MODIF
422
-	'texte_acces_ldap_anonyme_1' => 'Nogle LDAP-servere tillader ikke anonym adgang. I så fald må du angive en brugeridentifikation for senere at kunne søge efter information i kataloget. Men i de fleste tilfælde kan du lade de følgende felter stå tomme.',
423
-	'texte_admin_effacer_01' => 'Denne kommando sletter <i>hele</i> indholdet i databasen,
420
+    // T
421
+    'text_article_propose_publication' => 'Artiklen er sendt til offentliggørelse. Hold dig ikke tilbage fra at give din mening til kende gennem det forum, der er tilknyttet artiklen (nederst på siden).', # MODIF
422
+    'texte_acces_ldap_anonyme_1' => 'Nogle LDAP-servere tillader ikke anonym adgang. I så fald må du angive en brugeridentifikation for senere at kunne søge efter information i kataloget. Men i de fleste tilfælde kan du lade de følgende felter stå tomme.',
423
+    'texte_admin_effacer_01' => 'Denne kommando sletter <i>hele</i> indholdet i databasen,
424 424
 	herunder <i>hele</i> opsætningen for redaktører og administratorer. Når du har udført den, bør du 
425 425
 	geninstallere SPIP for at danne en ny database og åbne op for den første administratoradgang.',
426
-	'texte_adresse_annuaire_1' => '(Hvis dit katalog findes på samme server som webstedet, er det formentlig «localhost».)',
427
-	'texte_ajout_auteur' => 'Følgende forfatter har bidraget til artiklen:',
428
-	'texte_annuaire_ldap_1' => 'Hvis du har adgang til et LDAP-katalog, kan du anvende det til automatisk at importere brugere i SPIP.',
429
-	'texte_article_statut' => 'Denne artikel er:',
430
-	'texte_article_virtuel' => 'Virtuel artikel',
431
-	'texte_article_virtuel_reference' => '<b>Virtuel artikel:</b> fremstår som en artikel på dit websted, men viderestiller til en anden URL. Slet URL’en for at fjerne viderestillingen.',
432
-	'texte_aucun_resultat_auteur' => 'Ingen resultater til "@cherche_auteur@".',
433
-	'texte_auteur_messagerie' => 'Dette websted kan løbende holde øje med, hvilke redaktører der er logget ind. Dette muliggør realtidsudveksling af meddelelser (hvis udveksling af meddelser ovenfor er fravalgt, vedligeholdes oversigten over redaktører, der er online, heller ikke). Du kan vælge ikke at være synlig i oversigten (du er så «usynlig» for andre brugere).',
434
-	'texte_auteurs' => 'FORFATTERNE',
435
-	'texte_choix_base_1' => 'Vælg database:',
436
-	'texte_choix_base_2' => 'SQL server indeholder et antal databaser.',
437
-	'texte_choix_base_3' => '<b>Vælg</b> vælg nedenfor den database, som webhotellet har tildelt dig:',
438
-	'texte_compte_element' => '@count@ element',
439
-	'texte_compte_elements' => '@count@ elementer',
440
-	'texte_connexion_mysql' => 'Slå op i de oplysninger, som dit webhotel har stillet til rådighed: Hvis webhotellet understøtter SQL, bør det indeholde oplysninger om opkobling.', # MODIF
441
-	'texte_contenu_article' => '(Artiklens indhold med få ord.)',
442
-	'texte_contenu_articles' => 'Med udgangspunkt i det layout du har valgt til dit websted, kan du vælge at nogle artikelelementer ikke skal benyttes.
426
+    'texte_adresse_annuaire_1' => '(Hvis dit katalog findes på samme server som webstedet, er det formentlig «localhost».)',
427
+    'texte_ajout_auteur' => 'Følgende forfatter har bidraget til artiklen:',
428
+    'texte_annuaire_ldap_1' => 'Hvis du har adgang til et LDAP-katalog, kan du anvende det til automatisk at importere brugere i SPIP.',
429
+    'texte_article_statut' => 'Denne artikel er:',
430
+    'texte_article_virtuel' => 'Virtuel artikel',
431
+    'texte_article_virtuel_reference' => '<b>Virtuel artikel:</b> fremstår som en artikel på dit websted, men viderestiller til en anden URL. Slet URL’en for at fjerne viderestillingen.',
432
+    'texte_aucun_resultat_auteur' => 'Ingen resultater til "@cherche_auteur@".',
433
+    'texte_auteur_messagerie' => 'Dette websted kan løbende holde øje med, hvilke redaktører der er logget ind. Dette muliggør realtidsudveksling af meddelelser (hvis udveksling af meddelser ovenfor er fravalgt, vedligeholdes oversigten over redaktører, der er online, heller ikke). Du kan vælge ikke at være synlig i oversigten (du er så «usynlig» for andre brugere).',
434
+    'texte_auteurs' => 'FORFATTERNE',
435
+    'texte_choix_base_1' => 'Vælg database:',
436
+    'texte_choix_base_2' => 'SQL server indeholder et antal databaser.',
437
+    'texte_choix_base_3' => '<b>Vælg</b> vælg nedenfor den database, som webhotellet har tildelt dig:',
438
+    'texte_compte_element' => '@count@ element',
439
+    'texte_compte_elements' => '@count@ elementer',
440
+    'texte_connexion_mysql' => 'Slå op i de oplysninger, som dit webhotel har stillet til rådighed: Hvis webhotellet understøtter SQL, bør det indeholde oplysninger om opkobling.', # MODIF
441
+    'texte_contenu_article' => '(Artiklens indhold med få ord.)',
442
+    'texte_contenu_articles' => 'Med udgangspunkt i det layout du har valgt til dit websted, kan du vælge at nogle artikelelementer ikke skal benyttes.
443 443
 		Benyt følgende liste til at bestemme, hvilke elementer der skal være til rådighed.',
444
-	'texte_crash_base' => 'Hvis din database er brudt ned, kan du her forsøge en automatisk genopbygning.',
445
-	'texte_creer_rubrique' => 'Før du kan skrive artikler,<br /> skal du oprette et afsnit.',
446
-	'texte_date_creation_article' => 'DATO FOR OPRETTELSE AF ARTIKLEN:',
447
-	'texte_date_publication_anterieure' => 'DATO FOR TIDLIGERE OFFENTLIGGØRELSE',
448
-	'texte_date_publication_anterieure_nonaffichee' => 'Skjul dato for tidligere offentliggørelse.',
449
-	'texte_date_publication_article' => 'DATO FOR ONLINE OFFENTLIGGØRELSE:',
450
-	'texte_descriptif_rapide' => 'Kort beskrivelse',
451
-	'texte_effacer_base' => 'Slet SPIP databasen',
452
-	'texte_en_cours_validation' => 'Følgende artikler og nyheder er foreslået offentliggjort. Tøv ikke med at give din mening til kende via de fora, som er knyttet til artiklerne.', # MODIF
453
-	'texte_enrichir_mise_a_jour' => 'Du kan forbedre layoutet af teksten ved at benytte «typografiske koder».',
454
-	'texte_fichier_authent' => '<b>Skal SPIP oprette specielle <tt>.htpasswd</tt>
444
+    'texte_crash_base' => 'Hvis din database er brudt ned, kan du her forsøge en automatisk genopbygning.',
445
+    'texte_creer_rubrique' => 'Før du kan skrive artikler,<br /> skal du oprette et afsnit.',
446
+    'texte_date_creation_article' => 'DATO FOR OPRETTELSE AF ARTIKLEN:',
447
+    'texte_date_publication_anterieure' => 'DATO FOR TIDLIGERE OFFENTLIGGØRELSE',
448
+    'texte_date_publication_anterieure_nonaffichee' => 'Skjul dato for tidligere offentliggørelse.',
449
+    'texte_date_publication_article' => 'DATO FOR ONLINE OFFENTLIGGØRELSE:',
450
+    'texte_descriptif_rapide' => 'Kort beskrivelse',
451
+    'texte_effacer_base' => 'Slet SPIP databasen',
452
+    'texte_en_cours_validation' => 'Følgende artikler og nyheder er foreslået offentliggjort. Tøv ikke med at give din mening til kende via de fora, som er knyttet til artiklerne.', # MODIF
453
+    'texte_enrichir_mise_a_jour' => 'Du kan forbedre layoutet af teksten ved at benytte «typografiske koder».',
454
+    'texte_fichier_authent' => '<b>Skal SPIP oprette specielle <tt>.htpasswd</tt>
455 455
 		og <tt>.htpasswd-admin</tt> filer i kataloget @dossier@?</b><p>
456 456
 		Disse filer kan benyttes til at begrænse adgangen for forfattere og administratorer til andre dele af dit websted
457 457
 		(f.eks. et eksternt statistikprogram).<p>
458 458
 		Hvis du ikke har benyttet sådanne filer før, kan du vælge standardværdien (ingen filoprettelse).', # MODIF
459
-	'texte_informations_personnelles_1' => 'Systemet vil give dig en tilpasset adgang til webstedet.',
460
-	'texte_informations_personnelles_2' => '(Bemærk: hvis det er en geninstallation og din adgang stadig fungerer, kan du', # MODIF
461
-	'texte_introductif_article' => '(Introduktion til artiklen)',
462
-	'texte_jeu_caractere' => 'Denne indstilling er nyttig, hvis dit websted viser andre alfabeter end det latinske alfabet (dvs. det «vestlige») og dets afledninger. 
459
+    'texte_informations_personnelles_1' => 'Systemet vil give dig en tilpasset adgang til webstedet.',
460
+    'texte_informations_personnelles_2' => '(Bemærk: hvis det er en geninstallation og din adgang stadig fungerer, kan du', # MODIF
461
+    'texte_introductif_article' => '(Introduktion til artiklen)',
462
+    'texte_jeu_caractere' => 'Denne indstilling er nyttig, hvis dit websted viser andre alfabeter end det latinske alfabet (dvs. det «vestlige») og dets afledninger. 
463 463
  I så fald skal standardindstillingen ændres til et passende tegnsæt. Vi anbefaler dig at prøve med forskellige indstillinger for at finde den bedste løsning. Husk også at tilpasse webstedet tilsvarende (<tt>#CHARSET</tt> parameteren).',
464
-	'texte_login_ldap_1' => '(Efterlad tom for anonym adgang eller indtast en fuldstændig sti, f.eks. «<tt>uid=hansen, ou=brugere, dc=mit-domæne, dc=dk</tt>».)',
465
-	'texte_login_precaution' => 'Advarsel! Dette er den login, du er koblet på med nu.
464
+    'texte_login_ldap_1' => '(Efterlad tom for anonym adgang eller indtast en fuldstændig sti, f.eks. «<tt>uid=hansen, ou=brugere, dc=mit-domæne, dc=dk</tt>».)',
465
+    'texte_login_precaution' => 'Advarsel! Dette er den login, du er koblet på med nu.
466 466
 	Brug denne formular med forsigtighed ...',
467
-	'texte_mise_a_niveau_base_1' => 'Du har netop opdateret SPIP’s filer.
467
+    'texte_mise_a_niveau_base_1' => 'Du har netop opdateret SPIP’s filer.
468 468
 	Du skal nu opdatere webstedets database.',
469
-	'texte_modifier_article' => 'Ret artiklen:',
470
-	'texte_multilinguisme' => 'Hvis du ønsker at administrere artikler på flere sprog med den deraf følgende større kompleksitet, kan du forsyne afsnit og/eller artikler med en sprogvalgsmenu. Denne funktion er afhængig af strukturen på websiden.', # MODIF
471
-	'texte_multilinguisme_trad' => 'Du kan også vælge at have link mellem de forskellige sprogversioner af en artikel.', # MODIF
472
-	'texte_non_compresse' => '<i>ukomprimeret</i> (din server understøtter ikke denne funktion)',
473
-	'texte_nouvelle_version_spip_1' => 'Du har netop installeret en ny version af SPIP.',
474
-	'texte_nouvelle_version_spip_2' => 'Denne nye version kræver en mere omfattende opdatering end sædvanligt. Hvis du er webmaster på webstedet, så slet venligst filen <tt>inc_connect.php3</tt> i kataloget <tt>ecrire</tt> og genstart installationen for at opdatere dine opkoblingsparametre til databasen. <p>(NB.: hvis du har glemt dine opkoblingsparametre, så kast et blik på indholdet af filen <tt>inc_connect.php3</tt> før du sletter den...)', # MODIF
475
-	'texte_operation_echec' => 'Gå tilbage til forrige side og vælg en anden database eller opret en ny. Kontroller de oplysninger, dit webhotel har stillet til rådighed.',
476
-	'texte_plus_trois_car' => 'mere end 3 tegn',
477
-	'texte_plusieurs_articles' => 'Der er fundet flere forfattere til "@cherche_auteur@":',
478
-	'texte_port_annuaire' => '(Standardværdien passer for det meste.)',
479
-	'texte_proposer_publication' => 'Når din artikel er færdig,<br /> kan du indsende den til offentliggørelse.',
480
-	'texte_proxy' => 'I nogle tilfælde (intranet, beskyttede netværk...),
469
+    'texte_modifier_article' => 'Ret artiklen:',
470
+    'texte_multilinguisme' => 'Hvis du ønsker at administrere artikler på flere sprog med den deraf følgende større kompleksitet, kan du forsyne afsnit og/eller artikler med en sprogvalgsmenu. Denne funktion er afhængig af strukturen på websiden.', # MODIF
471
+    'texte_multilinguisme_trad' => 'Du kan også vælge at have link mellem de forskellige sprogversioner af en artikel.', # MODIF
472
+    'texte_non_compresse' => '<i>ukomprimeret</i> (din server understøtter ikke denne funktion)',
473
+    'texte_nouvelle_version_spip_1' => 'Du har netop installeret en ny version af SPIP.',
474
+    'texte_nouvelle_version_spip_2' => 'Denne nye version kræver en mere omfattende opdatering end sædvanligt. Hvis du er webmaster på webstedet, så slet venligst filen <tt>inc_connect.php3</tt> i kataloget <tt>ecrire</tt> og genstart installationen for at opdatere dine opkoblingsparametre til databasen. <p>(NB.: hvis du har glemt dine opkoblingsparametre, så kast et blik på indholdet af filen <tt>inc_connect.php3</tt> før du sletter den...)', # MODIF
475
+    'texte_operation_echec' => 'Gå tilbage til forrige side og vælg en anden database eller opret en ny. Kontroller de oplysninger, dit webhotel har stillet til rådighed.',
476
+    'texte_plus_trois_car' => 'mere end 3 tegn',
477
+    'texte_plusieurs_articles' => 'Der er fundet flere forfattere til "@cherche_auteur@":',
478
+    'texte_port_annuaire' => '(Standardværdien passer for det meste.)',
479
+    'texte_proposer_publication' => 'Når din artikel er færdig,<br /> kan du indsende den til offentliggørelse.',
480
+    'texte_proxy' => 'I nogle tilfælde (intranet, beskyttede netværk...),
481 481
 		er det nødvendigt at benytte en <i>proxy HTTP</i> for at komme i kontakt med syndikerede websteder.
482 482
 		Hvis der skal benyttes proxy, så indtast dens adresse her: 
483 483
 		<tt><html>http://proxy:8080</html></tt>. Almindeligvis skal feltet stå tomt.',
484
-	'texte_publication_articles_post_dates' => 'Hvad skal SPIP gøre med hensyn til artikler med en offentliggørelsesdato, der ligger ude i 
484
+    'texte_publication_articles_post_dates' => 'Hvad skal SPIP gøre med hensyn til artikler med en offentliggørelsesdato, der ligger ude i 
485 485
 		fremtiden?',
486
-	'texte_rappel_selection_champs' => '[Husk at vælge dette felt korrekt.]',
487
-	'texte_recalcul_page' => 'Hvis du kun ønsker at opdatere en side, bør du gøre det ved fra det offentlige område at benytte knappen « Opdater ».',
488
-	'texte_recuperer_base' => 'Reparer databasen',
489
-	'texte_reference_mais_redirige' => 'artikler der refereres til på dit SPIP websted, men som viderestiller til en anden URL.',
490
-	'texte_requetes_echouent' => '<b>Når nogle SQL forespørgsler systematisk og uden tilsyneladende grund går galt, er det muligt at fejlen ligger i selve databasen.</b>
486
+    'texte_rappel_selection_champs' => '[Husk at vælge dette felt korrekt.]',
487
+    'texte_recalcul_page' => 'Hvis du kun ønsker at opdatere en side, bør du gøre det ved fra det offentlige område at benytte knappen « Opdater ».',
488
+    'texte_recuperer_base' => 'Reparer databasen',
489
+    'texte_reference_mais_redirige' => 'artikler der refereres til på dit SPIP websted, men som viderestiller til en anden URL.',
490
+    'texte_requetes_echouent' => '<b>Når nogle SQL forespørgsler systematisk og uden tilsyneladende grund går galt, er det muligt at fejlen ligger i selve databasen.</b>
491 491
 		<p>SQL har en funktion, der reparerer dens tabeller, hvis de er blevet ødelagt ved et uheld. 
492 492
 		Her kan du forsøge at igangsætte denne reparationsfunktion; 
493 493
 		hvis den går galt, bør du beholde en kopi af skærmbilledet, 
494 494
 		som måske kan indeholde antydninger af, hvad der er galt....
495 495
 		<p>Hvis problemet fortsat består, så kontakt dit webhotel.', # MODIF
496
-	'texte_selection_langue_principale' => 'Du kan nedenfor vælge webstedets «hovedsprog». 
496
+    'texte_selection_langue_principale' => 'Du kan nedenfor vælge webstedets «hovedsprog». 
497 497
 		Heldigvis begrænser dette valg ikke dine artikler til at skulle skrives på det valgte sprog 
498 498
 		men gør det muligt at fastsætte, 
499 499
 		<ul><li> standardformatet for datoer i det offentlige område</li>
@@ -503,60 +503,60 @@  discard block
 block discarded – undo
503 503
 		<li> det sprog der anvendes i formularer på det offentlige websted</li>
504 504
 
505 505
 		<li> standardsproget i det private område.</li></ul>',
506
-	'texte_sous_titre' => 'Underrubrik',
507
-	'texte_statistiques_visites' => '(mørke bjælker:  Søndag / mørk kurve: gennemsnitsudvikling)',
508
-	'texte_statut_attente_validation' => 'afventer godkendelse',
509
-	'texte_statut_publies' => 'offentliggjort online',
510
-	'texte_statut_refuses' => 'afvist',
511
-	'texte_suppression_fichiers' => 'Brug denne kommando til at slette alle filer i SPIP’s cache.
506
+    'texte_sous_titre' => 'Underrubrik',
507
+    'texte_statistiques_visites' => '(mørke bjælker:  Søndag / mørk kurve: gennemsnitsudvikling)',
508
+    'texte_statut_attente_validation' => 'afventer godkendelse',
509
+    'texte_statut_publies' => 'offentliggjort online',
510
+    'texte_statut_refuses' => 'afvist',
511
+    'texte_suppression_fichiers' => 'Brug denne kommando til at slette alle filer i SPIP’s cache.
512 512
 		Dette giver dig bl.a. mulighed for at gennemtvinge opdatering af alle sider i tilfælde af 
513 513
 		at du har lavet væsentlige grafiske eller strukturelle ændringer på webstedet.',
514
-	'texte_sur_titre' => 'Hovedoverskrift',
515
-	'texte_table_ok' => ': denne tabel er OK.',
516
-	'texte_tentative_recuperation' => 'Reparationsforsøg',
517
-	'texte_tenter_reparation' => 'Forsøg på at reparere databasen',
518
-	'texte_test_proxy' => 'For at afprøve proxy’en, kan du indtaste adressen på et websted som du ønsker at teste.',
519
-	'texte_titre_02' => 'Emne:',
520
-	'texte_titre_obligatoire' => '<b>Overskrift</b> [Obligatorisk]',
521
-	'texte_travail_article' => '@nom_auteur_modif@ har arbejdet på denne artikel for @date_diff@ minutter siden',
522
-	'texte_travail_collaboratif' => 'Hvis det sker hyppigt at flere redaktører arbejder på samme artikel, kan systemet
514
+    'texte_sur_titre' => 'Hovedoverskrift',
515
+    'texte_table_ok' => ': denne tabel er OK.',
516
+    'texte_tentative_recuperation' => 'Reparationsforsøg',
517
+    'texte_tenter_reparation' => 'Forsøg på at reparere databasen',
518
+    'texte_test_proxy' => 'For at afprøve proxy’en, kan du indtaste adressen på et websted som du ønsker at teste.',
519
+    'texte_titre_02' => 'Emne:',
520
+    'texte_titre_obligatoire' => '<b>Overskrift</b> [Obligatorisk]',
521
+    'texte_travail_article' => '@nom_auteur_modif@ har arbejdet på denne artikel for @date_diff@ minutter siden',
522
+    'texte_travail_collaboratif' => 'Hvis det sker hyppigt at flere redaktører arbejder på samme artikel, kan systemet
523 523
 		vise «åbne» artikler for at undgå samtidige ændringer. Denne indstilling er som standard
524 524
 		slået fra for at undgå utidige advarselsmeddelelser.',
525
-	'texte_vide' => 'tom',
526
-	'texte_vider_cache' => 'Tøm cachen',
527
-	'titre_admin_tech' => 'Teknisk vedligeholdelse',
528
-	'titre_admin_vider' => 'Teknisk vedligeholdelse',
529
-	'titre_cadre_afficher_article' => 'Vis artikler som er',
530
-	'titre_cadre_afficher_traductions' => 'Vis oversættelsesstatus for følgende sprog:',
531
-	'titre_cadre_ajouter_auteur' => 'TILFØJ FORFATTER:',
532
-	'titre_cadre_interieur_rubrique' => 'I afsnit',
533
-	'titre_cadre_numero_auteur' => 'FORFATTER NUMMER',
534
-	'titre_cadre_signature_obligatoire' => '<b>Underskrift</b> [Obligatorisk]<br />',
535
-	'titre_config_fonctions' => 'Konfigurering af webstedet',
536
-	'titre_configuration' => 'Konfigurering af webstedet',
537
-	'titre_connexion_ldap' => 'Indstillinger: <b>Din LDAP forbindelse</b>',
538
-	'titre_groupe_mots' => 'NØGLEORDSGRUPPE:',
539
-	'titre_langue_article' => 'ARTIKLENS SPROG', # MODIF
540
-	'titre_langue_rubrique' => 'SPROGAFSNIT', # MODIF
541
-	'titre_langue_trad_article' => 'ARTIKLENS SPROG OG OVERSÆTTELSER',
542
-	'titre_les_articles' => 'ARTIKLER',
543
-	'titre_naviguer_dans_le_site' => 'Gennemse webstedet...',
544
-	'titre_nouvelle_rubrique' => 'Nyt afsnit',
545
-	'titre_numero_rubrique' => 'AFSNITSNUMMER:',
546
-	'titre_page_articles_edit' => 'Ret: @titre@',
547
-	'titre_page_articles_page' => 'Artikler',
548
-	'titre_page_articles_tous' => 'Hele webstedet',
549
-	'titre_page_calendrier' => 'Kalender @nom_mois@ @annee@',
550
-	'titre_page_config_contenu' => 'Webstedskonfigurering',
551
-	'titre_page_delete_all' => 'total og uigenkaldelig sletning',
552
-	'titre_page_recherche' => 'Søgeresultater @recherche@',
553
-	'titre_page_statistiques_referers' => 'Statistik (indkommende links)',
554
-	'titre_page_upgrade' => 'SPIP opgradering',
555
-	'titre_publication_articles_post_dates' => 'Offentliggørelse af fremdaterede artikler',
556
-	'titre_reparation' => 'Reparer',
557
-	'titre_suivi_petition' => 'Opfølgning på appeller',
558
-	'trad_article_traduction' => 'Alle udgaver af denne artikel :',
559
-	'trad_delier' => 'Afbryd forbindelsen mellem denne artikel og oversættelserne', # MODIF
560
-	'trad_lier' => 'Denne artikel er en oversættelse af artikel nummer :',
561
-	'trad_new' => 'Lav en ny oversættelse af denne artikel' # MODIF
525
+    'texte_vide' => 'tom',
526
+    'texte_vider_cache' => 'Tøm cachen',
527
+    'titre_admin_tech' => 'Teknisk vedligeholdelse',
528
+    'titre_admin_vider' => 'Teknisk vedligeholdelse',
529
+    'titre_cadre_afficher_article' => 'Vis artikler som er',
530
+    'titre_cadre_afficher_traductions' => 'Vis oversættelsesstatus for følgende sprog:',
531
+    'titre_cadre_ajouter_auteur' => 'TILFØJ FORFATTER:',
532
+    'titre_cadre_interieur_rubrique' => 'I afsnit',
533
+    'titre_cadre_numero_auteur' => 'FORFATTER NUMMER',
534
+    'titre_cadre_signature_obligatoire' => '<b>Underskrift</b> [Obligatorisk]<br />',
535
+    'titre_config_fonctions' => 'Konfigurering af webstedet',
536
+    'titre_configuration' => 'Konfigurering af webstedet',
537
+    'titre_connexion_ldap' => 'Indstillinger: <b>Din LDAP forbindelse</b>',
538
+    'titre_groupe_mots' => 'NØGLEORDSGRUPPE:',
539
+    'titre_langue_article' => 'ARTIKLENS SPROG', # MODIF
540
+    'titre_langue_rubrique' => 'SPROGAFSNIT', # MODIF
541
+    'titre_langue_trad_article' => 'ARTIKLENS SPROG OG OVERSÆTTELSER',
542
+    'titre_les_articles' => 'ARTIKLER',
543
+    'titre_naviguer_dans_le_site' => 'Gennemse webstedet...',
544
+    'titre_nouvelle_rubrique' => 'Nyt afsnit',
545
+    'titre_numero_rubrique' => 'AFSNITSNUMMER:',
546
+    'titre_page_articles_edit' => 'Ret: @titre@',
547
+    'titre_page_articles_page' => 'Artikler',
548
+    'titre_page_articles_tous' => 'Hele webstedet',
549
+    'titre_page_calendrier' => 'Kalender @nom_mois@ @annee@',
550
+    'titre_page_config_contenu' => 'Webstedskonfigurering',
551
+    'titre_page_delete_all' => 'total og uigenkaldelig sletning',
552
+    'titre_page_recherche' => 'Søgeresultater @recherche@',
553
+    'titre_page_statistiques_referers' => 'Statistik (indkommende links)',
554
+    'titre_page_upgrade' => 'SPIP opgradering',
555
+    'titre_publication_articles_post_dates' => 'Offentliggørelse af fremdaterede artikler',
556
+    'titre_reparation' => 'Reparer',
557
+    'titre_suivi_petition' => 'Opfølgning på appeller',
558
+    'trad_article_traduction' => 'Alle udgaver af denne artikel :',
559
+    'trad_delier' => 'Afbryd forbindelsen mellem denne artikel og oversættelserne', # MODIF
560
+    'trad_lier' => 'Denne artikel er en oversættelse af artikel nummer :',
561
+    'trad_new' => 'Lav en ny oversættelse af denne artikel' # MODIF
562 562
 );
Please login to merge, or discard this patch.
ecrire/lang/ecrire_ay.php 1 patch
Indentation   +190 added lines, -190 removed lines patch added patch discarded remove patch
@@ -4,211 +4,211 @@
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'activer_plugin' => 'Plugin uk naktayaña
12
+    // A
13
+    'activer_plugin' => 'Plugin uk naktayaña
14 14
 ',
15
-	'aide_non_disponible' => 'Aka yanapa naktatxa janiw aka arunx wakitakiti.',
16
-	'auteur' => 'Qillqiri:',
17
-	'avis_acces_interdit' => 'Mantawx jark’ata.',
18
-	'avis_article_modifie' => 'Amuyam @nom_auteur_modif@ aka qillqatax irnaqataw @date_diff@ ninkharata.',
19
-	'avis_aucun_resultat' => 'Janiw askichat utjkiti.
15
+    'aide_non_disponible' => 'Aka yanapa naktatxa janiw aka arunx wakitakiti.',
16
+    'auteur' => 'Qillqiri:',
17
+    'avis_acces_interdit' => 'Mantawx jark’ata.',
18
+    'avis_article_modifie' => 'Amuyam @nom_auteur_modif@ aka qillqatax irnaqataw @date_diff@ ninkharata.',
19
+    'avis_aucun_resultat' => 'Janiw askichat utjkiti.
20 20
 ',
21
-	'avis_chemin_invalide_1' => 'Thakhix ajllita',
22
-	'avis_chemin_invalide_2' => 'Jan jamakiw iyaw satakiti. Nayrt’ir laphi uñnaqar kutt’am ukatsti jikit yatiyawinak qhanstayam.',
23
-	'avis_connexion_echec_1' => 'Chinuwix jalanuqirirux janiw walt’kiti MySQL.',
24
-	'avis_connexion_echec_2' => 'Arkir laphi uñnaqar kutt’am ukatsti jikit yatiyawinaka mayamp uñjam.',
25
-	'avis_connexion_echec_3' => '&lt;b&gt;Amuyam:&lt;/b&gt; Walja jalanuqirinakana, munasiwa &lt;b&gt;mayiña&lt;/b&gt; mantawitx naktata yatqalltawiru MySQL janir apnaqasa. Janitix chinusiñ puyrktaxa mayampi uñjam lartax ukja.',
26
-	'avis_connexion_ldap_echec_1' => 'Jalanuqirirux chinuwi ukaxa LDAP janiw walt’kiti.',
27
-	'avis_connexion_ldap_echec_2' => 'Nayrir laphi uñnaqar kutt’am ukatsti jikit yatiyawinak qhanstayam.',
28
-	'avis_connexion_ldap_echec_3' => 'Mayakipawjam, askichir ukax jan apnaqamti LDAP apnaqirinak apayaniñataki.',
29
-	'avis_deplacement_rubrique' => '¡AMUYAM! Aka t’aqan utjiwa @contient_breves@ breve@scb@. Janitix yäqtaxa,  iyaw sat casilla uk naktayam.',
30
-	'avis_erreur_connexion_mysql' => 'Chinuw pantjata MySQL',
31
-	'avis_espace_interdit' => '<b>Ch’usawx jark’ata</b> <div>SPIP ukax uchantataxiwa</div>',
32
-	'avis_lecture_noms_bases_1' => 'Uchantat pirwa yatiyawinakatxa uchantir prugramaxa janiw liykiti.',
33
-	'avis_lecture_noms_bases_3' => 'Payir lurawinxa, inas mä pirwa apnaqiri sutimampi apnaqasispa:',
34
-	'avis_non_acces_page' => 'Aka laphi uñnaqarux janiw mantañaniktati.',
35
-	'avis_operation_echec' => 'Lurawix janiw walt’kiti.',
36
-	'avis_operation_impossible' => 'Lurawix janipuni',
37
-	'avis_suppression_base' => '¡AMUYAM, apaqat yatiyawinakax janiw askichaskaspati!',
21
+    'avis_chemin_invalide_1' => 'Thakhix ajllita',
22
+    'avis_chemin_invalide_2' => 'Jan jamakiw iyaw satakiti. Nayrt’ir laphi uñnaqar kutt’am ukatsti jikit yatiyawinak qhanstayam.',
23
+    'avis_connexion_echec_1' => 'Chinuwix jalanuqirirux janiw walt’kiti MySQL.',
24
+    'avis_connexion_echec_2' => 'Arkir laphi uñnaqar kutt’am ukatsti jikit yatiyawinaka mayamp uñjam.',
25
+    'avis_connexion_echec_3' => '&lt;b&gt;Amuyam:&lt;/b&gt; Walja jalanuqirinakana, munasiwa &lt;b&gt;mayiña&lt;/b&gt; mantawitx naktata yatqalltawiru MySQL janir apnaqasa. Janitix chinusiñ puyrktaxa mayampi uñjam lartax ukja.',
26
+    'avis_connexion_ldap_echec_1' => 'Jalanuqirirux chinuwi ukaxa LDAP janiw walt’kiti.',
27
+    'avis_connexion_ldap_echec_2' => 'Nayrir laphi uñnaqar kutt’am ukatsti jikit yatiyawinak qhanstayam.',
28
+    'avis_connexion_ldap_echec_3' => 'Mayakipawjam, askichir ukax jan apnaqamti LDAP apnaqirinak apayaniñataki.',
29
+    'avis_deplacement_rubrique' => '¡AMUYAM! Aka t’aqan utjiwa @contient_breves@ breve@scb@. Janitix yäqtaxa,  iyaw sat casilla uk naktayam.',
30
+    'avis_erreur_connexion_mysql' => 'Chinuw pantjata MySQL',
31
+    'avis_espace_interdit' => '<b>Ch’usawx jark’ata</b> <div>SPIP ukax uchantataxiwa</div>',
32
+    'avis_lecture_noms_bases_1' => 'Uchantat pirwa yatiyawinakatxa uchantir prugramaxa janiw liykiti.',
33
+    'avis_lecture_noms_bases_3' => 'Payir lurawinxa, inas mä pirwa apnaqiri sutimampi apnaqasispa:',
34
+    'avis_non_acces_page' => 'Aka laphi uñnaqarux janiw mantañaniktati.',
35
+    'avis_operation_echec' => 'Lurawix janiw walt’kiti.',
36
+    'avis_operation_impossible' => 'Lurawix janipuni',
37
+    'avis_suppression_base' => '¡AMUYAM, apaqat yatiyawinakax janiw askichaskaspati!',
38 38
 
39
-	// B
40
-	'bouton_acces_ldap' => 'Mä mantaw yapaña LDAP',
41
-	'bouton_ajouter' => 'Yapaña',
42
-	'bouton_annuler' => 'Jiwt’ayaña',
43
-	'bouton_demande_publication' => 'Aka qillqat yatiyañ mayiña',
44
-	'bouton_desactive_tout' => 'Taqpach jiwt’ayaña',
45
-	'bouton_effacer_tout' => '¡Taqpach chhaqhayaña!',
46
-	'bouton_envoyer_message' => 'Qhananchat yatiyaw: apayaña',
47
-	'bouton_modifier' => 'Mayjachaña',
48
-	'bouton_radio_afficher' => 'Uñachayaña',
49
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Chint’at tanta qillqirinakan uñstaña',
50
-	'bouton_radio_envoi_annonces_adresse' => 'Yatiyawinak utjawir apayaña:',
51
-	'bouton_radio_envoi_liste_nouveautes' => 'Machaq tanta yatiyawinak apayaña',
52
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Tanta qillqirinakan jan uñstaña',
53
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Yatiyawinak qhanstat jan apayaña',
54
-	'bouton_redirection' => 'Irpxatawi',
55
-	'bouton_relancer_installation' => 'Mayamp uchantaw yatiyaña',
56
-	'bouton_suivant' => 'Jutiri',
57
-	'bouton_tenter_recuperation' => 'Askichañ yant’aña',
58
-	'bouton_test_proxy' => 'proxy uk yant’aña',
59
-	'bouton_vider_cache' => 'caché uk ch’usachaña',
39
+    // B
40
+    'bouton_acces_ldap' => 'Mä mantaw yapaña LDAP',
41
+    'bouton_ajouter' => 'Yapaña',
42
+    'bouton_annuler' => 'Jiwt’ayaña',
43
+    'bouton_demande_publication' => 'Aka qillqat yatiyañ mayiña',
44
+    'bouton_desactive_tout' => 'Taqpach jiwt’ayaña',
45
+    'bouton_effacer_tout' => '¡Taqpach chhaqhayaña!',
46
+    'bouton_envoyer_message' => 'Qhananchat yatiyaw: apayaña',
47
+    'bouton_modifier' => 'Mayjachaña',
48
+    'bouton_radio_afficher' => 'Uñachayaña',
49
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Chint’at tanta qillqirinakan uñstaña',
50
+    'bouton_radio_envoi_annonces_adresse' => 'Yatiyawinak utjawir apayaña:',
51
+    'bouton_radio_envoi_liste_nouveautes' => 'Machaq tanta yatiyawinak apayaña',
52
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Tanta qillqirinakan jan uñstaña',
53
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Yatiyawinak qhanstat jan apayaña',
54
+    'bouton_redirection' => 'Irpxatawi',
55
+    'bouton_relancer_installation' => 'Mayamp uchantaw yatiyaña',
56
+    'bouton_suivant' => 'Jutiri',
57
+    'bouton_tenter_recuperation' => 'Askichañ yant’aña',
58
+    'bouton_test_proxy' => 'proxy uk yant’aña',
59
+    'bouton_vider_cache' => 'caché uk ch’usachaña',
60 60
 
61
-	// C
62
-	'cache_modifiable_webmestre' => 'Aka amuykipawix mayxt’ataspaw webmistress qamawit ukata.',
61
+    // C
62
+    'cache_modifiable_webmestre' => 'Aka amuykipawix mayxt’ataspaw webmistress qamawit ukata.',
63 63
 
64
-	// D
65
-	'date_mot_heures' => 'urasa
64
+    // D
65
+    'date_mot_heures' => 'urasa
66 66
 ',
67 67
 
68
-	// E
69
-	'email' => 'aruskipayiri',
70
-	'email_2' => 'aruskipayiri:
68
+    // E
69
+    'email' => 'aruskipayiri',
70
+    'email_2' => 'aruskipayiri:
71 71
 ',
72
-	'entree_adresse_annuaire' => 'Marpachat utjawi',
73
-	'entree_adresse_email' => 'Aruskipayirima',
74
-	'entree_base_donnee_1' => 'Pirwat yatiyawinakaxa utjawi',
75
-	'entree_biographie' => 'Mä juk’a jakawipat qillqa, juk’a arunakampi...',
76
-	'entree_chemin_acces' => '<b>Mantaña</b> mantañ thakhixa:',
77
-	'entree_cle_pgp' => 'Impt’atama PGP',
78
-	'entree_contenu_rubrique' => '(T’aqan utjawipa, qawqha arunakampi)',
79
-	'entree_identifiants_connexion' => 'Chinuw uñacht’ayirinakama...',
80
-	'entree_informations_connexion_ldap' => 'Aka phuqañ laphina yatiyawinak conexión ukata jach’a q’ipimaru LDAP. Uka yatiyawinakxa yatiyanitamwa apnaqir apnaqawita jan ukjax red ukata',
81
-	'entree_infos_perso' => '¿Khititasa?',
82
-	'entree_interieur_rubrique' => 'T’aqata maqhana...',
83
-	'entree_liens_sites' => '<b>Chinu jach’a sawu </b>(aytata, qamaw tumpañataki, ...)',
84
-	'entree_login' => 'Sutichatama',
85
-	'entree_login_connexion_1' => 'Chinu uñacht’ayirima',
86
-	'entree_mot_passe' => 'Imt’awima',
87
-	'entree_mot_passe_1' => 'Chinu imt’awima',
88
-	'entree_mot_passe_2' => '(Awisax FTP imt’atamar ukankiwa ukatsti awisax ch’usak jayti)',
89
-	'entree_nom_fichier' => 'K’ipit sutipa uk uchantaña @texte_compresse@:',
90
-	'entree_nom_pseudo' => 'Sutima jan ukax sutinchama',
91
-	'entree_nom_pseudo_1' => 'Sutima jan ukax sutinchama',
92
-	'entree_nom_site' => 'Qamawiman sutipa',
93
-	'entree_nouveau_passe' => 'Machaq imt’awima',
94
-	'entree_passe_ldap' => 'Imt’awima',
95
-	'entree_port_annuaire' => 'Marpachat thakhin jakhu',
96
-	'entree_signature' => 'Iyawsa',
97
-	'entree_titre_obligatoire' => '<b>Sutinchata</b> [Obligatorio]<br />',
98
-	'entree_url' => 'Utjawi(URL) qamawimata',
99
-	'erreur_plugin_fichier_absent' => 'Jan utjaw q’ipi
72
+    'entree_adresse_annuaire' => 'Marpachat utjawi',
73
+    'entree_adresse_email' => 'Aruskipayirima',
74
+    'entree_base_donnee_1' => 'Pirwat yatiyawinakaxa utjawi',
75
+    'entree_biographie' => 'Mä juk’a jakawipat qillqa, juk’a arunakampi...',
76
+    'entree_chemin_acces' => '<b>Mantaña</b> mantañ thakhixa:',
77
+    'entree_cle_pgp' => 'Impt’atama PGP',
78
+    'entree_contenu_rubrique' => '(T’aqan utjawipa, qawqha arunakampi)',
79
+    'entree_identifiants_connexion' => 'Chinuw uñacht’ayirinakama...',
80
+    'entree_informations_connexion_ldap' => 'Aka phuqañ laphina yatiyawinak conexión ukata jach’a q’ipimaru LDAP. Uka yatiyawinakxa yatiyanitamwa apnaqir apnaqawita jan ukjax red ukata',
81
+    'entree_infos_perso' => '¿Khititasa?',
82
+    'entree_interieur_rubrique' => 'T’aqata maqhana...',
83
+    'entree_liens_sites' => '<b>Chinu jach’a sawu </b>(aytata, qamaw tumpañataki, ...)',
84
+    'entree_login' => 'Sutichatama',
85
+    'entree_login_connexion_1' => 'Chinu uñacht’ayirima',
86
+    'entree_mot_passe' => 'Imt’awima',
87
+    'entree_mot_passe_1' => 'Chinu imt’awima',
88
+    'entree_mot_passe_2' => '(Awisax FTP imt’atamar ukankiwa ukatsti awisax ch’usak jayti)',
89
+    'entree_nom_fichier' => 'K’ipit sutipa uk uchantaña @texte_compresse@:',
90
+    'entree_nom_pseudo' => 'Sutima jan ukax sutinchama',
91
+    'entree_nom_pseudo_1' => 'Sutima jan ukax sutinchama',
92
+    'entree_nom_site' => 'Qamawiman sutipa',
93
+    'entree_nouveau_passe' => 'Machaq imt’awima',
94
+    'entree_passe_ldap' => 'Imt’awima',
95
+    'entree_port_annuaire' => 'Marpachat thakhin jakhu',
96
+    'entree_signature' => 'Iyawsa',
97
+    'entree_titre_obligatoire' => '<b>Sutinchata</b> [Obligatorio]<br />',
98
+    'entree_url' => 'Utjawi(URL) qamawimata',
99
+    'erreur_plugin_fichier_absent' => 'Jan utjaw q’ipi
100 100
 ',
101
-	'erreur_plugin_fichier_def_absent' => 'Qhanstayat q’ipix janiw utjkiti',
102
-	'erreur_plugin_nom_fonction_interdit' => 'Lurt’awit sutix jark’ata',
103
-	'erreur_plugin_nom_manquant' => 'Jan utjawi plugin ukan sutipa',
104
-	'erreur_plugin_prefix_manquant' => 'Sutinakat ch’usawj pluguin ukat jan qhanstata',
105
-	'erreur_plugin_tag_plugin_absent' => 'Janiw utjkiti &lt;plugin&gt; qhanstayawin q’ipita',
106
-	'erreur_plugin_version_manquant' => 'Pluguin ukat uñjata jan utjkiti',
101
+    'erreur_plugin_fichier_def_absent' => 'Qhanstayat q’ipix janiw utjkiti',
102
+    'erreur_plugin_nom_fonction_interdit' => 'Lurt’awit sutix jark’ata',
103
+    'erreur_plugin_nom_manquant' => 'Jan utjawi plugin ukan sutipa',
104
+    'erreur_plugin_prefix_manquant' => 'Sutinakat ch’usawj pluguin ukat jan qhanstata',
105
+    'erreur_plugin_tag_plugin_absent' => 'Janiw utjkiti &lt;plugin&gt; qhanstayawin q’ipita',
106
+    'erreur_plugin_version_manquant' => 'Pluguin ukat uñjata jan utjkiti',
107 107
 
108
-	// I
109
-	'ical_info1' => 'Aka qamawinxa kunayman lurawinak chinusiñataki utji qamaw utjawipampi',
110
-	'ical_info2' => 'Aka taqpach lurawinakxat juk’amp yatxatañatakix, yatxatañatakix jan pächasimti <a href="@spipnet@">illqanakawi</a>.', # MODIF
111
-	'ical_info_calendrier' => 'Pä pachachimpuw utjtam. Mayirix qamawit mä laphi uñnaqawa kunanti taqpach yatiyat qillqatank yatiyi: jumakiw uñjtax uka mä suti imt’awi ukata, ukatxa mayjt’ayasmaw kuna pachtix munktax ukja imt’awim mayjt’ayasa.',
112
-	'ical_methode_http' => 'Apaqaña',
113
-	'ical_methode_webcal' => 'Kikipawi (webcal://)', # MODIF
114
-	'ical_texte_prive' => 'Aka sapa maynit pacha chimpuxa, aka qamawit jark’ata lurawinak yatiytam (lurawinaka ukatsti sapa maynit aytatanaka, qillqatanaka ukatsti jisk’aptat amtanaka...)',
115
-	'ical_texte_public' => 'Aka pacha chimpux uñchukiytam qamawit lurawinaka (qillqatanak ukatsti jisk’aptatanak yatiyata).',
116
-	'ical_texte_rss' => 'Machaq yatiyawinak aka qamawitxa apxasismaw kawkir q’ipinak liyt’irimpi XML/RSS (Rich Site Summary) utt’ayataru. Ukhamaraki SPIP ukax liyt’aspaw machaq yatiyat yatiyawinaka yaqha qamawinakana kawkinti turkakipaw utt’ayatampi lurapxi (apxasit qamawinaka). ',
117
-	'ical_titre_js' => 'Javascript',
118
-	'ical_titre_mailing' => 'Aruskipayirit tanta',
119
-	'ical_titre_rss' => 'Apxasit q’ipinaka',
120
-	'icone_activer_cookie' => '“Cookie” uk naktayaña yatiyawinakata',
121
-	'icone_admin_plugin' => 'Pluguin ukanakat apnaqawi',
122
-	'icone_afficher_auteurs' => 'Qillqirinaka uñachayaña',
123
-	'icone_afficher_visiteurs' => 'Tumpirinaka uñachayaña',
124
-	'icone_arret_discussion' => 'Aka aruskipawin jan mayamp arst’añati',
125
-	'icone_calendrier' => 'Pachachimpu',
126
-	'icone_creer_auteur' => 'Mä machaq qillqiri uñstayaña ukatsti aka qillqatar mayacht’aña',
127
-	'icone_creer_rubrique_2' => 'Mä machaq t’aqa uñstayaña',
128
-	'icone_modifier_article' => 'Aka qillqata mayjt’ayaña',
129
-	'icone_modifier_rubrique' => 'Aka t’aqa mayjt’ayaña',
130
-	'icone_retour' => 'Kutiña',
131
-	'icone_retour_article' => 'Qillqatar kutiña',
132
-	'icone_supprimer_cookie' => '\\&quot;Cookie\\&quot; uk apaqaña yatiyawinakata ',
133
-	'icone_supprimer_rubrique' => 'Aka t’aqa a paqayaña',
134
-	'icone_supprimer_signature' => 'Aka iyawsa apaqaña',
135
-	'icone_valider_signature' => 'Aka iyaws iyaw saña',
136
-	'image_administrer_rubrique' => 'Aka t’aqa apnaqasmawa',
137
-	'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
138
-	'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
139
-	'info_1_article' => '1 qillqata',
140
-	'info_administrateur' => 'Apnaqiri',
141
-	'info_administrateur_1' => 'Apnaqiri',
142
-	'info_administrateur_2' => 'Qamawita (<i>amuyump luram</i>)',
143
-	'info_administrateur_site_02' => 'Aka chinunx limt’am',
144
-	'info_administrateurs' => 'Apnaqirinaka',
145
-	'info_administrer_rubrique' => 'Aka t’aqxa apnaqasmawa',
146
-	'info_adresse' => 'utjawiru:',
147
-	'info_adresse_url' => 'Utjawi (URL) jach’a qamaw utata',
148
-	'info_aide_en_ligne' => 'SPIP naktatat yanapa',
149
-	'info_ajouter_rubrique' => 'Apnaqañatakix yaqha t’aqa yapaña',
150
-	'info_annonce_nouveautes' => 'Machaq yatiyawinaka yatiyaña',
151
-	'info_article' => 'qillqata
108
+    // I
109
+    'ical_info1' => 'Aka qamawinxa kunayman lurawinak chinusiñataki utji qamaw utjawipampi',
110
+    'ical_info2' => 'Aka taqpach lurawinakxat juk’amp yatxatañatakix, yatxatañatakix jan pächasimti <a href="@spipnet@">illqanakawi</a>.', # MODIF
111
+    'ical_info_calendrier' => 'Pä pachachimpuw utjtam. Mayirix qamawit mä laphi uñnaqawa kunanti taqpach yatiyat qillqatank yatiyi: jumakiw uñjtax uka mä suti imt’awi ukata, ukatxa mayjt’ayasmaw kuna pachtix munktax ukja imt’awim mayjt’ayasa.',
112
+    'ical_methode_http' => 'Apaqaña',
113
+    'ical_methode_webcal' => 'Kikipawi (webcal://)', # MODIF
114
+    'ical_texte_prive' => 'Aka sapa maynit pacha chimpuxa, aka qamawit jark’ata lurawinak yatiytam (lurawinaka ukatsti sapa maynit aytatanaka, qillqatanaka ukatsti jisk’aptat amtanaka...)',
115
+    'ical_texte_public' => 'Aka pacha chimpux uñchukiytam qamawit lurawinaka (qillqatanak ukatsti jisk’aptatanak yatiyata).',
116
+    'ical_texte_rss' => 'Machaq yatiyawinak aka qamawitxa apxasismaw kawkir q’ipinak liyt’irimpi XML/RSS (Rich Site Summary) utt’ayataru. Ukhamaraki SPIP ukax liyt’aspaw machaq yatiyat yatiyawinaka yaqha qamawinakana kawkinti turkakipaw utt’ayatampi lurapxi (apxasit qamawinaka). ',
117
+    'ical_titre_js' => 'Javascript',
118
+    'ical_titre_mailing' => 'Aruskipayirit tanta',
119
+    'ical_titre_rss' => 'Apxasit q’ipinaka',
120
+    'icone_activer_cookie' => '“Cookie” uk naktayaña yatiyawinakata',
121
+    'icone_admin_plugin' => 'Pluguin ukanakat apnaqawi',
122
+    'icone_afficher_auteurs' => 'Qillqirinaka uñachayaña',
123
+    'icone_afficher_visiteurs' => 'Tumpirinaka uñachayaña',
124
+    'icone_arret_discussion' => 'Aka aruskipawin jan mayamp arst’añati',
125
+    'icone_calendrier' => 'Pachachimpu',
126
+    'icone_creer_auteur' => 'Mä machaq qillqiri uñstayaña ukatsti aka qillqatar mayacht’aña',
127
+    'icone_creer_rubrique_2' => 'Mä machaq t’aqa uñstayaña',
128
+    'icone_modifier_article' => 'Aka qillqata mayjt’ayaña',
129
+    'icone_modifier_rubrique' => 'Aka t’aqa mayjt’ayaña',
130
+    'icone_retour' => 'Kutiña',
131
+    'icone_retour_article' => 'Qillqatar kutiña',
132
+    'icone_supprimer_cookie' => '\\&quot;Cookie\\&quot; uk apaqaña yatiyawinakata ',
133
+    'icone_supprimer_rubrique' => 'Aka t’aqa a paqayaña',
134
+    'icone_supprimer_signature' => 'Aka iyawsa apaqaña',
135
+    'icone_valider_signature' => 'Aka iyaws iyaw saña',
136
+    'image_administrer_rubrique' => 'Aka t’aqa apnaqasmawa',
137
+    'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
138
+    'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
139
+    'info_1_article' => '1 qillqata',
140
+    'info_administrateur' => 'Apnaqiri',
141
+    'info_administrateur_1' => 'Apnaqiri',
142
+    'info_administrateur_2' => 'Qamawita (<i>amuyump luram</i>)',
143
+    'info_administrateur_site_02' => 'Aka chinunx limt’am',
144
+    'info_administrateurs' => 'Apnaqirinaka',
145
+    'info_administrer_rubrique' => 'Aka t’aqxa apnaqasmawa',
146
+    'info_adresse' => 'utjawiru:',
147
+    'info_adresse_url' => 'Utjawi (URL) jach’a qamaw utata',
148
+    'info_aide_en_ligne' => 'SPIP naktatat yanapa',
149
+    'info_ajouter_rubrique' => 'Apnaqañatakix yaqha t’aqa yapaña',
150
+    'info_annonce_nouveautes' => 'Machaq yatiyawinaka yatiyaña',
151
+    'info_article' => 'qillqata
152 152
 ',
153
-	'info_article_2' => 'qillqatanaka',
154
-	'info_article_a_paraitre' => 'Qillqatanak jutir urumpi yatiyataru',
155
-	'info_articles_02' => 'qillqatanaka',
156
-	'info_articles_2' => 'Qillqatanaka',
157
-	'info_articles_auteur' => 'Aka qillqirit qillqatanaka',
158
-	'info_articles_trouves' => 'Qillqatanak jikita',
159
-	'info_attente_validation' => 'Qillqatanakax iyaw sañataki suyaski',
160
-	'info_aujourdhui' => 'jichhüru:',
161
-	'info_auteur_gere_toutes_rubriques_2' => 'Je gère <b>toutes les rubriques</b>', # MODIF
162
-	'info_auteurs' => 'Qillqirinaka',
163
-	'info_auteurs_par_tri' => 'Qillqirinaka@partri@',
164
-	'info_auteurs_trouves' => 'Qillqirinaka jikita',
165
-	'info_authentification_externe' => 'Anqax chiqpach siriwi',
166
-	'info_avertissement' => 'Amuyam',
167
-	'info_base_installee' => 'Ch’akha ch’akha pirwa yatiyawinakamatxa uchantataxiwa',
168
-	'info_chapeau' => 'Qalltawi',
169
-	'info_chapeau_2' => 'Qalltawi:',
170
-	'info_chemin_acces_1' => 'Ajlliñatakiwa:  &lt;b&gt;&lt;/b&gt;mantañ thakhita jach’a q’ipina&lt;/b&gt;',
171
-	'info_chemin_acces_annuaire' => 'Ajllañatakiwa:  &lt;b&gt;Mantañ thakhi jach’a q’ipina&lt;/b&gt;',
172
-	'info_choix_base' => 'Kimsir sarawi:',
173
-	'info_classement_1' => '° ukjaru @liste@',
174
-	'info_classement_2' => '° ukjaru @liste@ 
153
+    'info_article_2' => 'qillqatanaka',
154
+    'info_article_a_paraitre' => 'Qillqatanak jutir urumpi yatiyataru',
155
+    'info_articles_02' => 'qillqatanaka',
156
+    'info_articles_2' => 'Qillqatanaka',
157
+    'info_articles_auteur' => 'Aka qillqirit qillqatanaka',
158
+    'info_articles_trouves' => 'Qillqatanak jikita',
159
+    'info_attente_validation' => 'Qillqatanakax iyaw sañataki suyaski',
160
+    'info_aujourdhui' => 'jichhüru:',
161
+    'info_auteur_gere_toutes_rubriques_2' => 'Je gère <b>toutes les rubriques</b>', # MODIF
162
+    'info_auteurs' => 'Qillqirinaka',
163
+    'info_auteurs_par_tri' => 'Qillqirinaka@partri@',
164
+    'info_auteurs_trouves' => 'Qillqirinaka jikita',
165
+    'info_authentification_externe' => 'Anqax chiqpach siriwi',
166
+    'info_avertissement' => 'Amuyam',
167
+    'info_base_installee' => 'Ch’akha ch’akha pirwa yatiyawinakamatxa uchantataxiwa',
168
+    'info_chapeau' => 'Qalltawi',
169
+    'info_chapeau_2' => 'Qalltawi:',
170
+    'info_chemin_acces_1' => 'Ajlliñatakiwa:  &lt;b&gt;&lt;/b&gt;mantañ thakhita jach’a q’ipina&lt;/b&gt;',
171
+    'info_chemin_acces_annuaire' => 'Ajllañatakiwa:  &lt;b&gt;Mantañ thakhi jach’a q’ipina&lt;/b&gt;',
172
+    'info_choix_base' => 'Kimsir sarawi:',
173
+    'info_classement_1' => '° ukjaru @liste@',
174
+    'info_classement_2' => '° ukjaru @liste@ 
175 175
 ',
176
-	'info_code_acces' => '¡Mantañ chimpunakam jan armasimti!',
177
-	'info_config_suivi_explication' => 'Tanta aruskipayiriru aka qamawitxa qillqayasismaw. Aruskipayiritxa qillqatanakat yatiyawinak qatuqata ukatsti jisk’aptat amtatanak yatiyatawiru.',
178
-	'info_confirmer_passe' => 'Machaq imt’aw iyaw saña: ',
179
-	'info_connexion_base' => 'Payir sarawi: &lt;b&gt;chinuñ yant’awi base ukaru&lt;/b&gt;',
180
-	'info_connexion_ldap_ok' => 'LDAP chinuwix lurt’xiwa.</b><p> jutir sarawir sarantasmawa.</p>', # MODIF
181
-	'info_connexion_mysql' => 'Mayir sarawi: <b> MySQL chinuwima</b>',
182
-	'info_connexion_ok' => 'Chinuwix lurt’xiwa.',
183
-	'info_contact' => 'Jikxatata',
184
-	'info_contenu_articles' => 'Qillqatanakat utjawi',
185
-	'info_creation_paragraphe' => ' (Tanta amuyunak uñstayañatakix, ch’usa siqinak jaytam)', # MODIF
186
-	'info_creation_rubrique' => 'Janir qillqatanak qillt’asinxa, &lt;br /&gt; mä t’aqa uñstayañama.&lt;br /&gt;',
187
-	'info_creation_tables' => 'Pusir sarawi: &lt;b&gt;base ukat uyu uyunakat uñstayawi&lt;/b&gt; ',
188
-	'info_creer_base' => '&lt;b&gt;uñstayaña&lt;/b&gt; mä machaq yatiyawinak pirwa: ',
189
-	'info_dans_rubrique' => 'T’aqanxa...',
190
-	'info_date_publication_anterieure' => 'Nayrt’ir uru aka qillqawita',
191
-	'info_date_referencement' => 'APXASIW URU AKA QAMAWITA:',
192
-	'info_derniere_etape' => 'Qhipa sarawi: ¡tukuytanwa!',
193
-	'info_descriptif' => 'Uñt’ayawi:',
194
-	'info_discussion_cours' => 'Amuyt’awinakax lurasiskiw',
195
-	'info_ecrire_article' => 'Janir qillqatanak qillqasinxa, mä t’aqa uñstayañamawa.',
196
-	'info_email_envoi' => 'Apaw aruskipayirit utjawipa (ajlliñatakiwa)',
197
-	'info_email_webmestre' => 'Aruskipayirit utjawipa webmaster ukata (ajlliñatakiwa)', # MODIF
198
-	'info_envoi_email_automatique' => 'Aruskipayirinakat justup apayawi',
199
-	'info_envoyer_maintenant' => 'Jichhaki apayaña',
200
-	'info_etape_suivante' => 'Arkir sarawir sarantaña',
201
-	'info_etape_suivante_1' => 'Arkir sarawir sarantasmawa',
202
-	'info_etape_suivante_2' => 'Arkir sarawir sarantasmawa',
203
-	'info_exportation_base' => 'base ukax apsusispaw @archive@ uka tuqiru',
204
-	'info_facilite_suivi_activite' => 'Qillqa lurawit uñch’ukiw jasachañatakix, SPIP ukax aruskipayirit apayaspa, mä tanta qillqirinakar ukhama yatiyatawinakataki yatiyawinaka ukatak mayiwinaka, ukhamarak qillqatanakat iyaw sawi.', # MODIF
205
-	'info_fichiers_authent' => 'Chiqpach sirit q’ipinaka «.htpasswd» ',
206
-	'info_forums_abo_invites' => 'Qamawimax aruskipañawinakaniw qullqimp qillqatanakatakikiwa; Aka jach’a uta qamawinxa tumpirinakaru qillqayasiñataki jawthapiyi.',
207
-	'info_gauche_auteurs' => 'Akanxa taqpach qamawit qillqirinakaw uñsti. Kunjamaskis ukxa jisk’a saltan kulurapampiw   uñacht’ayi (apnaqiri = ch’uxña, qillqiri = q’illu).',
208
-	'info_gauche_auteurs_exterieurs' => 'Anqajankir qillqirinakax, qamawir jan mantañaniwa, mä laram jisk’a saltampiw uñacht’ayataski; mä wayaqamp chhaqayatakis.', # MODIF
209
-	'info_gauche_messagerie' => 'Yatiyawirix yatiyasiwa, amtayirinak uñstyaña yatiyaw tantaru kuns apaniñapataki jan ukjax yatiyawinak yatiyaña ( apnaqir qutu ukar mayachatakis ukjax)
176
+    'info_code_acces' => '¡Mantañ chimpunakam jan armasimti!',
177
+    'info_config_suivi_explication' => 'Tanta aruskipayiriru aka qamawitxa qillqayasismaw. Aruskipayiritxa qillqatanakat yatiyawinak qatuqata ukatsti jisk’aptat amtatanak yatiyatawiru.',
178
+    'info_confirmer_passe' => 'Machaq imt’aw iyaw saña: ',
179
+    'info_connexion_base' => 'Payir sarawi: &lt;b&gt;chinuñ yant’awi base ukaru&lt;/b&gt;',
180
+    'info_connexion_ldap_ok' => 'LDAP chinuwix lurt’xiwa.</b><p> jutir sarawir sarantasmawa.</p>', # MODIF
181
+    'info_connexion_mysql' => 'Mayir sarawi: <b> MySQL chinuwima</b>',
182
+    'info_connexion_ok' => 'Chinuwix lurt’xiwa.',
183
+    'info_contact' => 'Jikxatata',
184
+    'info_contenu_articles' => 'Qillqatanakat utjawi',
185
+    'info_creation_paragraphe' => ' (Tanta amuyunak uñstayañatakix, ch’usa siqinak jaytam)', # MODIF
186
+    'info_creation_rubrique' => 'Janir qillqatanak qillt’asinxa, &lt;br /&gt; mä t’aqa uñstayañama.&lt;br /&gt;',
187
+    'info_creation_tables' => 'Pusir sarawi: &lt;b&gt;base ukat uyu uyunakat uñstayawi&lt;/b&gt; ',
188
+    'info_creer_base' => '&lt;b&gt;uñstayaña&lt;/b&gt; mä machaq yatiyawinak pirwa: ',
189
+    'info_dans_rubrique' => 'T’aqanxa...',
190
+    'info_date_publication_anterieure' => 'Nayrt’ir uru aka qillqawita',
191
+    'info_date_referencement' => 'APXASIW URU AKA QAMAWITA:',
192
+    'info_derniere_etape' => 'Qhipa sarawi: ¡tukuytanwa!',
193
+    'info_descriptif' => 'Uñt’ayawi:',
194
+    'info_discussion_cours' => 'Amuyt’awinakax lurasiskiw',
195
+    'info_ecrire_article' => 'Janir qillqatanak qillqasinxa, mä t’aqa uñstayañamawa.',
196
+    'info_email_envoi' => 'Apaw aruskipayirit utjawipa (ajlliñatakiwa)',
197
+    'info_email_webmestre' => 'Aruskipayirit utjawipa webmaster ukata (ajlliñatakiwa)', # MODIF
198
+    'info_envoi_email_automatique' => 'Aruskipayirinakat justup apayawi',
199
+    'info_envoyer_maintenant' => 'Jichhaki apayaña',
200
+    'info_etape_suivante' => 'Arkir sarawir sarantaña',
201
+    'info_etape_suivante_1' => 'Arkir sarawir sarantasmawa',
202
+    'info_etape_suivante_2' => 'Arkir sarawir sarantasmawa',
203
+    'info_exportation_base' => 'base ukax apsusispaw @archive@ uka tuqiru',
204
+    'info_facilite_suivi_activite' => 'Qillqa lurawit uñch’ukiw jasachañatakix, SPIP ukax aruskipayirit apayaspa, mä tanta qillqirinakar ukhama yatiyatawinakataki yatiyawinaka ukatak mayiwinaka, ukhamarak qillqatanakat iyaw sawi.', # MODIF
205
+    'info_fichiers_authent' => 'Chiqpach sirit q’ipinaka «.htpasswd» ',
206
+    'info_forums_abo_invites' => 'Qamawimax aruskipañawinakaniw qullqimp qillqatanakatakikiwa; Aka jach’a uta qamawinxa tumpirinakaru qillqayasiñataki jawthapiyi.',
207
+    'info_gauche_auteurs' => 'Akanxa taqpach qamawit qillqirinakaw uñsti. Kunjamaskis ukxa jisk’a saltan kulurapampiw   uñacht’ayi (apnaqiri = ch’uxña, qillqiri = q’illu).',
208
+    'info_gauche_auteurs_exterieurs' => 'Anqajankir qillqirinakax, qamawir jan mantañaniwa, mä laram jisk’a saltampiw uñacht’ayataski; mä wayaqamp chhaqayatakis.', # MODIF
209
+    'info_gauche_messagerie' => 'Yatiyawirix yatiyasiwa, amtayirinak uñstyaña yatiyaw tantaru kuns apaniñapataki jan ukjax yatiyawinak yatiyaña ( apnaqir qutu ukar mayachatakis ukjax)
210 210
 ',
211
-	'info_gauche_statistiques_referers' => 'Aka Web qamawix tantanak uñicht’ayi &lt;i&gt;referers&lt;/i&gt;, qamawinakan chinunak utjkis ukhamarak juman qamawimar apapxi, masurutakiki ukhamarak jichhurutakiki; aka tantaxa sapa pä tunka urasanaka ch’usaru uskuña.',
212
-	'info_gauche_visiteurs_enregistres' => 'Akanxa jach’a qamaw utan qillqatanakakiw jikxatasi (aruskipañawinak qillqayasiyampi)',
213
-	'info_identification_publique' => 'Uñacht’ayawima...'
211
+    'info_gauche_statistiques_referers' => 'Aka Web qamawix tantanak uñicht’ayi &lt;i&gt;referers&lt;/i&gt;, qamawinakan chinunak utjkis ukhamarak juman qamawimar apapxi, masurutakiki ukhamarak jichhurutakiki; aka tantaxa sapa pä tunka urasanaka ch’usaru uskuña.',
212
+    'info_gauche_visiteurs_enregistres' => 'Akanxa jach’a qamaw utan qillqatanakakiw jikxatasi (aruskipañawinak qillqayasiyampi)',
213
+    'info_identification_publique' => 'Uñacht’ayawima...'
214 214
 );
Please login to merge, or discard this patch.
ecrire/lang/ecrire_he.php 1 patch
Indentation   +366 added lines, -366 removed lines patch added patch discarded remove patch
@@ -4,393 +4,393 @@
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'activer_plugin' => 'החלף את ה-PLUGIN',
14
-	'affichage' => 'הצגה',
15
-	'aide_non_disponible' => 'חלק זה מהעזרה אונליין אינו עדיין מוכן בשפה זו.',
16
-	'auteur' => 'כותב',
17
-	'avis_acces_interdit' => 'גישה אסורה',
18
-	'avis_article_modifie' => 'אזהרה, @nom_auteur_modif@ עבד על הכתבה הזאת @date_diff@ לפני דקות אחדות',
19
-	'avis_aucun_resultat' => '.שום תוצאות לא נמצאו',
20
-	'avis_base_inaccessible' => 'אי אפשר להתחבר לנדבך נתונים données @base@.',
21
-	'avis_chemin_invalide_1' => 'הנתיב שבחרת',
22
-	'avis_chemin_invalide_2' => 'לא נראה בר תוקף. נא לחזור לדף הקודם ולוודא את האינפורמציה.',
23
-	'avis_connexion_echec_1' => 'התקשרות לבסיס הנתונים נכשלה',
24
-	'avis_connexion_echec_2' => 'נא לחזור לדף הקודם ולוודא את האינפורמציה. ',
25
-	'avis_connexion_echec_3' => '<b>N.B.</b> על מספר שרתים, אתה חייב <b>בקשה</b> ההפעלה של הגישה שלך לבסיס הנתונים של מיי.אס.קיו.אל לפני שתוכל להשתמש בו. אם אינך יכול להתחבר, וודא שלמעשה שלחת את הבקשה הזאת ',
26
-	'avis_connexion_ldap_echec_1' => 'התקשרות לשרת אל.די.איי.פי נכשלה',
27
-	'avis_connexion_ldap_echec_2' => 'חזור אל הדף הקודם וודא את האינפורמציה שסיפקת',
28
-	'avis_connexion_ldap_echec_3' => 'לחלופין, אל תשתמש בתמיכת אל.די.איי.פי  לייבא משתמשים ',
29
-	'avis_deplacement_rubrique' => ' אזהרה ! המדור הזה כולל @contient_breves@ brève@scb@ : אם הנך מזיז אותו, וודא שהנך מסמן את התיבה הזאת לאישור.',
30
-	'avis_erreur_connexion_mysql' => 'שגיאת התחברות לאס.קיו.אל',
31
-	'avis_espace_interdit' => '<b>Forbidden area</b><p>אס.פי.אי.פי כבר מותקן', # MODIF
32
-	'avis_lecture_noms_bases_1' => 'תוכנת ההתקנה לא יכולה לקרוא את שמות בסיסי הנתונים המותקנים ',
33
-	'avis_lecture_noms_bases_2' => 'או שאף בסיס אינו נגיש , או שהפונקציה המאפשרת לערוך רשימה של הבסיסים אינה פעילה יותר
12
+    // A
13
+    'activer_plugin' => 'החלף את ה-PLUGIN',
14
+    'affichage' => 'הצגה',
15
+    'aide_non_disponible' => 'חלק זה מהעזרה אונליין אינו עדיין מוכן בשפה זו.',
16
+    'auteur' => 'כותב',
17
+    'avis_acces_interdit' => 'גישה אסורה',
18
+    'avis_article_modifie' => 'אזהרה, @nom_auteur_modif@ עבד על הכתבה הזאת @date_diff@ לפני דקות אחדות',
19
+    'avis_aucun_resultat' => '.שום תוצאות לא נמצאו',
20
+    'avis_base_inaccessible' => 'אי אפשר להתחבר לנדבך נתונים données @base@.',
21
+    'avis_chemin_invalide_1' => 'הנתיב שבחרת',
22
+    'avis_chemin_invalide_2' => 'לא נראה בר תוקף. נא לחזור לדף הקודם ולוודא את האינפורמציה.',
23
+    'avis_connexion_echec_1' => 'התקשרות לבסיס הנתונים נכשלה',
24
+    'avis_connexion_echec_2' => 'נא לחזור לדף הקודם ולוודא את האינפורמציה. ',
25
+    'avis_connexion_echec_3' => '<b>N.B.</b> על מספר שרתים, אתה חייב <b>בקשה</b> ההפעלה של הגישה שלך לבסיס הנתונים של מיי.אס.קיו.אל לפני שתוכל להשתמש בו. אם אינך יכול להתחבר, וודא שלמעשה שלחת את הבקשה הזאת ',
26
+    'avis_connexion_ldap_echec_1' => 'התקשרות לשרת אל.די.איי.פי נכשלה',
27
+    'avis_connexion_ldap_echec_2' => 'חזור אל הדף הקודם וודא את האינפורמציה שסיפקת',
28
+    'avis_connexion_ldap_echec_3' => 'לחלופין, אל תשתמש בתמיכת אל.די.איי.פי  לייבא משתמשים ',
29
+    'avis_deplacement_rubrique' => ' אזהרה ! המדור הזה כולל @contient_breves@ brève@scb@ : אם הנך מזיז אותו, וודא שהנך מסמן את התיבה הזאת לאישור.',
30
+    'avis_erreur_connexion_mysql' => 'שגיאת התחברות לאס.קיו.אל',
31
+    'avis_espace_interdit' => '<b>Forbidden area</b><p>אס.פי.אי.פי כבר מותקן', # MODIF
32
+    'avis_lecture_noms_bases_1' => 'תוכנת ההתקנה לא יכולה לקרוא את שמות בסיסי הנתונים המותקנים ',
33
+    'avis_lecture_noms_bases_2' => 'או שאף בסיס אינו נגיש , או שהפונקציה המאפשרת לערוך רשימה של הבסיסים אינה פעילה יותר
34 34
  מסיבות בטיחות (מקרה הקורה אצל הרבה שרתי אכסון).',
35
-	'avis_lecture_noms_bases_3' => 'במידה והחלופה השנייה הייתה נכונה, ישנה אפשרות שבסיס הנתונים שנקרא אחרי כניסתך למערכת יכול להיות שימושי: ',
36
-	'avis_non_acces_page' => 'אינך חייב להכנס לדף הזה',
37
-	'avis_operation_echec' => 'הפעולה נכשלה',
38
-	'avis_operation_impossible' => 'פעולה אינה אפשרית',
39
-	'avis_suppression_base' => 'אזהרה, מחיקת המידע היא פעולה בלתי הפיכה ',
35
+    'avis_lecture_noms_bases_3' => 'במידה והחלופה השנייה הייתה נכונה, ישנה אפשרות שבסיס הנתונים שנקרא אחרי כניסתך למערכת יכול להיות שימושי: ',
36
+    'avis_non_acces_page' => 'אינך חייב להכנס לדף הזה',
37
+    'avis_operation_echec' => 'הפעולה נכשלה',
38
+    'avis_operation_impossible' => 'פעולה אינה אפשרית',
39
+    'avis_suppression_base' => 'אזהרה, מחיקת המידע היא פעולה בלתי הפיכה ',
40 40
 
41
-	// B
42
-	'bouton_acces_ldap' => ' הוסף גישה ל-LDAP',
43
-	'bouton_ajouter' => 'הוסף',
44
-	'bouton_annuler' => 'בטל',
45
-	'bouton_demande_publication' => 'בקשה להופיע את המאמר',
46
-	'bouton_desactive_tout' => 'בטל פעולה של הכל',
47
-	'bouton_desinstaller' => 'הסר',
48
-	'bouton_effacer_tout' => 'מחיקת הכל',
49
-	'bouton_envoyer_message' => 'הודעה סופית : שלח',
50
-	'bouton_fermer' => 'סגור',
51
-	'bouton_mettre_a_jour_base' => 'עכדן נדבך נתונים',
52
-	'bouton_modifier' => 'תיקון',
53
-	'bouton_radio_afficher' => 'הראה',
54
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'הופיע ברשימת העורכים המחוברים',
55
-	'bouton_radio_envoi_annonces_adresse' => ':שליחת הודעות לכתובת',
56
-	'bouton_radio_envoi_liste_nouveautes' => 'שלח את רשימת החדשות האחרונה',
57
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'אל תופיע ברשימת העורכים המחוברים',
58
-	'bouton_radio_non_envoi_annonces_editoriales' => 'אל תשלח הודעות עורך ',
59
-	'bouton_redirection' => 'כוון שנית',
60
-	'bouton_relancer_installation' => 'התחל בשנית התקנה',
61
-	'bouton_suivant' => 'הבא',
62
-	'bouton_tenter_recuperation' => 'ניסיון תיקון',
63
-	'bouton_test_proxy' => 'בחן את ייפוי הכוח',
64
-	'bouton_vider_cache' => '(לרוקן את המחבוא(מטמון',
41
+    // B
42
+    'bouton_acces_ldap' => ' הוסף גישה ל-LDAP',
43
+    'bouton_ajouter' => 'הוסף',
44
+    'bouton_annuler' => 'בטל',
45
+    'bouton_demande_publication' => 'בקשה להופיע את המאמר',
46
+    'bouton_desactive_tout' => 'בטל פעולה של הכל',
47
+    'bouton_desinstaller' => 'הסר',
48
+    'bouton_effacer_tout' => 'מחיקת הכל',
49
+    'bouton_envoyer_message' => 'הודעה סופית : שלח',
50
+    'bouton_fermer' => 'סגור',
51
+    'bouton_mettre_a_jour_base' => 'עכדן נדבך נתונים',
52
+    'bouton_modifier' => 'תיקון',
53
+    'bouton_radio_afficher' => 'הראה',
54
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'הופיע ברשימת העורכים המחוברים',
55
+    'bouton_radio_envoi_annonces_adresse' => ':שליחת הודעות לכתובת',
56
+    'bouton_radio_envoi_liste_nouveautes' => 'שלח את רשימת החדשות האחרונה',
57
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'אל תופיע ברשימת העורכים המחוברים',
58
+    'bouton_radio_non_envoi_annonces_editoriales' => 'אל תשלח הודעות עורך ',
59
+    'bouton_redirection' => 'כוון שנית',
60
+    'bouton_relancer_installation' => 'התחל בשנית התקנה',
61
+    'bouton_suivant' => 'הבא',
62
+    'bouton_tenter_recuperation' => 'ניסיון תיקון',
63
+    'bouton_test_proxy' => 'בחן את ייפוי הכוח',
64
+    'bouton_vider_cache' => '(לרוקן את המחבוא(מטמון',
65 65
 
66
-	// C
67
-	'cache_modifiable_webmestre' => 'הפרמטר הזה ניתן לשינוי על ידי מנהל האתר',
68
-	'calendrier_synchro' => 'אם אתה משתמש באפליקציית יומן תואמת עם <b>iCal</b>, אתה יכול לסנכרן את זה עם אינפורמציה של אתרים אחרים',
69
-	'config_activer_champs' => 'הפעל את השדות הבאים',
70
-	'config_choix_base_sup' => 'ציין בסיס נתונים על שרת זה',
71
-	'config_erreur_base_sup' => 'אין ל-SPIP גישה לרשימת בסיסי הנתונים הנגישים',
72
-	'config_info_base_sup' => 'אם יש לך בסיסי נתונים אחרים שאתה רוצה להתיעץ בהם באמצעות SPIP, על ידי השרת שלה SQL או על ידי אחר, השאלון למטה מאפשר לך להציג אותם. אם אתה משאיר שדות ריקים, המזהים של ההתקשרות לבסיס העיקרי יהיו בשימוש.',
73
-	'config_info_base_sup_disponibles' => 'ניתן להציג שאלות לבסיס הנוסף ',
74
-	'config_info_enregistree' => 'התצורה החדשה נשמר',
75
-	'config_info_logos' => 'כל אלמנט באתר יכול לשאת לוגו, כך גם « logo de survol »',
76
-	'config_info_logos_utiliser' => 'השתמש בלוגואים',
77
-	'config_info_logos_utiliser_non' => 'אל תשתמש בלוגואים',
78
-	'config_info_logos_utiliser_survol' => 'השתמש בלוגואים של העלעול',
79
-	'config_info_logos_utiliser_survol_non' => 'אל תשתמש בלוגואים של העלעול',
80
-	'config_info_redirection' => 'על ידי הפעלת האופציה הזאת, אתה יכול ליצור מאמרים וירטואלים, הפניות פשוטות למאמרים המפורסמים באתרים אחרים או מחוץ ל-SPIP',
81
-	'config_redirection' => 'מאמרים וירטואלים',
82
-	'config_titre_base_sup' => 'הצהרה של בסיס נתונים נוסף',
83
-	'config_titre_base_sup_choix' => 'בחר בסיס נתונים נוסף',
84
-	'connexion_ldap' => 'התחברות:',
66
+    // C
67
+    'cache_modifiable_webmestre' => 'הפרמטר הזה ניתן לשינוי על ידי מנהל האתר',
68
+    'calendrier_synchro' => 'אם אתה משתמש באפליקציית יומן תואמת עם <b>iCal</b>, אתה יכול לסנכרן את זה עם אינפורמציה של אתרים אחרים',
69
+    'config_activer_champs' => 'הפעל את השדות הבאים',
70
+    'config_choix_base_sup' => 'ציין בסיס נתונים על שרת זה',
71
+    'config_erreur_base_sup' => 'אין ל-SPIP גישה לרשימת בסיסי הנתונים הנגישים',
72
+    'config_info_base_sup' => 'אם יש לך בסיסי נתונים אחרים שאתה רוצה להתיעץ בהם באמצעות SPIP, על ידי השרת שלה SQL או על ידי אחר, השאלון למטה מאפשר לך להציג אותם. אם אתה משאיר שדות ריקים, המזהים של ההתקשרות לבסיס העיקרי יהיו בשימוש.',
73
+    'config_info_base_sup_disponibles' => 'ניתן להציג שאלות לבסיס הנוסף ',
74
+    'config_info_enregistree' => 'התצורה החדשה נשמר',
75
+    'config_info_logos' => 'כל אלמנט באתר יכול לשאת לוגו, כך גם « logo de survol »',
76
+    'config_info_logos_utiliser' => 'השתמש בלוגואים',
77
+    'config_info_logos_utiliser_non' => 'אל תשתמש בלוגואים',
78
+    'config_info_logos_utiliser_survol' => 'השתמש בלוגואים של העלעול',
79
+    'config_info_logos_utiliser_survol_non' => 'אל תשתמש בלוגואים של העלעול',
80
+    'config_info_redirection' => 'על ידי הפעלת האופציה הזאת, אתה יכול ליצור מאמרים וירטואלים, הפניות פשוטות למאמרים המפורסמים באתרים אחרים או מחוץ ל-SPIP',
81
+    'config_redirection' => 'מאמרים וירטואלים',
82
+    'config_titre_base_sup' => 'הצהרה של בסיס נתונים נוסף',
83
+    'config_titre_base_sup_choix' => 'בחר בסיס נתונים נוסף',
84
+    'connexion_ldap' => 'התחברות:',
85 85
 
86
-	// D
87
-	'date_mot_heures' => '"H"',
86
+    // D
87
+    'date_mot_heures' => '"H"',
88 88
 
89
-	// E
90
-	'email' => 'דוא"ל',
91
-	'email_2' => 'דוא"ל:',
92
-	'entree_adresse_annuaire' => 'מען המדריך',
93
-	'entree_adresse_email' => 'הדוא"ל שלך',
94
-	'entree_adresse_email_2' => 'כתובת דוא"ל',
95
-	'entree_base_donnee_1' => 'כתובת בסיס הנתונים',
96
-	'entree_base_donnee_2' => '(לעיתים הכתובת מתאימה לזאת של אתרך, לפעמים היא מתאימה למושג «localhost»,לפעמים היא מושארת לגמרי ריקה).',
97
-	'entree_biographie' => 'ביוגרפיה קצרה בכמה מילים',
98
-	'entree_chemin_acces' => '<b>Enter</b> את הדרך:',
99
-	'entree_cle_pgp' => 'מפתח ה-פי.ג’י.פי שלך',
100
-	'entree_contenu_rubrique' => '(תוכן המדור בכמה מילים.)',
101
-	'entree_identifiants_connexion' => '...מזהי ההתחברות שלך',
102
-	'entree_identifiants_connexion_2' => 'מזהה של חיבור',
103
-	'entree_informations_connexion_ldap' => 'נא מלא את התבנית הזאת עם אינפורמציית התקשרות ה-אל.די.איי.פי. אתה תהיה מוענק עם האינפורמציה הזאת על ידי מנהל הרשת או המערכת.',
104
-	'entree_infos_perso' => '?מי אתה',
105
-	'entree_infos_perso_2' => 'מי המחבר?',
106
-	'entree_interieur_rubrique' => 'בתוך המדור:',
107
-	'entree_liens_sites' => '<b>קישור היפרטקסט</b> (התיחסות, אתר לבקר...)',
108
-	'entree_login' => 'שם ההתחברות שלך',
109
-	'entree_login_connexion_1' => 'שם ההתחברות של החיבור',
110
-	'entree_login_connexion_2' => '(מתייחס לעיתים ל-LOGIN הגישה שלך ל-FTP, לפעמים הוא מושאר ריק)',
111
-	'entree_mot_passe' => 'סיסמתך',
112
-	'entree_mot_passe_1' => 'סיסמת התחברות',
113
-	'entree_mot_passe_2' => '(מתייחס לעיתים לסיסמה שלך על ה-FTP, לפעמים מושאר ריק)',
114
-	'entree_nom_fichier' => 'נא רשום את שם הקובץ@texte_compresse@:',
115
-	'entree_nom_pseudo' => 'שם או כינוי',
116
-	'entree_nom_pseudo_1' => '(שם או כינוי)',
117
-	'entree_nom_pseudo_2' => 'שם או כינוי',
118
-	'entree_nom_site' => 'השם של האתר שלך',
119
-	'entree_nouveau_passe' => 'סיסמה חדשה',
120
-	'entree_passe_ldap' => 'סיסמה',
121
-	'entree_port_annuaire' => 'מספר יציאה של המדריך',
122
-	'entree_signature' => 'חתימה',
123
-	'entree_titre_obligatoire' => '<b>כותרת</b> [הכרחי]<br />',
124
-	'entree_url' => 'הכתובת הכללית של האתר שלך',
125
-	'erreur_plugin_fichier_absent' => 'קובץ חסר',
126
-	'erreur_plugin_fichier_def_absent' => 'קובץ בעל הגדרה חסרה',
127
-	'erreur_plugin_nom_fonction_interdit' => 'שם פונקציה אסור',
128
-	'erreur_plugin_nom_manquant' => 'שם PLUGIN חסר',
129
-	'erreur_plugin_prefix_manquant' => 'אזור קריאת שם PLUGIN לא מוגדר',
130
-	'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; חסר בקובץ ההגדרה',
131
-	'erreur_plugin_version_manquant' => 'גרסת PLUGIN חסרה',
89
+    // E
90
+    'email' => 'דוא"ל',
91
+    'email_2' => 'דוא"ל:',
92
+    'entree_adresse_annuaire' => 'מען המדריך',
93
+    'entree_adresse_email' => 'הדוא"ל שלך',
94
+    'entree_adresse_email_2' => 'כתובת דוא"ל',
95
+    'entree_base_donnee_1' => 'כתובת בסיס הנתונים',
96
+    'entree_base_donnee_2' => '(לעיתים הכתובת מתאימה לזאת של אתרך, לפעמים היא מתאימה למושג «localhost»,לפעמים היא מושארת לגמרי ריקה).',
97
+    'entree_biographie' => 'ביוגרפיה קצרה בכמה מילים',
98
+    'entree_chemin_acces' => '<b>Enter</b> את הדרך:',
99
+    'entree_cle_pgp' => 'מפתח ה-פי.ג’י.פי שלך',
100
+    'entree_contenu_rubrique' => '(תוכן המדור בכמה מילים.)',
101
+    'entree_identifiants_connexion' => '...מזהי ההתחברות שלך',
102
+    'entree_identifiants_connexion_2' => 'מזהה של חיבור',
103
+    'entree_informations_connexion_ldap' => 'נא מלא את התבנית הזאת עם אינפורמציית התקשרות ה-אל.די.איי.פי. אתה תהיה מוענק עם האינפורמציה הזאת על ידי מנהל הרשת או המערכת.',
104
+    'entree_infos_perso' => '?מי אתה',
105
+    'entree_infos_perso_2' => 'מי המחבר?',
106
+    'entree_interieur_rubrique' => 'בתוך המדור:',
107
+    'entree_liens_sites' => '<b>קישור היפרטקסט</b> (התיחסות, אתר לבקר...)',
108
+    'entree_login' => 'שם ההתחברות שלך',
109
+    'entree_login_connexion_1' => 'שם ההתחברות של החיבור',
110
+    'entree_login_connexion_2' => '(מתייחס לעיתים ל-LOGIN הגישה שלך ל-FTP, לפעמים הוא מושאר ריק)',
111
+    'entree_mot_passe' => 'סיסמתך',
112
+    'entree_mot_passe_1' => 'סיסמת התחברות',
113
+    'entree_mot_passe_2' => '(מתייחס לעיתים לסיסמה שלך על ה-FTP, לפעמים מושאר ריק)',
114
+    'entree_nom_fichier' => 'נא רשום את שם הקובץ@texte_compresse@:',
115
+    'entree_nom_pseudo' => 'שם או כינוי',
116
+    'entree_nom_pseudo_1' => '(שם או כינוי)',
117
+    'entree_nom_pseudo_2' => 'שם או כינוי',
118
+    'entree_nom_site' => 'השם של האתר שלך',
119
+    'entree_nouveau_passe' => 'סיסמה חדשה',
120
+    'entree_passe_ldap' => 'סיסמה',
121
+    'entree_port_annuaire' => 'מספר יציאה של המדריך',
122
+    'entree_signature' => 'חתימה',
123
+    'entree_titre_obligatoire' => '<b>כותרת</b> [הכרחי]<br />',
124
+    'entree_url' => 'הכתובת הכללית של האתר שלך',
125
+    'erreur_plugin_fichier_absent' => 'קובץ חסר',
126
+    'erreur_plugin_fichier_def_absent' => 'קובץ בעל הגדרה חסרה',
127
+    'erreur_plugin_nom_fonction_interdit' => 'שם פונקציה אסור',
128
+    'erreur_plugin_nom_manquant' => 'שם PLUGIN חסר',
129
+    'erreur_plugin_prefix_manquant' => 'אזור קריאת שם PLUGIN לא מוגדר',
130
+    'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; חסר בקובץ ההגדרה',
131
+    'erreur_plugin_version_manquant' => 'גרסת PLUGIN חסרה',
132 132
 
133
-	// I
134
-	'ical_info1' => 'הדף הזה מציג כמה שיטות לשמור קשר עם פעילות האתר הזה.',
135
-	'ical_info2' => 'ליותר פרטים על כל הטכניקות, אל תהסס לפנות ל המסמכים של <<a href="@spipnet@">SPIP </a',
136
-	'ical_info_calendrier' => 'שני לוחות זמנים נמצאים בסל האשפה. הראשון הוא מפת אתר אשר מראה את כל הכתבות המפורסמות. השני מכיל הודעות עורכים גם ההודעות הפרטיות האחרונות שלך: זה שמור בשבילך הודות למפתח אישי שאתה יכול לשנות בכל זמן על ידי חידוש סיסמתך.',
137
-	'ical_methode_http' => 'מוריד',
138
-	'ical_methode_webcal' => 'סינכרוניזציה (webcal://)', # MODIF
139
-	'ical_texte_prive' => 'לוח הזמנים זה, לשימוש פרטי בלבד, מיידע אותך על הפעילות הפרטית של העורכים של האתר הזה (משימות, פגישות אישיות, מאמרים ומבזקים מוצעים...).',
140
-	'ical_texte_public' => 'לוח הזמנים זה מאפשר לך לעקוב אחר הפעילות הציבורית של האתר הזה (מאמרים מפורסמים ומבזקים). ',
141
-	'ical_texte_rss' => 'הינך יכול לעשות סינדיקציה על החדשות האחרונות של האתר הזה בכל אקס.אמ.אל/אר.אס.אס (סיכום עשיר של אתר) קורא קבצים. כמו כן זה גם הפורמט שמאפשר ל אס.פי.איי.פי לקרוא את החדשות האחרונות שמפורסמות על ידי אתרים אחרים אשר משתמשים בחילוף תואם של פורמטים (אתרים בעלי סינדיקציה)',
142
-	'ical_titre_js' => 'Javascript (שפת ג’אווה)',
143
-	'ical_titre_mailing' => 'רשימת דואר',
144
-	'ical_titre_rss' => 'קבצי איסוף תכני רשת',
145
-	'icone_activer_cookie' => '"מקם "קוקיי',
146
-	'icone_admin_plugin' => 'ניהול ה-PLUGINS',
147
-	'icone_afficher_auteurs' => 'הצג מחברים',
148
-	'icone_afficher_visiteurs' => 'הצג מבקרים',
149
-	'icone_arret_discussion' => 'הפסק השתתפות בשיחה זו',
150
-	'icone_calendrier' => 'לוח שנה',
151
-	'icone_creer_auteur' => 'צור מחבר חדש ושתף אותו עם המאמר הזה',
152
-	'icone_creer_mot_cle' => 'צור מילת מפתח חדשה וצור לה קישור עם המאמר הזה',
153
-	'icone_creer_rubrique_2' => 'צור מדור חדש',
154
-	'icone_modifier_article' => 'שנה את המאמר הזה',
155
-	'icone_modifier_rubrique' => 'תיקון מדור',
156
-	'icone_relancer_signataire' => 'העלה מחדש את החתום',
157
-	'icone_retour' => 'אחורה',
158
-	'icone_retour_article' => 'אל המאמר הקודם',
159
-	'icone_supprimer_cookie' => '"מחק "קוקיי',
160
-	'icone_supprimer_rubrique' => 'מחיקת המדור',
161
-	'icone_supprimer_signature' => 'מחק חתימה זו',
162
-	'icone_valider_signature' => 'תן תוקף לחתימה זו',
163
-	'image_administrer_rubrique' => 'אתה יכול לנהל את המדור',
164
-	'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
165
-	'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
166
-	'info_1_article' => 'מאמר 1',
167
-	'info_activer_cookie' => 'אתה יכול להפעיל <b> עוגיית התכתבות</b>, אשר יאפשר לך
133
+    // I
134
+    'ical_info1' => 'הדף הזה מציג כמה שיטות לשמור קשר עם פעילות האתר הזה.',
135
+    'ical_info2' => 'ליותר פרטים על כל הטכניקות, אל תהסס לפנות ל המסמכים של <<a href="@spipnet@">SPIP </a',
136
+    'ical_info_calendrier' => 'שני לוחות זמנים נמצאים בסל האשפה. הראשון הוא מפת אתר אשר מראה את כל הכתבות המפורסמות. השני מכיל הודעות עורכים גם ההודעות הפרטיות האחרונות שלך: זה שמור בשבילך הודות למפתח אישי שאתה יכול לשנות בכל זמן על ידי חידוש סיסמתך.',
137
+    'ical_methode_http' => 'מוריד',
138
+    'ical_methode_webcal' => 'סינכרוניזציה (webcal://)', # MODIF
139
+    'ical_texte_prive' => 'לוח הזמנים זה, לשימוש פרטי בלבד, מיידע אותך על הפעילות הפרטית של העורכים של האתר הזה (משימות, פגישות אישיות, מאמרים ומבזקים מוצעים...).',
140
+    'ical_texte_public' => 'לוח הזמנים זה מאפשר לך לעקוב אחר הפעילות הציבורית של האתר הזה (מאמרים מפורסמים ומבזקים). ',
141
+    'ical_texte_rss' => 'הינך יכול לעשות סינדיקציה על החדשות האחרונות של האתר הזה בכל אקס.אמ.אל/אר.אס.אס (סיכום עשיר של אתר) קורא קבצים. כמו כן זה גם הפורמט שמאפשר ל אס.פי.איי.פי לקרוא את החדשות האחרונות שמפורסמות על ידי אתרים אחרים אשר משתמשים בחילוף תואם של פורמטים (אתרים בעלי סינדיקציה)',
142
+    'ical_titre_js' => 'Javascript (שפת ג’אווה)',
143
+    'ical_titre_mailing' => 'רשימת דואר',
144
+    'ical_titre_rss' => 'קבצי איסוף תכני רשת',
145
+    'icone_activer_cookie' => '"מקם "קוקיי',
146
+    'icone_admin_plugin' => 'ניהול ה-PLUGINS',
147
+    'icone_afficher_auteurs' => 'הצג מחברים',
148
+    'icone_afficher_visiteurs' => 'הצג מבקרים',
149
+    'icone_arret_discussion' => 'הפסק השתתפות בשיחה זו',
150
+    'icone_calendrier' => 'לוח שנה',
151
+    'icone_creer_auteur' => 'צור מחבר חדש ושתף אותו עם המאמר הזה',
152
+    'icone_creer_mot_cle' => 'צור מילת מפתח חדשה וצור לה קישור עם המאמר הזה',
153
+    'icone_creer_rubrique_2' => 'צור מדור חדש',
154
+    'icone_modifier_article' => 'שנה את המאמר הזה',
155
+    'icone_modifier_rubrique' => 'תיקון מדור',
156
+    'icone_relancer_signataire' => 'העלה מחדש את החתום',
157
+    'icone_retour' => 'אחורה',
158
+    'icone_retour_article' => 'אל המאמר הקודם',
159
+    'icone_supprimer_cookie' => '"מחק "קוקיי',
160
+    'icone_supprimer_rubrique' => 'מחיקת המדור',
161
+    'icone_supprimer_signature' => 'מחק חתימה זו',
162
+    'icone_valider_signature' => 'תן תוקף לחתימה זו',
163
+    'image_administrer_rubrique' => 'אתה יכול לנהל את המדור',
164
+    'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF
165
+    'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF
166
+    'info_1_article' => 'מאמר 1',
167
+    'info_activer_cookie' => 'אתה יכול להפעיל <b> עוגיית התכתבות</b>, אשר יאפשר לך
168 168
  לעבור בקלות מן האתר הציבורי לאתר הפרטי.',
169
-	'info_administrateur' => 'מנהל',
170
-	'info_administrateur_1' => 'מנהל',
171
-	'info_administrateur_2' => 'של האתר (<i>use with caution</i>)',
172
-	'info_administrateur_site_01' => 'אם היך מנהל אתר, אנא',
173
-	'info_administrateur_site_02' => 'לחץ על הקישור הזה',
174
-	'info_administrateurs' => 'מנהלים',
175
-	'info_administrer_rubrique' => 'הינך יכול לנהל מדור זה',
176
-	'info_adresse' => ':אל הכתובת',
177
-	'info_adresse_url' => 'הכתובת הכללית של האתר הציבורי שלך',
178
-	'info_aide_en_ligne' => 'עזרה מקוונת ל-אס.פי.אי.פי',
179
-	'info_ajout_image' => 'כאשר אתה מוסיף תמונות כמסמכים מצורפים למאמר,
169
+    'info_administrateur' => 'מנהל',
170
+    'info_administrateur_1' => 'מנהל',
171
+    'info_administrateur_2' => 'של האתר (<i>use with caution</i>)',
172
+    'info_administrateur_site_01' => 'אם היך מנהל אתר, אנא',
173
+    'info_administrateur_site_02' => 'לחץ על הקישור הזה',
174
+    'info_administrateurs' => 'מנהלים',
175
+    'info_administrer_rubrique' => 'הינך יכול לנהל מדור זה',
176
+    'info_adresse' => ':אל הכתובת',
177
+    'info_adresse_url' => 'הכתובת הכללית של האתר הציבורי שלך',
178
+    'info_aide_en_ligne' => 'עזרה מקוונת ל-אס.פי.אי.פי',
179
+    'info_ajout_image' => 'כאשר אתה מוסיף תמונות כמסמכים מצורפים למאמר,
180 180
  SPIP יכול ליצור עבורך, בצורה אוטומטית, מיניאטורות של
181 181
  תמונות מוכנסות. הדבר מאפשר למשל ליצור
182 182
  אוטומטית גלריה או תיק עבודות.',
183
-	'info_ajouter_rubrique' => 'הוספת מדור נוסף לניהול:',
184
-	'info_annonce_nouveautes' => 'מודעות אחרונות של חדשות',
185
-	'info_article' => 'מאמר',
186
-	'info_article_2' => 'מאמרים',
187
-	'info_article_a_paraitre' => 'המאמרים בעלי תאריך מאוחר שיופיעו',
188
-	'info_articles_02' => 'מאמרים',
189
-	'info_articles_2' => 'מאמרים',
190
-	'info_articles_auteur' => 'המאמרים של המחבר הזה',
191
-	'info_articles_trouves' => 'מאמרים נמצאו',
192
-	'info_attente_validation' => 'המאמרים שלך מחכים למתן תוקף',
193
-	'info_aujourdhui' => ':היום',
194
-	'info_auteurs' => 'מחברים',
195
-	'info_auteurs_par_tri' => 'מחברים@partri@',
196
-	'info_auteurs_trouves' => 'מחברים נמצאו',
197
-	'info_authentification_externe' => 'אישור חיצוני',
198
-	'info_avertissement' => 'אזהרה',
199
-	'info_barre_outils' => 'עם סרגל הכלים שלי?',
200
-	'info_base_installee' => '.המבנה של בסיס הנתונים שלך מותקן',
201
-	'info_chapeau' => 'סיפון',
202
-	'info_chapeau_2' => ':הקדמה',
203
-	'info_chemin_acces_1' => 'אפשרויות: <b>Access path in directory</b>',
204
-	'info_chemin_acces_2' => 'מעכשיו והלאה, הינך חייב לעצב את דרך הגישה לספריית המידע. המידע הזה נחוץ לקריאת הפרופילים של המשתמשים אשר שמורים בספרייה.',
205
-	'info_chemin_acces_annuaire' => 'אפשרויות: <b>Access path in directory</b>',
206
-	'info_choix_base' => ':שלב שלישי',
207
-	'info_classement_1' => '<sup>st</sup> מחוץ ל @liste@',
208
-	'info_classement_2' => '<sup>th</sup> מחוץ ל @liste@',
209
-	'info_code_acces' => '!אל תשכח את את קודי הגישה שלך',
210
-	'info_config_suivi' => 'אם הכתובת הזאת מותאמת לרשימת דיוור,  אתה יכול לציין להלן את הכתובת איפה שמשתתפי האתר יכולים להרשם. הכתובת הזאת יכולה להיות כתובת כללית (למשל העמוד של רשימת הרישום דרך הרשת), או כתובת דוא"למעונקת עם נושא מסויים (למשל: <tt>@adresse_suivi@?subject=subscribe</tt>):',
211
-	'info_config_suivi_explication' => 'הינך יכול להירשם לרשימת הדיוור של האתר. לאחר הרישום תקבל, על ידי דואר אלקטרוני, את המודעות באשר למאמרים ולמבזקים המוצעים לפרסום.',
212
-	'info_confirmer_passe' => ':אשר סיסמה חדשה',
213
-	'info_connexion_base' => 'שלב שני: <b>Attempting to connect to database</b>',
214
-	'info_connexion_mysql' => 'שלב ראשון: <b>Your SQL connection</b>',
215
-	'info_connexion_ok' => '.התקשרות הצליחה',
216
-	'info_contact' => 'התקשר',
217
-	'info_contenu_articles' => 'תוכן המאמרים',
218
-	'info_creation_paragraphe' => '(בשביל ליצור פסקאות, אתה פשוט עוזב שורות ריקות.)', # MODIF
219
-	'info_creation_rubrique' => 'לפני שתוכל לכתוב מאמרים,<br />אתה חייב ליצור לפחות פדור אחד<br />',
220
-	'info_creation_tables' => 'שלב רביעי: <b>Creation of the database tables</b>',
221
-	'info_creer_base' => '<b>Create</b> בסיס נתונים חדש :',
222
-	'info_dans_rubrique' => 'במדור:',
223
-	'info_date_publication_anterieure' => 'תאריך של הוצאה לאור מוקדמת:',
224
-	'info_date_referencement' => ':תאריך של הוספת מראי מקום באתר זה',
225
-	'info_derniere_etape' => 'זהו הסתיים!',
226
-	'info_descriptif' => ':תיאור',
227
-	'info_discussion_cours' => 'דיונים בהתקדמות',
228
-	'info_ecrire_article' => 'לפני שתוכל לכתוב מאמרים, אתה חייב ליצור לפחות מדור אחד.',
229
-	'info_email_envoi' => '(כתובת הדוא"ל של השולח (רשות',
230
-	'info_email_webmestre' => '(כתובת הדוא"ל של מומחה הרשת (רשות', # MODIF
231
-	'info_envoi_email_automatique' => 'דיוור אוטומטי',
232
-	'info_envoyer_maintenant' => 'שלח עכשיו',
233
-	'info_etape_suivante' => 'לך אל השלב הבא',
234
-	'info_etape_suivante_1' => '.הינך יכול לעבור לשלב הבא',
235
-	'info_etape_suivante_2' => '.הינך יכול לעבור לשלב הבא',
236
-	'info_exportation_base' => 'יצוא בסיס נתונים אל @archive@',
237
-	'info_fichiers_authent' => '".htpasswd" אישור קובץ',
238
-	'info_gauche_auteurs_exterieurs' => 'מחברים חיצוניים, ללא שום גישה לאתר, מצויינים על ידי סמל כחול; מחברים מחוקים על ידי פח אשפה.', # MODIF
239
-	'info_gauche_messagerie' => 'התכתבות מאפשרת לך להחליף הודעות בין עורכים, כדי לשמר תזכירים (לשימושך האישי) או להציג מודעות בדף הבית של (.האזור הפרטי (אם אתה אחראי',
240
-	'info_gauche_statistiques_referers' => 'הדף הזה מציג רשימה של <i>referrers</i>, כלומר האתר מכיל קישורים לאתרך, רק להיום: למעשה הרשימה הזאת מתעדכנת כל 24 שעות.',
241
-	'info_generation_miniatures_images' => 'יוצר תמונות ממוזערות',
242
-	'info_hier' => ':אתמול',
243
-	'info_identification_publique' => '...הזהות הציבורית שלך',
244
-	'info_image_process2' => 'Si aucune image n’apparaît, alors le serveur qui héberge votre site n’a pas été configuré pour utiliser de tels outils. Si vous souhaitez utiliser ces fonctions, contactez le responsable technique et demandez les extensions « GD » ou « Imagick ».',
245
-	'info_informations_personnelles' => 'נתונים אישיים',
246
-	'info_inscription_automatique' => 'הרשמה אוטומטית של עורכים חדשים',
247
-	'info_jeu_caractere' => 'מערך תווים של האתר',
248
-	'info_jours' => 'ימים',
249
-	'info_laisser_champs_vides' => '(השאר את השדות האלה ריקים',
250
-	'info_langues' => 'שפת האתר',
251
-	'info_ldap_ok' => '.אישור אל.די.אי.פי מותקן',
252
-	'info_lien_hypertexte' => ':קישור היפר טקסט',
253
-	'info_liste_redacteurs_connectes' => 'רשימה של עורכים מחוברים',
254
-	'info_login_existant' => '.שם ההתחברות הזה תפוס',
255
-	'info_login_trop_court' => '.שם ההתחברות יותר מדי קצר',
256
-	'info_maximum' => ':מקסימום',
257
-	'info_message_en_redaction' => 'ההודעות שלך בהתקדמות',
258
-	'info_message_technique' => ':הודעה טכנית',
259
-	'info_messagerie_interne' => 'התכתבות פנימית',
260
-	'info_mise_a_niveau_base' => 'שדרוג בסיס הנתונים של מאי.אס.קיו.אל',
261
-	'info_modifier_rubrique' => 'תיקון המדור הזה:',
262
-	'info_modifier_titre' => 'שנה: @titre@',
263
-	'info_mon_site_spip' => 'אתר ה-אס.פי.איי.פי שלי',
264
-	'info_moyenne' => ':ממוצע',
265
-	'info_multi_cet_article' => ':שפת המאמר הזה',
266
-	'info_multi_secteurs' => '...רק למדורים הנמצאים בראשי?',
267
-	'info_nom' => 'שם',
268
-	'info_nom_destinataire' => 'שם המקבל',
269
-	'info_nom_site' => 'שם האתר שלך',
270
-	'info_nombre_articles' => '@nb_articles@ מאמרים,',
271
-	'info_nombre_rubriques' => '@nb_rubriques@ מדורים,',
272
-	'info_nombre_sites' => '@nb_sites@ אתרים,',
273
-	'info_non_deplacer' => '...אל תזוז',
274
-	'info_non_envoi_annonce_dernieres_nouveautes' => 'ספיפ יכול לשלוח דרך הדוא"ל בקביעות הודעת החדשות של האתר
183
+    'info_ajouter_rubrique' => 'הוספת מדור נוסף לניהול:',
184
+    'info_annonce_nouveautes' => 'מודעות אחרונות של חדשות',
185
+    'info_article' => 'מאמר',
186
+    'info_article_2' => 'מאמרים',
187
+    'info_article_a_paraitre' => 'המאמרים בעלי תאריך מאוחר שיופיעו',
188
+    'info_articles_02' => 'מאמרים',
189
+    'info_articles_2' => 'מאמרים',
190
+    'info_articles_auteur' => 'המאמרים של המחבר הזה',
191
+    'info_articles_trouves' => 'מאמרים נמצאו',
192
+    'info_attente_validation' => 'המאמרים שלך מחכים למתן תוקף',
193
+    'info_aujourdhui' => ':היום',
194
+    'info_auteurs' => 'מחברים',
195
+    'info_auteurs_par_tri' => 'מחברים@partri@',
196
+    'info_auteurs_trouves' => 'מחברים נמצאו',
197
+    'info_authentification_externe' => 'אישור חיצוני',
198
+    'info_avertissement' => 'אזהרה',
199
+    'info_barre_outils' => 'עם סרגל הכלים שלי?',
200
+    'info_base_installee' => '.המבנה של בסיס הנתונים שלך מותקן',
201
+    'info_chapeau' => 'סיפון',
202
+    'info_chapeau_2' => ':הקדמה',
203
+    'info_chemin_acces_1' => 'אפשרויות: <b>Access path in directory</b>',
204
+    'info_chemin_acces_2' => 'מעכשיו והלאה, הינך חייב לעצב את דרך הגישה לספריית המידע. המידע הזה נחוץ לקריאת הפרופילים של המשתמשים אשר שמורים בספרייה.',
205
+    'info_chemin_acces_annuaire' => 'אפשרויות: <b>Access path in directory</b>',
206
+    'info_choix_base' => ':שלב שלישי',
207
+    'info_classement_1' => '<sup>st</sup> מחוץ ל @liste@',
208
+    'info_classement_2' => '<sup>th</sup> מחוץ ל @liste@',
209
+    'info_code_acces' => '!אל תשכח את את קודי הגישה שלך',
210
+    'info_config_suivi' => 'אם הכתובת הזאת מותאמת לרשימת דיוור,  אתה יכול לציין להלן את הכתובת איפה שמשתתפי האתר יכולים להרשם. הכתובת הזאת יכולה להיות כתובת כללית (למשל העמוד של רשימת הרישום דרך הרשת), או כתובת דוא"למעונקת עם נושא מסויים (למשל: <tt>@adresse_suivi@?subject=subscribe</tt>):',
211
+    'info_config_suivi_explication' => 'הינך יכול להירשם לרשימת הדיוור של האתר. לאחר הרישום תקבל, על ידי דואר אלקטרוני, את המודעות באשר למאמרים ולמבזקים המוצעים לפרסום.',
212
+    'info_confirmer_passe' => ':אשר סיסמה חדשה',
213
+    'info_connexion_base' => 'שלב שני: <b>Attempting to connect to database</b>',
214
+    'info_connexion_mysql' => 'שלב ראשון: <b>Your SQL connection</b>',
215
+    'info_connexion_ok' => '.התקשרות הצליחה',
216
+    'info_contact' => 'התקשר',
217
+    'info_contenu_articles' => 'תוכן המאמרים',
218
+    'info_creation_paragraphe' => '(בשביל ליצור פסקאות, אתה פשוט עוזב שורות ריקות.)', # MODIF
219
+    'info_creation_rubrique' => 'לפני שתוכל לכתוב מאמרים,<br />אתה חייב ליצור לפחות פדור אחד<br />',
220
+    'info_creation_tables' => 'שלב רביעי: <b>Creation of the database tables</b>',
221
+    'info_creer_base' => '<b>Create</b> בסיס נתונים חדש :',
222
+    'info_dans_rubrique' => 'במדור:',
223
+    'info_date_publication_anterieure' => 'תאריך של הוצאה לאור מוקדמת:',
224
+    'info_date_referencement' => ':תאריך של הוספת מראי מקום באתר זה',
225
+    'info_derniere_etape' => 'זהו הסתיים!',
226
+    'info_descriptif' => ':תיאור',
227
+    'info_discussion_cours' => 'דיונים בהתקדמות',
228
+    'info_ecrire_article' => 'לפני שתוכל לכתוב מאמרים, אתה חייב ליצור לפחות מדור אחד.',
229
+    'info_email_envoi' => '(כתובת הדוא"ל של השולח (רשות',
230
+    'info_email_webmestre' => '(כתובת הדוא"ל של מומחה הרשת (רשות', # MODIF
231
+    'info_envoi_email_automatique' => 'דיוור אוטומטי',
232
+    'info_envoyer_maintenant' => 'שלח עכשיו',
233
+    'info_etape_suivante' => 'לך אל השלב הבא',
234
+    'info_etape_suivante_1' => '.הינך יכול לעבור לשלב הבא',
235
+    'info_etape_suivante_2' => '.הינך יכול לעבור לשלב הבא',
236
+    'info_exportation_base' => 'יצוא בסיס נתונים אל @archive@',
237
+    'info_fichiers_authent' => '".htpasswd" אישור קובץ',
238
+    'info_gauche_auteurs_exterieurs' => 'מחברים חיצוניים, ללא שום גישה לאתר, מצויינים על ידי סמל כחול; מחברים מחוקים על ידי פח אשפה.', # MODIF
239
+    'info_gauche_messagerie' => 'התכתבות מאפשרת לך להחליף הודעות בין עורכים, כדי לשמר תזכירים (לשימושך האישי) או להציג מודעות בדף הבית של (.האזור הפרטי (אם אתה אחראי',
240
+    'info_gauche_statistiques_referers' => 'הדף הזה מציג רשימה של <i>referrers</i>, כלומר האתר מכיל קישורים לאתרך, רק להיום: למעשה הרשימה הזאת מתעדכנת כל 24 שעות.',
241
+    'info_generation_miniatures_images' => 'יוצר תמונות ממוזערות',
242
+    'info_hier' => ':אתמול',
243
+    'info_identification_publique' => '...הזהות הציבורית שלך',
244
+    'info_image_process2' => 'Si aucune image n’apparaît, alors le serveur qui héberge votre site n’a pas été configuré pour utiliser de tels outils. Si vous souhaitez utiliser ces fonctions, contactez le responsable technique et demandez les extensions « GD » ou « Imagick ».',
245
+    'info_informations_personnelles' => 'נתונים אישיים',
246
+    'info_inscription_automatique' => 'הרשמה אוטומטית של עורכים חדשים',
247
+    'info_jeu_caractere' => 'מערך תווים של האתר',
248
+    'info_jours' => 'ימים',
249
+    'info_laisser_champs_vides' => '(השאר את השדות האלה ריקים',
250
+    'info_langues' => 'שפת האתר',
251
+    'info_ldap_ok' => '.אישור אל.די.אי.פי מותקן',
252
+    'info_lien_hypertexte' => ':קישור היפר טקסט',
253
+    'info_liste_redacteurs_connectes' => 'רשימה של עורכים מחוברים',
254
+    'info_login_existant' => '.שם ההתחברות הזה תפוס',
255
+    'info_login_trop_court' => '.שם ההתחברות יותר מדי קצר',
256
+    'info_maximum' => ':מקסימום',
257
+    'info_message_en_redaction' => 'ההודעות שלך בהתקדמות',
258
+    'info_message_technique' => ':הודעה טכנית',
259
+    'info_messagerie_interne' => 'התכתבות פנימית',
260
+    'info_mise_a_niveau_base' => 'שדרוג בסיס הנתונים של מאי.אס.קיו.אל',
261
+    'info_modifier_rubrique' => 'תיקון המדור הזה:',
262
+    'info_modifier_titre' => 'שנה: @titre@',
263
+    'info_mon_site_spip' => 'אתר ה-אס.פי.איי.פי שלי',
264
+    'info_moyenne' => ':ממוצע',
265
+    'info_multi_cet_article' => ':שפת המאמר הזה',
266
+    'info_multi_secteurs' => '...רק למדורים הנמצאים בראשי?',
267
+    'info_nom' => 'שם',
268
+    'info_nom_destinataire' => 'שם המקבל',
269
+    'info_nom_site' => 'שם האתר שלך',
270
+    'info_nombre_articles' => '@nb_articles@ מאמרים,',
271
+    'info_nombre_rubriques' => '@nb_rubriques@ מדורים,',
272
+    'info_nombre_sites' => '@nb_sites@ אתרים,',
273
+    'info_non_deplacer' => '...אל תזוז',
274
+    'info_non_envoi_annonce_dernieres_nouveautes' => 'ספיפ יכול לשלוח דרך הדוא"ל בקביעות הודעת החדשות של האתר
275 275
 (מאמרים ומבזקים שפורסמו לארחונה).',
276
-	'info_non_envoi_liste_nouveautes' => 'אל תשלח את רשימת החדשות האחרונה',
277
-	'info_non_modifiable' => 'לא יכול להשתנות',
278
-	'info_non_suppression_mot_cle' => '.אני לא רוצה למחוק את מילת המפתח הזאת',
279
-	'info_notes' => 'הערת שוליים',
280
-	'info_nouvel_article' => 'מאמר חדש',
281
-	'info_nouvelle_traduction' => ':תרגום חדש',
282
-	'info_numero_article' => ':מספר מאמר',
283
-	'info_obligatoire_02' => '[מהווה חובה]', # MODIF
284
-	'info_options_avancees' => 'אפשרויות מתקדמות',
285
-	'info_ou' => '...או',
286
-	'info_page_interdite' => 'דף אסור',
287
-	'info_par_nom' => 'לפי שם',
288
-	'info_par_nombre_article' => '(על ידי מספר מאמרים)',
289
-	'info_passe_trop_court' => '.סיסמה קצרה מדי',
290
-	'info_passes_identiques' => '.שתי הסימאות לא זהות',
291
-	'info_plus_cinq_car' => 'יותר מ-5 תווים',
292
-	'info_plus_cinq_car_2' => '(יותר מ-5 תווים)',
293
-	'info_plus_trois_car' => '(יותר מ-3 תווים)',
294
-	'info_popularite' => 'פופולריות: @popularite@; ביקורים: @visites@',
295
-	'info_post_scriptum' => 'פוסטסקריפט',
296
-	'info_post_scriptum_2' => ':פוסטסקריפט',
297
-	'info_pour' => 'ל',
298
-	'info_preview_texte' => 'אפשר לבקר את האתר בהקשפה מוקדמת כאילו כל המאמרים והמבזקים התפרסמו (עם לפחות הסטטוס "מוצע"). האם אתה רוצה להגיש אפשרות זו למנהלים בלבד, לכל מחברים או לכולם?', # MODIF
299
-	'info_procedez_par_etape' => 'אנא המשך צעד אחר צעד',
300
-	'info_ps' => 'נ.ב',
301
-	'info_publier' => 'לפרסם',
302
-	'info_publies' => 'המאמרים שלך מפורסמים ברשת',
303
-	'info_racine_site' => 'בסיס האתר',
304
-	'info_recharger_page' => '.אנא טען מחדש דף זה בעוד כמה רגעים',
305
-	'info_recherche_auteur_zero' => 'אין תוצאות ל "@cherche_auteur@".',
306
-	'info_recommencer' => '.אנא נסה שוב',
307
-	'info_redacteur_1' => 'עורך',
308
-	'info_redacteur_2' => 'מקבל אישור כניסה לאזור האישי (<i>recommended</i>)',
309
-	'info_redacteurs' => 'עורכים',
310
-	'info_redaction_en_cours' => 'עריכה בהתקדמות',
311
-	'info_redirection' => 'הכוונה מחודשת',
312
-	'info_refuses' => 'המאמרים שלך נדחו',
313
-	'info_rubriques' => 'נושאים',
314
-	'info_sans_titre' => 'בלי כותר',
315
-	'info_site' => 'אתר אינטרנט',
316
-	'info_site_2' => 'אתר אינטרנט :',
317
-	'info_site_min' => 'אתר',
318
-	'info_sites' => 'אתרים',
319
-	'info_sous_titre' => 'כתוביות :',
320
-	'info_statut_administrateur' => 'מנהל',
321
-	'info_surtitre' => 'הכותרת למעלה:',
322
-	'info_texte' => 'טקסט',
323
-	'info_texte_message' => 'הטקסט של ההודעה שלך :', # MODIF
324
-	'info_total' => 'הכל :',
325
-	'info_tous_les' => 'כל :',
326
-	'info_tout_site' => 'כל האתר',
327
-	'info_un_article' => 'פריט,',
328
-	'info_un_site' => 'האתר,',
329
-	'info_une_rubrique' => 'קטגוריה,',
330
-	'info_url' => 'קישור :',
331
-	'info_visiteur_1' => 'המבקר',
332
-	'info_visiteur_2' => 'אתר ציבורי',
333
-	'info_visiteurs' => 'מבקרים',
334
-	'info_visiteurs_02' => 'המבקרים באתר את הציבור',
335
-	'install_select_type_mysql' => 'MySQL',
336
-	'install_select_type_sqlite2' => 'SQLite 2',
337
-	'install_select_type_sqlite3' => 'SQLite 3',
338
-	'intem_redacteur' => 'עורך',
339
-	'item_administrateur_2' => 'מנהל',
340
-	'item_login' => 'הסינכ',
341
-	'item_non' => 'לא',
342
-	'item_nouvel_auteur' => 'מחבר חדש',
343
-	'item_nouvelle_rubrique' => 'נושא חדש',
344
-	'item_oui' => 'כן',
276
+    'info_non_envoi_liste_nouveautes' => 'אל תשלח את רשימת החדשות האחרונה',
277
+    'info_non_modifiable' => 'לא יכול להשתנות',
278
+    'info_non_suppression_mot_cle' => '.אני לא רוצה למחוק את מילת המפתח הזאת',
279
+    'info_notes' => 'הערת שוליים',
280
+    'info_nouvel_article' => 'מאמר חדש',
281
+    'info_nouvelle_traduction' => ':תרגום חדש',
282
+    'info_numero_article' => ':מספר מאמר',
283
+    'info_obligatoire_02' => '[מהווה חובה]', # MODIF
284
+    'info_options_avancees' => 'אפשרויות מתקדמות',
285
+    'info_ou' => '...או',
286
+    'info_page_interdite' => 'דף אסור',
287
+    'info_par_nom' => 'לפי שם',
288
+    'info_par_nombre_article' => '(על ידי מספר מאמרים)',
289
+    'info_passe_trop_court' => '.סיסמה קצרה מדי',
290
+    'info_passes_identiques' => '.שתי הסימאות לא זהות',
291
+    'info_plus_cinq_car' => 'יותר מ-5 תווים',
292
+    'info_plus_cinq_car_2' => '(יותר מ-5 תווים)',
293
+    'info_plus_trois_car' => '(יותר מ-3 תווים)',
294
+    'info_popularite' => 'פופולריות: @popularite@; ביקורים: @visites@',
295
+    'info_post_scriptum' => 'פוסטסקריפט',
296
+    'info_post_scriptum_2' => ':פוסטסקריפט',
297
+    'info_pour' => 'ל',
298
+    'info_preview_texte' => 'אפשר לבקר את האתר בהקשפה מוקדמת כאילו כל המאמרים והמבזקים התפרסמו (עם לפחות הסטטוס "מוצע"). האם אתה רוצה להגיש אפשרות זו למנהלים בלבד, לכל מחברים או לכולם?', # MODIF
299
+    'info_procedez_par_etape' => 'אנא המשך צעד אחר צעד',
300
+    'info_ps' => 'נ.ב',
301
+    'info_publier' => 'לפרסם',
302
+    'info_publies' => 'המאמרים שלך מפורסמים ברשת',
303
+    'info_racine_site' => 'בסיס האתר',
304
+    'info_recharger_page' => '.אנא טען מחדש דף זה בעוד כמה רגעים',
305
+    'info_recherche_auteur_zero' => 'אין תוצאות ל "@cherche_auteur@".',
306
+    'info_recommencer' => '.אנא נסה שוב',
307
+    'info_redacteur_1' => 'עורך',
308
+    'info_redacteur_2' => 'מקבל אישור כניסה לאזור האישי (<i>recommended</i>)',
309
+    'info_redacteurs' => 'עורכים',
310
+    'info_redaction_en_cours' => 'עריכה בהתקדמות',
311
+    'info_redirection' => 'הכוונה מחודשת',
312
+    'info_refuses' => 'המאמרים שלך נדחו',
313
+    'info_rubriques' => 'נושאים',
314
+    'info_sans_titre' => 'בלי כותר',
315
+    'info_site' => 'אתר אינטרנט',
316
+    'info_site_2' => 'אתר אינטרנט :',
317
+    'info_site_min' => 'אתר',
318
+    'info_sites' => 'אתרים',
319
+    'info_sous_titre' => 'כתוביות :',
320
+    'info_statut_administrateur' => 'מנהל',
321
+    'info_surtitre' => 'הכותרת למעלה:',
322
+    'info_texte' => 'טקסט',
323
+    'info_texte_message' => 'הטקסט של ההודעה שלך :', # MODIF
324
+    'info_total' => 'הכל :',
325
+    'info_tous_les' => 'כל :',
326
+    'info_tout_site' => 'כל האתר',
327
+    'info_un_article' => 'פריט,',
328
+    'info_un_site' => 'האתר,',
329
+    'info_une_rubrique' => 'קטגוריה,',
330
+    'info_url' => 'קישור :',
331
+    'info_visiteur_1' => 'המבקר',
332
+    'info_visiteur_2' => 'אתר ציבורי',
333
+    'info_visiteurs' => 'מבקרים',
334
+    'info_visiteurs_02' => 'המבקרים באתר את הציבור',
335
+    'install_select_type_mysql' => 'MySQL',
336
+    'install_select_type_sqlite2' => 'SQLite 2',
337
+    'install_select_type_sqlite3' => 'SQLite 3',
338
+    'intem_redacteur' => 'עורך',
339
+    'item_administrateur_2' => 'מנהל',
340
+    'item_login' => 'הסינכ',
341
+    'item_non' => 'לא',
342
+    'item_nouvel_auteur' => 'מחבר חדש',
343
+    'item_nouvelle_rubrique' => 'נושא חדש',
344
+    'item_oui' => 'כן',
345 345
 
346
-	// L
347
-	'lien_email' => 'דואר אלקטרוני',
348
-	'lien_site' => 'אתר',
349
-	'logo_article' => 'למס מאמר', # MODIF
350
-	'logo_auteur' => 'למס מחבר', # MODIF
351
-	'logo_rubrique' => 'למס של כותרת', # MODIF
352
-	'logo_site' => 'למס של אתר זה', # MODIF
346
+    // L
347
+    'lien_email' => 'דואר אלקטרוני',
348
+    'lien_site' => 'אתר',
349
+    'logo_article' => 'למס מאמר', # MODIF
350
+    'logo_auteur' => 'למס מחבר', # MODIF
351
+    'logo_rubrique' => 'למס של כותרת', # MODIF
352
+    'logo_site' => 'למס של אתר זה', # MODIF
353 353
 
354
-	// M
355
-	'module_raccourci' => 'קיצור דרך',
354
+    // M
355
+    'module_raccourci' => 'קיצור דרך',
356 356
 
357
-	// O
358
-	'onglet_contenu' => 'תכות',
359
-	'onglet_discuter' => 'לדון',
360
-	'onglet_proprietes' => 'םינייפאמ',
357
+    // O
358
+    'onglet_contenu' => 'תכות',
359
+    'onglet_discuter' => 'לדון',
360
+    'onglet_proprietes' => 'םינייפאמ',
361 361
 
362
-	// P
363
-	'plugin_info_automatique_ou' => 'או ...',
364
-	'plugins_vue_liste' => 'רשימה',
362
+    // P
363
+    'plugin_info_automatique_ou' => 'או ...',
364
+    'plugins_vue_liste' => 'רשימה',
365 365
 
366
-	// R
367
-	'repertoire_plugins' => 'ספריה :',
368
-	'required' => '[מהווה חובה]', # MODIF
366
+    // R
367
+    'repertoire_plugins' => 'ספריה :',
368
+    'required' => '[מהווה חובה]', # MODIF
369 369
 
370
-	// S
371
-	'sans_heure' => 'בלי זמן',
370
+    // S
371
+    'sans_heure' => 'בלי זמן',
372 372
 
373
-	// T
374
-	'taille_cache_vide' => 'האתר המטמון ריק.',
375
-	'text_article_propose_publication' => 'במאמר מוצע לפרסום.',
376
-	'texte_auteurs' => 'המחברים',
377
-	'texte_compte_element' => '@count@ אלמנט',
378
-	'texte_compte_elements' => '@count@ אלמנטים',
379
-	'texte_sous_titre' => 'כתובית',
380
-	'texte_statut_attente_validation' => 'אימות ממתינים',
381
-	'texte_statut_publies' => 'שפורסם באינטרנט',
382
-	'texte_statut_refuses' => 'סירב',
383
-	'texte_sur_titre' => 'על כותרת',
384
-	'texte_titre_02' => 'כותר :',
385
-	'texte_vide' => 'ריק',
386
-	'titre_langue_article' => 'שפת המאמר',
387
-	'titre_langue_rubrique' => 'שפת המדור',
388
-	'titre_page_articles_page' => 'מאמרים',
389
-	'titre_page_articles_tous' => 'כל האתר',
390
-	'titre_reparation' => 'תיקון',
391
-	'trad_delier' => 'לא לקשור את המאמר לתרגומיו',
392
-	'trad_new' => 'כתיבת תרגום חדש של המאמר',
373
+    // T
374
+    'taille_cache_vide' => 'האתר המטמון ריק.',
375
+    'text_article_propose_publication' => 'במאמר מוצע לפרסום.',
376
+    'texte_auteurs' => 'המחברים',
377
+    'texte_compte_element' => '@count@ אלמנט',
378
+    'texte_compte_elements' => '@count@ אלמנטים',
379
+    'texte_sous_titre' => 'כתובית',
380
+    'texte_statut_attente_validation' => 'אימות ממתינים',
381
+    'texte_statut_publies' => 'שפורסם באינטרנט',
382
+    'texte_statut_refuses' => 'סירב',
383
+    'texte_sur_titre' => 'על כותרת',
384
+    'texte_titre_02' => 'כותר :',
385
+    'texte_vide' => 'ריק',
386
+    'titre_langue_article' => 'שפת המאמר',
387
+    'titre_langue_rubrique' => 'שפת המדור',
388
+    'titre_page_articles_page' => 'מאמרים',
389
+    'titre_page_articles_tous' => 'כל האתר',
390
+    'titre_reparation' => 'תיקון',
391
+    'trad_delier' => 'לא לקשור את המאמר לתרגומיו',
392
+    'trad_new' => 'כתיבת תרגום חדש של המאמר',
393 393
 
394
-	// V
395
-	'version' => 'מספר :'
394
+    // V
395
+    'version' => 'מספר :'
396 396
 );
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Indentation   +2266 added lines, -2267 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 
@@ -48,71 +48,71 @@  discard block
 block discarded – undo
48 48
  *     Nom de la fonction, ou false.
49 49
  */
50 50
 function charger_fonction($nom, $dossier = 'exec', $continue = false) {
51
-	static $echecs = [];
52
-
53
-	if (strlen($dossier) and substr($dossier, -1) != '/') {
54
-		$dossier .= '/';
55
-	}
56
-	$f = str_replace('/', '_', $dossier) . $nom;
57
-
58
-	if (function_exists($f)) {
59
-		return $f;
60
-	}
61
-	if (function_exists($g = $f . '_dist')) {
62
-		return $g;
63
-	}
64
-
65
-	if (isset($echecs[$f])) {
66
-		return $echecs[$f];
67
-	}
68
-	// Sinon charger le fichier de declaration si plausible
69
-
70
-	if (!preg_match(',^\w+$,', $f)) {
71
-		if ($continue) {
72
-			return false;
73
-		} //appel interne, on passe
74
-		include_spip('inc/minipres');
75
-		echo minipres();
76
-		exit;
77
-	}
78
-
79
-	// passer en minuscules (cf les balises de formulaires)
80
-	// et inclure le fichier
81
-	if (
82
-		!$inc = include_spip($dossier . ($d = strtolower($nom)))
83
-		// si le fichier truc/machin/nom.php n'existe pas,
84
-		// la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions
85
-		and strlen(dirname($dossier)) and dirname($dossier) != '.'
86
-	) {
87
-		include_spip(substr($dossier, 0, -1));
88
-	}
89
-	if (function_exists($f)) {
90
-		return $f;
91
-	}
92
-	if (function_exists($g)) {
93
-		return $g;
94
-	}
95
-
96
-	if ($continue) {
97
-		return $echecs[$f] = false;
98
-	}
99
-
100
-	// Echec : message d'erreur
101
-	spip_log("fonction $nom ($f ou $g) indisponible" .
102
-		($inc ? '' : " (fichier $d absent de $dossier)"));
103
-
104
-	include_spip('inc/minipres');
105
-	echo minipres(
106
-		_T('forum_titre_erreur'),
107
-		$inc ?
108
-			_T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($f) . '</code>'])
109
-			. '<br />'
110
-			. _T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($g) . '</code>'])
111
-			:
112
-			_T('fichier_introuvable', ['fichier' => '<code>' . spip_htmlentities($d) . '</code>']),
113
-		['all_inline' => true,'status' => 404]
114
-	);
115
-	exit;
51
+    static $echecs = [];
52
+
53
+    if (strlen($dossier) and substr($dossier, -1) != '/') {
54
+        $dossier .= '/';
55
+    }
56
+    $f = str_replace('/', '_', $dossier) . $nom;
57
+
58
+    if (function_exists($f)) {
59
+        return $f;
60
+    }
61
+    if (function_exists($g = $f . '_dist')) {
62
+        return $g;
63
+    }
64
+
65
+    if (isset($echecs[$f])) {
66
+        return $echecs[$f];
67
+    }
68
+    // Sinon charger le fichier de declaration si plausible
69
+
70
+    if (!preg_match(',^\w+$,', $f)) {
71
+        if ($continue) {
72
+            return false;
73
+        } //appel interne, on passe
74
+        include_spip('inc/minipres');
75
+        echo minipres();
76
+        exit;
77
+    }
78
+
79
+    // passer en minuscules (cf les balises de formulaires)
80
+    // et inclure le fichier
81
+    if (
82
+        !$inc = include_spip($dossier . ($d = strtolower($nom)))
83
+        // si le fichier truc/machin/nom.php n'existe pas,
84
+        // la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions
85
+        and strlen(dirname($dossier)) and dirname($dossier) != '.'
86
+    ) {
87
+        include_spip(substr($dossier, 0, -1));
88
+    }
89
+    if (function_exists($f)) {
90
+        return $f;
91
+    }
92
+    if (function_exists($g)) {
93
+        return $g;
94
+    }
95
+
96
+    if ($continue) {
97
+        return $echecs[$f] = false;
98
+    }
99
+
100
+    // Echec : message d'erreur
101
+    spip_log("fonction $nom ($f ou $g) indisponible" .
102
+        ($inc ? '' : " (fichier $d absent de $dossier)"));
103
+
104
+    include_spip('inc/minipres');
105
+    echo minipres(
106
+        _T('forum_titre_erreur'),
107
+        $inc ?
108
+            _T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($f) . '</code>'])
109
+            . '<br />'
110
+            . _T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($g) . '</code>'])
111
+            :
112
+            _T('fichier_introuvable', ['fichier' => '<code>' . spip_htmlentities($d) . '</code>']),
113
+        ['all_inline' => true,'status' => 404]
114
+    );
115
+    exit;
116 116
 }
117 117
 
118 118
 /**
@@ -122,17 +122,17 @@  discard block
 block discarded – undo
122 122
  * @return bool
123 123
  */
124 124
 function include_once_check($file) {
125
-	if (file_exists($file)) {
126
-		include_once $file;
125
+    if (file_exists($file)) {
126
+        include_once $file;
127 127
 
128
-		return true;
129
-	}
130
-	$crash = (isset($GLOBALS['meta']['message_crash_plugins']) ? unserialize($GLOBALS['meta']['message_crash_plugins']) : '');
131
-	$crash = ($crash ?: []);
132
-	$crash[$file] = true;
133
-	ecrire_meta('message_crash_plugins', serialize($crash));
128
+        return true;
129
+    }
130
+    $crash = (isset($GLOBALS['meta']['message_crash_plugins']) ? unserialize($GLOBALS['meta']['message_crash_plugins']) : '');
131
+    $crash = ($crash ?: []);
132
+    $crash[$file] = true;
133
+    ecrire_meta('message_crash_plugins', serialize($crash));
134 134
 
135
-	return false;
135
+    return false;
136 136
 }
137 137
 
138 138
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
  *     - string : chemin du fichier trouvé
157 157
  **/
158 158
 function include_spip($f, $include = true) {
159
-	return find_in_path($f . '.php', '', $include);
159
+    return find_in_path($f . '.php', '', $include);
160 160
 }
161 161
 
162 162
 /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
  *     - string : chemin du fichier trouvé
177 177
  **/
178 178
 function require_spip($f) {
179
-	return find_in_path($f . '.php', '', 'required');
179
+    return find_in_path($f . '.php', '', 'required');
180 180
 }
181 181
 
182 182
 
@@ -185,27 +185,27 @@  discard block
 block discarded – undo
185 185
  * quand on a besoin dans le PHP de filtres/fonctions qui y sont definis
186 186
  */
187 187
 function include_fichiers_fonctions() {
188
-	static $done = false;
189
-	if (!$done) {
190
-		include_spip('inc/lang');
191
-
192
-		// NB: mes_fonctions peut initialiser $dossier_squelettes (old-style)
193
-		// donc il faut l'inclure "en globals"
194
-		if ($f = find_in_path('mes_fonctions.php')) {
195
-			global $dossier_squelettes;
196
-			include_once(_ROOT_CWD . $f);
197
-		}
198
-
199
-		if (@is_readable(_CACHE_PLUGINS_FCT)) {
200
-			// chargement optimise precompile
201
-			include_once(_CACHE_PLUGINS_FCT);
202
-		}
203
-		if (test_espace_prive()) {
204
-			include_spip('inc/filtres_ecrire');
205
-		}
206
-		include_spip('public/fonctions'); // charger les fichiers fonctions associes aux criteres, balises..
207
-		$done = true;
208
-	}
188
+    static $done = false;
189
+    if (!$done) {
190
+        include_spip('inc/lang');
191
+
192
+        // NB: mes_fonctions peut initialiser $dossier_squelettes (old-style)
193
+        // donc il faut l'inclure "en globals"
194
+        if ($f = find_in_path('mes_fonctions.php')) {
195
+            global $dossier_squelettes;
196
+            include_once(_ROOT_CWD . $f);
197
+        }
198
+
199
+        if (@is_readable(_CACHE_PLUGINS_FCT)) {
200
+            // chargement optimise precompile
201
+            include_once(_CACHE_PLUGINS_FCT);
202
+        }
203
+        if (test_espace_prive()) {
204
+            include_spip('inc/filtres_ecrire');
205
+        }
206
+        include_spip('public/fonctions'); // charger les fichiers fonctions associes aux criteres, balises..
207
+        $done = true;
208
+    }
209 209
 }
210 210
 
211 211
 /**
@@ -231,23 +231,23 @@  discard block
 block discarded – undo
231 231
  *     Les paramètres du pipeline modifiés
232 232
  **/
233 233
 function minipipe($fonc, &$val) {
234
-	// fonction
235
-	if (function_exists($fonc)) {
236
-		$val = $fonc($val);
237
-	} // Class::Methode
238
-	else {
239
-		if (
240
-			preg_match('/^(\w*)::(\w*)$/S', $fonc, $regs)
241
-			and $methode = [$regs[1], $regs[2]]
242
-			and is_callable($methode)
243
-		) {
244
-			$val = $methode($val);
245
-		} else {
246
-			spip_log("Erreur - '$fonc' non definie !");
247
-		}
248
-	}
249
-
250
-	return $val;
234
+    // fonction
235
+    if (function_exists($fonc)) {
236
+        $val = $fonc($val);
237
+    } // Class::Methode
238
+    else {
239
+        if (
240
+            preg_match('/^(\w*)::(\w*)$/S', $fonc, $regs)
241
+            and $methode = [$regs[1], $regs[2]]
242
+            and is_callable($methode)
243
+        ) {
244
+            $val = $methode($val);
245
+        } else {
246
+            spip_log("Erreur - '$fonc' non definie !");
247
+        }
248
+    }
249
+
250
+    return $val;
251 251
 }
252 252
 
253 253
 /**
@@ -278,46 +278,46 @@  discard block
 block discarded – undo
278 278
  *     Résultat
279 279
  */
280 280
 function pipeline($action, $val = null) {
281
-	static $charger;
282
-
283
-	// chargement initial des fonctions mises en cache, ou generation du cache
284
-	if (!$charger) {
285
-		if (!($ok = @is_readable($charger = _CACHE_PIPELINES))) {
286
-			include_spip('inc/plugin');
287
-			// generer les fichiers php precompiles
288
-			// de chargement des plugins et des pipelines
289
-			actualise_plugins_actifs();
290
-			if (!($ok = @is_readable($charger))) {
291
-				spip_log("fichier $charger pas cree");
292
-			}
293
-		}
294
-
295
-		if ($ok) {
296
-			include_once $charger;
297
-		}
298
-	}
299
-
300
-	// appliquer notre fonction si elle existe
301
-	$fonc = 'execute_pipeline_' . strtolower($action);
302
-	if (function_exists($fonc)) {
303
-		$val = $fonc($val);
304
-	} // plantage ?
305
-	else {
306
-		spip_log("fonction $fonc absente : pipeline desactive", _LOG_ERREUR);
307
-	}
308
-
309
-	// si le flux est une table avec 2 cle args&data
310
-	// on ne ressort du pipe que les donnees dans 'data'
311
-	// array_key_exists pour php 4.1.0
312
-	if (
313
-		is_array($val)
314
-		and count($val) == 2
315
-		and (array_key_exists('data', $val))
316
-	) {
317
-		$val = $val['data'];
318
-	}
319
-
320
-	return $val;
281
+    static $charger;
282
+
283
+    // chargement initial des fonctions mises en cache, ou generation du cache
284
+    if (!$charger) {
285
+        if (!($ok = @is_readable($charger = _CACHE_PIPELINES))) {
286
+            include_spip('inc/plugin');
287
+            // generer les fichiers php precompiles
288
+            // de chargement des plugins et des pipelines
289
+            actualise_plugins_actifs();
290
+            if (!($ok = @is_readable($charger))) {
291
+                spip_log("fichier $charger pas cree");
292
+            }
293
+        }
294
+
295
+        if ($ok) {
296
+            include_once $charger;
297
+        }
298
+    }
299
+
300
+    // appliquer notre fonction si elle existe
301
+    $fonc = 'execute_pipeline_' . strtolower($action);
302
+    if (function_exists($fonc)) {
303
+        $val = $fonc($val);
304
+    } // plantage ?
305
+    else {
306
+        spip_log("fonction $fonc absente : pipeline desactive", _LOG_ERREUR);
307
+    }
308
+
309
+    // si le flux est une table avec 2 cle args&data
310
+    // on ne ressort du pipe que les donnees dans 'data'
311
+    // array_key_exists pour php 4.1.0
312
+    if (
313
+        is_array($val)
314
+        and count($val) == 2
315
+        and (array_key_exists('data', $val))
316
+    ) {
317
+        $val = $val['data'];
318
+    }
319
+
320
+    return $val;
321 321
 }
322 322
 
323 323
 /**
@@ -361,38 +361,38 @@  discard block
 block discarded – undo
361 361
  *     paramètre est planté pour cause de compatibilité ascendante.
362 362
  */
363 363
 function spip_log($message = null, $name = null) {
364
-	static $pre = [];
365
-	static $log;
366
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
367
-	if (!isset($regs[1]) or !$logname = $regs[1]) {
368
-		$logname = null;
369
-	}
370
-	if (!isset($regs[2])) {
371
-		$niveau = _LOG_INFO;
372
-	}
373
-	else {
374
-		$niveau = intval($regs[2]);
375
-	}
376
-
377
-	if ($niveau <= (defined('_LOG_FILTRE_GRAVITE') ? _LOG_FILTRE_GRAVITE : _LOG_INFO_IMPORTANTE)) {
378
-		if (!$pre) {
379
-			$pre = [
380
-				_LOG_HS => 'HS:',
381
-				_LOG_ALERTE_ROUGE => 'ALERTE:',
382
-				_LOG_CRITIQUE => 'CRITIQUE:',
383
-				_LOG_ERREUR => 'ERREUR:',
384
-				_LOG_AVERTISSEMENT => 'WARNING:',
385
-				_LOG_INFO_IMPORTANTE => '!INFO:',
386
-				_LOG_INFO => 'info:',
387
-				_LOG_DEBUG => 'debug:'
388
-			];
389
-			$log = charger_fonction('log', 'inc');
390
-		}
391
-		if (!is_string($message)) {
392
-			$message = print_r($message, true);
393
-		}
394
-		$log($pre[$niveau] . ' ' . $message, $logname);
395
-	}
364
+    static $pre = [];
365
+    static $log;
366
+    preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
367
+    if (!isset($regs[1]) or !$logname = $regs[1]) {
368
+        $logname = null;
369
+    }
370
+    if (!isset($regs[2])) {
371
+        $niveau = _LOG_INFO;
372
+    }
373
+    else {
374
+        $niveau = intval($regs[2]);
375
+    }
376
+
377
+    if ($niveau <= (defined('_LOG_FILTRE_GRAVITE') ? _LOG_FILTRE_GRAVITE : _LOG_INFO_IMPORTANTE)) {
378
+        if (!$pre) {
379
+            $pre = [
380
+                _LOG_HS => 'HS:',
381
+                _LOG_ALERTE_ROUGE => 'ALERTE:',
382
+                _LOG_CRITIQUE => 'CRITIQUE:',
383
+                _LOG_ERREUR => 'ERREUR:',
384
+                _LOG_AVERTISSEMENT => 'WARNING:',
385
+                _LOG_INFO_IMPORTANTE => '!INFO:',
386
+                _LOG_INFO => 'info:',
387
+                _LOG_DEBUG => 'debug:'
388
+            ];
389
+            $log = charger_fonction('log', 'inc');
390
+        }
391
+        if (!is_string($message)) {
392
+            $message = print_r($message, true);
393
+        }
394
+        $log($pre[$niveau] . ' ' . $message, $logname);
395
+    }
396 396
 }
397 397
 
398 398
 /**
@@ -403,8 +403,8 @@  discard block
 block discarded – undo
403 403
  * @param array $opt Tableau d'options
404 404
  **/
405 405
 function journal($phrase, $opt = []) {
406
-	$journal = charger_fonction('journal', 'inc');
407
-	$journal($phrase, $opt);
406
+    $journal = charger_fonction('journal', 'inc');
407
+    $journal($phrase, $opt);
408 408
 }
409 409
 
410 410
 
@@ -423,37 +423,37 @@  discard block
 block discarded – undo
423 423
  **/
424 424
 function _request($var, $c = false) {
425 425
 
426
-	if (is_array($c)) {
427
-		return $c[$var] ?? null;
428
-	}
429
-
430
-	if (isset($_GET[$var])) {
431
-		$a = $_GET[$var];
432
-	} elseif (isset($_POST[$var])) {
433
-		$a = $_POST[$var];
434
-	} else {
435
-		return null;
436
-	}
437
-
438
-	// Si on est en ajax et en POST tout a ete encode
439
-	// via encodeURIComponent, il faut donc repasser
440
-	// dans le charset local...
441
-	if (
442
-		defined('_AJAX')
443
-		and _AJAX
444
-		and isset($GLOBALS['meta']['charset'])
445
-		and $GLOBALS['meta']['charset'] != 'utf-8'
446
-		and is_string($a)
447
-		// check rapide mais pas fiable
448
-		and preg_match(',[\x80-\xFF],', $a)
449
-		// check fiable
450
-		and include_spip('inc/charsets')
451
-		and is_utf8($a)
452
-	) {
453
-		return importer_charset($a, 'utf-8');
454
-	}
455
-
456
-	return $a;
426
+    if (is_array($c)) {
427
+        return $c[$var] ?? null;
428
+    }
429
+
430
+    if (isset($_GET[$var])) {
431
+        $a = $_GET[$var];
432
+    } elseif (isset($_POST[$var])) {
433
+        $a = $_POST[$var];
434
+    } else {
435
+        return null;
436
+    }
437
+
438
+    // Si on est en ajax et en POST tout a ete encode
439
+    // via encodeURIComponent, il faut donc repasser
440
+    // dans le charset local...
441
+    if (
442
+        defined('_AJAX')
443
+        and _AJAX
444
+        and isset($GLOBALS['meta']['charset'])
445
+        and $GLOBALS['meta']['charset'] != 'utf-8'
446
+        and is_string($a)
447
+        // check rapide mais pas fiable
448
+        and preg_match(',[\x80-\xFF],', $a)
449
+        // check fiable
450
+        and include_spip('inc/charsets')
451
+        and is_utf8($a)
452
+    ) {
453
+        return importer_charset($a, 'utf-8');
454
+    }
455
+
456
+    return $a;
457 457
 }
458 458
 
459 459
 
@@ -471,22 +471,22 @@  discard block
 block discarded – undo
471 471
  *     - false sinon
472 472
  **/
473 473
 function set_request($var, $val = null, $c = false) {
474
-	if (is_array($c)) {
475
-		unset($c[$var]);
476
-		if ($val !== null) {
477
-			$c[$var] = $val;
478
-		}
474
+    if (is_array($c)) {
475
+        unset($c[$var]);
476
+        if ($val !== null) {
477
+            $c[$var] = $val;
478
+        }
479 479
 
480
-		return $c;
481
-	}
480
+        return $c;
481
+    }
482 482
 
483
-	unset($_GET[$var]);
484
-	unset($_POST[$var]);
485
-	if ($val !== null) {
486
-		$_GET[$var] = $val;
487
-	}
483
+    unset($_GET[$var]);
484
+    unset($_POST[$var]);
485
+    if ($val !== null) {
486
+        $_GET[$var] = $val;
487
+    }
488 488
 
489
-	return false; # n'affecte pas $c
489
+    return false; # n'affecte pas $c
490 490
 }
491 491
 
492 492
 /**
@@ -506,25 +506,25 @@  discard block
 block discarded – undo
506 506
  * @return array|mixed|string
507 507
  */
508 508
 function spip_sanitize_from_request($value, $key, $sanitize_function = 'entites_html') {
509
-	if (is_array($value)) {
510
-		if ($key == '*') {
511
-			$key = array_keys($value);
512
-		}
513
-		if (!is_array($key)) {
514
-			$key = [$key];
515
-		}
516
-		foreach ($key as $k) {
517
-			if (!empty($value[$k])) {
518
-				$value[$k] = spip_sanitize_from_request($value[$k], $k, $sanitize_function);
519
-			}
520
-		}
521
-		return $value;
522
-	}
523
-	// si la valeur vient des GET ou POST on la sanitize
524
-	if (!empty($value) and $value == _request($key)) {
525
-		$value = $sanitize_function($value);
526
-	}
527
-	return $value;
509
+    if (is_array($value)) {
510
+        if ($key == '*') {
511
+            $key = array_keys($value);
512
+        }
513
+        if (!is_array($key)) {
514
+            $key = [$key];
515
+        }
516
+        foreach ($key as $k) {
517
+            if (!empty($value[$k])) {
518
+                $value[$k] = spip_sanitize_from_request($value[$k], $k, $sanitize_function);
519
+            }
520
+        }
521
+        return $value;
522
+    }
523
+    // si la valeur vient des GET ou POST on la sanitize
524
+    if (!empty($value) and $value == _request($key)) {
525
+        $value = $sanitize_function($value);
526
+    }
527
+    return $value;
528 528
 }
529 529
 
530 530
 /**
@@ -532,23 +532,22 @@  discard block
 block discarded – undo
532 532
  *
533 533
  * On est sur le web, on exclut certains protocoles,
534 534
  * notamment 'file://', 'php://' et d'autres…
535
-
536 535
  * @param string $url
537 536
  * @return bool
538 537
  */
539 538
 function tester_url_absolue($url) {
540
-	$url = trim($url ?? '');
541
-	if ($url && preg_match(';^([a-z]{3,7}:)?//;Uims', $url, $m)) {
542
-		if (
543
-			isset($m[1])
544
-			and $p = strtolower(rtrim($m[1], ':'))
545
-			and in_array($p, ['file', 'php', 'zlib', 'glob', 'phar', 'ssh2', 'rar', 'ogg', 'expect', 'zip'])
546
-		) {
547
-			return false;
548
-		}
549
-		return true;
550
-	}
551
-	return false;
539
+    $url = trim($url ?? '');
540
+    if ($url && preg_match(';^([a-z]{3,7}:)?//;Uims', $url, $m)) {
541
+        if (
542
+            isset($m[1])
543
+            and $p = strtolower(rtrim($m[1], ':'))
544
+            and in_array($p, ['file', 'php', 'zlib', 'glob', 'phar', 'ssh2', 'rar', 'ogg', 'expect', 'zip'])
545
+        ) {
546
+            return false;
547
+        }
548
+        return true;
549
+    }
550
+    return false;
552 551
 }
553 552
 
554 553
 /**
@@ -570,100 +569,100 @@  discard block
 block discarded – undo
570 569
  * @return string URL
571 570
  */
572 571
 function parametre_url($url, $c, $v = null, $sep = '&amp;') {
573
-	// requete erronnee : plusieurs variable dans $c et aucun $v
574
-	if (strpos($c, '|') !== false and is_null($v)) {
575
-		return null;
576
-	}
577
-
578
-	// lever l'#ancre
579
-	if (preg_match(',^([^#]*)(#.*)$,', $url, $r)) {
580
-		$url = $r[1];
581
-		$ancre = $r[2];
582
-	} else {
583
-		$ancre = '';
584
-	}
585
-
586
-	// eclater
587
-	$url = preg_split(',[?]|&amp;|&,', $url);
588
-
589
-	// recuperer la base
590
-	$a = array_shift($url);
591
-	if (!$a) {
592
-		$a = './';
593
-	}
594
-
595
-	// preparer la regexp de maniere securisee
596
-	$regexp = explode('|', $c);
597
-	foreach ($regexp as $r => $e) {
598
-		$regexp[$r] = str_replace('[]', '\[\]', preg_replace(',[^\w\d\[\]-],', '', $e));
599
-	}
600
-	$regexp = ',^(' . implode('|', $regexp) . '[[]?[]]?)(=.*)?$,';
601
-	$ajouts = array_flip(explode('|', $c));
602
-	$u = is_array($v) ? $v : rawurlencode((string) $v);
603
-	$testv = (is_array($v) ? count($v) : strlen((string) $v));
604
-	$v_read = null;
605
-	// lire les variables et agir
606
-	foreach ($url as $n => $val) {
607
-		if (preg_match($regexp, urldecode($val), $r)) {
608
-			$r = array_pad($r, 3, null);
609
-			if ($v === null) {
610
-				// c'est un tableau, on memorise les valeurs
611
-				if (substr($r[1], -2) == '[]') {
612
-					if (!$v_read) {
613
-						$v_read = [];
614
-					}
615
-					$v_read[] = $r[2] ? substr($r[2], 1) : '';
616
-				} // c'est un scalaire, on retourne direct
617
-				else {
618
-					return $r[2] ? substr($r[2], 1) : '';
619
-				}
620
-			} // suppression
621
-			elseif (!$testv) {
622
-				unset($url[$n]);
623
-			}
624
-			// Ajout. Pour une variable, remplacer au meme endroit,
625
-			// pour un tableau ce sera fait dans la prochaine boucle
626
-			elseif (substr($r[1], -2) != '[]') {
627
-				$url[$n] = $r[1] . '=' . $u;
628
-				unset($ajouts[$r[1]]);
629
-			}
630
-			// Pour les tableaux on laisse tomber les valeurs de
631
-			// départ, on remplira à l'étape suivante
632
-			else {
633
-				unset($url[$n]);
634
-			}
635
-		}
636
-	}
637
-
638
-	// traiter les parametres pas encore trouves
639
-	if (
640
-		$v === null
641
-		and $args = func_get_args()
642
-		and count($args) == 2
643
-	) {
644
-		return $v_read; // rien trouve ou un tableau
645
-	} elseif ($testv) {
646
-		foreach ($ajouts as $k => $n) {
647
-			if (!is_array($v)) {
648
-				$url[] = $k . '=' . $u;
649
-			} else {
650
-				$id = (substr($k, -2) == '[]') ? $k : ($k . '[]');
651
-				foreach ($v as $w) {
652
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w));
653
-				}
654
-			}
655
-		}
656
-	}
657
-
658
-	// eliminer les vides
659
-	$url = array_filter($url);
660
-
661
-	// recomposer l'adresse
662
-	if ($url) {
663
-		$a .= '?' . join($sep, $url);
664
-	}
665
-
666
-	return $a . $ancre;
572
+    // requete erronnee : plusieurs variable dans $c et aucun $v
573
+    if (strpos($c, '|') !== false and is_null($v)) {
574
+        return null;
575
+    }
576
+
577
+    // lever l'#ancre
578
+    if (preg_match(',^([^#]*)(#.*)$,', $url, $r)) {
579
+        $url = $r[1];
580
+        $ancre = $r[2];
581
+    } else {
582
+        $ancre = '';
583
+    }
584
+
585
+    // eclater
586
+    $url = preg_split(',[?]|&amp;|&,', $url);
587
+
588
+    // recuperer la base
589
+    $a = array_shift($url);
590
+    if (!$a) {
591
+        $a = './';
592
+    }
593
+
594
+    // preparer la regexp de maniere securisee
595
+    $regexp = explode('|', $c);
596
+    foreach ($regexp as $r => $e) {
597
+        $regexp[$r] = str_replace('[]', '\[\]', preg_replace(',[^\w\d\[\]-],', '', $e));
598
+    }
599
+    $regexp = ',^(' . implode('|', $regexp) . '[[]?[]]?)(=.*)?$,';
600
+    $ajouts = array_flip(explode('|', $c));
601
+    $u = is_array($v) ? $v : rawurlencode((string) $v);
602
+    $testv = (is_array($v) ? count($v) : strlen((string) $v));
603
+    $v_read = null;
604
+    // lire les variables et agir
605
+    foreach ($url as $n => $val) {
606
+        if (preg_match($regexp, urldecode($val), $r)) {
607
+            $r = array_pad($r, 3, null);
608
+            if ($v === null) {
609
+                // c'est un tableau, on memorise les valeurs
610
+                if (substr($r[1], -2) == '[]') {
611
+                    if (!$v_read) {
612
+                        $v_read = [];
613
+                    }
614
+                    $v_read[] = $r[2] ? substr($r[2], 1) : '';
615
+                } // c'est un scalaire, on retourne direct
616
+                else {
617
+                    return $r[2] ? substr($r[2], 1) : '';
618
+                }
619
+            } // suppression
620
+            elseif (!$testv) {
621
+                unset($url[$n]);
622
+            }
623
+            // Ajout. Pour une variable, remplacer au meme endroit,
624
+            // pour un tableau ce sera fait dans la prochaine boucle
625
+            elseif (substr($r[1], -2) != '[]') {
626
+                $url[$n] = $r[1] . '=' . $u;
627
+                unset($ajouts[$r[1]]);
628
+            }
629
+            // Pour les tableaux on laisse tomber les valeurs de
630
+            // départ, on remplira à l'étape suivante
631
+            else {
632
+                unset($url[$n]);
633
+            }
634
+        }
635
+    }
636
+
637
+    // traiter les parametres pas encore trouves
638
+    if (
639
+        $v === null
640
+        and $args = func_get_args()
641
+        and count($args) == 2
642
+    ) {
643
+        return $v_read; // rien trouve ou un tableau
644
+    } elseif ($testv) {
645
+        foreach ($ajouts as $k => $n) {
646
+            if (!is_array($v)) {
647
+                $url[] = $k . '=' . $u;
648
+            } else {
649
+                $id = (substr($k, -2) == '[]') ? $k : ($k . '[]');
650
+                foreach ($v as $w) {
651
+                    $url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w));
652
+                }
653
+            }
654
+        }
655
+    }
656
+
657
+    // eliminer les vides
658
+    $url = array_filter($url);
659
+
660
+    // recomposer l'adresse
661
+    if ($url) {
662
+        $a .= '?' . join($sep, $url);
663
+    }
664
+
665
+    return $a . $ancre;
667 666
 }
668 667
 
669 668
 /**
@@ -678,22 +677,22 @@  discard block
 block discarded – undo
678 677
  * @uses translitteration()
679 678
  */
680 679
 function ancre_url(string $url, ?string $ancre = ''): string {
681
-	$ancre ??= '';
682
-	// lever l'#ancre
683
-	if (preg_match(',^([^#]*)(#.*)$,', $url, $r)) {
684
-		$url = $r[1];
685
-	}
686
-	if (preg_match('/[^-_a-zA-Z0-9]+/S', $ancre)) {
687
-		if (!function_exists('translitteration')) {
688
-			include_spip('inc/charsets');
689
-		}
690
-		$ancre = preg_replace(
691
-			['/^[^-_a-zA-Z0-9]+/', '/[^-_a-zA-Z0-9]/'],
692
-			['', '-'],
693
-			translitteration($ancre)
694
-		);
695
-	}
696
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
680
+    $ancre ??= '';
681
+    // lever l'#ancre
682
+    if (preg_match(',^([^#]*)(#.*)$,', $url, $r)) {
683
+        $url = $r[1];
684
+    }
685
+    if (preg_match('/[^-_a-zA-Z0-9]+/S', $ancre)) {
686
+        if (!function_exists('translitteration')) {
687
+            include_spip('inc/charsets');
688
+        }
689
+        $ancre = preg_replace(
690
+            ['/^[^-_a-zA-Z0-9]+/', '/[^-_a-zA-Z0-9]/'],
691
+            ['', '-'],
692
+            translitteration($ancre)
693
+        );
694
+    }
695
+    return $url . (strlen($ancre) ? '#' . $ancre : '');
697 696
 }
698 697
 
699 698
 /**
@@ -703,16 +702,16 @@  discard block
 block discarded – undo
703 702
  * @return string
704 703
  */
705 704
 function nettoyer_uri($reset = null) {
706
-	static $done = false;
707
-	static $propre = '';
708
-	if (!is_null($reset)) {
709
-		return $propre = $reset;
710
-	}
711
-	if ($done) {
712
-		return $propre;
713
-	}
714
-	$done = true;
715
-	return $propre = nettoyer_uri_var($GLOBALS['REQUEST_URI']);
705
+    static $done = false;
706
+    static $propre = '';
707
+    if (!is_null($reset)) {
708
+        return $propre = $reset;
709
+    }
710
+    if ($done) {
711
+        return $propre;
712
+    }
713
+    $done = true;
714
+    return $propre = nettoyer_uri_var($GLOBALS['REQUEST_URI']);
716 715
 }
717 716
 
718 717
 /**
@@ -724,16 +723,16 @@  discard block
 block discarded – undo
724 723
  * @return string
725 724
  */
726 725
 function nettoyer_uri_var($request_uri) {
727
-	$uri1 = $request_uri;
728
-	do {
729
-		$uri = $uri1;
730
-		$uri1 = preg_replace(
731
-			',([?&])(var_[^=&]*|PHPSESSID|fbclid|utm_[^=&]*)=[^&]*(&|$),i',
732
-			'\1',
733
-			$uri
734
-		);
735
-	} while ($uri <> $uri1);
736
-	return preg_replace(',[?&]$,', '', $uri1);
726
+    $uri1 = $request_uri;
727
+    do {
728
+        $uri = $uri1;
729
+        $uri1 = preg_replace(
730
+            ',([?&])(var_[^=&]*|PHPSESSID|fbclid|utm_[^=&]*)=[^&]*(&|$),i',
731
+            '\1',
732
+            $uri
733
+        );
734
+    } while ($uri <> $uri1);
735
+    return preg_replace(',[?&]$,', '', $uri1);
737 736
 }
738 737
 
739 738
 
@@ -747,48 +746,48 @@  discard block
 block discarded – undo
747 746
  *    URL vers soi-même
748 747
  **/
749 748
 function self($amp = '&amp;', $root = false) {
750
-	$url = nettoyer_uri();
751
-	if (
752
-		!$root
753
-		and (
754
-			// si pas de profondeur on peut tronquer
755
-			$GLOBALS['profondeur_url'] < (_DIR_RESTREINT ? 1 : 2)
756
-			// sinon c'est OK si _SET_HTML_BASE a ete force a false
757
-			or (defined('_SET_HTML_BASE') and !_SET_HTML_BASE))
758
-	) {
759
-		$url = preg_replace(',^[^?]*/,', '', $url);
760
-	}
761
-	// ajouter le cas echeant les variables _POST['id_...']
762
-	foreach ($_POST as $v => $c) {
763
-		if (substr($v, 0, 3) == 'id_') {
764
-			$url = parametre_url($url, $v, $c, '&');
765
-		}
766
-	}
767
-
768
-	// supprimer les variables sans interet
769
-	if (test_espace_prive()) {
770
-		$url = preg_replace(',([?&])('
771
-			. 'lang|show_docs|'
772
-			. 'changer_lang|var_lang|action)=[^&]*,i', '\1', $url);
773
-		$url = preg_replace(',([?&])[&]+,', '\1', $url);
774
-		$url = preg_replace(',[&]$,', '\1', $url);
775
-	}
776
-
777
-	// eviter les hacks
778
-	include_spip('inc/filtres_mini');
779
-	$url = spip_htmlspecialchars($url);
780
-
781
-	$url = str_replace(["'", '"', '<', '[', ']', ':'], ['%27', '%22', '%3C', '%5B', '%5D', '%3A'], $url);
782
-
783
-	// &amp; ?
784
-	if ($amp != '&amp;') {
785
-		$url = str_replace('&amp;', $amp, $url);
786
-	}
787
-
788
-	// Si ca demarre par ? ou vide, donner './'
789
-	$url = preg_replace(',^([?].*)?$,', './\1', $url);
790
-
791
-	return $url;
749
+    $url = nettoyer_uri();
750
+    if (
751
+        !$root
752
+        and (
753
+            // si pas de profondeur on peut tronquer
754
+            $GLOBALS['profondeur_url'] < (_DIR_RESTREINT ? 1 : 2)
755
+            // sinon c'est OK si _SET_HTML_BASE a ete force a false
756
+            or (defined('_SET_HTML_BASE') and !_SET_HTML_BASE))
757
+    ) {
758
+        $url = preg_replace(',^[^?]*/,', '', $url);
759
+    }
760
+    // ajouter le cas echeant les variables _POST['id_...']
761
+    foreach ($_POST as $v => $c) {
762
+        if (substr($v, 0, 3) == 'id_') {
763
+            $url = parametre_url($url, $v, $c, '&');
764
+        }
765
+    }
766
+
767
+    // supprimer les variables sans interet
768
+    if (test_espace_prive()) {
769
+        $url = preg_replace(',([?&])('
770
+            . 'lang|show_docs|'
771
+            . 'changer_lang|var_lang|action)=[^&]*,i', '\1', $url);
772
+        $url = preg_replace(',([?&])[&]+,', '\1', $url);
773
+        $url = preg_replace(',[&]$,', '\1', $url);
774
+    }
775
+
776
+    // eviter les hacks
777
+    include_spip('inc/filtres_mini');
778
+    $url = spip_htmlspecialchars($url);
779
+
780
+    $url = str_replace(["'", '"', '<', '[', ']', ':'], ['%27', '%22', '%3C', '%5B', '%5D', '%3A'], $url);
781
+
782
+    // &amp; ?
783
+    if ($amp != '&amp;') {
784
+        $url = str_replace('&amp;', $amp, $url);
785
+    }
786
+
787
+    // Si ca demarre par ? ou vide, donner './'
788
+    $url = preg_replace(',^([?].*)?$,', './\1', $url);
789
+
790
+    return $url;
792 791
 }
793 792
 
794 793
 
@@ -799,7 +798,7 @@  discard block
 block discarded – undo
799 798
  *     true si c'est le cas, false sinon.
800 799
  */
801 800
 function test_espace_prive() {
802
-	return defined('_ESPACE_PRIVE') ? _ESPACE_PRIVE : false;
801
+    return defined('_ESPACE_PRIVE') ? _ESPACE_PRIVE : false;
803 802
 }
804 803
 
805 804
 /**
@@ -809,7 +808,7 @@  discard block
 block discarded – undo
809 808
  * @return bool
810 809
  */
811 810
 function test_plugin_actif($plugin) {
812
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
811
+    return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
813 812
 }
814 813
 
815 814
 /**
@@ -840,52 +839,52 @@  discard block
 block discarded – undo
840 839
  *     Texte
841 840
  */
842 841
 function _T($texte, $args = [], $options = []) {
843
-	static $traduire = false;
844
-	$o = ['class' => '', 'force' => true, 'sanitize' => true];
845
-	if ($options) {
846
-		// support de l'ancien argument $class
847
-		if (is_string($options)) {
848
-			$options = ['class' => $options];
849
-		}
850
-		$o = array_merge($o, $options);
851
-	}
852
-
853
-	if (!$traduire) {
854
-		$traduire = charger_fonction('traduire', 'inc');
855
-		include_spip('inc/lang');
856
-	}
857
-
858
-	// On peut passer explicitement la langue dans le tableau
859
-	// On utilise le même nom de variable que la globale
860
-	if (isset($args['spip_lang'])) {
861
-		$lang = $args['spip_lang'];
862
-		// On l'enleve pour ne pas le passer au remplacement
863
-		unset($args['spip_lang']);
864
-	} // Sinon on prend la langue du contexte
865
-	else {
866
-		$lang = $GLOBALS['spip_lang'];
867
-	}
868
-	$text = $traduire($texte, $lang);
869
-
870
-	if ($text === null || !strlen($text)) {
871
-		if (!$o['force']) {
872
-			return '';
873
-		}
874
-
875
-		$text = $texte;
876
-
877
-		// pour les chaines non traduites, assurer un service minimum
878
-		if (!$GLOBALS['test_i18n'] and (_request('var_mode') != 'traduction')) {
879
-			$n = strpos($text, ':');
880
-			if ($n !== false) {
881
-				$text = substr($text, $n + 1);
882
-			}
883
-			$text = str_replace('_', ' ', $text);
884
-		}
885
-		$o['class'] = null;
886
-	}
887
-
888
-	return _L($text, $args, $o);
842
+    static $traduire = false;
843
+    $o = ['class' => '', 'force' => true, 'sanitize' => true];
844
+    if ($options) {
845
+        // support de l'ancien argument $class
846
+        if (is_string($options)) {
847
+            $options = ['class' => $options];
848
+        }
849
+        $o = array_merge($o, $options);
850
+    }
851
+
852
+    if (!$traduire) {
853
+        $traduire = charger_fonction('traduire', 'inc');
854
+        include_spip('inc/lang');
855
+    }
856
+
857
+    // On peut passer explicitement la langue dans le tableau
858
+    // On utilise le même nom de variable que la globale
859
+    if (isset($args['spip_lang'])) {
860
+        $lang = $args['spip_lang'];
861
+        // On l'enleve pour ne pas le passer au remplacement
862
+        unset($args['spip_lang']);
863
+    } // Sinon on prend la langue du contexte
864
+    else {
865
+        $lang = $GLOBALS['spip_lang'];
866
+    }
867
+    $text = $traduire($texte, $lang);
868
+
869
+    if ($text === null || !strlen($text)) {
870
+        if (!$o['force']) {
871
+            return '';
872
+        }
873
+
874
+        $text = $texte;
875
+
876
+        // pour les chaines non traduites, assurer un service minimum
877
+        if (!$GLOBALS['test_i18n'] and (_request('var_mode') != 'traduction')) {
878
+            $n = strpos($text, ':');
879
+            if ($n !== false) {
880
+                $text = substr($text, $n + 1);
881
+            }
882
+            $text = str_replace('_', ' ', $text);
883
+        }
884
+        $o['class'] = null;
885
+    }
886
+
887
+    return _L($text, $args, $o);
889 888
 }
890 889
 
891 890
 
@@ -912,53 +911,53 @@  discard block
 block discarded – undo
912 911
  *     Texte
913 912
  */
914 913
 function _L($text, $args = [], $options = []) {
915
-	$f = $text;
916
-	$defaut_options = [
917
-		'class' => null,
918
-		'sanitize' => true,
919
-	];
920
-	// support de l'ancien argument $class
921
-	if ($options and is_string($options)) {
922
-		$options = ['class' => $options];
923
-	}
924
-	if (is_array($options)) {
925
-		$options += $defaut_options;
926
-	} else {
927
-		$options = $defaut_options;
928
-	}
929
-
930
-	if (is_array($args) and count($args)) {
931
-		if (!function_exists('interdire_scripts')) {
932
-			include_spip('inc/texte');
933
-		}
934
-		if (!function_exists('echapper_html_suspect')) {
935
-			include_spip('inc/texte_mini');
936
-		}
937
-		foreach ($args as $name => $value) {
938
-			if (strpos($text, (string) "@$name@") !== false) {
939
-				if ($options['sanitize']) {
940
-					$value = echapper_html_suspect($value);
941
-					$value = interdire_scripts($value, -1);
942
-				}
943
-				if (!empty($options['class'])) {
944
-					$value = "<span class='" . $options['class'] . "'>$value</span>";
945
-				}
946
-				$text = str_replace("@$name@", $value, $text);
947
-				unset($args[$name]);
948
-			}
949
-		}
950
-		// Si des variables n'ont pas ete inserees, le signaler
951
-		// (chaines de langues pas a jour)
952
-		if ($args) {
953
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
954
-		}
955
-	}
956
-
957
-	if (($GLOBALS['test_i18n'] or (_request('var_mode') == 'traduction')) and is_null($options['class'])) {
958
-		return "<span class='debug-traduction-erreur'>$text</span>";
959
-	} else {
960
-		return $text;
961
-	}
914
+    $f = $text;
915
+    $defaut_options = [
916
+        'class' => null,
917
+        'sanitize' => true,
918
+    ];
919
+    // support de l'ancien argument $class
920
+    if ($options and is_string($options)) {
921
+        $options = ['class' => $options];
922
+    }
923
+    if (is_array($options)) {
924
+        $options += $defaut_options;
925
+    } else {
926
+        $options = $defaut_options;
927
+    }
928
+
929
+    if (is_array($args) and count($args)) {
930
+        if (!function_exists('interdire_scripts')) {
931
+            include_spip('inc/texte');
932
+        }
933
+        if (!function_exists('echapper_html_suspect')) {
934
+            include_spip('inc/texte_mini');
935
+        }
936
+        foreach ($args as $name => $value) {
937
+            if (strpos($text, (string) "@$name@") !== false) {
938
+                if ($options['sanitize']) {
939
+                    $value = echapper_html_suspect($value);
940
+                    $value = interdire_scripts($value, -1);
941
+                }
942
+                if (!empty($options['class'])) {
943
+                    $value = "<span class='" . $options['class'] . "'>$value</span>";
944
+                }
945
+                $text = str_replace("@$name@", $value, $text);
946
+                unset($args[$name]);
947
+            }
948
+        }
949
+        // Si des variables n'ont pas ete inserees, le signaler
950
+        // (chaines de langues pas a jour)
951
+        if ($args) {
952
+            spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
953
+        }
954
+    }
955
+
956
+    if (($GLOBALS['test_i18n'] or (_request('var_mode') == 'traduction')) and is_null($options['class'])) {
957
+        return "<span class='debug-traduction-erreur'>$text</span>";
958
+    } else {
959
+        return $text;
960
+    }
962 961
 }
963 962
 
964 963
 
@@ -972,13 +971,13 @@  discard block
 block discarded – undo
972 971
  * @return string
973 972
  */
974 973
 function joli_repertoire($rep) {
975
-	$a = substr($rep, 0, 1);
976
-	if ($a <> '.' and $a <> '/') {
977
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
978
-	}
979
-	$rep = preg_replace(',(^\.\.\/),', '', $rep);
974
+    $a = substr($rep, 0, 1);
975
+    if ($a <> '.' and $a <> '/') {
976
+        $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
977
+    }
978
+    $rep = preg_replace(',(^\.\.\/),', '', $rep);
980 979
 
981
-	return $rep;
980
+    return $rep;
982 981
 }
983 982
 
984 983
 
@@ -1003,54 +1002,54 @@  discard block
 block discarded – undo
1003 1002
  * @return float|int|string|void
1004 1003
  */
1005 1004
 function spip_timer($t = 'rien', $raw = false) {
1006
-	static $time;
1007
-	$a = time();
1008
-	$b = microtime();
1009
-	// microtime peut contenir les microsecondes et le temps
1010
-	$b = explode(' ', $b);
1011
-	if (count($b) == 2) {
1012
-		$a = end($b);
1013
-	} // plus precis !
1014
-	$b = reset($b);
1015
-	if (!isset($time[$t])) {
1016
-		$time[$t] = $a + $b;
1017
-	} else {
1018
-		$p = ($a + $b - $time[$t]) * 1000;
1019
-		unset($time[$t]);
1005
+    static $time;
1006
+    $a = time();
1007
+    $b = microtime();
1008
+    // microtime peut contenir les microsecondes et le temps
1009
+    $b = explode(' ', $b);
1010
+    if (count($b) == 2) {
1011
+        $a = end($b);
1012
+    } // plus precis !
1013
+    $b = reset($b);
1014
+    if (!isset($time[$t])) {
1015
+        $time[$t] = $a + $b;
1016
+    } else {
1017
+        $p = ($a + $b - $time[$t]) * 1000;
1018
+        unset($time[$t]);
1020 1019
 #			echo "'$p'";exit;
1021
-		if ($raw) {
1022
-			return $p;
1023
-		}
1024
-		if ($p < 1000) {
1025
-			$s = '';
1026
-		} else {
1027
-			$s = sprintf('%d ', $x = floor($p / 1000));
1028
-			$p -= ($x * 1000);
1029
-		}
1020
+        if ($raw) {
1021
+            return $p;
1022
+        }
1023
+        if ($p < 1000) {
1024
+            $s = '';
1025
+        } else {
1026
+            $s = sprintf('%d ', $x = floor($p / 1000));
1027
+            $p -= ($x * 1000);
1028
+        }
1030 1029
 
1031
-		return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1032
-	}
1030
+        return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1031
+    }
1033 1032
 }
1034 1033
 
1035 1034
 
1036 1035
 // Renvoie False si un fichier n'est pas plus vieux que $duree secondes,
1037 1036
 // sinon renvoie True et le date sauf si ca n'est pas souhaite
1038 1037
 function spip_touch($fichier, $duree = 0, $touch = true) {
1039
-	if ($duree) {
1040
-		clearstatcache();
1041
-		if ((@$f = filemtime($fichier)) and ($f >= time() - $duree)) {
1042
-			return false;
1043
-		}
1044
-	}
1045
-	if ($touch !== false) {
1046
-		if (!@touch($fichier)) {
1047
-			spip_unlink($fichier);
1048
-			@touch($fichier);
1049
-		};
1050
-		@chmod($fichier, _SPIP_CHMOD & ~0111);
1051
-	}
1038
+    if ($duree) {
1039
+        clearstatcache();
1040
+        if ((@$f = filemtime($fichier)) and ($f >= time() - $duree)) {
1041
+            return false;
1042
+        }
1043
+    }
1044
+    if ($touch !== false) {
1045
+        if (!@touch($fichier)) {
1046
+            spip_unlink($fichier);
1047
+            @touch($fichier);
1048
+        };
1049
+        @chmod($fichier, _SPIP_CHMOD & ~0111);
1050
+    }
1052 1051
 
1053
-	return true;
1052
+    return true;
1054 1053
 }
1055 1054
 
1056 1055
 
@@ -1061,11 +1060,11 @@  discard block
 block discarded – undo
1061 1060
  * @uses cron()
1062 1061
  **/
1063 1062
 function action_cron() {
1064
-	include_spip('inc/headers');
1065
-	http_response_code(204); // No Content
1066
-	header('Connection: close');
1067
-	define('_DIRECT_CRON_FORCE', true);
1068
-	cron();
1063
+    include_spip('inc/headers');
1064
+    http_response_code(204); // No Content
1065
+    header('Connection: close');
1066
+    define('_DIRECT_CRON_FORCE', true);
1067
+    cron();
1069 1068
 }
1070 1069
 
1071 1070
 /**
@@ -1081,26 +1080,26 @@  discard block
 block discarded – undo
1081 1080
  *     True si la tache a pu être effectuée
1082 1081
  */
1083 1082
 function cron($taches = [], $taches_old = []) {
1084
-	// si pas en mode cron force, laisser tomber.
1085
-	if (!defined('_DIRECT_CRON_FORCE')) {
1086
-		return false;
1087
-	}
1088
-	if (!is_array($taches)) {
1089
-		$taches = $taches_old;
1090
-	} // compat anciens appels
1091
-	// si taches a inserer en base et base inaccessible, laisser tomber
1092
-	// sinon on ne verifie pas la connexion tout de suite, car si ca se trouve
1093
-	// queue_sleep_time_to_next_job() dira qu'il n'y a rien a faire
1094
-	// et on evite d'ouvrir une connexion pour rien (utilisation de _DIRECT_CRON_FORCE dans mes_options.php)
1095
-	if ($taches and count($taches) and !spip_connect()) {
1096
-		return false;
1097
-	}
1098
-	spip_log('cron !', 'jq' . _LOG_DEBUG);
1099
-	if ($genie = charger_fonction('genie', 'inc', true)) {
1100
-		return $genie($taches);
1101
-	}
1102
-
1103
-	return false;
1083
+    // si pas en mode cron force, laisser tomber.
1084
+    if (!defined('_DIRECT_CRON_FORCE')) {
1085
+        return false;
1086
+    }
1087
+    if (!is_array($taches)) {
1088
+        $taches = $taches_old;
1089
+    } // compat anciens appels
1090
+    // si taches a inserer en base et base inaccessible, laisser tomber
1091
+    // sinon on ne verifie pas la connexion tout de suite, car si ca se trouve
1092
+    // queue_sleep_time_to_next_job() dira qu'il n'y a rien a faire
1093
+    // et on evite d'ouvrir une connexion pour rien (utilisation de _DIRECT_CRON_FORCE dans mes_options.php)
1094
+    if ($taches and count($taches) and !spip_connect()) {
1095
+        return false;
1096
+    }
1097
+    spip_log('cron !', 'jq' . _LOG_DEBUG);
1098
+    if ($genie = charger_fonction('genie', 'inc', true)) {
1099
+        return $genie($taches);
1100
+    }
1101
+
1102
+    return false;
1104 1103
 }
1105 1104
 
1106 1105
 /**
@@ -1132,17 +1131,17 @@  discard block
 block discarded – undo
1132 1131
  *     Le numéro de travail ajouté ou `0` si aucun travail n’a été ajouté.
1133 1132
  */
1134 1133
 function job_queue_add(
1135
-	$function,
1136
-	$description,
1137
-	$arguments = [],
1138
-	$file = '',
1139
-	$no_duplicate = false,
1140
-	$time = 0,
1141
-	$priority = 0
1134
+    $function,
1135
+    $description,
1136
+    $arguments = [],
1137
+    $file = '',
1138
+    $no_duplicate = false,
1139
+    $time = 0,
1140
+    $priority = 0
1142 1141
 ) {
1143
-	include_spip('inc/queue');
1142
+    include_spip('inc/queue');
1144 1143
 
1145
-	return queue_add_job($function, $description, $arguments, $file, $no_duplicate, $time, $priority);
1144
+    return queue_add_job($function, $description, $arguments, $file, $no_duplicate, $time, $priority);
1146 1145
 }
1147 1146
 
1148 1147
 /**
@@ -1153,9 +1152,9 @@  discard block
 block discarded – undo
1153 1152
  * @return bool
1154 1153
  */
1155 1154
 function job_queue_remove($id_job) {
1156
-	include_spip('inc/queue');
1155
+    include_spip('inc/queue');
1157 1156
 
1158
-	return queue_remove_job($id_job);
1157
+    return queue_remove_job($id_job);
1159 1158
 }
1160 1159
 
1161 1160
 /**
@@ -1168,9 +1167,9 @@  discard block
 block discarded – undo
1168 1167
  *     or an array of simple array to link multiples objet in one time
1169 1168
  */
1170 1169
 function job_queue_link($id_job, $objets) {
1171
-	include_spip('inc/queue');
1170
+    include_spip('inc/queue');
1172 1171
 
1173
-	return queue_link_job($id_job, $objets);
1172
+    return queue_link_job($id_job, $objets);
1174 1173
 }
1175 1174
 
1176 1175
 
@@ -1190,36 +1189,36 @@  discard block
 block discarded – undo
1190 1189
  *  - `null` si la queue n'est pas encore initialisée
1191 1190
  */
1192 1191
 function queue_sleep_time_to_next_job($force = null) {
1193
-	static $queue_next_job_time = -1;
1194
-	if ($force === true) {
1195
-		$queue_next_job_time = -1;
1196
-	} elseif ($force) {
1197
-		$queue_next_job_time = $force;
1198
-	}
1199
-
1200
-	if ($queue_next_job_time == -1) {
1201
-		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1202
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt');
1203
-		}
1204
-		// utiliser un cache memoire si dispo
1205
-		if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
1206
-			$queue_next_job_time = cache_get(_JQ_NEXT_JOB_TIME_FILENAME);
1207
-		} else {
1208
-			$queue_next_job_time = null;
1209
-			if (lire_fichier(_JQ_NEXT_JOB_TIME_FILENAME, $contenu)) {
1210
-				$queue_next_job_time = intval($contenu);
1211
-			}
1212
-		}
1213
-	}
1214
-
1215
-	if (is_null($queue_next_job_time)) {
1216
-		return null;
1217
-	}
1218
-	if (!$_SERVER['REQUEST_TIME']) {
1219
-		$_SERVER['REQUEST_TIME'] = time();
1220
-	}
1221
-
1222
-	return $queue_next_job_time - $_SERVER['REQUEST_TIME'];
1192
+    static $queue_next_job_time = -1;
1193
+    if ($force === true) {
1194
+        $queue_next_job_time = -1;
1195
+    } elseif ($force) {
1196
+        $queue_next_job_time = $force;
1197
+    }
1198
+
1199
+    if ($queue_next_job_time == -1) {
1200
+        if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1201
+            define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt');
1202
+        }
1203
+        // utiliser un cache memoire si dispo
1204
+        if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
1205
+            $queue_next_job_time = cache_get(_JQ_NEXT_JOB_TIME_FILENAME);
1206
+        } else {
1207
+            $queue_next_job_time = null;
1208
+            if (lire_fichier(_JQ_NEXT_JOB_TIME_FILENAME, $contenu)) {
1209
+                $queue_next_job_time = intval($contenu);
1210
+            }
1211
+        }
1212
+    }
1213
+
1214
+    if (is_null($queue_next_job_time)) {
1215
+        return null;
1216
+    }
1217
+    if (!$_SERVER['REQUEST_TIME']) {
1218
+        $_SERVER['REQUEST_TIME'] = time();
1219
+    }
1220
+
1221
+    return $queue_next_job_time - $_SERVER['REQUEST_TIME'];
1223 1222
 }
1224 1223
 
1225 1224
 
@@ -1231,11 +1230,11 @@  discard block
 block discarded – undo
1231 1230
  * @return string
1232 1231
  */
1233 1232
 function quote_amp($u) {
1234
-	return preg_replace(
1235
-		'/&(?![a-z]{0,4}\w{2,3};|#x?[0-9a-f]{2,6};)/i',
1236
-		'&amp;',
1237
-		$u
1238
-	);
1233
+    return preg_replace(
1234
+        '/&(?![a-z]{0,4}\w{2,3};|#x?[0-9a-f]{2,6};)/i',
1235
+        '&amp;',
1236
+        $u
1237
+    );
1239 1238
 }
1240 1239
 
1241 1240
 
@@ -1258,27 +1257,27 @@  discard block
 block discarded – undo
1258 1257
  *     Balise HTML `<script>` et son contenu
1259 1258
  **/
1260 1259
 function http_script($script, $src = '', $noscript = '') {
1261
-	static $done = [];
1260
+    static $done = [];
1262 1261
 
1263
-	if ($src && !isset($done[$src])) {
1264
-		$done[$src] = true;
1265
-		$src = find_in_path($src, _JAVASCRIPT);
1266
-		$src = " src='$src'";
1267
-	} else {
1268
-		$src = '';
1269
-	}
1270
-	if ($script) {
1271
-		$script = ("/*<![CDATA[*/\n" .
1272
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1273
-			'/*]]>*/');
1274
-	}
1275
-	if ($noscript) {
1276
-		$noscript = "<noscript>\n\t$noscript\n</noscript>\n";
1277
-	}
1262
+    if ($src && !isset($done[$src])) {
1263
+        $done[$src] = true;
1264
+        $src = find_in_path($src, _JAVASCRIPT);
1265
+        $src = " src='$src'";
1266
+    } else {
1267
+        $src = '';
1268
+    }
1269
+    if ($script) {
1270
+        $script = ("/*<![CDATA[*/\n" .
1271
+            preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1272
+            '/*]]>*/');
1273
+    }
1274
+    if ($noscript) {
1275
+        $noscript = "<noscript>\n\t$noscript\n</noscript>\n";
1276
+    }
1278 1277
 
1279
-	return ($src or $script or $noscript)
1280
-		? "<script type='text/javascript'$src>$script</script>$noscript"
1281
-		: '';
1278
+    return ($src or $script or $noscript)
1279
+        ? "<script type='text/javascript'$src>$script</script>$noscript"
1280
+        : '';
1282 1281
 }
1283 1282
 
1284 1283
 
@@ -1313,7 +1312,7 @@  discard block
 block discarded – undo
1313 1312
  *     Texte échappé
1314 1313
  **/
1315 1314
 function texte_script(string $texte): string {
1316
-	return str_replace('\'', '\\\'', str_replace('\\', '\\\\', $texte));
1315
+    return str_replace('\'', '\\\'', str_replace('\\', '\\\\', $texte));
1317 1316
 }
1318 1317
 
1319 1318
 
@@ -1350,68 +1349,68 @@  discard block
 block discarded – undo
1350 1349
  *     Liste des chemins, par ordre de priorité.
1351 1350
  **/
1352 1351
 function _chemin($dir_path = null) {
1353
-	static $path_base = null;
1354
-	static $path_full = null;
1355
-	if ($path_base == null) {
1356
-		// Chemin standard depuis l'espace public
1357
-		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1358
-			_DIR_RACINE . ':' .
1359
-			_DIR_RACINE . 'squelettes-dist/:' .
1360
-			_DIR_RACINE . 'prive/:' .
1361
-			_DIR_RESTREINT;
1362
-		// Ajouter squelettes/
1363
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1364
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1365
-		}
1366
-		foreach (explode(':', $path) as $dir) {
1367
-			if (strlen($dir) and substr($dir, -1) != '/') {
1368
-				$dir .= '/';
1369
-			}
1370
-			$path_base[] = $dir;
1371
-		}
1372
-		$path_full = $path_base;
1373
-		// Et le(s) dossier(s) des squelettes nommes
1374
-		if (strlen($GLOBALS['dossier_squelettes'])) {
1375
-			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1376
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1377
-			}
1378
-		}
1379
-		$GLOBALS['path_sig'] = md5(serialize($path_full));
1380
-	}
1381
-	if ($dir_path === null) {
1382
-		return $path_full;
1383
-	}
1384
-
1385
-	if (is_array($dir_path) or strlen($dir_path)) {
1386
-		$tete = '';
1387
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1388
-			$tete = array_shift($path_base);
1389
-		}
1390
-		$dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path));
1391
-		$dirs = array_reverse($dirs);
1392
-		foreach ($dirs as $dir_path) {
1393
-			if (substr($dir_path, -1) != '/') {
1394
-				$dir_path .= '/';
1395
-			}
1396
-			if (!in_array($dir_path, $path_base)) {
1397
-				array_unshift($path_base, $dir_path);
1398
-			}
1399
-		}
1400
-		if (strlen($tete)) {
1401
-			array_unshift($path_base, $tete);
1402
-		}
1403
-	}
1404
-	$path_full = $path_base;
1405
-	// Et le(s) dossier(s) des squelettes nommes
1406
-	if (strlen($GLOBALS['dossier_squelettes'])) {
1407
-		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1408
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1409
-		}
1410
-	}
1411
-
1412
-	$GLOBALS['path_sig'] = md5(serialize($path_full));
1413
-
1414
-	return $path_full;
1352
+    static $path_base = null;
1353
+    static $path_full = null;
1354
+    if ($path_base == null) {
1355
+        // Chemin standard depuis l'espace public
1356
+        $path = defined('_SPIP_PATH') ? _SPIP_PATH :
1357
+            _DIR_RACINE . ':' .
1358
+            _DIR_RACINE . 'squelettes-dist/:' .
1359
+            _DIR_RACINE . 'prive/:' .
1360
+            _DIR_RESTREINT;
1361
+        // Ajouter squelettes/
1362
+        if (@is_dir(_DIR_RACINE . 'squelettes')) {
1363
+            $path = _DIR_RACINE . 'squelettes/:' . $path;
1364
+        }
1365
+        foreach (explode(':', $path) as $dir) {
1366
+            if (strlen($dir) and substr($dir, -1) != '/') {
1367
+                $dir .= '/';
1368
+            }
1369
+            $path_base[] = $dir;
1370
+        }
1371
+        $path_full = $path_base;
1372
+        // Et le(s) dossier(s) des squelettes nommes
1373
+        if (strlen($GLOBALS['dossier_squelettes'])) {
1374
+            foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1375
+                array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1376
+            }
1377
+        }
1378
+        $GLOBALS['path_sig'] = md5(serialize($path_full));
1379
+    }
1380
+    if ($dir_path === null) {
1381
+        return $path_full;
1382
+    }
1383
+
1384
+    if (is_array($dir_path) or strlen($dir_path)) {
1385
+        $tete = '';
1386
+        if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1387
+            $tete = array_shift($path_base);
1388
+        }
1389
+        $dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path));
1390
+        $dirs = array_reverse($dirs);
1391
+        foreach ($dirs as $dir_path) {
1392
+            if (substr($dir_path, -1) != '/') {
1393
+                $dir_path .= '/';
1394
+            }
1395
+            if (!in_array($dir_path, $path_base)) {
1396
+                array_unshift($path_base, $dir_path);
1397
+            }
1398
+        }
1399
+        if (strlen($tete)) {
1400
+            array_unshift($path_base, $tete);
1401
+        }
1402
+    }
1403
+    $path_full = $path_base;
1404
+    // Et le(s) dossier(s) des squelettes nommes
1405
+    if (strlen($GLOBALS['dossier_squelettes'])) {
1406
+        foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1407
+            array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1408
+        }
1409
+    }
1410
+
1411
+    $GLOBALS['path_sig'] = md5(serialize($path_full));
1412
+
1413
+    return $path_full;
1415 1414
 }
1416 1415
 
1417 1416
 /**
@@ -1424,78 +1423,78 @@  discard block
 block discarded – undo
1424 1423
  * @return array Liste de chemins
1425 1424
  **/
1426 1425
 function creer_chemin() {
1427
-	$path_a = _chemin();
1428
-	static $c = '';
1426
+    $path_a = _chemin();
1427
+    static $c = '';
1429 1428
 
1430
-	// on calcule le chemin si le dossier skel a change
1431
-	if ($c != $GLOBALS['dossier_squelettes']) {
1432
-		// assurer le non plantage lors de la montee de version :
1433
-		$c = $GLOBALS['dossier_squelettes'];
1434
-		$path_a = _chemin(''); // forcer un recalcul du chemin
1435
-	}
1429
+    // on calcule le chemin si le dossier skel a change
1430
+    if ($c != $GLOBALS['dossier_squelettes']) {
1431
+        // assurer le non plantage lors de la montee de version :
1432
+        $c = $GLOBALS['dossier_squelettes'];
1433
+        $path_a = _chemin(''); // forcer un recalcul du chemin
1434
+    }
1436 1435
 
1437
-	return $path_a;
1436
+    return $path_a;
1438 1437
 }
1439 1438
 
1440 1439
 
1441 1440
 function lister_themes_prives() {
1442
-	static $themes = null;
1443
-	if (is_null($themes)) {
1444
-		// si pas encore definie
1445
-		if (!defined('_SPIP_THEME_PRIVE')) {
1446
-			define('_SPIP_THEME_PRIVE', 'spip');
1447
-		}
1448
-		$themes = [_SPIP_THEME_PRIVE];
1449
-		// lors d'une installation neuve, prefs n'est pas definie.
1450
-		if (isset($GLOBALS['visiteur_session']['prefs'])) {
1451
-			$prefs = $GLOBALS['visiteur_session']['prefs'];
1452
-		} else {
1453
-			$prefs = [];
1454
-		}
1455
-		if (is_string($prefs)) {
1456
-			$prefs = unserialize($GLOBALS['visiteur_session']['prefs']);
1457
-		}
1458
-		if (
1459
-			((isset($prefs['theme']) and $theme = $prefs['theme'])
1460
-				or (isset($GLOBALS['theme_prive_defaut']) and $theme = $GLOBALS['theme_prive_defaut']))
1461
-			and $theme != _SPIP_THEME_PRIVE
1462
-		) {
1463
-			array_unshift($themes, $theme);
1464
-		} // placer le theme choisi en tete
1465
-	}
1466
-
1467
-	return $themes;
1441
+    static $themes = null;
1442
+    if (is_null($themes)) {
1443
+        // si pas encore definie
1444
+        if (!defined('_SPIP_THEME_PRIVE')) {
1445
+            define('_SPIP_THEME_PRIVE', 'spip');
1446
+        }
1447
+        $themes = [_SPIP_THEME_PRIVE];
1448
+        // lors d'une installation neuve, prefs n'est pas definie.
1449
+        if (isset($GLOBALS['visiteur_session']['prefs'])) {
1450
+            $prefs = $GLOBALS['visiteur_session']['prefs'];
1451
+        } else {
1452
+            $prefs = [];
1453
+        }
1454
+        if (is_string($prefs)) {
1455
+            $prefs = unserialize($GLOBALS['visiteur_session']['prefs']);
1456
+        }
1457
+        if (
1458
+            ((isset($prefs['theme']) and $theme = $prefs['theme'])
1459
+                or (isset($GLOBALS['theme_prive_defaut']) and $theme = $GLOBALS['theme_prive_defaut']))
1460
+            and $theme != _SPIP_THEME_PRIVE
1461
+        ) {
1462
+            array_unshift($themes, $theme);
1463
+        } // placer le theme choisi en tete
1464
+    }
1465
+
1466
+    return $themes;
1468 1467
 }
1469 1468
 
1470 1469
 function find_in_theme($file, $subdir = '', $include = false) {
1471
-	static $themefiles = [];
1472
-	if (isset($themefiles["$subdir$file"])) {
1473
-		return $themefiles["$subdir$file"];
1474
-	}
1475
-	// on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
1476
-	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1477
-	if (
1478
-		preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1479
-		and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg'
1480
-		and $f = find_in_theme("$file_svg_generique")
1481
-	) {
1482
-		if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) {
1483
-			return $themefiles["$subdir$file"] = $fsize;
1484
-		}
1485
-		else {
1486
-			return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px';
1487
-		}
1488
-	}
1489
-
1490
-	$themes = lister_themes_prives();
1491
-	foreach ($themes as $theme) {
1492
-		if ($f = find_in_path($file, "prive/themes/$theme/$subdir", $include)) {
1493
-			return $themefiles["$subdir$file"] = $f;
1494
-		}
1495
-	}
1496
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1497
-
1498
-	return $themefiles["$subdir$file"] = '';
1470
+    static $themefiles = [];
1471
+    if (isset($themefiles["$subdir$file"])) {
1472
+        return $themefiles["$subdir$file"];
1473
+    }
1474
+    // on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
1475
+    // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1476
+    if (
1477
+        preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1478
+        and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg'
1479
+        and $f = find_in_theme("$file_svg_generique")
1480
+    ) {
1481
+        if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) {
1482
+            return $themefiles["$subdir$file"] = $fsize;
1483
+        }
1484
+        else {
1485
+            return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px';
1486
+        }
1487
+    }
1488
+
1489
+    $themes = lister_themes_prives();
1490
+    foreach ($themes as $theme) {
1491
+        if ($f = find_in_path($file, "prive/themes/$theme/$subdir", $include)) {
1492
+            return $themefiles["$subdir$file"] = $f;
1493
+        }
1494
+    }
1495
+    spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1496
+
1497
+    return $themefiles["$subdir$file"] = '';
1499 1498
 }
1500 1499
 
1501 1500
 
@@ -1519,31 +1518,31 @@  discard block
 block discarded – undo
1519 1518
  *     sinon chaîne vide.
1520 1519
  **/
1521 1520
 function chemin_image($icone) {
1522
-	static $icone_renommer;
1523
-	if ($p = strpos($icone, '?')) {
1524
-		$icone = substr($icone, 0, $p);
1525
-	}
1526
-	// gerer le cas d'un double appel en evitant de refaire le travail inutilement
1527
-	if (strpos($icone, '/') !== false and file_exists($icone)) {
1528
-		return $icone;
1529
-	}
1530
-
1531
-	// si c'est un nom d'image complet (article-24.png) essayer de le renvoyer direct
1532
-	if (preg_match(',[.](png|gif|jpg|webp|svg)$,', $icone) and $f = find_in_theme("images/$icone")) {
1533
-		return $f;
1534
-	}
1535
-	// sinon passer par le module de renommage
1536
-	if (is_null($icone_renommer)) {
1537
-		$icone_renommer = charger_fonction('icone_renommer', 'inc', true);
1538
-	}
1539
-	if ($icone_renommer) {
1540
-		[$icone, $fonction] = $icone_renommer($icone, '');
1541
-		if (file_exists($icone)) {
1542
-			return $icone;
1543
-		}
1544
-	}
1545
-
1546
-	return find_in_path($icone, _NOM_IMG_PACK);
1521
+    static $icone_renommer;
1522
+    if ($p = strpos($icone, '?')) {
1523
+        $icone = substr($icone, 0, $p);
1524
+    }
1525
+    // gerer le cas d'un double appel en evitant de refaire le travail inutilement
1526
+    if (strpos($icone, '/') !== false and file_exists($icone)) {
1527
+        return $icone;
1528
+    }
1529
+
1530
+    // si c'est un nom d'image complet (article-24.png) essayer de le renvoyer direct
1531
+    if (preg_match(',[.](png|gif|jpg|webp|svg)$,', $icone) and $f = find_in_theme("images/$icone")) {
1532
+        return $f;
1533
+    }
1534
+    // sinon passer par le module de renommage
1535
+    if (is_null($icone_renommer)) {
1536
+        $icone_renommer = charger_fonction('icone_renommer', 'inc', true);
1537
+    }
1538
+    if ($icone_renommer) {
1539
+        [$icone, $fonction] = $icone_renommer($icone, '');
1540
+        if (file_exists($icone)) {
1541
+            return $icone;
1542
+        }
1543
+    }
1544
+
1545
+    return find_in_path($icone, _NOM_IMG_PACK);
1547 1546
 }
1548 1547
 
1549 1548
 //
@@ -1581,128 +1580,128 @@  discard block
 block discarded – undo
1581 1580
  *     - false : fichier introuvable
1582 1581
  **/
1583 1582
 function find_in_path($file, $dirname = '', $include = false) {
1584
-	static $dirs = [];
1585
-	static $inc = []; # cf https://git.spip.net/spip/spip/commit/42e4e028e38c839121efaee84308d08aee307eec
1586
-	static $c = '';
1587
-
1588
-	if (!$file and !strlen($file)) {
1589
-		return false;
1590
-	}
1591
-
1592
-	// on calcule le chemin si le dossier skel a change
1593
-	if ($c != $GLOBALS['dossier_squelettes']) {
1594
-		// assurer le non plantage lors de la montee de version :
1595
-		$c = $GLOBALS['dossier_squelettes'];
1596
-		creer_chemin(); // forcer un recalcul du chemin et la mise a jour de path_sig
1597
-	}
1598
-
1599
-	if (isset($GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file])) {
1600
-		if (!$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]) {
1601
-			return false;
1602
-		}
1603
-		if ($include and !isset($inc[$dirname][$file])) {
1604
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1605
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1606
-		}
1607
-
1608
-		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1609
-	}
1610
-
1611
-	$a = strrpos($file, '/');
1612
-	if ($a !== false) {
1613
-		$dirname .= substr($file, 0, ++$a);
1614
-		$file = substr($file, $a);
1615
-	}
1616
-
1617
-	foreach (creer_chemin() as $dir) {
1618
-		if (!isset($dirs[$a = $dir . $dirname])) {
1619
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1620
-		}
1621
-		if ($dirs[$a]) {
1622
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1623
-				if ($include and !isset($inc[$dirname][$file])) {
1624
-					include_once _ROOT_CWD . $a;
1625
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1626
-				}
1627
-				if (!defined('_SAUVER_CHEMIN')) {
1628
-					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
1629
-					if (is_null($GLOBALS['path_files'])) {
1630
-						return $a;
1631
-					}
1632
-					define('_SAUVER_CHEMIN', true);
1633
-				}
1634
-
1635
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1636
-			}
1637
-		}
1638
-	}
1639
-
1640
-	if ($include) {
1641
-		spip_log("include_spip $dirname$file non trouve");
1642
-		if ($include === 'required') {
1643
-			echo '<pre>',
1644
-			'<strong>Erreur Fatale</strong><br />';
1645
-			if (function_exists('debug_print_backtrace')) {
1646
-				echo debug_print_backtrace();
1647
-			}
1648
-			echo '</pre>';
1649
-			die("Erreur interne: ne peut inclure $dirname$file");
1650
-		}
1651
-	}
1652
-
1653
-	if (!defined('_SAUVER_CHEMIN')) {
1654
-		// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
1655
-		if (is_null($GLOBALS['path_files'])) {
1656
-			return false;
1657
-		}
1658
-		define('_SAUVER_CHEMIN', true);
1659
-	}
1660
-
1661
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1583
+    static $dirs = [];
1584
+    static $inc = []; # cf https://git.spip.net/spip/spip/commit/42e4e028e38c839121efaee84308d08aee307eec
1585
+    static $c = '';
1586
+
1587
+    if (!$file and !strlen($file)) {
1588
+        return false;
1589
+    }
1590
+
1591
+    // on calcule le chemin si le dossier skel a change
1592
+    if ($c != $GLOBALS['dossier_squelettes']) {
1593
+        // assurer le non plantage lors de la montee de version :
1594
+        $c = $GLOBALS['dossier_squelettes'];
1595
+        creer_chemin(); // forcer un recalcul du chemin et la mise a jour de path_sig
1596
+    }
1597
+
1598
+    if (isset($GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file])) {
1599
+        if (!$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]) {
1600
+            return false;
1601
+        }
1602
+        if ($include and !isset($inc[$dirname][$file])) {
1603
+            include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1604
+            $inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1605
+        }
1606
+
1607
+        return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1608
+    }
1609
+
1610
+    $a = strrpos($file, '/');
1611
+    if ($a !== false) {
1612
+        $dirname .= substr($file, 0, ++$a);
1613
+        $file = substr($file, $a);
1614
+    }
1615
+
1616
+    foreach (creer_chemin() as $dir) {
1617
+        if (!isset($dirs[$a = $dir . $dirname])) {
1618
+            $dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1619
+        }
1620
+        if ($dirs[$a]) {
1621
+            if (file_exists(_ROOT_CWD . ($a .= $file))) {
1622
+                if ($include and !isset($inc[$dirname][$file])) {
1623
+                    include_once _ROOT_CWD . $a;
1624
+                    $inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1625
+                }
1626
+                if (!defined('_SAUVER_CHEMIN')) {
1627
+                    // si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
1628
+                    if (is_null($GLOBALS['path_files'])) {
1629
+                        return $a;
1630
+                    }
1631
+                    define('_SAUVER_CHEMIN', true);
1632
+                }
1633
+
1634
+                return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1635
+            }
1636
+        }
1637
+    }
1638
+
1639
+    if ($include) {
1640
+        spip_log("include_spip $dirname$file non trouve");
1641
+        if ($include === 'required') {
1642
+            echo '<pre>',
1643
+            '<strong>Erreur Fatale</strong><br />';
1644
+            if (function_exists('debug_print_backtrace')) {
1645
+                echo debug_print_backtrace();
1646
+            }
1647
+            echo '</pre>';
1648
+            die("Erreur interne: ne peut inclure $dirname$file");
1649
+        }
1650
+    }
1651
+
1652
+    if (!defined('_SAUVER_CHEMIN')) {
1653
+        // si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
1654
+        if (is_null($GLOBALS['path_files'])) {
1655
+            return false;
1656
+        }
1657
+        define('_SAUVER_CHEMIN', true);
1658
+    }
1659
+
1660
+    return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1662 1661
 }
1663 1662
 
1664 1663
 function clear_path_cache() {
1665
-	$GLOBALS['path_files'] = [];
1666
-	spip_unlink(_CACHE_CHEMIN);
1664
+    $GLOBALS['path_files'] = [];
1665
+    spip_unlink(_CACHE_CHEMIN);
1667 1666
 }
1668 1667
 
1669 1668
 function load_path_cache() {
1670
-	// charger le path des plugins
1671
-	if (@is_readable(_CACHE_PLUGINS_PATH)) {
1672
-		include_once(_CACHE_PLUGINS_PATH);
1673
-	}
1674
-	$GLOBALS['path_files'] = [];
1675
-	// si le visiteur est admin,
1676
-	// on ne recharge pas le cache pour forcer sa mise a jour
1677
-	if (
1678
-		// la session n'est pas encore chargee a ce moment, on ne peut donc pas s'y fier
1679
-		//AND (!isset($GLOBALS['visiteur_session']['statut']) OR $GLOBALS['visiteur_session']['statut']!='0minirezo')
1680
-		// utiliser le cookie est un pis aller qui marche 'en general'
1681
-		// on blinde par un second test au moment de la lecture de la session
1682
-		// !isset($_COOKIE[$GLOBALS['cookie_prefix'].'_admin'])
1683
-		// et en ignorant ce cache en cas de recalcul explicite
1684
-		!_request('var_mode')
1685
-	) {
1686
-		// on essaye de lire directement sans verrou pour aller plus vite
1687
-		if ($contenu = spip_file_get_contents(_CACHE_CHEMIN)) {
1688
-			// mais si semble corrompu on relit avec un verrou
1689
-			if (!$GLOBALS['path_files'] = unserialize($contenu)) {
1690
-				lire_fichier(_CACHE_CHEMIN, $contenu);
1691
-				if (!$GLOBALS['path_files'] = unserialize($contenu)) {
1692
-					$GLOBALS['path_files'] = [];
1693
-				}
1694
-			}
1695
-		}
1696
-	}
1669
+    // charger le path des plugins
1670
+    if (@is_readable(_CACHE_PLUGINS_PATH)) {
1671
+        include_once(_CACHE_PLUGINS_PATH);
1672
+    }
1673
+    $GLOBALS['path_files'] = [];
1674
+    // si le visiteur est admin,
1675
+    // on ne recharge pas le cache pour forcer sa mise a jour
1676
+    if (
1677
+        // la session n'est pas encore chargee a ce moment, on ne peut donc pas s'y fier
1678
+        //AND (!isset($GLOBALS['visiteur_session']['statut']) OR $GLOBALS['visiteur_session']['statut']!='0minirezo')
1679
+        // utiliser le cookie est un pis aller qui marche 'en general'
1680
+        // on blinde par un second test au moment de la lecture de la session
1681
+        // !isset($_COOKIE[$GLOBALS['cookie_prefix'].'_admin'])
1682
+        // et en ignorant ce cache en cas de recalcul explicite
1683
+        !_request('var_mode')
1684
+    ) {
1685
+        // on essaye de lire directement sans verrou pour aller plus vite
1686
+        if ($contenu = spip_file_get_contents(_CACHE_CHEMIN)) {
1687
+            // mais si semble corrompu on relit avec un verrou
1688
+            if (!$GLOBALS['path_files'] = unserialize($contenu)) {
1689
+                lire_fichier(_CACHE_CHEMIN, $contenu);
1690
+                if (!$GLOBALS['path_files'] = unserialize($contenu)) {
1691
+                    $GLOBALS['path_files'] = [];
1692
+                }
1693
+            }
1694
+        }
1695
+    }
1697 1696
 }
1698 1697
 
1699 1698
 function save_path_cache() {
1700
-	if (
1701
-		defined('_SAUVER_CHEMIN')
1702
-		and _SAUVER_CHEMIN
1703
-	) {
1704
-		ecrire_fichier(_CACHE_CHEMIN, serialize($GLOBALS['path_files']));
1705
-	}
1699
+    if (
1700
+        defined('_SAUVER_CHEMIN')
1701
+        and _SAUVER_CHEMIN
1702
+    ) {
1703
+        ecrire_fichier(_CACHE_CHEMIN, serialize($GLOBALS['path_files']));
1704
+    }
1706 1705
 }
1707 1706
 
1708 1707
 
@@ -1722,33 +1721,33 @@  discard block
 block discarded – undo
1722 1721
  * @return array
1723 1722
  */
1724 1723
 function find_all_in_path($dir, $pattern, $recurs = false) {
1725
-	$liste_fichiers = [];
1726
-	$maxfiles = 10000;
1727
-
1728
-	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1729
-	// on a pas encore inclus flock.php
1730
-	if (!function_exists('preg_files')) {
1731
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1732
-	}
1733
-
1734
-	// Parcourir le chemin
1735
-	foreach (creer_chemin() as $d) {
1736
-		$f = $d . $dir;
1737
-		if (@is_dir($f)) {
1738
-			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs);
1739
-			foreach ($liste as $chemin) {
1740
-				$nom = basename($chemin);
1741
-				// ne prendre que les fichiers pas deja trouves
1742
-				// car find_in_path prend le premier qu'il trouve,
1743
-				// les autres sont donc masques
1744
-				if (!isset($liste_fichiers[$nom])) {
1745
-					$liste_fichiers[$nom] = $chemin;
1746
-				}
1747
-			}
1748
-		}
1749
-	}
1750
-
1751
-	return $liste_fichiers;
1724
+    $liste_fichiers = [];
1725
+    $maxfiles = 10000;
1726
+
1727
+    // cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1728
+    // on a pas encore inclus flock.php
1729
+    if (!function_exists('preg_files')) {
1730
+        include_once _ROOT_RESTREINT . 'inc/flock.php';
1731
+    }
1732
+
1733
+    // Parcourir le chemin
1734
+    foreach (creer_chemin() as $d) {
1735
+        $f = $d . $dir;
1736
+        if (@is_dir($f)) {
1737
+            $liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs);
1738
+            foreach ($liste as $chemin) {
1739
+                $nom = basename($chemin);
1740
+                // ne prendre que les fichiers pas deja trouves
1741
+                // car find_in_path prend le premier qu'il trouve,
1742
+                // les autres sont donc masques
1743
+                if (!isset($liste_fichiers[$nom])) {
1744
+                    $liste_fichiers[$nom] = $chemin;
1745
+                }
1746
+            }
1747
+        }
1748
+    }
1749
+
1750
+    return $liste_fichiers;
1752 1751
 }
1753 1752
 
1754 1753
 /**
@@ -1760,17 +1759,17 @@  discard block
 block discarded – undo
1760 1759
  * @return bool
1761 1760
  */
1762 1761
 function autoriser_sans_cookie($nom, $strict = false) {
1763
-	static $autsanscookie = ['install', 'base_repair'];
1762
+    static $autsanscookie = ['install', 'base_repair'];
1764 1763
 
1765
-	if (in_array($nom, $autsanscookie)) {
1766
-		if (test_espace_prive()) {
1767
-			include_spip('base/connect_sql');
1768
-			if (!$strict or !spip_connect()) {
1769
-				return true;
1770
-			}
1771
-		}
1772
-	}
1773
-	return false;
1764
+    if (in_array($nom, $autsanscookie)) {
1765
+        if (test_espace_prive()) {
1766
+            include_spip('base/connect_sql');
1767
+            if (!$strict or !spip_connect()) {
1768
+                return true;
1769
+            }
1770
+        }
1771
+    }
1772
+    return false;
1774 1773
 }
1775 1774
 
1776 1775
 /**
@@ -1780,60 +1779,60 @@  discard block
 block discarded – undo
1780 1779
  * @return string
1781 1780
  */
1782 1781
 function charger_fonction_url(string $quoi, string $type = '') {
1783
-	if ($type === 'defaut') {
1784
-		$objet = objet_type($quoi);
1785
-		if (
1786
-			$f = charger_fonction('generer_' . $objet . '_url', 'urls', true)
1787
-			// deprecated
1788
-			or $f = charger_fonction('generer_url_' . $objet, 'urls', true)
1789
-		) {
1790
-			return $f;
1791
-		}
1792
-		return '';
1793
-	}
1794
-
1795
-	$url_type = $type;
1796
-	if (!$url_type) {
1797
-		$url_type = $GLOBALS['type_urls'] ?? $GLOBALS['meta']['type_urls'] ?? 'page'; // sinon type "page" par défaut
1798
-	}
1799
-
1800
-	// inclure le module d'url
1801
-	include_spip('urls/' . $url_type);
1802
-
1803
-	switch ($quoi) {
1804
-		case 'page':
1805
-			if (
1806
-				 function_exists($f = "urls_{$url_type}_generer_url_page")
1807
-				or function_exists($f .= '_dist')
1808
-				// ou une fonction custom utilisateur independante du type d'url
1809
-				or function_exists($f = 'generer_url_page')
1810
-				or function_exists($f .= '_dist')
1811
-			) {
1812
-				return $f;
1813
-			}
1814
-			// pas de compat ancienne version ici, c'est une nouvelle feature
1815
-			return '';
1816
-		case 'objet':
1817
-		case 'decoder':
1818
-		default:
1819
-			$fquoi = ($quoi === 'objet' ? 'generer_url_objet' : 'decoder_url');
1820
-			if (
1821
-				function_exists($f = "urls_{$url_type}_{$fquoi}")
1822
-				or function_exists($f .= '_dist')
1823
-			) {
1824
-				return $f;
1825
-			}
1826
-			// est-ce qu'on a une ancienne fonction urls_xxx_dist() ?
1827
-			// c'est un ancien module d'url, on appelle l'ancienne fonction qui fait tout
1828
-			if ($f = charger_fonction($url_type, 'urls', true)) {
1829
-				return $f;
1830
-			}
1831
-			// sinon on se rabat sur les urls page si ce n'est pas un type demande explicitement
1832
-			if (!$type and $url_type !== 'page') {
1833
-				return charger_fonction_url($quoi, 'page');
1834
-			}
1835
-			return '';
1836
-	}
1782
+    if ($type === 'defaut') {
1783
+        $objet = objet_type($quoi);
1784
+        if (
1785
+            $f = charger_fonction('generer_' . $objet . '_url', 'urls', true)
1786
+            // deprecated
1787
+            or $f = charger_fonction('generer_url_' . $objet, 'urls', true)
1788
+        ) {
1789
+            return $f;
1790
+        }
1791
+        return '';
1792
+    }
1793
+
1794
+    $url_type = $type;
1795
+    if (!$url_type) {
1796
+        $url_type = $GLOBALS['type_urls'] ?? $GLOBALS['meta']['type_urls'] ?? 'page'; // sinon type "page" par défaut
1797
+    }
1798
+
1799
+    // inclure le module d'url
1800
+    include_spip('urls/' . $url_type);
1801
+
1802
+    switch ($quoi) {
1803
+        case 'page':
1804
+            if (
1805
+                    function_exists($f = "urls_{$url_type}_generer_url_page")
1806
+                or function_exists($f .= '_dist')
1807
+                // ou une fonction custom utilisateur independante du type d'url
1808
+                or function_exists($f = 'generer_url_page')
1809
+                or function_exists($f .= '_dist')
1810
+            ) {
1811
+                return $f;
1812
+            }
1813
+            // pas de compat ancienne version ici, c'est une nouvelle feature
1814
+            return '';
1815
+        case 'objet':
1816
+        case 'decoder':
1817
+        default:
1818
+            $fquoi = ($quoi === 'objet' ? 'generer_url_objet' : 'decoder_url');
1819
+            if (
1820
+                function_exists($f = "urls_{$url_type}_{$fquoi}")
1821
+                or function_exists($f .= '_dist')
1822
+            ) {
1823
+                return $f;
1824
+            }
1825
+            // est-ce qu'on a une ancienne fonction urls_xxx_dist() ?
1826
+            // c'est un ancien module d'url, on appelle l'ancienne fonction qui fait tout
1827
+            if ($f = charger_fonction($url_type, 'urls', true)) {
1828
+                return $f;
1829
+            }
1830
+            // sinon on se rabat sur les urls page si ce n'est pas un type demande explicitement
1831
+            if (!$type and $url_type !== 'page') {
1832
+                return charger_fonction_url($quoi, 'page');
1833
+            }
1834
+            return '';
1835
+    }
1837 1836
 }
1838 1837
 
1839 1838
 
@@ -1859,48 +1858,48 @@  discard block
 block discarded – undo
1859 1858
  *   url codee ou fonction de decodage
1860 1859
  */
1861 1860
 function generer_objet_url($id, string $entite, string $args = '', string $ancre = '', ?bool $public = null, string $type = '', string $connect = ''): string {
1862
-	if ($public === null) {
1863
-		$public = !test_espace_prive();
1864
-	}
1865
-	$id = intval($id);
1866
-	$entite = objet_type($entite); // cas particulier d'appels sur objet/id_objet...
1867
-
1868
-	if (!$public) {
1869
-		if (!$entite) {
1870
-			return '';
1871
-		}
1872
-		if (!function_exists('generer_objet_url_ecrire')) {
1873
-			include_spip('inc/urls');
1874
-		}
1875
-		$res = generer_objet_url_ecrire($id, $entite, $args, $ancre, false, $connect);
1876
-	} else {
1877
-		$f = charger_fonction_url('objet', $type ?? '');
1878
-
1879
-		// @deprecated si $entite='', on veut la fonction de passage URL ==> id
1880
-		// @see charger_fonction_url
1881
-		if (!$entite) {
1882
-			return $f;
1883
-		}
1884
-
1885
-		// mais d'abord il faut tester le cas des urls sur une
1886
-		// base distante
1887
-		if (
1888
-			$connect
1889
-			and $g = charger_fonction('connect', 'urls', true)
1890
-		) {
1891
-			$f = $g;
1892
-		}
1893
-
1894
-		$res = $f(intval($id), $entite, $args ?: '', $ancre ?: '', $connect);
1895
-	}
1896
-	if ($res) {
1897
-		return $res;
1898
-	}
1899
-
1900
-	// On a ete gentil mais la ....
1901
-	spip_log("generer_objet_url: entite $entite ($f) inconnue $type $public $connect", _LOG_ERREUR);
1902
-
1903
-	return '';
1861
+    if ($public === null) {
1862
+        $public = !test_espace_prive();
1863
+    }
1864
+    $id = intval($id);
1865
+    $entite = objet_type($entite); // cas particulier d'appels sur objet/id_objet...
1866
+
1867
+    if (!$public) {
1868
+        if (!$entite) {
1869
+            return '';
1870
+        }
1871
+        if (!function_exists('generer_objet_url_ecrire')) {
1872
+            include_spip('inc/urls');
1873
+        }
1874
+        $res = generer_objet_url_ecrire($id, $entite, $args, $ancre, false, $connect);
1875
+    } else {
1876
+        $f = charger_fonction_url('objet', $type ?? '');
1877
+
1878
+        // @deprecated si $entite='', on veut la fonction de passage URL ==> id
1879
+        // @see charger_fonction_url
1880
+        if (!$entite) {
1881
+            return $f;
1882
+        }
1883
+
1884
+        // mais d'abord il faut tester le cas des urls sur une
1885
+        // base distante
1886
+        if (
1887
+            $connect
1888
+            and $g = charger_fonction('connect', 'urls', true)
1889
+        ) {
1890
+            $f = $g;
1891
+        }
1892
+
1893
+        $res = $f(intval($id), $entite, $args ?: '', $ancre ?: '', $connect);
1894
+    }
1895
+    if ($res) {
1896
+        return $res;
1897
+    }
1898
+
1899
+    // On a ete gentil mais la ....
1900
+    spip_log("generer_objet_url: entite $entite ($f) inconnue $type $public $connect", _LOG_ERREUR);
1901
+
1902
+    return '';
1904 1903
 }
1905 1904
 
1906 1905
 /**
@@ -1908,10 +1907,10 @@  discard block
 block discarded – undo
1908 1907
  * @see generer_objet_url
1909 1908
  */
1910 1909
 function generer_url_entite($id = 0, $entite = '', $args = '', $ancre = '', $public = null, $type = null) {
1911
-	if ($public and is_string($public)) {
1912
-		return generer_objet_url(intval($id), $entite, $args ?: '', $ancre ?: '', true, $type ?? '', $public);
1913
-	}
1914
-	return generer_objet_url(intval($id), $entite, $args ?: '', $ancre ?: '', $public, $type ?? '');
1910
+    if ($public and is_string($public)) {
1911
+        return generer_objet_url(intval($id), $entite, $args ?: '', $ancre ?: '', true, $type ?? '', $public);
1912
+    }
1913
+    return generer_objet_url(intval($id), $entite, $args ?: '', $ancre ?: '', $public, $type ?? '');
1915 1914
 }
1916 1915
 
1917 1916
 /**
@@ -1923,19 +1922,19 @@  discard block
 block discarded – undo
1923 1922
  * @return string
1924 1923
  */
1925 1924
 function generer_objet_url_ecrire_edit($id, string $entite, string $args = '', string $ancre = ''): string {
1926
-	$id = intval($id);
1927
-	$exec = objet_info($entite, 'url_edit');
1928
-	$url = generer_url_ecrire($exec, $args);
1929
-	if (intval($id)) {
1930
-		$url = parametre_url($url, id_table_objet($entite), $id);
1931
-	} else {
1932
-		$url = parametre_url($url, 'new', 'oui');
1933
-	}
1934
-	if ($ancre) {
1935
-		$url = ancre_url($url, $ancre);
1936
-	}
1925
+    $id = intval($id);
1926
+    $exec = objet_info($entite, 'url_edit');
1927
+    $url = generer_url_ecrire($exec, $args);
1928
+    if (intval($id)) {
1929
+        $url = parametre_url($url, id_table_objet($entite), $id);
1930
+    } else {
1931
+        $url = parametre_url($url, 'new', 'oui');
1932
+    }
1933
+    if ($ancre) {
1934
+        $url = ancre_url($url, $ancre);
1935
+    }
1937 1936
 
1938
-	return $url;
1937
+    return $url;
1939 1938
 }
1940 1939
 
1941 1940
 /**
@@ -1943,18 +1942,18 @@  discard block
 block discarded – undo
1943 1942
  * @see generer_objet_url_ecrire_edit
1944 1943
  */
1945 1944
 function generer_url_ecrire_entite_edit($id, $entite, $args = '', $ancre = '') {
1946
-	return generer_objet_url_ecrire_edit(intval($id), $entite, $args, $ancre);
1945
+    return generer_objet_url_ecrire_edit(intval($id), $entite, $args, $ancre);
1947 1946
 }
1948 1947
 
1949 1948
 
1950 1949
 function urls_connect_dist($i, &$entite, $args = '', $ancre = '', $public = null) {
1951
-	include_spip('base/connect_sql');
1952
-	$id_type = id_table_objet($entite, $public);
1950
+    include_spip('base/connect_sql');
1951
+    $id_type = id_table_objet($entite, $public);
1953 1952
 
1954
-	return _DIR_RACINE . get_spip_script('./')
1955
-	. '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1956
-	. (!$args ? '' : "&$args")
1957
-	. (!$ancre ? '' : "#$ancre");
1953
+    return _DIR_RACINE . get_spip_script('./')
1954
+    . '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1955
+    . (!$args ? '' : "&$args")
1956
+    . (!$ancre ? '' : "#$ancre");
1958 1957
 }
1959 1958
 
1960 1959
 
@@ -1965,18 +1964,18 @@  discard block
 block discarded – undo
1965 1964
  * @return string
1966 1965
  */
1967 1966
 function urlencode_1738($url) {
1968
-	if (preg_match(',[^\x00-\x7E],sS', $url)) {
1969
-		$uri = '';
1970
-		for ($i = 0; $i < strlen($url); $i++) {
1971
-			if (ord($a = $url[$i]) > 127) {
1972
-				$a = rawurlencode($a);
1973
-			}
1974
-			$uri .= $a;
1975
-		}
1976
-		$url = $uri;
1977
-	}
1967
+    if (preg_match(',[^\x00-\x7E],sS', $url)) {
1968
+        $uri = '';
1969
+        for ($i = 0; $i < strlen($url); $i++) {
1970
+            if (ord($a = $url[$i]) > 127) {
1971
+                $a = rawurlencode($a);
1972
+            }
1973
+            $uri .= $a;
1974
+        }
1975
+        $url = $uri;
1976
+    }
1978 1977
 
1979
-	return quote_amp($url);
1978
+    return quote_amp($url);
1980 1979
 }
1981 1980
 
1982 1981
 /**
@@ -1992,14 +1991,14 @@  discard block
 block discarded – undo
1992 1991
  * @return string
1993 1992
  */
1994 1993
 function generer_objet_url_absolue($id = 0, string $entite = '', string $args = '', string $ancre = '', ?bool $public = null, string $type = '', string $connect = ''): string {
1995
-	$id = intval($id);
1996
-	$h = generer_objet_url($id, $entite, $args, $ancre, $public, $type, $connect);
1997
-	if (!preg_match(',^\w+:,', $h)) {
1998
-		include_spip('inc/filtres_mini');
1999
-		$h = url_absolue($h);
2000
-	}
1994
+    $id = intval($id);
1995
+    $h = generer_objet_url($id, $entite, $args, $ancre, $public, $type, $connect);
1996
+    if (!preg_match(',^\w+:,', $h)) {
1997
+        include_spip('inc/filtres_mini');
1998
+        $h = url_absolue($h);
1999
+    }
2001 2000
 
2002
-	return $h;
2001
+    return $h;
2003 2002
 }
2004 2003
 
2005 2004
 /**
@@ -2007,7 +2006,7 @@  discard block
 block discarded – undo
2007 2006
  * @see  generer_objet_url_absolue
2008 2007
  */
2009 2008
 function generer_url_entite_absolue($id = 0, $entite = '', $args = '', $ancre = '', $connect = null) {
2010
-	return generer_objet_url_absolue(intval($id), $entite, $args, $ancre, true, '', $connect ?? '');
2009
+    return generer_objet_url_absolue(intval($id), $entite, $args, $ancre, true, '', $connect ?? '');
2011 2010
 }
2012 2011
 
2013 2012
 
@@ -2023,11 +2022,11 @@  discard block
 block discarded – undo
2023 2022
  *     true si la valeur est considérée active ; false sinon.
2024 2023
  **/
2025 2024
 function test_valeur_serveur($truc) {
2026
-	if (!$truc) {
2027
-		return false;
2028
-	}
2025
+    if (!$truc) {
2026
+        return false;
2027
+    }
2029 2028
 
2030
-	return (strtolower($truc) !== 'off');
2029
+    return (strtolower($truc) !== 'off');
2031 2030
 }
2032 2031
 
2033 2032
 //
@@ -2055,89 +2054,89 @@  discard block
 block discarded – undo
2055 2054
  */
2056 2055
 function url_de_base($profondeur = null) {
2057 2056
 
2058
-	static $url = [];
2059
-	if (is_array($profondeur)) {
2060
-		return $url = $profondeur;
2061
-	}
2062
-	if ($profondeur === false) {
2063
-		return $url;
2064
-	}
2065
-
2066
-	if (is_null($profondeur)) {
2067
-		$profondeur = $GLOBALS['profondeur_url'] ?? (_DIR_RESTREINT ? 0 : 1);
2068
-	}
2069
-
2070
-	if (isset($url[$profondeur])) {
2071
-		return $url[$profondeur];
2072
-	}
2073
-
2074
-	$http = 'http';
2075
-
2076
-	if (
2077
-		isset($_SERVER['SCRIPT_URI'])
2078
-		and substr($_SERVER['SCRIPT_URI'], 0, 5) == 'https'
2079
-	) {
2080
-		$http = 'https';
2081
-	} elseif (
2082
-		isset($_SERVER['HTTPS'])
2083
-		and test_valeur_serveur($_SERVER['HTTPS'])
2084
-	) {
2085
-		$http = 'https';
2086
-	}
2087
-
2088
-	// note : HTTP_HOST contient le :port si necessaire
2089
-	if ($host = $_SERVER['HTTP_HOST'] ?? null) {
2090
-		// Filtrer $host pour proteger d'attaques d'entete HTTP
2091
-		$host = (filter_var($host, FILTER_SANITIZE_URL) ?: null);
2092
-	}
2093
-
2094
-	// si on n'a pas trouvé d'hôte du tout, en dernier recours on utilise adresse_site comme fallback
2095
-	if (is_null($host) and isset($GLOBALS['meta']['adresse_site'])) {
2096
-		$host = $GLOBALS['meta']['adresse_site'];
2097
-		if ($scheme = parse_url($host, PHP_URL_SCHEME)) {
2098
-			$http = $scheme;
2099
-			$host = str_replace("{$scheme}://", '', $host);
2100
-		}
2101
-	}
2102
-	if (
2103
-		isset($_SERVER['SERVER_PORT'])
2104
-		and $port = $_SERVER['SERVER_PORT']
2105
-		and strpos($host, ':') == false
2106
-	) {
2107
-		if (!defined('_PORT_HTTP_STANDARD')) {
2108
-			define('_PORT_HTTP_STANDARD', '80');
2109
-		}
2110
-		if (!defined('_PORT_HTTPS_STANDARD')) {
2111
-			define('_PORT_HTTPS_STANDARD', '443');
2112
-		}
2113
-		if ($http == 'http' and !in_array($port, explode(',', _PORT_HTTP_STANDARD))) {
2114
-			$host .= ":$port";
2115
-		}
2116
-		if ($http == 'https' and !in_array($port, explode(',', _PORT_HTTPS_STANDARD))) {
2117
-			$host .= ":$port";
2118
-		}
2119
-	}
2120
-
2121
-	if (!$GLOBALS['REQUEST_URI']) {
2122
-		if (isset($_SERVER['REQUEST_URI'])) {
2123
-			$GLOBALS['REQUEST_URI'] = $_SERVER['REQUEST_URI'];
2124
-		} else {
2125
-			$GLOBALS['REQUEST_URI'] = (php_sapi_name() !== 'cli') ? $_SERVER['PHP_SELF'] : '';
2126
-			if (
2127
-				!empty($_SERVER['QUERY_STRING'])
2128
-				and !strpos($_SERVER['REQUEST_URI'], '?')
2129
-			) {
2130
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2131
-			}
2132
-		}
2133
-	}
2134
-
2135
-	// Et nettoyer l'url
2136
-	$GLOBALS['REQUEST_URI'] = (filter_var($GLOBALS['REQUEST_URI'], FILTER_SANITIZE_URL) ?: '');
2137
-
2138
-	$url[$profondeur] = url_de_($http, $host, $GLOBALS['REQUEST_URI'], $profondeur);
2139
-
2140
-	return $url[$profondeur];
2057
+    static $url = [];
2058
+    if (is_array($profondeur)) {
2059
+        return $url = $profondeur;
2060
+    }
2061
+    if ($profondeur === false) {
2062
+        return $url;
2063
+    }
2064
+
2065
+    if (is_null($profondeur)) {
2066
+        $profondeur = $GLOBALS['profondeur_url'] ?? (_DIR_RESTREINT ? 0 : 1);
2067
+    }
2068
+
2069
+    if (isset($url[$profondeur])) {
2070
+        return $url[$profondeur];
2071
+    }
2072
+
2073
+    $http = 'http';
2074
+
2075
+    if (
2076
+        isset($_SERVER['SCRIPT_URI'])
2077
+        and substr($_SERVER['SCRIPT_URI'], 0, 5) == 'https'
2078
+    ) {
2079
+        $http = 'https';
2080
+    } elseif (
2081
+        isset($_SERVER['HTTPS'])
2082
+        and test_valeur_serveur($_SERVER['HTTPS'])
2083
+    ) {
2084
+        $http = 'https';
2085
+    }
2086
+
2087
+    // note : HTTP_HOST contient le :port si necessaire
2088
+    if ($host = $_SERVER['HTTP_HOST'] ?? null) {
2089
+        // Filtrer $host pour proteger d'attaques d'entete HTTP
2090
+        $host = (filter_var($host, FILTER_SANITIZE_URL) ?: null);
2091
+    }
2092
+
2093
+    // si on n'a pas trouvé d'hôte du tout, en dernier recours on utilise adresse_site comme fallback
2094
+    if (is_null($host) and isset($GLOBALS['meta']['adresse_site'])) {
2095
+        $host = $GLOBALS['meta']['adresse_site'];
2096
+        if ($scheme = parse_url($host, PHP_URL_SCHEME)) {
2097
+            $http = $scheme;
2098
+            $host = str_replace("{$scheme}://", '', $host);
2099
+        }
2100
+    }
2101
+    if (
2102
+        isset($_SERVER['SERVER_PORT'])
2103
+        and $port = $_SERVER['SERVER_PORT']
2104
+        and strpos($host, ':') == false
2105
+    ) {
2106
+        if (!defined('_PORT_HTTP_STANDARD')) {
2107
+            define('_PORT_HTTP_STANDARD', '80');
2108
+        }
2109
+        if (!defined('_PORT_HTTPS_STANDARD')) {
2110
+            define('_PORT_HTTPS_STANDARD', '443');
2111
+        }
2112
+        if ($http == 'http' and !in_array($port, explode(',', _PORT_HTTP_STANDARD))) {
2113
+            $host .= ":$port";
2114
+        }
2115
+        if ($http == 'https' and !in_array($port, explode(',', _PORT_HTTPS_STANDARD))) {
2116
+            $host .= ":$port";
2117
+        }
2118
+    }
2119
+
2120
+    if (!$GLOBALS['REQUEST_URI']) {
2121
+        if (isset($_SERVER['REQUEST_URI'])) {
2122
+            $GLOBALS['REQUEST_URI'] = $_SERVER['REQUEST_URI'];
2123
+        } else {
2124
+            $GLOBALS['REQUEST_URI'] = (php_sapi_name() !== 'cli') ? $_SERVER['PHP_SELF'] : '';
2125
+            if (
2126
+                !empty($_SERVER['QUERY_STRING'])
2127
+                and !strpos($_SERVER['REQUEST_URI'], '?')
2128
+            ) {
2129
+                $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2130
+            }
2131
+        }
2132
+    }
2133
+
2134
+    // Et nettoyer l'url
2135
+    $GLOBALS['REQUEST_URI'] = (filter_var($GLOBALS['REQUEST_URI'], FILTER_SANITIZE_URL) ?: '');
2136
+
2137
+    $url[$profondeur] = url_de_($http, $host, $GLOBALS['REQUEST_URI'], $profondeur);
2138
+
2139
+    return $url[$profondeur];
2141 2140
 }
2142 2141
 
2143 2142
 /**
@@ -2150,26 +2149,26 @@  discard block
 block discarded – undo
2150 2149
  * @return string
2151 2150
  */
2152 2151
 function url_de_($http, $host, $request, $prof = 0) {
2153
-	$prof = max($prof, 0);
2152
+    $prof = max($prof, 0);
2154 2153
 
2155
-	$myself = ltrim($request, '/');
2156
-	# supprimer la chaine de GET
2157
-	[$myself] = explode('?', $myself);
2158
-	// vieux mode HTTP qui envoie après le nom de la methode l'URL compléte
2159
-	// protocole, "://", nom du serveur avant le path dans _SERVER["REQUEST_URI"]
2160
-	if (strpos($myself, '://') !== false) {
2161
-		$myself = explode('://', $myself);
2162
-		array_shift($myself);
2163
-		$myself = implode('://', $myself);
2164
-		$myself = explode('/', $myself);
2165
-		array_shift($myself);
2166
-		$myself = implode('/', $myself);
2167
-	}
2168
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2154
+    $myself = ltrim($request, '/');
2155
+    # supprimer la chaine de GET
2156
+    [$myself] = explode('?', $myself);
2157
+    // vieux mode HTTP qui envoie après le nom de la methode l'URL compléte
2158
+    // protocole, "://", nom du serveur avant le path dans _SERVER["REQUEST_URI"]
2159
+    if (strpos($myself, '://') !== false) {
2160
+        $myself = explode('://', $myself);
2161
+        array_shift($myself);
2162
+        $myself = implode('://', $myself);
2163
+        $myself = explode('/', $myself);
2164
+        array_shift($myself);
2165
+        $myself = implode('/', $myself);
2166
+    }
2167
+    $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2169 2168
 
2170
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2169
+    $url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2171 2170
 
2172
-	return $url;
2171
+    return $url;
2173 2172
 }
2174 2173
 
2175 2174
 
@@ -2204,26 +2203,26 @@  discard block
 block discarded – undo
2204 2203
  * @return string URL
2205 2204
  **/
2206 2205
 function generer_url_ecrire(?string $script = '', $args = '', $no_entities = false, $rel = false) {
2207
-	$script ??= '';
2208
-	if (!$rel) {
2209
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2210
-	} else {
2211
-		if (!is_string($rel)) {
2212
-			$rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT;
2213
-		}
2214
-	}
2215
-
2216
-	[$script, $ancre] = array_pad(explode('#', $script), 2, null);
2217
-	if ($script and ($script <> 'accueil' or $rel)) {
2218
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2219
-	} elseif ($args) {
2220
-		$args = "?$args";
2221
-	}
2222
-	if ($ancre) {
2223
-		$args .= "#$ancre";
2224
-	}
2225
-
2226
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2206
+    $script ??= '';
2207
+    if (!$rel) {
2208
+        $rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2209
+    } else {
2210
+        if (!is_string($rel)) {
2211
+            $rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT;
2212
+        }
2213
+    }
2214
+
2215
+    [$script, $ancre] = array_pad(explode('#', $script), 2, null);
2216
+    if ($script and ($script <> 'accueil' or $rel)) {
2217
+        $args = "?exec=$script" . (!$args ? '' : "&$args");
2218
+    } elseif ($args) {
2219
+        $args = "?$args";
2220
+    }
2221
+    if ($ancre) {
2222
+        $args .= "#$ancre";
2223
+    }
2224
+
2225
+    return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2227 2226
 }
2228 2227
 
2229 2228
 //
@@ -2245,15 +2244,15 @@  discard block
 block discarded – undo
2245 2244
  *     Nom du fichier (constante _SPIP_SCRIPT), sinon nom par défaut
2246 2245
  **/
2247 2246
 function get_spip_script($default = '') {
2248
-	if (!defined('_SPIP_SCRIPT')) {
2249
-		return 'spip.php';
2250
-	}
2251
-	# cas define('_SPIP_SCRIPT', '');
2252
-	if (_SPIP_SCRIPT) {
2253
-		return _SPIP_SCRIPT;
2254
-	} else {
2255
-		return $default;
2256
-	}
2247
+    if (!defined('_SPIP_SCRIPT')) {
2248
+        return 'spip.php';
2249
+    }
2250
+    # cas define('_SPIP_SCRIPT', '');
2251
+    if (_SPIP_SCRIPT) {
2252
+        return _SPIP_SCRIPT;
2253
+    } else {
2254
+        return $default;
2255
+    }
2257 2256
 }
2258 2257
 
2259 2258
 /**
@@ -2282,45 +2281,45 @@  discard block
 block discarded – undo
2282 2281
  * @return string URL
2283 2282
  **/
2284 2283
 function generer_url_public($script = '', $args = '', $no_entities = false, $rel = true, $action = '') {
2285
-	// si le script est une action (spip_pass, spip_inscription),
2286
-	// standardiser vers la nouvelle API
2287
-
2288
-	if (is_array($args)) {
2289
-		$args = http_build_query($args);
2290
-	}
2291
-
2292
-	$url = '';
2293
-	if ($f = charger_fonction_url('page')) {
2294
-		$url = $f($script, $args);
2295
-		if ($url and !$rel) {
2296
-			include_spip('inc/filtres_mini');
2297
-			$url = url_absolue($url);
2298
-		}
2299
-	}
2300
-	if (!$url) {
2301
-		if (!$action) {
2302
-			$action = get_spip_script();
2303
-		}
2304
-		if ($script) {
2305
-			$action = parametre_url($action, _SPIP_PAGE, $script, '&');
2306
-		}
2307
-		if ($args) {
2308
-			$action .= (strpos($action, '?') !== false ? '&' : '?') . $args;
2309
-		}
2310
-		// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2311
-		$url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action"));
2312
-	}
2313
-
2314
-	if (!$no_entities) {
2315
-		$url = quote_amp($url);
2316
-	}
2317
-
2318
-	return $url;
2284
+    // si le script est une action (spip_pass, spip_inscription),
2285
+    // standardiser vers la nouvelle API
2286
+
2287
+    if (is_array($args)) {
2288
+        $args = http_build_query($args);
2289
+    }
2290
+
2291
+    $url = '';
2292
+    if ($f = charger_fonction_url('page')) {
2293
+        $url = $f($script, $args);
2294
+        if ($url and !$rel) {
2295
+            include_spip('inc/filtres_mini');
2296
+            $url = url_absolue($url);
2297
+        }
2298
+    }
2299
+    if (!$url) {
2300
+        if (!$action) {
2301
+            $action = get_spip_script();
2302
+        }
2303
+        if ($script) {
2304
+            $action = parametre_url($action, _SPIP_PAGE, $script, '&');
2305
+        }
2306
+        if ($args) {
2307
+            $action .= (strpos($action, '?') !== false ? '&' : '?') . $args;
2308
+        }
2309
+        // ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2310
+        $url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action"));
2311
+    }
2312
+
2313
+    if (!$no_entities) {
2314
+        $url = quote_amp($url);
2315
+    }
2316
+
2317
+    return $url;
2319 2318
 }
2320 2319
 
2321 2320
 function generer_url_prive($script, $args = '', $no_entities = false) {
2322 2321
 
2323
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2322
+    return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2324 2323
 }
2325 2324
 
2326 2325
 // Pour les formulaires en methode POST,
@@ -2345,19 +2344,19 @@  discard block
 block discarded – undo
2345 2344
  **/
2346 2345
 function generer_form_ecrire($script, $corps, $atts = '', $submit = '') {
2347 2346
 
2348
-	$script1 = explode('&', $script);
2349
-	$script1 = reset($script1);
2347
+    $script1 = explode('&', $script);
2348
+    $script1 = reset($script1);
2350 2349
 
2351
-	return "<form action='"
2352
-	. ($script ? generer_url_ecrire($script) : '')
2353
-	. "' "
2354
-	. ($atts ?: " method='post'")
2355
-	. "><div>\n"
2356
-	. "<input type='hidden' name='exec' value='$script1' />"
2357
-	. $corps
2358
-	. (!$submit ? '' :
2359
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>'))
2360
-	. "</div></form>\n";
2350
+    return "<form action='"
2351
+    . ($script ? generer_url_ecrire($script) : '')
2352
+    . "' "
2353
+    . ($atts ?: " method='post'")
2354
+    . "><div>\n"
2355
+    . "<input type='hidden' name='exec' value='$script1' />"
2356
+    . $corps
2357
+    . (!$submit ? '' :
2358
+        ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>'))
2359
+    . "</div></form>\n";
2361 2360
 }
2362 2361
 
2363 2362
 /**
@@ -2374,22 +2373,22 @@  discard block
 block discarded – undo
2374 2373
  * @return string
2375 2374
  */
2376 2375
 function generer_form_action($script, $corps, $atts = '', $public = false) {
2377
-	// si l'on est dans l'espace prive, on garde dans l'url
2378
-	// l'exec a l'origine de l'action, qui permet de savoir si il est necessaire
2379
-	// ou non de proceder a l'authentification (cas typique de l'install par exemple)
2380
-	$h = (_DIR_RACINE and !$public)
2381
-		? generer_url_ecrire(_request('exec'))
2382
-		: generer_url_public();
2376
+    // si l'on est dans l'espace prive, on garde dans l'url
2377
+    // l'exec a l'origine de l'action, qui permet de savoir si il est necessaire
2378
+    // ou non de proceder a l'authentification (cas typique de l'install par exemple)
2379
+    $h = (_DIR_RACINE and !$public)
2380
+        ? generer_url_ecrire(_request('exec'))
2381
+        : generer_url_public();
2383 2382
 
2384
-	return "\n<form action='" .
2385
-	$h .
2386
-	"'" .
2387
-	$atts .
2388
-	">\n" .
2389
-	'<div>' .
2390
-	"\n<input type='hidden' name='action' value='$script' />" .
2391
-	$corps .
2392
-	'</div></form>';
2383
+    return "\n<form action='" .
2384
+    $h .
2385
+    "'" .
2386
+    $atts .
2387
+    ">\n" .
2388
+    '<div>' .
2389
+    "\n<input type='hidden' name='action' value='$script' />" .
2390
+    $corps .
2391
+    '</div></form>';
2393 2392
 }
2394 2393
 
2395 2394
 /**
@@ -2408,22 +2407,22 @@  discard block
 block discarded – undo
2408 2407
  *     URL
2409 2408
  */
2410 2409
 function generer_url_action($script, $args = '', $no_entities = false, $public = false) {
2411
-	// si l'on est dans l'espace prive, on garde dans l'url
2412
-	// l'exec a l'origine de l'action, qui permet de savoir si il est necessaire
2413
-	// ou non de proceder a l'authentification (cas typique de l'install par exemple)
2414
-	$url = (_DIR_RACINE and !$public)
2415
-		? generer_url_ecrire(_request('exec'))
2416
-		: generer_url_public('', '', false, false);
2417
-	$url = parametre_url($url, 'action', $script);
2418
-	if ($args) {
2419
-		$url .= quote_amp('&' . $args);
2420
-	}
2410
+    // si l'on est dans l'espace prive, on garde dans l'url
2411
+    // l'exec a l'origine de l'action, qui permet de savoir si il est necessaire
2412
+    // ou non de proceder a l'authentification (cas typique de l'install par exemple)
2413
+    $url = (_DIR_RACINE and !$public)
2414
+        ? generer_url_ecrire(_request('exec'))
2415
+        : generer_url_public('', '', false, false);
2416
+    $url = parametre_url($url, 'action', $script);
2417
+    if ($args) {
2418
+        $url .= quote_amp('&' . $args);
2419
+    }
2421 2420
 
2422
-	if ($no_entities) {
2423
-		$url = str_replace('&amp;', '&', $url);
2424
-	}
2421
+    if ($no_entities) {
2422
+        $url = str_replace('&amp;', '&', $url);
2423
+    }
2425 2424
 
2426
-	return $url;
2425
+    return $url;
2427 2426
 }
2428 2427
 
2429 2428
 
@@ -2442,23 +2441,23 @@  discard block
 block discarded – undo
2442 2441
  *     URL
2443 2442
  */
2444 2443
 function generer_url_api(string $script, string $path, string $args, bool $no_entities = false, ?bool $public = null) {
2445
-	if (is_null($public)) {
2446
-		$public = (_DIR_RACINE ? false : '');
2447
-	}
2448
-	if (substr($script, -4) !== '.api') {
2449
-		$script .= '.api';
2450
-	}
2451
-	$url =
2452
-		(($public ? _DIR_RACINE : _DIR_RESTREINT) ?: './')
2453
-	. $script . '/'
2454
-	. ($path ? trim($path, '/') : '')
2455
-	. ($args ? '?' . quote_amp($args) : '');
2444
+    if (is_null($public)) {
2445
+        $public = (_DIR_RACINE ? false : '');
2446
+    }
2447
+    if (substr($script, -4) !== '.api') {
2448
+        $script .= '.api';
2449
+    }
2450
+    $url =
2451
+        (($public ? _DIR_RACINE : _DIR_RESTREINT) ?: './')
2452
+    . $script . '/'
2453
+    . ($path ? trim($path, '/') : '')
2454
+    . ($args ? '?' . quote_amp($args) : '');
2456 2455
 
2457
-	if ($no_entities) {
2458
-		$url = str_replace('&amp;', '&', $url);
2459
-	}
2456
+    if ($no_entities) {
2457
+        $url = str_replace('&amp;', '&', $url);
2458
+    }
2460 2459
 
2461
-	return $url;
2460
+    return $url;
2462 2461
 }
2463 2462
 
2464 2463
 
@@ -2471,8 +2470,8 @@  discard block
 block discarded – undo
2471 2470
  * @param string $ta Répertoire temporaire accessible
2472 2471
  */
2473 2472
 function spip_initialisation($pi = null, $pa = null, $ti = null, $ta = null) {
2474
-	spip_initialisation_core($pi, $pa, $ti, $ta);
2475
-	spip_initialisation_suite();
2473
+    spip_initialisation_core($pi, $pa, $ti, $ta);
2474
+    spip_initialisation_suite();
2476 2475
 }
2477 2476
 
2478 2477
 /**
@@ -2492,310 +2491,310 @@  discard block
 block discarded – undo
2492 2491
  * @param string $ta Répertoire temporaire accessible
2493 2492
  */
2494 2493
 function spip_initialisation_core($pi = null, $pa = null, $ti = null, $ta = null) {
2495
-	static $too_late = 0;
2496
-	if ($too_late++) {
2497
-		return;
2498
-	}
2499
-
2500
-	// Declaration des repertoires
2501
-
2502
-	// le nom du repertoire plugins/ activables/desactivables
2503
-	if (!defined('_DIR_PLUGINS')) {
2504
-		define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/');
2505
-	}
2506
-
2507
-	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2508
-	if (!defined('_DIR_PLUGINS_DIST')) {
2509
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/');
2510
-	}
2511
-
2512
-	// le nom du repertoire des librairies
2513
-	if (!defined('_DIR_LIB')) {
2514
-		define('_DIR_LIB', _DIR_RACINE . 'lib/');
2515
-	}
2516
-
2517
-	if (!defined('_DIR_IMG')) {
2518
-		define('_DIR_IMG', $pa);
2519
-	}
2520
-	if (!defined('_DIR_LOGOS')) {
2521
-		define('_DIR_LOGOS', $pa);
2522
-	}
2523
-	if (!defined('_DIR_IMG_ICONES')) {
2524
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/');
2525
-	}
2526
-
2527
-	if (!defined('_DIR_DUMP')) {
2528
-		define('_DIR_DUMP', $ti . 'dump/');
2529
-	}
2530
-	if (!defined('_DIR_SESSIONS')) {
2531
-		define('_DIR_SESSIONS', $ti . 'sessions/');
2532
-	}
2533
-	if (!defined('_DIR_TRANSFERT')) {
2534
-		define('_DIR_TRANSFERT', $ti . 'upload/');
2535
-	}
2536
-	if (!defined('_DIR_CACHE')) {
2537
-		define('_DIR_CACHE', $ti . 'cache/');
2538
-	}
2539
-	if (!defined('_DIR_CACHE_XML')) {
2540
-		define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/');
2541
-	}
2542
-	if (!defined('_DIR_SKELS')) {
2543
-		define('_DIR_SKELS', _DIR_CACHE . 'skel/');
2544
-	}
2545
-	if (!defined('_DIR_AIDE')) {
2546
-		define('_DIR_AIDE', _DIR_CACHE . 'aide/');
2547
-	}
2548
-	if (!defined('_DIR_TMP')) {
2549
-		define('_DIR_TMP', $ti);
2550
-	}
2551
-
2552
-	if (!defined('_DIR_VAR')) {
2553
-		define('_DIR_VAR', $ta);
2554
-	}
2555
-
2556
-	if (!defined('_DIR_ETC')) {
2557
-		define('_DIR_ETC', $pi);
2558
-	}
2559
-	if (!defined('_DIR_CONNECT')) {
2560
-		define('_DIR_CONNECT', $pi);
2561
-	}
2562
-	if (!defined('_DIR_CHMOD')) {
2563
-		define('_DIR_CHMOD', $pi);
2564
-	}
2565
-
2566
-	if (!isset($GLOBALS['test_dirs'])) {
2567
-		// Pas $pi car il est bon de le mettre hors ecriture apres intstall
2568
-		// il sera rajoute automatiquement si besoin a l'etape 2 de l'install
2569
-	$GLOBALS['test_dirs'] = [$pa, $ti, $ta];
2570
-	}
2571
-
2572
-	// Declaration des fichiers
2573
-
2574
-	if (!defined('_CACHE_PLUGINS_PATH')) {
2575
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php');
2576
-	}
2577
-	if (!defined('_CACHE_PLUGINS_OPT')) {
2578
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php');
2579
-	}
2580
-	if (!defined('_CACHE_PLUGINS_FCT')) {
2581
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php');
2582
-	}
2583
-	if (!defined('_CACHE_PIPELINES')) {
2584
-		define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php');
2585
-	}
2586
-	if (!defined('_CACHE_CHEMIN')) {
2587
-		define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt');
2588
-	}
2589
-
2590
-	# attention .php obligatoire pour ecrire_fichier_securise
2591
-	if (!defined('_FILE_META')) {
2592
-		define('_FILE_META', $ti . 'meta_cache.php');
2593
-	}
2594
-	if (!defined('_DIR_LOG')) {
2595
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2596
-	}
2597
-	if (!defined('_FILE_LOG')) {
2598
-		define('_FILE_LOG', 'spip');
2599
-	}
2600
-	if (!defined('_FILE_LOG_SUFFIX')) {
2601
-		define('_FILE_LOG_SUFFIX', '.log');
2602
-	}
2603
-
2604
-	// Le fichier de connexion a la base de donnees
2605
-	// tient compte des anciennes versions (inc_connect...)
2606
-	if (!defined('_FILE_CONNECT_INS')) {
2607
-		define('_FILE_CONNECT_INS', 'connect');
2608
-	}
2609
-	if (!defined('_FILE_CONNECT')) {
2610
-		define(
2611
-			'_FILE_CONNECT',
2612
-			(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2613
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2614
-			: false))
2615
-		);
2616
-	}
2617
-
2618
-	// Le fichier de reglages des droits
2619
-	if (!defined('_FILE_CHMOD_INS')) {
2620
-		define('_FILE_CHMOD_INS', 'chmod');
2621
-	}
2622
-	if (!defined('_FILE_CHMOD')) {
2623
-		define(
2624
-			'_FILE_CHMOD',
2625
-			(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2626
-			: false)
2627
-		);
2628
-	}
2629
-
2630
-	if (!defined('_FILE_LDAP')) {
2631
-		define('_FILE_LDAP', 'ldap.php');
2632
-	}
2633
-
2634
-	if (!defined('_FILE_TMP_SUFFIX')) {
2635
-		define('_FILE_TMP_SUFFIX', '.tmp.php');
2636
-	}
2637
-	if (!defined('_FILE_CONNECT_TMP')) {
2638
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2639
-	}
2640
-	if (!defined('_FILE_CHMOD_TMP')) {
2641
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2642
-	}
2643
-
2644
-	// Definition des droits d'acces en ecriture
2645
-	if (!defined('_SPIP_CHMOD') and _FILE_CHMOD) {
2646
-		include_once _FILE_CHMOD;
2647
-	}
2648
-
2649
-	// Se mefier des fichiers mal remplis!
2650
-	if (!defined('_SPIP_CHMOD')) {
2651
-		define('_SPIP_CHMOD', 0777);
2652
-	}
2653
-
2654
-	if (!defined('_DEFAULT_CHARSET')) {
2655
-		/** Le charset par défaut lors de l'installation */
2656
-		define('_DEFAULT_CHARSET', 'utf-8');
2657
-	}
2658
-	if (!defined('_ROOT_PLUGINS')) {
2659
-		define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/');
2660
-	}
2661
-	if (!defined('_ROOT_PLUGINS_DIST')) {
2662
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/');
2663
-	}
2664
-	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2665
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2666
-	}
2667
-
2668
-	// La taille des Log
2669
-	if (!defined('_MAX_LOG')) {
2670
-		define('_MAX_LOG', 100);
2671
-	}
2672
-
2673
-	// Sommes-nous dans l'empire du Mal ?
2674
-	// (ou sous le signe du Pingouin, ascendant GNU ?)
2675
-	if (isset($_SERVER['SERVER_SOFTWARE']) and strpos($_SERVER['SERVER_SOFTWARE'], '(Win') !== false) {
2676
-		if (!defined('_OS_SERVEUR')) {
2677
-			define('_OS_SERVEUR', 'windows');
2678
-		}
2679
-		if (!defined('_SPIP_LOCK_MODE')) {
2680
-			define('_SPIP_LOCK_MODE', 1);
2681
-		} // utiliser le flock php
2682
-	} else {
2683
-		if (!defined('_OS_SERVEUR')) {
2684
-			define('_OS_SERVEUR', '');
2685
-		}
2686
-		if (!defined('_SPIP_LOCK_MODE')) {
2687
-			define('_SPIP_LOCK_MODE', 1);
2688
-		} // utiliser le flock php
2689
-		#if (!defined('_SPIP_LOCK_MODE')) define('_SPIP_LOCK_MODE',2); // utiliser le nfslock de spip mais link() est tres souvent interdite
2690
-	}
2691
-
2692
-	// Langue par defaut
2693
-	if (!defined('_LANGUE_PAR_DEFAUT')) {
2694
-		define('_LANGUE_PAR_DEFAUT', 'fr');
2695
-	}
2696
-
2697
-	//
2698
-	// Module de lecture/ecriture/suppression de fichiers utilisant flock()
2699
-	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2700
-	// pour le rendre surchargeable, on va provoquer un reecriture
2701
-	// systematique du noyau ou une baisse de perfs => a etudier)
2702
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2703
-
2704
-	// charger tout de suite le path et son cache
2705
-	load_path_cache();
2706
-
2707
-	// *********** traiter les variables ************
2708
-
2709
-	//
2710
-	// Securite
2711
-	//
2712
-
2713
-	// Ne pas se faire manger par un bug php qui accepte ?GLOBALS[truc]=toto
2714
-	if (isset($_REQUEST['GLOBALS'])) {
2715
-		die();
2716
-	}
2717
-	// nettoyer les magic quotes \' et les caracteres nuls %00
2718
-	spip_desinfecte($_GET);
2719
-	spip_desinfecte($_POST);
2720
-	spip_desinfecte($_COOKIE);
2721
-	spip_desinfecte($_REQUEST);
2722
-
2723
-	// appliquer le cookie_prefix
2724
-	if ($GLOBALS['cookie_prefix'] != 'spip') {
2725
-		include_spip('inc/cookie');
2726
-		recuperer_cookies_spip($GLOBALS['cookie_prefix']);
2727
-	}
2728
-
2729
-	// Compatibilite avec serveurs ne fournissant pas $REQUEST_URI
2730
-	if (isset($_SERVER['REQUEST_URI'])) {
2731
-		$GLOBALS['REQUEST_URI'] = $_SERVER['REQUEST_URI'];
2732
-	} else {
2733
-		$GLOBALS['REQUEST_URI'] = (php_sapi_name() !== 'cli') ? $_SERVER['PHP_SELF'] : '';
2734
-		if (
2735
-			!empty($_SERVER['QUERY_STRING'])
2736
-			and !strpos($_SERVER['REQUEST_URI'], '?')
2737
-		) {
2738
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2739
-		}
2740
-	}
2741
-
2742
-	// Duree de validite de l'alea pour les cookies et ce qui s'ensuit.
2743
-	if (!defined('_RENOUVELLE_ALEA')) {
2744
-		define('_RENOUVELLE_ALEA', 12 * 3600);
2745
-	}
2746
-	if (!defined('_DUREE_COOKIE_ADMIN')) {
2747
-		define('_DUREE_COOKIE_ADMIN', 14 * 24 * 3600);
2748
-	}
2749
-
2750
-	// charger les meta si possible et renouveller l'alea au besoin
2751
-	// charge aussi effacer_meta et ecrire_meta
2752
-	$inc_meta = charger_fonction('meta', 'inc');
2753
-	$inc_meta();
2754
-
2755
-	// nombre de repertoires depuis la racine
2756
-	// on compare a l'adresse de spip.php : $_SERVER["SCRIPT_NAME"]
2757
-	// ou a defaut celle donnee en meta ; (mais si celle-ci est fausse
2758
-	// le calcul est faux)
2759
-	if (!_DIR_RESTREINT) {
2760
-		$GLOBALS['profondeur_url'] = 1;
2761
-	} else {
2762
-		$uri = isset($_SERVER['REQUEST_URI']) ? explode('?', $_SERVER['REQUEST_URI']) : '';
2763
-		$uri_ref = $_SERVER['SCRIPT_NAME'];
2764
-		if (
2765
-			!$uri_ref
2766
-			// si on est appele avec un autre ti, on est sans doute en mutu
2767
-			// si jamais c'est de la mutu avec sous rep, on est perdu si on se fie
2768
-			// a spip.php qui est a la racine du spip, et vue qu'on sait pas se reperer
2769
-			// s'en remettre a l'adresse du site. alea jacta est.
2770
-			or $ti !== _NOM_TEMPORAIRES_INACCESSIBLES
2771
-		) {
2772
-			if (isset($GLOBALS['meta']['adresse_site'])) {
2773
-				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2774
-				$uri_ref = ($uri_ref['path'] ?? '') . '/';
2775
-			} else {
2776
-				$uri_ref = '';
2777
-			}
2778
-		}
2779
-		if (!$uri or !$uri_ref) {
2780
-			$GLOBALS['profondeur_url'] = 0;
2781
-		} else {
2782
-			$GLOBALS['profondeur_url'] = max(
2783
-				0,
2784
-				substr_count($uri[0], '/')
2785
-				- substr_count($uri_ref, '/')
2786
-			);
2787
-		}
2788
-	}
2789
-	// s'il y a un cookie ou PHP_AUTH, initialiser visiteur_session
2790
-	if (_FILE_CONNECT) {
2791
-		if (
2792
-			verifier_visiteur() == '0minirezo'
2793
-			// si c'est un admin sans cookie admin, il faut ignorer le cache chemin !
2794
-			and !isset($_COOKIE['spip_admin'])
2795
-		) {
2796
-			clear_path_cache();
2797
-		}
2798
-	}
2494
+    static $too_late = 0;
2495
+    if ($too_late++) {
2496
+        return;
2497
+    }
2498
+
2499
+    // Declaration des repertoires
2500
+
2501
+    // le nom du repertoire plugins/ activables/desactivables
2502
+    if (!defined('_DIR_PLUGINS')) {
2503
+        define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/');
2504
+    }
2505
+
2506
+    // le nom du repertoire des extensions/ permanentes du core, toujours actives
2507
+    if (!defined('_DIR_PLUGINS_DIST')) {
2508
+        define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/');
2509
+    }
2510
+
2511
+    // le nom du repertoire des librairies
2512
+    if (!defined('_DIR_LIB')) {
2513
+        define('_DIR_LIB', _DIR_RACINE . 'lib/');
2514
+    }
2515
+
2516
+    if (!defined('_DIR_IMG')) {
2517
+        define('_DIR_IMG', $pa);
2518
+    }
2519
+    if (!defined('_DIR_LOGOS')) {
2520
+        define('_DIR_LOGOS', $pa);
2521
+    }
2522
+    if (!defined('_DIR_IMG_ICONES')) {
2523
+        define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/');
2524
+    }
2525
+
2526
+    if (!defined('_DIR_DUMP')) {
2527
+        define('_DIR_DUMP', $ti . 'dump/');
2528
+    }
2529
+    if (!defined('_DIR_SESSIONS')) {
2530
+        define('_DIR_SESSIONS', $ti . 'sessions/');
2531
+    }
2532
+    if (!defined('_DIR_TRANSFERT')) {
2533
+        define('_DIR_TRANSFERT', $ti . 'upload/');
2534
+    }
2535
+    if (!defined('_DIR_CACHE')) {
2536
+        define('_DIR_CACHE', $ti . 'cache/');
2537
+    }
2538
+    if (!defined('_DIR_CACHE_XML')) {
2539
+        define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/');
2540
+    }
2541
+    if (!defined('_DIR_SKELS')) {
2542
+        define('_DIR_SKELS', _DIR_CACHE . 'skel/');
2543
+    }
2544
+    if (!defined('_DIR_AIDE')) {
2545
+        define('_DIR_AIDE', _DIR_CACHE . 'aide/');
2546
+    }
2547
+    if (!defined('_DIR_TMP')) {
2548
+        define('_DIR_TMP', $ti);
2549
+    }
2550
+
2551
+    if (!defined('_DIR_VAR')) {
2552
+        define('_DIR_VAR', $ta);
2553
+    }
2554
+
2555
+    if (!defined('_DIR_ETC')) {
2556
+        define('_DIR_ETC', $pi);
2557
+    }
2558
+    if (!defined('_DIR_CONNECT')) {
2559
+        define('_DIR_CONNECT', $pi);
2560
+    }
2561
+    if (!defined('_DIR_CHMOD')) {
2562
+        define('_DIR_CHMOD', $pi);
2563
+    }
2564
+
2565
+    if (!isset($GLOBALS['test_dirs'])) {
2566
+        // Pas $pi car il est bon de le mettre hors ecriture apres intstall
2567
+        // il sera rajoute automatiquement si besoin a l'etape 2 de l'install
2568
+    $GLOBALS['test_dirs'] = [$pa, $ti, $ta];
2569
+    }
2570
+
2571
+    // Declaration des fichiers
2572
+
2573
+    if (!defined('_CACHE_PLUGINS_PATH')) {
2574
+        define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php');
2575
+    }
2576
+    if (!defined('_CACHE_PLUGINS_OPT')) {
2577
+        define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php');
2578
+    }
2579
+    if (!defined('_CACHE_PLUGINS_FCT')) {
2580
+        define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php');
2581
+    }
2582
+    if (!defined('_CACHE_PIPELINES')) {
2583
+        define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php');
2584
+    }
2585
+    if (!defined('_CACHE_CHEMIN')) {
2586
+        define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt');
2587
+    }
2588
+
2589
+    # attention .php obligatoire pour ecrire_fichier_securise
2590
+    if (!defined('_FILE_META')) {
2591
+        define('_FILE_META', $ti . 'meta_cache.php');
2592
+    }
2593
+    if (!defined('_DIR_LOG')) {
2594
+        define('_DIR_LOG', _DIR_TMP . 'log/');
2595
+    }
2596
+    if (!defined('_FILE_LOG')) {
2597
+        define('_FILE_LOG', 'spip');
2598
+    }
2599
+    if (!defined('_FILE_LOG_SUFFIX')) {
2600
+        define('_FILE_LOG_SUFFIX', '.log');
2601
+    }
2602
+
2603
+    // Le fichier de connexion a la base de donnees
2604
+    // tient compte des anciennes versions (inc_connect...)
2605
+    if (!defined('_FILE_CONNECT_INS')) {
2606
+        define('_FILE_CONNECT_INS', 'connect');
2607
+    }
2608
+    if (!defined('_FILE_CONNECT')) {
2609
+        define(
2610
+            '_FILE_CONNECT',
2611
+            (@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2612
+            : (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2613
+            : false))
2614
+        );
2615
+    }
2616
+
2617
+    // Le fichier de reglages des droits
2618
+    if (!defined('_FILE_CHMOD_INS')) {
2619
+        define('_FILE_CHMOD_INS', 'chmod');
2620
+    }
2621
+    if (!defined('_FILE_CHMOD')) {
2622
+        define(
2623
+            '_FILE_CHMOD',
2624
+            (@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2625
+            : false)
2626
+        );
2627
+    }
2628
+
2629
+    if (!defined('_FILE_LDAP')) {
2630
+        define('_FILE_LDAP', 'ldap.php');
2631
+    }
2632
+
2633
+    if (!defined('_FILE_TMP_SUFFIX')) {
2634
+        define('_FILE_TMP_SUFFIX', '.tmp.php');
2635
+    }
2636
+    if (!defined('_FILE_CONNECT_TMP')) {
2637
+        define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2638
+    }
2639
+    if (!defined('_FILE_CHMOD_TMP')) {
2640
+        define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2641
+    }
2642
+
2643
+    // Definition des droits d'acces en ecriture
2644
+    if (!defined('_SPIP_CHMOD') and _FILE_CHMOD) {
2645
+        include_once _FILE_CHMOD;
2646
+    }
2647
+
2648
+    // Se mefier des fichiers mal remplis!
2649
+    if (!defined('_SPIP_CHMOD')) {
2650
+        define('_SPIP_CHMOD', 0777);
2651
+    }
2652
+
2653
+    if (!defined('_DEFAULT_CHARSET')) {
2654
+        /** Le charset par défaut lors de l'installation */
2655
+        define('_DEFAULT_CHARSET', 'utf-8');
2656
+    }
2657
+    if (!defined('_ROOT_PLUGINS')) {
2658
+        define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/');
2659
+    }
2660
+    if (!defined('_ROOT_PLUGINS_DIST')) {
2661
+        define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/');
2662
+    }
2663
+    if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2664
+        define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2665
+    }
2666
+
2667
+    // La taille des Log
2668
+    if (!defined('_MAX_LOG')) {
2669
+        define('_MAX_LOG', 100);
2670
+    }
2671
+
2672
+    // Sommes-nous dans l'empire du Mal ?
2673
+    // (ou sous le signe du Pingouin, ascendant GNU ?)
2674
+    if (isset($_SERVER['SERVER_SOFTWARE']) and strpos($_SERVER['SERVER_SOFTWARE'], '(Win') !== false) {
2675
+        if (!defined('_OS_SERVEUR')) {
2676
+            define('_OS_SERVEUR', 'windows');
2677
+        }
2678
+        if (!defined('_SPIP_LOCK_MODE')) {
2679
+            define('_SPIP_LOCK_MODE', 1);
2680
+        } // utiliser le flock php
2681
+    } else {
2682
+        if (!defined('_OS_SERVEUR')) {
2683
+            define('_OS_SERVEUR', '');
2684
+        }
2685
+        if (!defined('_SPIP_LOCK_MODE')) {
2686
+            define('_SPIP_LOCK_MODE', 1);
2687
+        } // utiliser le flock php
2688
+        #if (!defined('_SPIP_LOCK_MODE')) define('_SPIP_LOCK_MODE',2); // utiliser le nfslock de spip mais link() est tres souvent interdite
2689
+    }
2690
+
2691
+    // Langue par defaut
2692
+    if (!defined('_LANGUE_PAR_DEFAUT')) {
2693
+        define('_LANGUE_PAR_DEFAUT', 'fr');
2694
+    }
2695
+
2696
+    //
2697
+    // Module de lecture/ecriture/suppression de fichiers utilisant flock()
2698
+    // (non surchargeable en l'etat ; attention si on utilise include_spip()
2699
+    // pour le rendre surchargeable, on va provoquer un reecriture
2700
+    // systematique du noyau ou une baisse de perfs => a etudier)
2701
+    include_once _ROOT_RESTREINT . 'inc/flock.php';
2702
+
2703
+    // charger tout de suite le path et son cache
2704
+    load_path_cache();
2705
+
2706
+    // *********** traiter les variables ************
2707
+
2708
+    //
2709
+    // Securite
2710
+    //
2711
+
2712
+    // Ne pas se faire manger par un bug php qui accepte ?GLOBALS[truc]=toto
2713
+    if (isset($_REQUEST['GLOBALS'])) {
2714
+        die();
2715
+    }
2716
+    // nettoyer les magic quotes \' et les caracteres nuls %00
2717
+    spip_desinfecte($_GET);
2718
+    spip_desinfecte($_POST);
2719
+    spip_desinfecte($_COOKIE);
2720
+    spip_desinfecte($_REQUEST);
2721
+
2722
+    // appliquer le cookie_prefix
2723
+    if ($GLOBALS['cookie_prefix'] != 'spip') {
2724
+        include_spip('inc/cookie');
2725
+        recuperer_cookies_spip($GLOBALS['cookie_prefix']);
2726
+    }
2727
+
2728
+    // Compatibilite avec serveurs ne fournissant pas $REQUEST_URI
2729
+    if (isset($_SERVER['REQUEST_URI'])) {
2730
+        $GLOBALS['REQUEST_URI'] = $_SERVER['REQUEST_URI'];
2731
+    } else {
2732
+        $GLOBALS['REQUEST_URI'] = (php_sapi_name() !== 'cli') ? $_SERVER['PHP_SELF'] : '';
2733
+        if (
2734
+            !empty($_SERVER['QUERY_STRING'])
2735
+            and !strpos($_SERVER['REQUEST_URI'], '?')
2736
+        ) {
2737
+            $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2738
+        }
2739
+    }
2740
+
2741
+    // Duree de validite de l'alea pour les cookies et ce qui s'ensuit.
2742
+    if (!defined('_RENOUVELLE_ALEA')) {
2743
+        define('_RENOUVELLE_ALEA', 12 * 3600);
2744
+    }
2745
+    if (!defined('_DUREE_COOKIE_ADMIN')) {
2746
+        define('_DUREE_COOKIE_ADMIN', 14 * 24 * 3600);
2747
+    }
2748
+
2749
+    // charger les meta si possible et renouveller l'alea au besoin
2750
+    // charge aussi effacer_meta et ecrire_meta
2751
+    $inc_meta = charger_fonction('meta', 'inc');
2752
+    $inc_meta();
2753
+
2754
+    // nombre de repertoires depuis la racine
2755
+    // on compare a l'adresse de spip.php : $_SERVER["SCRIPT_NAME"]
2756
+    // ou a defaut celle donnee en meta ; (mais si celle-ci est fausse
2757
+    // le calcul est faux)
2758
+    if (!_DIR_RESTREINT) {
2759
+        $GLOBALS['profondeur_url'] = 1;
2760
+    } else {
2761
+        $uri = isset($_SERVER['REQUEST_URI']) ? explode('?', $_SERVER['REQUEST_URI']) : '';
2762
+        $uri_ref = $_SERVER['SCRIPT_NAME'];
2763
+        if (
2764
+            !$uri_ref
2765
+            // si on est appele avec un autre ti, on est sans doute en mutu
2766
+            // si jamais c'est de la mutu avec sous rep, on est perdu si on se fie
2767
+            // a spip.php qui est a la racine du spip, et vue qu'on sait pas se reperer
2768
+            // s'en remettre a l'adresse du site. alea jacta est.
2769
+            or $ti !== _NOM_TEMPORAIRES_INACCESSIBLES
2770
+        ) {
2771
+            if (isset($GLOBALS['meta']['adresse_site'])) {
2772
+                $uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2773
+                $uri_ref = ($uri_ref['path'] ?? '') . '/';
2774
+            } else {
2775
+                $uri_ref = '';
2776
+            }
2777
+        }
2778
+        if (!$uri or !$uri_ref) {
2779
+            $GLOBALS['profondeur_url'] = 0;
2780
+        } else {
2781
+            $GLOBALS['profondeur_url'] = max(
2782
+                0,
2783
+                substr_count($uri[0], '/')
2784
+                - substr_count($uri_ref, '/')
2785
+            );
2786
+        }
2787
+    }
2788
+    // s'il y a un cookie ou PHP_AUTH, initialiser visiteur_session
2789
+    if (_FILE_CONNECT) {
2790
+        if (
2791
+            verifier_visiteur() == '0minirezo'
2792
+            // si c'est un admin sans cookie admin, il faut ignorer le cache chemin !
2793
+            and !isset($_COOKIE['spip_admin'])
2794
+        ) {
2795
+            clear_path_cache();
2796
+        }
2797
+    }
2799 2798
 }
2800 2799
 
2801 2800
 /**
@@ -2804,157 +2803,157 @@  discard block
 block discarded – undo
2804 2803
  *
2805 2804
  */
2806 2805
 function spip_initialisation_suite() {
2807
-	static $too_late = 0;
2808
-	if ($too_late++) {
2809
-		return;
2810
-	}
2811
-
2812
-	// taille mini des login
2813
-	if (!defined('_LOGIN_TROP_COURT')) {
2814
-		define('_LOGIN_TROP_COURT', 4);
2815
-	}
2816
-
2817
-	// la taille maxi des logos (0 : pas de limite) (pas de define par defaut, ce n'est pas utile)
2818
-	#if (!defined('_LOGO_MAX_SIZE')) define('_LOGO_MAX_SIZE', 0); # poids en ko
2819
-	#if (!defined('_LOGO_MAX_WIDTH')) define('_LOGO_MAX_WIDTH', 0); # largeur en pixels
2820
-	#if (!defined('_LOGO_MAX_HEIGHT')) define('_LOGO_MAX_HEIGHT', 0); # hauteur en pixels
2821
-
2822
-	// la taille maxi des images (0 : pas de limite) (pas de define par defaut, ce n'est pas utile)
2823
-	#if (!defined('_DOC_MAX_SIZE')) define('_DOC_MAX_SIZE', 0); # poids en ko
2824
-	#if (!defined('_IMG_MAX_SIZE')) define('_IMG_MAX_SIZE', 0); # poids en ko
2825
-	#if (!defined('_IMG_MAX_WIDTH')) define('_IMG_MAX_WIDTH', 0); # largeur en pixels
2826
-	#if (!defined('_IMG_MAX_HEIGHT')) define('_IMG_MAX_HEIGHT', 0); # hauteur en pixels
2827
-
2828
-	if (!defined('_PASS_LONGUEUR_MINI')) {
2829
-		define('_PASS_LONGUEUR_MINI', 6);
2830
-	}
2831
-
2832
-	// largeur maximale des images dans l'administration
2833
-	if (!defined('_IMG_ADMIN_MAX_WIDTH')) {
2834
-		define('_IMG_ADMIN_MAX_WIDTH', 768);
2835
-	}
2836
-
2837
-	// Qualite des images calculees automatiquement. C'est un nombre entre 0 et 100, meme pour imagick (on ramene a 0..1 par la suite)
2838
-	if (!defined('_IMG_QUALITE')) {
2839
-		define('_IMG_QUALITE', 85);
2840
-	} # valeur par defaut
2841
-	if (!defined('_IMG_GD_QUALITE')) {
2842
-		define('_IMG_GD_QUALITE', _IMG_QUALITE);
2843
-	} # surcharge pour la lib GD
2844
-	if (!defined('_IMG_CONVERT_QUALITE')) {
2845
-		define('_IMG_CONVERT_QUALITE', _IMG_QUALITE);
2846
-	} # surcharge pour imagick en ligne de commande
2847
-	// Historiquement la valeur pour imagick semble differente. Si ca n'est pas necessaire, il serait preferable de garder _IMG_QUALITE
2848
-	if (!defined('_IMG_IMAGICK_QUALITE')) {
2849
-		define('_IMG_IMAGICK_QUALITE', 75);
2850
-	} # surcharge pour imagick en PHP
2851
-
2852
-	if (!defined('_COPIE_LOCALE_MAX_SIZE')) {
2853
-		define('_COPIE_LOCALE_MAX_SIZE', 33_554_432);
2854
-	} // poids en octet
2855
-
2856
-	// qq chaines standard
2857
-	if (!defined('_ACCESS_FILE_NAME')) {
2858
-		define('_ACCESS_FILE_NAME', '.htaccess');
2859
-	}
2860
-	if (!defined('_AUTH_USER_FILE')) {
2861
-		define('_AUTH_USER_FILE', '.htpasswd');
2862
-	}
2863
-	if (!defined('_SPIP_DUMP')) {
2864
-		define('_SPIP_DUMP', 'dump@nom_site@@[email protected]');
2865
-	}
2866
-	if (!defined('_CACHE_RUBRIQUES')) {
2867
-		/** Fichier cache pour le navigateur de rubrique du bandeau */
2868
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2869
-	}
2870
-	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2871
-		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
2872
-		define('_CACHE_RUBRIQUES_MAX', 500);
2873
-	}
2874
-
2875
-	if (!defined('_CACHE_CONTEXTES_AJAX_SUR_LONGUEUR')) {
2876
-		/**
2877
-		 * Basculer les contextes ajax en fichier si la longueur d’url est trop grande
2878
-		 * @var int Nombre de caractères */
2879
-		define('_CACHE_CONTEXTES_AJAX_SUR_LONGUEUR', 2000);
2880
-	}
2881
-
2882
-	if (!defined('_EXTENSION_SQUELETTES')) {
2883
-		define('_EXTENSION_SQUELETTES', 'html');
2884
-	}
2885
-
2886
-	if (!defined('_DOCTYPE_ECRIRE')) {
2887
-		/** Définit le doctype de l’espace privé */
2888
-		define('_DOCTYPE_ECRIRE', "<!DOCTYPE html>\n");
2889
-	}
2890
-	if (!defined('_DOCTYPE_AIDE')) {
2891
-		/** Définit le doctype de l’aide en ligne */
2892
-		define(
2893
-			'_DOCTYPE_AIDE',
2894
-			"<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Frameset//EN' 'http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd'>"
2895
-		);
2896
-	}
2897
-
2898
-	if (!defined('_SPIP_SCRIPT')) {
2899
-		/** L'adresse de base du site ; on peut mettre '' si la racine est gerée par
2900
-		 * le script de l'espace public, alias index.php */
2901
-		define('_SPIP_SCRIPT', 'spip.php');
2902
-	}
2903
-	if (!defined('_SPIP_PAGE')) {
2904
-		/** Argument page, personalisable en cas de conflit avec un autre script */
2905
-		define('_SPIP_PAGE', 'page');
2906
-	}
2907
-
2908
-	// le script de l'espace prive
2909
-	// Mettre a "index.php" si DirectoryIndex ne le fait pas ou pb connexes:
2910
-	// les anciens IIS n'acceptent pas les POST sur ecrire/ (#419)
2911
-	// meme pb sur thttpd cf. https://forum.spip.net/fr_184153.html
2912
-	if (!defined('_SPIP_ECRIRE_SCRIPT')) {
2913
-		if (!empty($_SERVER['SERVER_SOFTWARE']) and preg_match(',IIS|thttpd,', $_SERVER['SERVER_SOFTWARE'])) {
2914
-			define('_SPIP_ECRIRE_SCRIPT', 'index.php');
2915
-		} else {
2916
-			define('_SPIP_ECRIRE_SCRIPT', '');
2917
-		}
2918
-	}
2919
-
2920
-
2921
-	if (!defined('_SPIP_AJAX')) {
2922
-		define('_SPIP_AJAX', ((!isset($_COOKIE['spip_accepte_ajax']))
2923
-			? 1
2924
-			: (($_COOKIE['spip_accepte_ajax'] != -1) ? 1 : 0)));
2925
-	}
2926
-
2927
-	// La requete est-elle en ajax ?
2928
-	if (!defined('_AJAX')) {
2929
-		define(
2930
-			'_AJAX',
2931
-			(isset($_SERVER['HTTP_X_REQUESTED_WITH']) # ajax jQuery
2932
-				or !empty($_REQUEST['var_ajax_redir']) # redirection 302 apres ajax jQuery
2933
-				or !empty($_REQUEST['var_ajaxcharset']) # compat ascendante pour plugins
2934
-				or !empty($_REQUEST['var_ajax']) # forms ajax & inclure ajax de spip
2935
-			)
2936
-			and empty($_REQUEST['var_noajax']) # horrible exception, car c'est pas parce que la requete est ajax jquery qu'il faut tuer tous les formulaires ajax qu'elle contient
2937
-		);
2938
-	}
2939
-
2940
-	# nombre de pixels maxi pour calcul de la vignette avec gd
2941
-	# au dela de 5500000 on considere que php n'est pas limite en memoire pour cette operation
2942
-	# les configurations limitees en memoire ont un seuil plutot vers 1MPixel
2943
-	if (!defined('_IMG_GD_MAX_PIXELS')) {
2944
-		define(
2945
-			'_IMG_GD_MAX_PIXELS',
2946
-			(isset($GLOBALS['meta']['max_taille_vignettes']) and $GLOBALS['meta']['max_taille_vignettes'])
2947
-			? $GLOBALS['meta']['max_taille_vignettes']
2948
-			: 0
2949
-		);
2950
-	}
2951
-
2952
-	// Protocoles a normaliser dans les chaines de langues
2953
-	if (!defined('_PROTOCOLES_STD')) {
2954
-		define('_PROTOCOLES_STD', 'http|https|ftp|mailto|webcal');
2955
-	}
2956
-
2957
-	init_var_mode();
2806
+    static $too_late = 0;
2807
+    if ($too_late++) {
2808
+        return;
2809
+    }
2810
+
2811
+    // taille mini des login
2812
+    if (!defined('_LOGIN_TROP_COURT')) {
2813
+        define('_LOGIN_TROP_COURT', 4);
2814
+    }
2815
+
2816
+    // la taille maxi des logos (0 : pas de limite) (pas de define par defaut, ce n'est pas utile)
2817
+    #if (!defined('_LOGO_MAX_SIZE')) define('_LOGO_MAX_SIZE', 0); # poids en ko
2818
+    #if (!defined('_LOGO_MAX_WIDTH')) define('_LOGO_MAX_WIDTH', 0); # largeur en pixels
2819
+    #if (!defined('_LOGO_MAX_HEIGHT')) define('_LOGO_MAX_HEIGHT', 0); # hauteur en pixels
2820
+
2821
+    // la taille maxi des images (0 : pas de limite) (pas de define par defaut, ce n'est pas utile)
2822
+    #if (!defined('_DOC_MAX_SIZE')) define('_DOC_MAX_SIZE', 0); # poids en ko
2823
+    #if (!defined('_IMG_MAX_SIZE')) define('_IMG_MAX_SIZE', 0); # poids en ko
2824
+    #if (!defined('_IMG_MAX_WIDTH')) define('_IMG_MAX_WIDTH', 0); # largeur en pixels
2825
+    #if (!defined('_IMG_MAX_HEIGHT')) define('_IMG_MAX_HEIGHT', 0); # hauteur en pixels
2826
+
2827
+    if (!defined('_PASS_LONGUEUR_MINI')) {
2828
+        define('_PASS_LONGUEUR_MINI', 6);
2829
+    }
2830
+
2831
+    // largeur maximale des images dans l'administration
2832
+    if (!defined('_IMG_ADMIN_MAX_WIDTH')) {
2833
+        define('_IMG_ADMIN_MAX_WIDTH', 768);
2834
+    }
2835
+
2836
+    // Qualite des images calculees automatiquement. C'est un nombre entre 0 et 100, meme pour imagick (on ramene a 0..1 par la suite)
2837
+    if (!defined('_IMG_QUALITE')) {
2838
+        define('_IMG_QUALITE', 85);
2839
+    } # valeur par defaut
2840
+    if (!defined('_IMG_GD_QUALITE')) {
2841
+        define('_IMG_GD_QUALITE', _IMG_QUALITE);
2842
+    } # surcharge pour la lib GD
2843
+    if (!defined('_IMG_CONVERT_QUALITE')) {
2844
+        define('_IMG_CONVERT_QUALITE', _IMG_QUALITE);
2845
+    } # surcharge pour imagick en ligne de commande
2846
+    // Historiquement la valeur pour imagick semble differente. Si ca n'est pas necessaire, il serait preferable de garder _IMG_QUALITE
2847
+    if (!defined('_IMG_IMAGICK_QUALITE')) {
2848
+        define('_IMG_IMAGICK_QUALITE', 75);
2849
+    } # surcharge pour imagick en PHP
2850
+
2851
+    if (!defined('_COPIE_LOCALE_MAX_SIZE')) {
2852
+        define('_COPIE_LOCALE_MAX_SIZE', 33_554_432);
2853
+    } // poids en octet
2854
+
2855
+    // qq chaines standard
2856
+    if (!defined('_ACCESS_FILE_NAME')) {
2857
+        define('_ACCESS_FILE_NAME', '.htaccess');
2858
+    }
2859
+    if (!defined('_AUTH_USER_FILE')) {
2860
+        define('_AUTH_USER_FILE', '.htpasswd');
2861
+    }
2862
+    if (!defined('_SPIP_DUMP')) {
2863
+        define('_SPIP_DUMP', 'dump@nom_site@@[email protected]');
2864
+    }
2865
+    if (!defined('_CACHE_RUBRIQUES')) {
2866
+        /** Fichier cache pour le navigateur de rubrique du bandeau */
2867
+        define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2868
+    }
2869
+    if (!defined('_CACHE_RUBRIQUES_MAX')) {
2870
+        /** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
2871
+        define('_CACHE_RUBRIQUES_MAX', 500);
2872
+    }
2873
+
2874
+    if (!defined('_CACHE_CONTEXTES_AJAX_SUR_LONGUEUR')) {
2875
+        /**
2876
+         * Basculer les contextes ajax en fichier si la longueur d’url est trop grande
2877
+         * @var int Nombre de caractères */
2878
+        define('_CACHE_CONTEXTES_AJAX_SUR_LONGUEUR', 2000);
2879
+    }
2880
+
2881
+    if (!defined('_EXTENSION_SQUELETTES')) {
2882
+        define('_EXTENSION_SQUELETTES', 'html');
2883
+    }
2884
+
2885
+    if (!defined('_DOCTYPE_ECRIRE')) {
2886
+        /** Définit le doctype de l’espace privé */
2887
+        define('_DOCTYPE_ECRIRE', "<!DOCTYPE html>\n");
2888
+    }
2889
+    if (!defined('_DOCTYPE_AIDE')) {
2890
+        /** Définit le doctype de l’aide en ligne */
2891
+        define(
2892
+            '_DOCTYPE_AIDE',
2893
+            "<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Frameset//EN' 'http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd'>"
2894
+        );
2895
+    }
2896
+
2897
+    if (!defined('_SPIP_SCRIPT')) {
2898
+        /** L'adresse de base du site ; on peut mettre '' si la racine est gerée par
2899
+         * le script de l'espace public, alias index.php */
2900
+        define('_SPIP_SCRIPT', 'spip.php');
2901
+    }
2902
+    if (!defined('_SPIP_PAGE')) {
2903
+        /** Argument page, personalisable en cas de conflit avec un autre script */
2904
+        define('_SPIP_PAGE', 'page');
2905
+    }
2906
+
2907
+    // le script de l'espace prive
2908
+    // Mettre a "index.php" si DirectoryIndex ne le fait pas ou pb connexes:
2909
+    // les anciens IIS n'acceptent pas les POST sur ecrire/ (#419)
2910
+    // meme pb sur thttpd cf. https://forum.spip.net/fr_184153.html
2911
+    if (!defined('_SPIP_ECRIRE_SCRIPT')) {
2912
+        if (!empty($_SERVER['SERVER_SOFTWARE']) and preg_match(',IIS|thttpd,', $_SERVER['SERVER_SOFTWARE'])) {
2913
+            define('_SPIP_ECRIRE_SCRIPT', 'index.php');
2914
+        } else {
2915
+            define('_SPIP_ECRIRE_SCRIPT', '');
2916
+        }
2917
+    }
2918
+
2919
+
2920
+    if (!defined('_SPIP_AJAX')) {
2921
+        define('_SPIP_AJAX', ((!isset($_COOKIE['spip_accepte_ajax']))
2922
+            ? 1
2923
+            : (($_COOKIE['spip_accepte_ajax'] != -1) ? 1 : 0)));
2924
+    }
2925
+
2926
+    // La requete est-elle en ajax ?
2927
+    if (!defined('_AJAX')) {
2928
+        define(
2929
+            '_AJAX',
2930
+            (isset($_SERVER['HTTP_X_REQUESTED_WITH']) # ajax jQuery
2931
+                or !empty($_REQUEST['var_ajax_redir']) # redirection 302 apres ajax jQuery
2932
+                or !empty($_REQUEST['var_ajaxcharset']) # compat ascendante pour plugins
2933
+                or !empty($_REQUEST['var_ajax']) # forms ajax & inclure ajax de spip
2934
+            )
2935
+            and empty($_REQUEST['var_noajax']) # horrible exception, car c'est pas parce que la requete est ajax jquery qu'il faut tuer tous les formulaires ajax qu'elle contient
2936
+        );
2937
+    }
2938
+
2939
+    # nombre de pixels maxi pour calcul de la vignette avec gd
2940
+    # au dela de 5500000 on considere que php n'est pas limite en memoire pour cette operation
2941
+    # les configurations limitees en memoire ont un seuil plutot vers 1MPixel
2942
+    if (!defined('_IMG_GD_MAX_PIXELS')) {
2943
+        define(
2944
+            '_IMG_GD_MAX_PIXELS',
2945
+            (isset($GLOBALS['meta']['max_taille_vignettes']) and $GLOBALS['meta']['max_taille_vignettes'])
2946
+            ? $GLOBALS['meta']['max_taille_vignettes']
2947
+            : 0
2948
+        );
2949
+    }
2950
+
2951
+    // Protocoles a normaliser dans les chaines de langues
2952
+    if (!defined('_PROTOCOLES_STD')) {
2953
+        define('_PROTOCOLES_STD', 'http|https|ftp|mailto|webcal');
2954
+    }
2955
+
2956
+    init_var_mode();
2958 2957
 }
2959 2958
 
2960 2959
 /**
@@ -2988,136 +2987,136 @@  discard block
 block discarded – undo
2988 2987
  * `   var_mode` (calcul ou recalcul).
2989 2988
  */
2990 2989
 function init_var_mode() {
2991
-	static $done = false;
2992
-	if (!$done) {
2993
-		if (isset($_GET['var_mode'])) {
2994
-			$var_mode = explode(',', $_GET['var_mode']);
2995
-			// tout le monde peut calcul/recalcul
2996
-			if (!defined('_VAR_MODE')) {
2997
-				if (in_array('recalcul', $var_mode)) {
2998
-					define('_VAR_MODE', 'recalcul');
2999
-				} elseif (in_array('calcul', $var_mode)) {
3000
-					define('_VAR_MODE', 'calcul');
3001
-				}
3002
-			}
3003
-			$var_mode = array_diff($var_mode, ['calcul', 'recalcul']);
3004
-			if ($var_mode) {
3005
-				include_spip('inc/autoriser');
3006
-				// autoriser preview si preview seulement, et sinon autoriser debug
3007
-				if (
3008
-					autoriser(
3009
-						($_GET['var_mode'] == 'preview')
3010
-						? 'previsualiser'
3011
-						: 'debug'
3012
-					)
3013
-				) {
3014
-					if (in_array('traduction', $var_mode)) {
3015
-						// forcer le calcul pour passer dans traduire
3016
-						if (!defined('_VAR_MODE')) {
3017
-							define('_VAR_MODE', 'calcul');
3018
-						}
3019
-						// et ne pas enregistrer de cache pour ne pas trainer les surlignages sur d'autres pages
3020
-						if (!defined('_VAR_NOCACHE')) {
3021
-							define('_VAR_NOCACHE', true);
3022
-						}
3023
-						$var_mode = array_diff($var_mode, ['traduction']);
3024
-					}
3025
-					if (in_array('preview', $var_mode)) {
3026
-						// basculer sur les criteres de preview dans les boucles
3027
-						if (!defined('_VAR_PREVIEW')) {
3028
-							define('_VAR_PREVIEW', true);
3029
-						}
3030
-						// forcer le calcul
3031
-						if (!defined('_VAR_MODE')) {
3032
-							define('_VAR_MODE', 'calcul');
3033
-						}
3034
-						// et ne pas enregistrer de cache
3035
-						if (!defined('_VAR_NOCACHE')) {
3036
-							define('_VAR_NOCACHE', true);
3037
-						}
3038
-						$var_mode = array_diff($var_mode, ['preview']);
3039
-					}
3040
-					if (in_array('inclure', $var_mode)) {
3041
-						// forcer le compilo et ignorer les caches existants
3042
-						if (!defined('_VAR_MODE')) {
3043
-							define('_VAR_MODE', 'calcul');
3044
-						}
3045
-						if (!defined('_VAR_INCLURE')) {
3046
-							define('_VAR_INCLURE', true);
3047
-						}
3048
-						// et ne pas enregistrer de cache
3049
-						if (!defined('_VAR_NOCACHE')) {
3050
-							define('_VAR_NOCACHE', true);
3051
-						}
3052
-						$var_mode = array_diff($var_mode, ['inclure']);
3053
-					}
3054
-					if (in_array('urls', $var_mode)) {
3055
-						// forcer le compilo et ignorer les caches existants
3056
-						if (!defined('_VAR_MODE')) {
3057
-							define('_VAR_MODE', 'calcul');
3058
-						}
3059
-						if (!defined('_VAR_URLS')) {
3060
-							define('_VAR_URLS', true);
3061
-						}
3062
-						$var_mode = array_diff($var_mode, ['urls']);
3063
-					}
3064
-					if (in_array('images', $var_mode)) {
3065
-						// forcer le compilo et ignorer les caches existants
3066
-						if (!defined('_VAR_MODE')) {
3067
-							define('_VAR_MODE', 'calcul');
3068
-						}
3069
-						// indiquer qu'on doit recalculer les images
3070
-						if (!defined('_VAR_IMAGES')) {
3071
-							define('_VAR_IMAGES', true);
3072
-						}
3073
-						$var_mode = array_diff($var_mode, ['images']);
3074
-					}
3075
-					if (in_array('debug', $var_mode)) {
3076
-						if (!defined('_VAR_MODE')) {
3077
-							define('_VAR_MODE', 'debug');
3078
-						}
3079
-						// et ne pas enregistrer de cache
3080
-						if (!defined('_VAR_NOCACHE')) {
3081
-							define('_VAR_NOCACHE', true);
3082
-						}
3083
-						$var_mode = array_diff($var_mode, ['debug']);
3084
-					}
3085
-					if (count($var_mode) and !defined('_VAR_MODE')) {
3086
-						define('_VAR_MODE', reset($var_mode));
3087
-					}
3088
-					if (isset($GLOBALS['visiteur_session']['nom'])) {
3089
-						spip_log($GLOBALS['visiteur_session']['nom']
3090
-							. ' ' . _VAR_MODE);
3091
-					}
3092
-				} // pas autorise ?
3093
-				else {
3094
-					// si on n'est pas connecte on se redirige, si on est pas en cli et pas deja en train de se loger
3095
-					if (
3096
-						!$GLOBALS['visiteur_session']
3097
-						and !empty($_SERVER['HTTP_HOST'])
3098
-						and !empty($_SERVER['REQUEST_METHOD'])
3099
-						and $_SERVER['REQUEST_METHOD'] === 'GET'
3100
-					) {
3101
-						$self = self('&', true);
3102
-						if (strpos($self, 'page=login') === false) {
3103
-							include_spip('inc/headers');
3104
-							$redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&');
3105
-							redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true));
3106
-						}
3107
-					}
3108
-					// sinon tant pis
3109
-				}
3110
-			}
3111
-		}
3112
-		if (!defined('_VAR_MODE')) {
3113
-			/**
3114
-			 * Indique le mode de calcul ou d'affichage de la page.
3115
-			 * @see init_var_mode()
3116
-			 */
3117
-			define('_VAR_MODE', false);
3118
-		}
3119
-		$done = true;
3120
-	}
2990
+    static $done = false;
2991
+    if (!$done) {
2992
+        if (isset($_GET['var_mode'])) {
2993
+            $var_mode = explode(',', $_GET['var_mode']);
2994
+            // tout le monde peut calcul/recalcul
2995
+            if (!defined('_VAR_MODE')) {
2996
+                if (in_array('recalcul', $var_mode)) {
2997
+                    define('_VAR_MODE', 'recalcul');
2998
+                } elseif (in_array('calcul', $var_mode)) {
2999
+                    define('_VAR_MODE', 'calcul');
3000
+                }
3001
+            }
3002
+            $var_mode = array_diff($var_mode, ['calcul', 'recalcul']);
3003
+            if ($var_mode) {
3004
+                include_spip('inc/autoriser');
3005
+                // autoriser preview si preview seulement, et sinon autoriser debug
3006
+                if (
3007
+                    autoriser(
3008
+                        ($_GET['var_mode'] == 'preview')
3009
+                        ? 'previsualiser'
3010
+                        : 'debug'
3011
+                    )
3012
+                ) {
3013
+                    if (in_array('traduction', $var_mode)) {
3014
+                        // forcer le calcul pour passer dans traduire
3015
+                        if (!defined('_VAR_MODE')) {
3016
+                            define('_VAR_MODE', 'calcul');
3017
+                        }
3018
+                        // et ne pas enregistrer de cache pour ne pas trainer les surlignages sur d'autres pages
3019
+                        if (!defined('_VAR_NOCACHE')) {
3020
+                            define('_VAR_NOCACHE', true);
3021
+                        }
3022
+                        $var_mode = array_diff($var_mode, ['traduction']);
3023
+                    }
3024
+                    if (in_array('preview', $var_mode)) {
3025
+                        // basculer sur les criteres de preview dans les boucles
3026
+                        if (!defined('_VAR_PREVIEW')) {
3027
+                            define('_VAR_PREVIEW', true);
3028
+                        }
3029
+                        // forcer le calcul
3030
+                        if (!defined('_VAR_MODE')) {
3031
+                            define('_VAR_MODE', 'calcul');
3032
+                        }
3033
+                        // et ne pas enregistrer de cache
3034
+                        if (!defined('_VAR_NOCACHE')) {
3035
+                            define('_VAR_NOCACHE', true);
3036
+                        }
3037
+                        $var_mode = array_diff($var_mode, ['preview']);
3038
+                    }
3039
+                    if (in_array('inclure', $var_mode)) {
3040
+                        // forcer le compilo et ignorer les caches existants
3041
+                        if (!defined('_VAR_MODE')) {
3042
+                            define('_VAR_MODE', 'calcul');
3043
+                        }
3044
+                        if (!defined('_VAR_INCLURE')) {
3045
+                            define('_VAR_INCLURE', true);
3046
+                        }
3047
+                        // et ne pas enregistrer de cache
3048
+                        if (!defined('_VAR_NOCACHE')) {
3049
+                            define('_VAR_NOCACHE', true);
3050
+                        }
3051
+                        $var_mode = array_diff($var_mode, ['inclure']);
3052
+                    }
3053
+                    if (in_array('urls', $var_mode)) {
3054
+                        // forcer le compilo et ignorer les caches existants
3055
+                        if (!defined('_VAR_MODE')) {
3056
+                            define('_VAR_MODE', 'calcul');
3057
+                        }
3058
+                        if (!defined('_VAR_URLS')) {
3059
+                            define('_VAR_URLS', true);
3060
+                        }
3061
+                        $var_mode = array_diff($var_mode, ['urls']);
3062
+                    }
3063
+                    if (in_array('images', $var_mode)) {
3064
+                        // forcer le compilo et ignorer les caches existants
3065
+                        if (!defined('_VAR_MODE')) {
3066
+                            define('_VAR_MODE', 'calcul');
3067
+                        }
3068
+                        // indiquer qu'on doit recalculer les images
3069
+                        if (!defined('_VAR_IMAGES')) {
3070
+                            define('_VAR_IMAGES', true);
3071
+                        }
3072
+                        $var_mode = array_diff($var_mode, ['images']);
3073
+                    }
3074
+                    if (in_array('debug', $var_mode)) {
3075
+                        if (!defined('_VAR_MODE')) {
3076
+                            define('_VAR_MODE', 'debug');
3077
+                        }
3078
+                        // et ne pas enregistrer de cache
3079
+                        if (!defined('_VAR_NOCACHE')) {
3080
+                            define('_VAR_NOCACHE', true);
3081
+                        }
3082
+                        $var_mode = array_diff($var_mode, ['debug']);
3083
+                    }
3084
+                    if (count($var_mode) and !defined('_VAR_MODE')) {
3085
+                        define('_VAR_MODE', reset($var_mode));
3086
+                    }
3087
+                    if (isset($GLOBALS['visiteur_session']['nom'])) {
3088
+                        spip_log($GLOBALS['visiteur_session']['nom']
3089
+                            . ' ' . _VAR_MODE);
3090
+                    }
3091
+                } // pas autorise ?
3092
+                else {
3093
+                    // si on n'est pas connecte on se redirige, si on est pas en cli et pas deja en train de se loger
3094
+                    if (
3095
+                        !$GLOBALS['visiteur_session']
3096
+                        and !empty($_SERVER['HTTP_HOST'])
3097
+                        and !empty($_SERVER['REQUEST_METHOD'])
3098
+                        and $_SERVER['REQUEST_METHOD'] === 'GET'
3099
+                    ) {
3100
+                        $self = self('&', true);
3101
+                        if (strpos($self, 'page=login') === false) {
3102
+                            include_spip('inc/headers');
3103
+                            $redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&');
3104
+                            redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true));
3105
+                        }
3106
+                    }
3107
+                    // sinon tant pis
3108
+                }
3109
+            }
3110
+        }
3111
+        if (!defined('_VAR_MODE')) {
3112
+            /**
3113
+             * Indique le mode de calcul ou d'affichage de la page.
3114
+             * @see init_var_mode()
3115
+             */
3116
+            define('_VAR_MODE', false);
3117
+        }
3118
+        $done = true;
3119
+    }
3121 3120
 }
3122 3121
 
3123 3122
 /**
@@ -3129,16 +3128,16 @@  discard block
 block discarded – undo
3129 3128
  * @param bool $deep = true : appliquer récursivement
3130 3129
 **/
3131 3130
 function spip_desinfecte(&$t, $deep = true) {
3132
-	foreach ($t as $key => $val) {
3133
-		if (is_string($t[$key])) {
3134
-			$t[$key] = str_replace(chr(0), '-', $t[$key]);
3135
-		} // traiter aussi les "texte_plus" de article_edit
3136
-		else {
3137
-			if ($deep and is_array($t[$key]) and $key !== 'GLOBALS') {
3138
-				spip_desinfecte($t[$key], $deep);
3139
-			}
3140
-		}
3141
-	}
3131
+    foreach ($t as $key => $val) {
3132
+        if (is_string($t[$key])) {
3133
+            $t[$key] = str_replace(chr(0), '-', $t[$key]);
3134
+        } // traiter aussi les "texte_plus" de article_edit
3135
+        else {
3136
+            if ($deep and is_array($t[$key]) and $key !== 'GLOBALS') {
3137
+                spip_desinfecte($t[$key], $deep);
3138
+            }
3139
+        }
3140
+    }
3142 3141
 }
3143 3142
 
3144 3143
 /**
@@ -3151,64 +3150,64 @@  discard block
 block discarded – undo
3151 3150
  * @return string|0|false
3152 3151
 **/
3153 3152
 function verifier_visiteur() {
3154
-	@spip_initialisation_core(
3155
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3156
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3157
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3158
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3159
-	);
3160
-
3161
-	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
3162
-	// dans un formulaire sans login (ex: #FORMULAIRE_FORUM)
3163
-	// Attention on separe bien session_nom et nom, pour eviter
3164
-	// les melanges entre donnees SQL et variables plus aleatoires
3165
-	$variables_session = ['session_nom', 'session_email'];
3166
-	foreach ($variables_session as $var) {
3167
-		if (_request($var) !== null) {
3168
-			$init = true;
3169
-			break;
3170
-		}
3171
-	}
3172
-	if (isset($init)) {
3173
-		#@spip_initialisation_suite();
3174
-		$session = charger_fonction('session', 'inc');
3175
-		$session();
3176
-		include_spip('inc/texte');
3177
-		foreach ($variables_session as $var) {
3178
-			if (($a = _request($var)) !== null) {
3179
-				$GLOBALS['visiteur_session'][$var] = safehtml($a);
3180
-			}
3181
-		}
3182
-		if (!isset($GLOBALS['visiteur_session']['id_auteur'])) {
3183
-			$GLOBALS['visiteur_session']['id_auteur'] = 0;
3184
-		}
3185
-		$session($GLOBALS['visiteur_session']);
3186
-
3187
-		return 0;
3188
-	}
3189
-
3190
-	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3191
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3192
-		$session = charger_fonction('session', 'inc');
3193
-		if ($session()) {
3194
-			return $GLOBALS['visiteur_session']['statut'];
3195
-		}
3196
-		if ($h and isset($_SERVER['PHP_AUTH_PW'])) {
3197
-			include_spip('inc/auth');
3198
-			$h = lire_php_auth($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
3199
-		}
3200
-		if ($h) {
3201
-			$GLOBALS['visiteur_session'] = $h;
3202
-
3203
-			return $GLOBALS['visiteur_session']['statut'];
3204
-		}
3205
-	}
3206
-
3207
-	// au moins son navigateur nous dit la langue preferee de cet inconnu
3208
-	include_spip('inc/lang');
3209
-	utiliser_langue_visiteur();
3210
-
3211
-	return false;
3153
+    @spip_initialisation_core(
3154
+        (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3155
+        (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3156
+        (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3157
+        (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3158
+    );
3159
+
3160
+    // Demarrer une session NON AUTHENTIFIEE si on donne son nom
3161
+    // dans un formulaire sans login (ex: #FORMULAIRE_FORUM)
3162
+    // Attention on separe bien session_nom et nom, pour eviter
3163
+    // les melanges entre donnees SQL et variables plus aleatoires
3164
+    $variables_session = ['session_nom', 'session_email'];
3165
+    foreach ($variables_session as $var) {
3166
+        if (_request($var) !== null) {
3167
+            $init = true;
3168
+            break;
3169
+        }
3170
+    }
3171
+    if (isset($init)) {
3172
+        #@spip_initialisation_suite();
3173
+        $session = charger_fonction('session', 'inc');
3174
+        $session();
3175
+        include_spip('inc/texte');
3176
+        foreach ($variables_session as $var) {
3177
+            if (($a = _request($var)) !== null) {
3178
+                $GLOBALS['visiteur_session'][$var] = safehtml($a);
3179
+            }
3180
+        }
3181
+        if (!isset($GLOBALS['visiteur_session']['id_auteur'])) {
3182
+            $GLOBALS['visiteur_session']['id_auteur'] = 0;
3183
+        }
3184
+        $session($GLOBALS['visiteur_session']);
3185
+
3186
+        return 0;
3187
+    }
3188
+
3189
+    $h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3190
+    if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3191
+        $session = charger_fonction('session', 'inc');
3192
+        if ($session()) {
3193
+            return $GLOBALS['visiteur_session']['statut'];
3194
+        }
3195
+        if ($h and isset($_SERVER['PHP_AUTH_PW'])) {
3196
+            include_spip('inc/auth');
3197
+            $h = lire_php_auth($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
3198
+        }
3199
+        if ($h) {
3200
+            $GLOBALS['visiteur_session'] = $h;
3201
+
3202
+            return $GLOBALS['visiteur_session']['statut'];
3203
+        }
3204
+    }
3205
+
3206
+    // au moins son navigateur nous dit la langue preferee de cet inconnu
3207
+    include_spip('inc/lang');
3208
+    utiliser_langue_visiteur();
3209
+
3210
+    return false;
3212 3211
 }
3213 3212
 
3214 3213
 
@@ -3231,21 +3230,21 @@  discard block
 block discarded – undo
3231 3230
  *     - string Langue utilisée.
3232 3231
  **/
3233 3232
 function lang_select($lang = null) {
3234
-	static $pile_langues = [];
3235
-	if (!function_exists('changer_langue')) {
3236
-		include_spip('inc/lang');
3237
-	}
3238
-	if ($lang === null) {
3239
-		$lang = array_pop($pile_langues);
3240
-	} else {
3241
-		array_push($pile_langues, $GLOBALS['spip_lang']);
3242
-	}
3243
-	if (isset($GLOBALS['spip_lang']) and $lang == $GLOBALS['spip_lang']) {
3244
-		return $lang;
3245
-	}
3246
-	changer_langue($lang);
3233
+    static $pile_langues = [];
3234
+    if (!function_exists('changer_langue')) {
3235
+        include_spip('inc/lang');
3236
+    }
3237
+    if ($lang === null) {
3238
+        $lang = array_pop($pile_langues);
3239
+    } else {
3240
+        array_push($pile_langues, $GLOBALS['spip_lang']);
3241
+    }
3242
+    if (isset($GLOBALS['spip_lang']) and $lang == $GLOBALS['spip_lang']) {
3243
+        return $lang;
3244
+    }
3245
+    changer_langue($lang);
3247 3246
 
3248
-	return $lang;
3247
+    return $lang;
3249 3248
 }
3250 3249
 
3251 3250
 /**
@@ -3262,20 +3261,20 @@  discard block
 block discarded – undo
3262 3261
  *     Identifiant de la session
3263 3262
  **/
3264 3263
 function spip_session($force = false) {
3265
-	static $session;
3266
-	if ($force or !isset($session)) {
3267
-		$s = pipeline(
3268
-			'definir_session',
3269
-			$GLOBALS['visiteur_session']
3270
-				? serialize($GLOBALS['visiteur_session'])
3271
-				. '_' . @$_COOKIE['spip_session']
3272
-				: ''
3273
-		);
3274
-		$session = $s ? substr(md5($s), 0, 8) : '';
3275
-	}
3264
+    static $session;
3265
+    if ($force or !isset($session)) {
3266
+        $s = pipeline(
3267
+            'definir_session',
3268
+            $GLOBALS['visiteur_session']
3269
+                ? serialize($GLOBALS['visiteur_session'])
3270
+                . '_' . @$_COOKIE['spip_session']
3271
+                : ''
3272
+        );
3273
+        $session = $s ? substr(md5($s), 0, 8) : '';
3274
+    }
3276 3275
 
3277
-	#spip_log('session: '.$session);
3278
-	return $session;
3276
+    #spip_log('session: '.$session);
3277
+    return $session;
3279 3278
 }
3280 3279
 
3281 3280
 
@@ -3294,9 +3293,9 @@  discard block
 block discarded – undo
3294 3293
  *    Lien sur une icone d'aide
3295 3294
  **/
3296 3295
 function aider($aide = '', $distante = false) {
3297
-	$aider = charger_fonction('aide', 'inc', true);
3296
+    $aider = charger_fonction('aide', 'inc', true);
3298 3297
 
3299
-	return $aider ? $aider($aide, '', [], $distante) : '';
3298
+    return $aider ? $aider($aide, '', [], $distante) : '';
3300 3299
 }
3301 3300
 
3302 3301
 /**
@@ -3306,35 +3305,35 @@  discard block
 block discarded – undo
3306 3305
  */
3307 3306
 function exec_info_dist() {
3308 3307
 
3309
-	include_spip('inc/autoriser');
3310
-	if (autoriser('phpinfos')) {
3311
-		$cookies_masques = ['spip_session', 'PHPSESSID'];
3312
-		$cookies_backup = [];
3313
-		$server_backup = ['HTTP_COOKIE' => $_SERVER['HTTP_COOKIE'] ?? []];
3314
-		$env_backup = ['HTTP_COOKIE' => $_ENV['HTTP_COOKIE'] ?? []];
3315
-		$mask = '******************************';
3316
-		foreach ($cookies_masques as $k) {
3317
-			if (!empty($_COOKIE[$k])) {
3318
-				$cookies_backup[$k] = $_COOKIE[$k];
3319
-				$_SERVER['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
3320
-				$_ENV['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
3321
-				$_COOKIE[$k] = $mask;
3322
-			}
3323
-		}
3324
-		phpinfo();
3325
-		foreach ($cookies_backup as $k => $v) {
3326
-			$_COOKIE[$k] = $v;
3327
-		}
3328
-		foreach ($server_backup as $k => $v) {
3329
-			$_SERVER[$k] = $v;
3330
-		}
3331
-		foreach ($env_backup as $k => $v) {
3332
-			$_ENV[$k] = $v;
3333
-		}
3334
-	} else {
3335
-		include_spip('inc/filtres');
3336
-		sinon_interdire_acces();
3337
-	}
3308
+    include_spip('inc/autoriser');
3309
+    if (autoriser('phpinfos')) {
3310
+        $cookies_masques = ['spip_session', 'PHPSESSID'];
3311
+        $cookies_backup = [];
3312
+        $server_backup = ['HTTP_COOKIE' => $_SERVER['HTTP_COOKIE'] ?? []];
3313
+        $env_backup = ['HTTP_COOKIE' => $_ENV['HTTP_COOKIE'] ?? []];
3314
+        $mask = '******************************';
3315
+        foreach ($cookies_masques as $k) {
3316
+            if (!empty($_COOKIE[$k])) {
3317
+                $cookies_backup[$k] = $_COOKIE[$k];
3318
+                $_SERVER['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
3319
+                $_ENV['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
3320
+                $_COOKIE[$k] = $mask;
3321
+            }
3322
+        }
3323
+        phpinfo();
3324
+        foreach ($cookies_backup as $k => $v) {
3325
+            $_COOKIE[$k] = $v;
3326
+        }
3327
+        foreach ($server_backup as $k => $v) {
3328
+            $_SERVER[$k] = $v;
3329
+        }
3330
+        foreach ($env_backup as $k => $v) {
3331
+            $_ENV[$k] = $v;
3332
+        }
3333
+    } else {
3334
+        include_spip('inc/filtres');
3335
+        sinon_interdire_acces();
3336
+    }
3338 3337
 }
3339 3338
 
3340 3339
 /**
@@ -3354,13 +3353,13 @@  discard block
 block discarded – undo
3354 3353
  *     - string si $message à false.
3355 3354
  **/
3356 3355
 function erreur_squelette($message = '', $lieu = '') {
3357
-	$debusquer = charger_fonction('debusquer', 'public');
3358
-	if (is_array($lieu)) {
3359
-		include_spip('public/compiler');
3360
-		$lieu = reconstruire_contexte_compil($lieu);
3361
-	}
3356
+    $debusquer = charger_fonction('debusquer', 'public');
3357
+    if (is_array($lieu)) {
3358
+        include_spip('public/compiler');
3359
+        $lieu = reconstruire_contexte_compil($lieu);
3360
+    }
3362 3361
 
3363
-	return $debusquer($message, $lieu);
3362
+    return $debusquer($message, $lieu);
3364 3363
 }
3365 3364
 
3366 3365
 /**
@@ -3397,108 +3396,108 @@  discard block
 block discarded – undo
3397 3396
  *     - ou tableau d'information sur le squelette.
3398 3397
  */
3399 3398
 function recuperer_fond($fond, $contexte = [], $options = [], string $connect = '') {
3400
-	if (!function_exists('evaluer_fond')) {
3401
-		include_spip('public/assembler');
3402
-	}
3403
-	// assurer la compat avec l'ancienne syntaxe
3404
-	// (trim etait le 3eme argument, par defaut a true)
3405
-	if (!is_array($options)) {
3406
-		$options = ['trim' => $options];
3407
-	}
3408
-	if (!isset($options['trim'])) {
3409
-		$options['trim'] = true;
3410
-	}
3411
-
3412
-	if (isset($contexte['connect'])) {
3413
-		$connect = $contexte['connect'];
3414
-		unset($contexte['connect']);
3415
-	}
3416
-
3417
-	$texte = '';
3418
-	$pages = [];
3419
-	$lang_select = '';
3420
-	if (!isset($options['etoile']) or !$options['etoile']) {
3421
-		// Si on a inclus sans fixer le critere de lang, on prend la langue courante
3422
-		if (!isset($contexte['lang'])) {
3423
-			$contexte['lang'] = $GLOBALS['spip_lang'];
3424
-		}
3425
-
3426
-		if ($contexte['lang'] != $GLOBALS['meta']['langue_site']) {
3427
-			$lang_select = lang_select($contexte['lang']);
3428
-		}
3429
-	}
3430
-
3431
-	if (!isset($GLOBALS['_INC_PUBLIC'])) {
3432
-		$GLOBALS['_INC_PUBLIC'] = 0;
3433
-	}
3434
-
3435
-	$GLOBALS['_INC_PUBLIC']++;
3436
-
3437
-	// fix #4235
3438
-	$cache_utilise_session_appelant	= ($GLOBALS['cache_utilise_session'] ?? null);
3439
-
3440
-
3441
-	foreach (is_array($fond) ? $fond : [$fond] as $f) {
3442
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3443
-
3444
-		$page = evaluer_fond($f, $contexte, $connect);
3445
-		if ($page === '') {
3446
-			$c = $options['compil'] ?? '';
3447
-			$a = ['fichier' => $f];
3448
-			$erreur = _T('info_erreur_squelette2', $a); // squelette introuvable
3449
-			erreur_squelette($erreur, $c);
3450
-			// eviter des erreurs strictes ensuite sur $page['cle'] en PHP >= 5.4
3451
-			$page = ['texte' => '', 'erreur' => $erreur];
3452
-		}
3453
-
3454
-		$page = pipeline('recuperer_fond', [
3455
-			'args' => ['fond' => $f, 'contexte' => $contexte, 'options' => $options, 'connect' => $connect],
3456
-			'data' => $page
3457
-		]);
3458
-		if (isset($options['ajax']) and $options['ajax']) {
3459
-			if (!function_exists('encoder_contexte_ajax')) {
3460
-				include_spip('inc/filtres');
3461
-			}
3462
-			$page['texte'] = encoder_contexte_ajax(
3463
-				array_merge(
3464
-					$contexte,
3465
-					['fond' => $f],
3466
-					($connect ? ['connect' => $connect] : [])
3467
-				),
3468
-				'',
3469
-				$page['texte'],
3470
-				$options['ajax']
3471
-			);
3472
-		}
3473
-
3474
-		if (isset($options['raw']) and $options['raw']) {
3475
-			$pages[] = $page;
3476
-		} else {
3477
-			$texte .= $options['trim'] ? rtrim($page['texte'] ?? '') : $page['texte'];
3478
-		}
3479
-
3480
-		// contamination de la session appelante, pour les inclusions statiques
3481
-		if (isset($page['invalideurs']['session'])) {
3482
-			$cache_utilise_session_appelant = $page['invalideurs']['session'];
3483
-		}
3484
-	}
3485
-
3486
-	// restaurer le sessionnement du contexte appelant,
3487
-	// éventuellement contaminé si on vient de récupérer une inclusion statique sessionnée
3488
-	if (isset($cache_utilise_session_appelant)) {
3489
-		$GLOBALS['cache_utilise_session'] = $cache_utilise_session_appelant;
3490
-	}
3491
-
3492
-	$GLOBALS['_INC_PUBLIC']--;
3493
-
3494
-	if ($lang_select) {
3495
-		lang_select();
3496
-	}
3497
-	if (isset($options['raw']) and $options['raw']) {
3498
-		return is_array($fond) ? $pages : reset($pages);
3499
-	} else {
3500
-		return $options['trim'] ? ltrim($texte) : $texte;
3501
-	}
3399
+    if (!function_exists('evaluer_fond')) {
3400
+        include_spip('public/assembler');
3401
+    }
3402
+    // assurer la compat avec l'ancienne syntaxe
3403
+    // (trim etait le 3eme argument, par defaut a true)
3404
+    if (!is_array($options)) {
3405
+        $options = ['trim' => $options];
3406
+    }
3407
+    if (!isset($options['trim'])) {
3408
+        $options['trim'] = true;
3409
+    }
3410
+
3411
+    if (isset($contexte['connect'])) {
3412
+        $connect = $contexte['connect'];
3413
+        unset($contexte['connect']);
3414
+    }
3415
+
3416
+    $texte = '';
3417
+    $pages = [];
3418
+    $lang_select = '';
3419
+    if (!isset($options['etoile']) or !$options['etoile']) {
3420
+        // Si on a inclus sans fixer le critere de lang, on prend la langue courante
3421
+        if (!isset($contexte['lang'])) {
3422
+            $contexte['lang'] = $GLOBALS['spip_lang'];
3423
+        }
3424
+
3425
+        if ($contexte['lang'] != $GLOBALS['meta']['langue_site']) {
3426
+            $lang_select = lang_select($contexte['lang']);
3427
+        }
3428
+    }
3429
+
3430
+    if (!isset($GLOBALS['_INC_PUBLIC'])) {
3431
+        $GLOBALS['_INC_PUBLIC'] = 0;
3432
+    }
3433
+
3434
+    $GLOBALS['_INC_PUBLIC']++;
3435
+
3436
+    // fix #4235
3437
+    $cache_utilise_session_appelant	= ($GLOBALS['cache_utilise_session'] ?? null);
3438
+
3439
+
3440
+    foreach (is_array($fond) ? $fond : [$fond] as $f) {
3441
+        unset($GLOBALS['cache_utilise_session']);	// fix #4235
3442
+
3443
+        $page = evaluer_fond($f, $contexte, $connect);
3444
+        if ($page === '') {
3445
+            $c = $options['compil'] ?? '';
3446
+            $a = ['fichier' => $f];
3447
+            $erreur = _T('info_erreur_squelette2', $a); // squelette introuvable
3448
+            erreur_squelette($erreur, $c);
3449
+            // eviter des erreurs strictes ensuite sur $page['cle'] en PHP >= 5.4
3450
+            $page = ['texte' => '', 'erreur' => $erreur];
3451
+        }
3452
+
3453
+        $page = pipeline('recuperer_fond', [
3454
+            'args' => ['fond' => $f, 'contexte' => $contexte, 'options' => $options, 'connect' => $connect],
3455
+            'data' => $page
3456
+        ]);
3457
+        if (isset($options['ajax']) and $options['ajax']) {
3458
+            if (!function_exists('encoder_contexte_ajax')) {
3459
+                include_spip('inc/filtres');
3460
+            }
3461
+            $page['texte'] = encoder_contexte_ajax(
3462
+                array_merge(
3463
+                    $contexte,
3464
+                    ['fond' => $f],
3465
+                    ($connect ? ['connect' => $connect] : [])
3466
+                ),
3467
+                '',
3468
+                $page['texte'],
3469
+                $options['ajax']
3470
+            );
3471
+        }
3472
+
3473
+        if (isset($options['raw']) and $options['raw']) {
3474
+            $pages[] = $page;
3475
+        } else {
3476
+            $texte .= $options['trim'] ? rtrim($page['texte'] ?? '') : $page['texte'];
3477
+        }
3478
+
3479
+        // contamination de la session appelante, pour les inclusions statiques
3480
+        if (isset($page['invalideurs']['session'])) {
3481
+            $cache_utilise_session_appelant = $page['invalideurs']['session'];
3482
+        }
3483
+    }
3484
+
3485
+    // restaurer le sessionnement du contexte appelant,
3486
+    // éventuellement contaminé si on vient de récupérer une inclusion statique sessionnée
3487
+    if (isset($cache_utilise_session_appelant)) {
3488
+        $GLOBALS['cache_utilise_session'] = $cache_utilise_session_appelant;
3489
+    }
3490
+
3491
+    $GLOBALS['_INC_PUBLIC']--;
3492
+
3493
+    if ($lang_select) {
3494
+        lang_select();
3495
+    }
3496
+    if (isset($options['raw']) and $options['raw']) {
3497
+        return is_array($fond) ? $pages : reset($pages);
3498
+    } else {
3499
+        return $options['trim'] ? ltrim($texte) : $texte;
3500
+    }
3502 3501
 }
3503 3502
 
3504 3503
 /**
@@ -3508,7 +3507,7 @@  discard block
 block discarded – undo
3508 3507
  * @return string
3509 3508
  */
3510 3509
 function trouve_modele($nom) {
3511
-	return trouver_fond($nom, 'modeles/');
3510
+    return trouver_fond($nom, 'modeles/');
3512 3511
 }
3513 3512
 
3514 3513
 /**
@@ -3524,21 +3523,21 @@  discard block
 block discarded – undo
3524 3523
  * @return array|string
3525 3524
  */
3526 3525
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3527
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3528
-	if (!$pathinfo) {
3529
-		return $f;
3530
-	}
3531
-	// renvoyer un tableau detaille si $pathinfo==true
3532
-	$p = pathinfo($f);
3533
-	if (!isset($p['extension']) or !$p['extension']) {
3534
-		$p['extension'] = _EXTENSION_SQUELETTES;
3535
-	}
3536
-	if (!isset($p['extension']) or !$p['filename']) {
3537
-		$p['filename'] = ($p['basename'] ? substr($p['basename'], 0, -strlen($p['extension']) - 1) : '');
3538
-	}
3539
-	$p['fond'] = ($f ? substr($f, 0, -strlen($p['extension']) - 1) : '');
3526
+    $f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3527
+    if (!$pathinfo) {
3528
+        return $f;
3529
+    }
3530
+    // renvoyer un tableau detaille si $pathinfo==true
3531
+    $p = pathinfo($f);
3532
+    if (!isset($p['extension']) or !$p['extension']) {
3533
+        $p['extension'] = _EXTENSION_SQUELETTES;
3534
+    }
3535
+    if (!isset($p['extension']) or !$p['filename']) {
3536
+        $p['filename'] = ($p['basename'] ? substr($p['basename'], 0, -strlen($p['extension']) - 1) : '');
3537
+    }
3538
+    $p['fond'] = ($f ? substr($f, 0, -strlen($p['extension']) - 1) : '');
3540 3539
 
3541
-	return $p;
3540
+    return $p;
3542 3541
 }
3543 3542
 
3544 3543
 /**
@@ -3558,21 +3557,21 @@  discard block
 block discarded – undo
3558 3557
  *     Nom de l'exec, sinon chaîne vide.
3559 3558
  **/
3560 3559
 function tester_url_ecrire($nom) {
3561
-	static $exec = [];
3562
-	if (isset($exec[$nom])) {
3563
-		return $exec[$nom];
3564
-	}
3565
-	// tester si c'est une page en squelette
3566
-	if (trouver_fond($nom, 'prive/squelettes/contenu/')) {
3567
-		return $exec[$nom] = 'fond';
3568
-	} // echafaudage d'un fond !
3569
-	elseif (include_spip('public/styliser_par_z') and z_echafaudable($nom)) {
3570
-		return $exec[$nom] = 'fond';
3571
-	}
3572
-	// attention, il ne faut pas inclure l'exec ici
3573
-	// car sinon #URL_ECRIRE provoque des inclusions
3574
-	// et des define intrusifs potentiels
3575
-	return $exec[$nom] = ((find_in_path("{$nom}.php", 'exec/') or charger_fonction($nom, 'exec', true)) ? $nom : '');
3560
+    static $exec = [];
3561
+    if (isset($exec[$nom])) {
3562
+        return $exec[$nom];
3563
+    }
3564
+    // tester si c'est une page en squelette
3565
+    if (trouver_fond($nom, 'prive/squelettes/contenu/')) {
3566
+        return $exec[$nom] = 'fond';
3567
+    } // echafaudage d'un fond !
3568
+    elseif (include_spip('public/styliser_par_z') and z_echafaudable($nom)) {
3569
+        return $exec[$nom] = 'fond';
3570
+    }
3571
+    // attention, il ne faut pas inclure l'exec ici
3572
+    // car sinon #URL_ECRIRE provoque des inclusions
3573
+    // et des define intrusifs potentiels
3574
+    return $exec[$nom] = ((find_in_path("{$nom}.php", 'exec/') or charger_fonction($nom, 'exec', true)) ? $nom : '');
3576 3575
 }
3577 3576
 
3578 3577
 /**
@@ -3582,8 +3581,8 @@  discard block
 block discarded – undo
3582 3581
  *     true si la constante _VERSION_HTML n'est pas définie ou égale à html5
3583 3582
  **/
3584 3583
 function html5_permis() {
3585
-	return (!defined('_VERSION_HTML')
3586
-		or _VERSION_HTML !== 'html4');
3584
+    return (!defined('_VERSION_HTML')
3585
+        or _VERSION_HTML !== 'html4');
3587 3586
 }
3588 3587
 
3589 3588
 /**
@@ -3593,30 +3592,30 @@  discard block
 block discarded – undo
3593 3592
  * @return array
3594 3593
  */
3595 3594
 function formats_image_acceptables($gd = null, $svg_allowed = true) {
3596
-	$formats = null;
3597
-	if (!is_null($gd)) {
3598
-		$config = ($gd ? 'gd_formats' : 'formats_graphiques');
3599
-		if (isset($GLOBALS['meta'][$config])) {
3600
-			$formats = $GLOBALS['meta'][$config];
3601
-			$formats = explode(',', $formats);
3602
-			$formats = array_filter($formats);
3603
-			$formats = array_map('trim', $formats);
3604
-		}
3605
-	}
3606
-	if (is_null($formats)) {
3607
-		include_spip('inc/filtres_images_lib_mini');
3608
-		$formats = _image_extensions_acceptees_en_entree();
3609
-	}
3610
-
3611
-	if ($svg_allowed) {
3612
-		if (!in_array('svg', $formats)) {
3613
-			$formats[] = 'svg';
3614
-		}
3615
-	}
3616
-	else {
3617
-		$formats = array_diff($formats, ['svg']);
3618
-	}
3619
-	return $formats;
3595
+    $formats = null;
3596
+    if (!is_null($gd)) {
3597
+        $config = ($gd ? 'gd_formats' : 'formats_graphiques');
3598
+        if (isset($GLOBALS['meta'][$config])) {
3599
+            $formats = $GLOBALS['meta'][$config];
3600
+            $formats = explode(',', $formats);
3601
+            $formats = array_filter($formats);
3602
+            $formats = array_map('trim', $formats);
3603
+        }
3604
+    }
3605
+    if (is_null($formats)) {
3606
+        include_spip('inc/filtres_images_lib_mini');
3607
+        $formats = _image_extensions_acceptees_en_entree();
3608
+    }
3609
+
3610
+    if ($svg_allowed) {
3611
+        if (!in_array('svg', $formats)) {
3612
+            $formats[] = 'svg';
3613
+        }
3614
+    }
3615
+    else {
3616
+        $formats = array_diff($formats, ['svg']);
3617
+    }
3618
+    return $formats;
3620 3619
 }
3621 3620
 
3622 3621
 /**
@@ -3625,20 +3624,20 @@  discard block
 block discarded – undo
3625 3624
  * @return array|bool
3626 3625
  */
3627 3626
 function spip_getimagesize($fichier) {
3628
-	if (!$imagesize = @getimagesize($fichier)) {
3629
-		include_spip('inc/svg');
3630
-		if ($attrs = svg_lire_attributs($fichier)) {
3631
-			[$width, $height, $viewbox] = svg_getimagesize_from_attr($attrs);
3632
-			$imagesize = [
3633
-				$width,
3634
-				$height,
3635
-				IMAGETYPE_SVG,
3636
-				"width=\"{$width}\" height=\"{$height}\"",
3637
-				'mime' => 'image/svg+xml'
3638
-			];
3639
-		}
3640
-	}
3641
-	return $imagesize;
3627
+    if (!$imagesize = @getimagesize($fichier)) {
3628
+        include_spip('inc/svg');
3629
+        if ($attrs = svg_lire_attributs($fichier)) {
3630
+            [$width, $height, $viewbox] = svg_getimagesize_from_attr($attrs);
3631
+            $imagesize = [
3632
+                $width,
3633
+                $height,
3634
+                IMAGETYPE_SVG,
3635
+                "width=\"{$width}\" height=\"{$height}\"",
3636
+                'mime' => 'image/svg+xml'
3637
+            ];
3638
+        }
3639
+    }
3640
+    return $imagesize;
3642 3641
 }
3643 3642
 
3644 3643
 /**
@@ -3652,19 +3651,19 @@  discard block
 block discarded – undo
3652 3651
  * @param string $statut
3653 3652
  */
3654 3653
 function avertir_auteurs($nom, $message, $statut = '') {
3655
-	$alertes = $GLOBALS['meta']['message_alertes_auteurs'];
3656
-	if (
3657
-		!$alertes
3658
-		or !is_array($alertes = unserialize($alertes))
3659
-	) {
3660
-		$alertes = [];
3661
-	}
3654
+    $alertes = $GLOBALS['meta']['message_alertes_auteurs'];
3655
+    if (
3656
+        !$alertes
3657
+        or !is_array($alertes = unserialize($alertes))
3658
+    ) {
3659
+        $alertes = [];
3660
+    }
3662 3661
 
3663
-	if (!isset($alertes[$statut])) {
3664
-		$alertes[$statut] = [];
3665
-	}
3666
-	$alertes[$statut][$nom] = $message;
3667
-	ecrire_meta('message_alertes_auteurs', serialize($alertes));
3662
+    if (!isset($alertes[$statut])) {
3663
+        $alertes[$statut] = [];
3664
+    }
3665
+    $alertes[$statut][$nom] = $message;
3666
+    ecrire_meta('message_alertes_auteurs', serialize($alertes));
3668 3667
 }
3669 3668
 
3670 3669
 /**
@@ -3678,10 +3677,10 @@  discard block
 block discarded – undo
3678 3677
  * @return string|string[]
3679 3678
  */
3680 3679
 function spip_sanitize_classname($classes) {
3681
-	if (is_array($classes)) {
3682
-		return array_map('spip_sanitize_classname', $classes);
3683
-	}
3684
-	return preg_replace('/[^ 0-9a-z_\-+@]/i', '', $classes);
3680
+    if (is_array($classes)) {
3681
+        return array_map('spip_sanitize_classname', $classes);
3682
+    }
3683
+    return preg_replace('/[^ 0-9a-z_\-+@]/i', '', $classes);
3685 3684
 }
3686 3685
 
3687 3686
 
@@ -3706,32 +3705,32 @@  discard block
 block discarded – undo
3706 3705
  *    Avec operateur : bool.
3707 3706
  **/
3708 3707
 function spip_version_compare($v1, $v2, $op = null) {
3709
-	$v1 = strtolower(preg_replace(',([0-9])[\s.-]?(dev|alpha|a|beta|b|rc|pl|p),i', '\\1.\\2', $v1));
3710
-	$v2 = strtolower(preg_replace(',([0-9])[\s.-]?(dev|alpha|a|beta|b|rc|pl|p),i', '\\1.\\2', $v2));
3711
-	$v1 = str_replace('rc', 'RC', $v1); // certaines versions de PHP ne comprennent RC qu'en majuscule
3712
-	$v2 = str_replace('rc', 'RC', $v2); // certaines versions de PHP ne comprennent RC qu'en majuscule
3713
-
3714
-	$v1 = explode('.', $v1);
3715
-	$v2 = explode('.', $v2);
3716
-	// $v1 est toujours une version, donc sans etoile
3717
-	while (count($v1) < count($v2)) {
3718
-		$v1[] = '0';
3719
-	}
3720
-
3721
-	// $v2 peut etre une borne, donc accepte l'etoile
3722
-	$etoile = false;
3723
-	foreach ($v1 as $k => $v) {
3724
-		if (!isset($v2[$k])) {
3725
-			$v2[] = ($etoile and (is_numeric($v) or $v == 'pl' or $v == 'p')) ? $v : '0';
3726
-		} else {
3727
-			if ($v2[$k] == '*') {
3728
-				$etoile = true;
3729
-				$v2[$k] = $v;
3730
-			}
3731
-		}
3732
-	}
3733
-	$v1 = implode('.', $v1);
3734
-	$v2 = implode('.', $v2);
3735
-
3736
-	return $op ? version_compare($v1, $v2, $op) : version_compare($v1, $v2);
3708
+    $v1 = strtolower(preg_replace(',([0-9])[\s.-]?(dev|alpha|a|beta|b|rc|pl|p),i', '\\1.\\2', $v1));
3709
+    $v2 = strtolower(preg_replace(',([0-9])[\s.-]?(dev|alpha|a|beta|b|rc|pl|p),i', '\\1.\\2', $v2));
3710
+    $v1 = str_replace('rc', 'RC', $v1); // certaines versions de PHP ne comprennent RC qu'en majuscule
3711
+    $v2 = str_replace('rc', 'RC', $v2); // certaines versions de PHP ne comprennent RC qu'en majuscule
3712
+
3713
+    $v1 = explode('.', $v1);
3714
+    $v2 = explode('.', $v2);
3715
+    // $v1 est toujours une version, donc sans etoile
3716
+    while (count($v1) < count($v2)) {
3717
+        $v1[] = '0';
3718
+    }
3719
+
3720
+    // $v2 peut etre une borne, donc accepte l'etoile
3721
+    $etoile = false;
3722
+    foreach ($v1 as $k => $v) {
3723
+        if (!isset($v2[$k])) {
3724
+            $v2[] = ($etoile and (is_numeric($v) or $v == 'pl' or $v == 'p')) ? $v : '0';
3725
+        } else {
3726
+            if ($v2[$k] == '*') {
3727
+                $etoile = true;
3728
+                $v2[$k] = $v;
3729
+            }
3730
+        }
3731
+    }
3732
+    $v1 = implode('.', $v1);
3733
+    $v2 = implode('.', $v2);
3734
+
3735
+    return $op ? version_compare($v1, $v2, $op) : version_compare($v1, $v2);
3737 3736
 }
Please login to merge, or discard this patch.
ecrire/inc/texte.php 1 patch
Indentation   +228 added lines, -228 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 include_spip('inc/texte_mini');
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
  * @return array Tablea ('','')
35 35
  */
36 36
 function definir_raccourcis_alineas() {
37
-	return ['', ''];
37
+    return ['', ''];
38 38
 }
39 39
 
40 40
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
  * @return string
48 48
  */
49 49
 function traiter_tableau($bloc) {
50
-	return $bloc;
50
+    return $bloc;
51 51
 }
52 52
 
53 53
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  * @return string
62 62
  */
63 63
 function traiter_listes($texte) {
64
-	return $texte;
64
+    return $texte;
65 65
 }
66 66
 
67 67
 /**
@@ -77,16 +77,16 @@  discard block
 block discarded – undo
77 77
  */
78 78
 function traiter_raccourcis($letexte) {
79 79
 
80
-	// Appeler les fonctions de pre_traitement
81
-	$letexte = pipeline('pre_propre', $letexte);
80
+    // Appeler les fonctions de pre_traitement
81
+    $letexte = pipeline('pre_propre', $letexte);
82 82
 
83
-	// APPELER ICI UN PIPELINE traiter_raccourcis ?
84
-	// $letexte = pipeline('traiter_raccourcis', $letexte);
83
+    // APPELER ICI UN PIPELINE traiter_raccourcis ?
84
+    // $letexte = pipeline('traiter_raccourcis', $letexte);
85 85
 
86
-	// Appeler les fonctions de post-traitement
87
-	$letexte = pipeline('post_propre', $letexte);
86
+    // Appeler les fonctions de post-traitement
87
+    $letexte = pipeline('post_propre', $letexte);
88 88
 
89
-	return $letexte;
89
+    return $letexte;
90 90
 }
91 91
 
92 92
 /*************************************************************************************************************************
@@ -102,22 +102,22 @@  discard block
 block discarded – undo
102 102
  * @return string
103 103
  */
104 104
 function echappe_js($t, $class = ' class = "echappe-js"') {
105
-	foreach (['script', 'iframe'] as $tag) {
106
-		if (
107
-			stripos($t, (string) "<$tag") !== false
108
-			and preg_match_all(',<' . $tag . '.*?($|</' . $tag . '.),isS', $t, $r, PREG_SET_ORDER)
109
-		) {
110
-			foreach ($r as $regs) {
111
-				$t = str_replace(
112
-					$regs[0],
113
-					"<code$class>" . nl2br(spip_htmlspecialchars($regs[0])) . '</code>',
114
-					$t
115
-				);
116
-			}
117
-		}
118
-	}
119
-
120
-	return $t;
105
+    foreach (['script', 'iframe'] as $tag) {
106
+        if (
107
+            stripos($t, (string) "<$tag") !== false
108
+            and preg_match_all(',<' . $tag . '.*?($|</' . $tag . '.),isS', $t, $r, PREG_SET_ORDER)
109
+        ) {
110
+            foreach ($r as $regs) {
111
+                $t = str_replace(
112
+                    $regs[0],
113
+                    "<code$class>" . nl2br(spip_htmlspecialchars($regs[0])) . '</code>',
114
+                    $t
115
+                );
116
+            }
117
+        }
118
+    }
119
+
120
+    return $t;
121 121
 }
122 122
 
123 123
 
@@ -146,55 +146,55 @@  discard block
 block discarded – undo
146 146
  *     Code protégé
147 147
  **/
148 148
 function interdire_scripts($arg, $mode_filtre = null) {
149
-	// on memorise le resultat sur les arguments non triviaux
150
-	static $dejavu = [];
151
-
152
-	// Attention, si ce n'est pas une chaine, laisser intact
153
-	if (!$arg or !is_string($arg) or !strstr($arg, '<')) {
154
-		return $arg;
155
-	}
156
-
157
-	if (is_null($mode_filtre) or !in_array($mode_filtre, [-1, 0, 1])) {
158
-		$mode_filtre = $GLOBALS['filtrer_javascript'];
159
-	}
160
-
161
-	if (isset($dejavu[$mode_filtre][$arg])) {
162
-		return $dejavu[$mode_filtre][$arg];
163
-	}
164
-
165
-	// echapper les tags asp/php
166
-	$t = str_replace('<' . '%', '&lt;%', $arg);
167
-
168
-	// echapper le php
169
-	$t = str_replace('<' . '?', '&lt;?', $t);
170
-
171
-	// echapper le < script language=php >
172
-	$t = preg_replace(',<(script\b[^>]+\blanguage\b[^\w>]+php\b),UimsS', '&lt;\1', $t);
173
-
174
-	// Pour le js, trois modes : parano (-1), prive (0), ok (1)
175
-	switch ($mode_filtre) {
176
-		case 0:
177
-			if (!_DIR_RESTREINT) {
178
-				$t = echappe_js($t);
179
-			}
180
-			break;
181
-		case -1:
182
-			$t = echappe_js($t);
183
-			break;
184
-	}
185
-
186
-	// pas de <base href /> svp !
187
-	$t = preg_replace(',<(base\b),iS', '&lt;\1', $t);
188
-
189
-	// Reinserer les echappements des modeles
190
-	if (defined('_PROTEGE_JS_MODELES')) {
191
-		$t = echappe_retour($t, 'javascript' . _PROTEGE_JS_MODELES);
192
-	}
193
-	if (defined('_PROTEGE_PHP_MODELES')) {
194
-		$t = echappe_retour($t, 'php' . _PROTEGE_PHP_MODELES);
195
-	}
196
-
197
-	return $dejavu[$mode_filtre][$arg] = $t;
149
+    // on memorise le resultat sur les arguments non triviaux
150
+    static $dejavu = [];
151
+
152
+    // Attention, si ce n'est pas une chaine, laisser intact
153
+    if (!$arg or !is_string($arg) or !strstr($arg, '<')) {
154
+        return $arg;
155
+    }
156
+
157
+    if (is_null($mode_filtre) or !in_array($mode_filtre, [-1, 0, 1])) {
158
+        $mode_filtre = $GLOBALS['filtrer_javascript'];
159
+    }
160
+
161
+    if (isset($dejavu[$mode_filtre][$arg])) {
162
+        return $dejavu[$mode_filtre][$arg];
163
+    }
164
+
165
+    // echapper les tags asp/php
166
+    $t = str_replace('<' . '%', '&lt;%', $arg);
167
+
168
+    // echapper le php
169
+    $t = str_replace('<' . '?', '&lt;?', $t);
170
+
171
+    // echapper le < script language=php >
172
+    $t = preg_replace(',<(script\b[^>]+\blanguage\b[^\w>]+php\b),UimsS', '&lt;\1', $t);
173
+
174
+    // Pour le js, trois modes : parano (-1), prive (0), ok (1)
175
+    switch ($mode_filtre) {
176
+        case 0:
177
+            if (!_DIR_RESTREINT) {
178
+                $t = echappe_js($t);
179
+            }
180
+            break;
181
+        case -1:
182
+            $t = echappe_js($t);
183
+            break;
184
+    }
185
+
186
+    // pas de <base href /> svp !
187
+    $t = preg_replace(',<(base\b),iS', '&lt;\1', $t);
188
+
189
+    // Reinserer les echappements des modeles
190
+    if (defined('_PROTEGE_JS_MODELES')) {
191
+        $t = echappe_retour($t, 'javascript' . _PROTEGE_JS_MODELES);
192
+    }
193
+    if (defined('_PROTEGE_PHP_MODELES')) {
194
+        $t = echappe_retour($t, 'php' . _PROTEGE_PHP_MODELES);
195
+    }
196
+
197
+    return $dejavu[$mode_filtre][$arg] = $t;
198 198
 }
199 199
 
200 200
 
@@ -223,66 +223,66 @@  discard block
 block discarded – undo
223 223
  *     Texte transformé
224 224
  **/
225 225
 function typo($letexte, $echapper = true, $connect = null, $env = []) {
226
-	// Plus vite !
227
-	if (!$letexte) {
228
-		return $letexte;
229
-	}
230
-
231
-	// les appels directs a cette fonction depuis le php de l'espace
232
-	// prive etant historiquement ecrit sans argment $connect
233
-	// on utilise la presence de celui-ci pour distinguer les cas
234
-	// ou il faut passer interdire_script explicitement
235
-	// les appels dans les squelettes (de l'espace prive) fournissant un $connect
236
-	// ne seront pas perturbes
237
-	$interdire_script = false;
238
-	if (is_null($connect)) {
239
-		$connect = '';
240
-		$interdire_script = true;
241
-		$env['espace_prive'] = test_espace_prive();
242
-	}
243
-
244
-	// Echapper les codes <html> etc
245
-	if ($echapper) {
246
-		$letexte = echappe_html($letexte, 'TYPO');
247
-	}
248
-
249
-	//
250
-	// Installer les modeles, notamment images et documents ;
251
-	//
252
-	// NOTE : propre() ne passe pas par ici mais directement par corriger_typo
253
-	// cf. inc/lien
254
-
255
-	$letexte = traiter_modeles($mem = $letexte, false, $echapper ? 'TYPO' : '', $connect ?? '', null, $env);
256
-	if ($letexte != $mem) {
257
-		$echapper = true;
258
-	}
259
-	unset($mem);
260
-
261
-	$letexte = corriger_typo($letexte);
262
-	$letexte = echapper_faux_tags($letexte);
263
-
264
-	// reintegrer les echappements
265
-	if ($echapper) {
266
-		$letexte = echappe_retour($letexte, 'TYPO');
267
-	}
268
-
269
-	// Dans les appels directs hors squelette, securiser ici aussi
270
-	if ($interdire_script) {
271
-		$letexte = interdire_scripts($letexte);
272
-	}
273
-
274
-	// Dans l'espace prive on se mefie de tout contenu dangereux
275
-	// https://core.spip.net/issues/3371
276
-	// et aussi dans l'espace public si la globale filtrer_javascript = -1
277
-	// https://core.spip.net/issues/4166
278
-	if (
279
-		$GLOBALS['filtrer_javascript'] == -1
280
-		or (isset($env['espace_prive']) and $env['espace_prive'] and $GLOBALS['filtrer_javascript'] <= 0)
281
-	) {
282
-		$letexte = echapper_html_suspect($letexte, [], $connect, $env);
283
-	}
284
-
285
-	return $letexte;
226
+    // Plus vite !
227
+    if (!$letexte) {
228
+        return $letexte;
229
+    }
230
+
231
+    // les appels directs a cette fonction depuis le php de l'espace
232
+    // prive etant historiquement ecrit sans argment $connect
233
+    // on utilise la presence de celui-ci pour distinguer les cas
234
+    // ou il faut passer interdire_script explicitement
235
+    // les appels dans les squelettes (de l'espace prive) fournissant un $connect
236
+    // ne seront pas perturbes
237
+    $interdire_script = false;
238
+    if (is_null($connect)) {
239
+        $connect = '';
240
+        $interdire_script = true;
241
+        $env['espace_prive'] = test_espace_prive();
242
+    }
243
+
244
+    // Echapper les codes <html> etc
245
+    if ($echapper) {
246
+        $letexte = echappe_html($letexte, 'TYPO');
247
+    }
248
+
249
+    //
250
+    // Installer les modeles, notamment images et documents ;
251
+    //
252
+    // NOTE : propre() ne passe pas par ici mais directement par corriger_typo
253
+    // cf. inc/lien
254
+
255
+    $letexte = traiter_modeles($mem = $letexte, false, $echapper ? 'TYPO' : '', $connect ?? '', null, $env);
256
+    if ($letexte != $mem) {
257
+        $echapper = true;
258
+    }
259
+    unset($mem);
260
+
261
+    $letexte = corriger_typo($letexte);
262
+    $letexte = echapper_faux_tags($letexte);
263
+
264
+    // reintegrer les echappements
265
+    if ($echapper) {
266
+        $letexte = echappe_retour($letexte, 'TYPO');
267
+    }
268
+
269
+    // Dans les appels directs hors squelette, securiser ici aussi
270
+    if ($interdire_script) {
271
+        $letexte = interdire_scripts($letexte);
272
+    }
273
+
274
+    // Dans l'espace prive on se mefie de tout contenu dangereux
275
+    // https://core.spip.net/issues/3371
276
+    // et aussi dans l'espace public si la globale filtrer_javascript = -1
277
+    // https://core.spip.net/issues/4166
278
+    if (
279
+        $GLOBALS['filtrer_javascript'] == -1
280
+        or (isset($env['espace_prive']) and $env['espace_prive'] and $GLOBALS['filtrer_javascript'] <= 0)
281
+    ) {
282
+        $letexte = echapper_html_suspect($letexte, [], $connect, $env);
283
+    }
284
+
285
+    return $letexte;
286 286
 }
287 287
 
288 288
 // Correcteur typographique
@@ -307,57 +307,57 @@  discard block
 block discarded – undo
307 307
  */
308 308
 function corriger_typo($letexte, $lang = '') {
309 309
 
310
-	// Plus vite !
311
-	if (!$letexte) {
312
-		return $letexte;
313
-	}
314
-
315
-	$letexte = pipeline('pre_typo', $letexte);
316
-
317
-	// Caracteres de controle "illegaux"
318
-	$letexte = corriger_caracteres($letexte);
319
-
320
-	// Proteger les caracteres typographiques a l'interieur des tags html
321
-	if (preg_match_all(_TYPO_BALISE, $letexte, $regs, PREG_SET_ORDER)) {
322
-		foreach ($regs as $reg) {
323
-			$insert = $reg[0];
324
-			// hack: on transforme les caracteres a proteger en les remplacant
325
-			// par des caracteres "illegaux". (cf corriger_caracteres())
326
-			$insert = strtr($insert, _TYPO_PROTEGER, _TYPO_PROTECTEUR);
327
-			$letexte = str_replace($reg[0], $insert, $letexte);
328
-		}
329
-	}
330
-
331
-	// trouver les blocs idiomes et les traiter à part
332
-	$letexte = extraire_idiome($ei = $letexte, $lang, true);
333
-	$ei = ($ei !== $letexte);
334
-
335
-	// trouver les blocs multi et les traiter a part
336
-	$letexte = extraire_multi($em = $letexte, $lang, true);
337
-	$em = ($em !== $letexte);
338
-
339
-	// Charger & appliquer les fonctions de typographie
340
-	$typographie = charger_fonction(lang_typo($lang), 'typographie');
341
-	$letexte = $typographie($letexte);
342
-
343
-	// Les citations en une autre langue, s'il y a lieu
344
-	if ($em) {
345
-		$letexte = echappe_retour($letexte, 'multi');
346
-	}
347
-	if ($ei) {
348
-		$letexte = echappe_retour($letexte, 'idiome');
349
-	}
350
-
351
-	// Retablir les caracteres proteges
352
-	$letexte = strtr($letexte, _TYPO_PROTECTEUR, _TYPO_PROTEGER);
353
-
354
-	// pipeline
355
-	$letexte = pipeline('post_typo', $letexte);
356
-
357
-	# un message pour abs_url - on est passe en mode texte
358
-	$GLOBALS['mode_abs_url'] = 'texte';
359
-
360
-	return $letexte;
310
+    // Plus vite !
311
+    if (!$letexte) {
312
+        return $letexte;
313
+    }
314
+
315
+    $letexte = pipeline('pre_typo', $letexte);
316
+
317
+    // Caracteres de controle "illegaux"
318
+    $letexte = corriger_caracteres($letexte);
319
+
320
+    // Proteger les caracteres typographiques a l'interieur des tags html
321
+    if (preg_match_all(_TYPO_BALISE, $letexte, $regs, PREG_SET_ORDER)) {
322
+        foreach ($regs as $reg) {
323
+            $insert = $reg[0];
324
+            // hack: on transforme les caracteres a proteger en les remplacant
325
+            // par des caracteres "illegaux". (cf corriger_caracteres())
326
+            $insert = strtr($insert, _TYPO_PROTEGER, _TYPO_PROTECTEUR);
327
+            $letexte = str_replace($reg[0], $insert, $letexte);
328
+        }
329
+    }
330
+
331
+    // trouver les blocs idiomes et les traiter à part
332
+    $letexte = extraire_idiome($ei = $letexte, $lang, true);
333
+    $ei = ($ei !== $letexte);
334
+
335
+    // trouver les blocs multi et les traiter a part
336
+    $letexte = extraire_multi($em = $letexte, $lang, true);
337
+    $em = ($em !== $letexte);
338
+
339
+    // Charger & appliquer les fonctions de typographie
340
+    $typographie = charger_fonction(lang_typo($lang), 'typographie');
341
+    $letexte = $typographie($letexte);
342
+
343
+    // Les citations en une autre langue, s'il y a lieu
344
+    if ($em) {
345
+        $letexte = echappe_retour($letexte, 'multi');
346
+    }
347
+    if ($ei) {
348
+        $letexte = echappe_retour($letexte, 'idiome');
349
+    }
350
+
351
+    // Retablir les caracteres proteges
352
+    $letexte = strtr($letexte, _TYPO_PROTECTEUR, _TYPO_PROTEGER);
353
+
354
+    // pipeline
355
+    $letexte = pipeline('post_typo', $letexte);
356
+
357
+    # un message pour abs_url - on est passe en mode texte
358
+    $GLOBALS['mode_abs_url'] = 'texte';
359
+
360
+    return $letexte;
361 361
 }
362 362
 
363 363
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
  * @return string
374 374
  */
375 375
 function paragrapher($letexte, $forcer = true) {
376
-	return $letexte;
376
+    return $letexte;
377 377
 }
378 378
 
379 379
 /**
@@ -385,11 +385,11 @@  discard block
 block discarded – undo
385 385
  * @return string Texte
386 386
  **/
387 387
 function traiter_retours_chariots($letexte) {
388
-	$letexte = preg_replace(",\r\n?,S", "\n", $letexte);
389
-	$letexte = preg_replace(',<p[>[:space:]],iS', "\n\n\\0", $letexte);
390
-	$letexte = preg_replace(',</p[>[:space:]],iS', "\\0\n\n", $letexte);
388
+    $letexte = preg_replace(",\r\n?,S", "\n", $letexte);
389
+    $letexte = preg_replace(',<p[>[:space:]],iS', "\n\n\\0", $letexte);
390
+    $letexte = preg_replace(',</p[>[:space:]],iS', "\\0\n\n", $letexte);
391 391
 
392
-	return $letexte;
392
+    return $letexte;
393 393
 }
394 394
 
395 395
 
@@ -415,40 +415,40 @@  discard block
 block discarded – undo
415 415
  *     Texte transformé
416 416
  **/
417 417
 function propre($t, $connect = null, $env = []) {
418
-	// les appels directs a cette fonction depuis le php de l'espace
419
-	// prive etant historiquement ecrits sans argment $connect
420
-	// on utilise la presence de celui-ci pour distinguer les cas
421
-	// ou il faut passer interdire_script explicitement
422
-	// les appels dans les squelettes (de l'espace prive) fournissant un $connect
423
-	// ne seront pas perturbes
424
-	$interdire_script = false;
425
-	if (is_null($connect)) {
426
-		$connect = '';
427
-		$interdire_script = true;
428
-		$env['espace_prive'] = true;
429
-	}
430
-
431
-	if (!$t) {
432
-		return strval($t);
433
-	}
434
-
435
-	// Dans l'espace prive on se mefie de tout contenu dangereux
436
-	// avant echappement des balises <html>
437
-	// https://core.spip.net/issues/3371
438
-	// et aussi dans l'espace public si la globale filtrer_javascript = -1
439
-	// https://core.spip.net/issues/4166
440
-	if (
441
-		$interdire_script
442
-		or $GLOBALS['filtrer_javascript'] == -1
443
-		or (!empty($env['espace_prive']) and $GLOBALS['filtrer_javascript'] <= 0)
444
-		or (!empty($env['wysiwyg']) and $env['wysiwyg'] and $GLOBALS['filtrer_javascript'] <= 0)
445
-	) {
446
-		$t = echapper_html_suspect($t, ['strict' => false], $connect, $env);
447
-	}
448
-	$t = echappe_html($t);
449
-	$t = expanser_liens($t, $connect, $env);
450
-	$t = traiter_raccourcis($t);
451
-	$t = echappe_retour_modeles($t, $interdire_script);
452
-
453
-	return $t;
418
+    // les appels directs a cette fonction depuis le php de l'espace
419
+    // prive etant historiquement ecrits sans argment $connect
420
+    // on utilise la presence de celui-ci pour distinguer les cas
421
+    // ou il faut passer interdire_script explicitement
422
+    // les appels dans les squelettes (de l'espace prive) fournissant un $connect
423
+    // ne seront pas perturbes
424
+    $interdire_script = false;
425
+    if (is_null($connect)) {
426
+        $connect = '';
427
+        $interdire_script = true;
428
+        $env['espace_prive'] = true;
429
+    }
430
+
431
+    if (!$t) {
432
+        return strval($t);
433
+    }
434
+
435
+    // Dans l'espace prive on se mefie de tout contenu dangereux
436
+    // avant echappement des balises <html>
437
+    // https://core.spip.net/issues/3371
438
+    // et aussi dans l'espace public si la globale filtrer_javascript = -1
439
+    // https://core.spip.net/issues/4166
440
+    if (
441
+        $interdire_script
442
+        or $GLOBALS['filtrer_javascript'] == -1
443
+        or (!empty($env['espace_prive']) and $GLOBALS['filtrer_javascript'] <= 0)
444
+        or (!empty($env['wysiwyg']) and $env['wysiwyg'] and $GLOBALS['filtrer_javascript'] <= 0)
445
+    ) {
446
+        $t = echapper_html_suspect($t, ['strict' => false], $connect, $env);
447
+    }
448
+    $t = echappe_html($t);
449
+    $t = expanser_liens($t, $connect, $env);
450
+    $t = traiter_raccourcis($t);
451
+    $t = echappe_retour_modeles($t, $interdire_script);
452
+
453
+    return $t;
454 454
 }
Please login to merge, or discard this patch.