Completed
Push — master ( 3caaa9...7e8601 )
by cam
01:42
created
ecrire/plugins/afficher_liste.php 1 patch
Indentation   +75 added lines, -75 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
 include_spip('inc/charsets');
17 17
 
@@ -27,90 +27,90 @@  discard block
 block discarded – undo
27 27
  * @return string
28 28
  */
29 29
 function plugins_afficher_liste_dist(
30
-	$url_page,
31
-	$liste_plugins,
32
-	$liste_plugins_checked,
33
-	$liste_plugins_actifs,
34
-	$dir_plugins = _DIR_PLUGINS,
35
-	$afficher_un = 'afficher_plugin'
30
+    $url_page,
31
+    $liste_plugins,
32
+    $liste_plugins_checked,
33
+    $liste_plugins_actifs,
34
+    $dir_plugins = _DIR_PLUGINS,
35
+    $afficher_un = 'afficher_plugin'
36 36
 ) {
37
-	$get_infos = charger_fonction('get_infos', 'plugins');
38
-	$ligne_plug = charger_fonction($afficher_un, 'plugins');
37
+    $get_infos = charger_fonction('get_infos', 'plugins');
38
+    $ligne_plug = charger_fonction($afficher_un, 'plugins');
39 39
 
40
-	$all_infos = $get_infos($liste_plugins, false, $dir_plugins);
40
+    $all_infos = $get_infos($liste_plugins, false, $dir_plugins);
41 41
 
42
-	$all_infos = pipeline(
43
-		'filtrer_liste_plugins',
44
-		[
45
-			'args' => [
46
-				'liste_plugins' => $liste_plugins,
47
-				'liste_plugins_checked' => $liste_plugins_checked,
48
-				'liste_plugins_actifs' => $liste_plugins_actifs,
49
-				'dir_plugins' => $dir_plugins
50
-			],
51
-			'data' => $all_infos
52
-		]
53
-	);
42
+    $all_infos = pipeline(
43
+        'filtrer_liste_plugins',
44
+        [
45
+            'args' => [
46
+                'liste_plugins' => $liste_plugins,
47
+                'liste_plugins_checked' => $liste_plugins_checked,
48
+                'liste_plugins_actifs' => $liste_plugins_actifs,
49
+                'dir_plugins' => $dir_plugins
50
+            ],
51
+            'data' => $all_infos
52
+        ]
53
+    );
54 54
 
55
-	$liste_plugins = array_flip($liste_plugins);
56
-	foreach ($liste_plugins as $chemin => $v) {
57
-		// des plugins ont pu etre enleves de la liste par le pipeline. On en tient compte.
58
-		if (isset($all_infos[$chemin])) {
59
-			$liste_plugins[$chemin] = strtoupper(trim(typo(translitteration(unicode2charset(html2unicode($all_infos[$chemin]['nom']))))));
60
-		} else {
61
-			unset($liste_plugins[$chemin]);
62
-		}
63
-	}
64
-	asort($liste_plugins);
65
-	$exposed = urldecode(_request('plugin') ?? '');
55
+    $liste_plugins = array_flip($liste_plugins);
56
+    foreach ($liste_plugins as $chemin => $v) {
57
+        // des plugins ont pu etre enleves de la liste par le pipeline. On en tient compte.
58
+        if (isset($all_infos[$chemin])) {
59
+            $liste_plugins[$chemin] = strtoupper(trim(typo(translitteration(unicode2charset(html2unicode($all_infos[$chemin]['nom']))))));
60
+        } else {
61
+            unset($liste_plugins[$chemin]);
62
+        }
63
+    }
64
+    asort($liste_plugins);
65
+    $exposed = urldecode(_request('plugin') ?? '');
66 66
 
67
-	$block_par_lettre = false;//count($liste_plugins)>10;
68
-	$fast_liste_plugins_actifs = [];
69
-	$fast_liste_plugins_checked = [];
70
-	if (is_array($liste_plugins_actifs)) {
71
-		$fast_liste_plugins_actifs = array_flip($liste_plugins_actifs);
72
-	}
73
-	if (is_array($liste_plugins_checked)) {
74
-		$fast_liste_plugins_checked = array_flip($liste_plugins_checked);
75
-	}
67
+    $block_par_lettre = false;//count($liste_plugins)>10;
68
+    $fast_liste_plugins_actifs = [];
69
+    $fast_liste_plugins_checked = [];
70
+    if (is_array($liste_plugins_actifs)) {
71
+        $fast_liste_plugins_actifs = array_flip($liste_plugins_actifs);
72
+    }
73
+    if (is_array($liste_plugins_checked)) {
74
+        $fast_liste_plugins_checked = array_flip($liste_plugins_checked);
75
+    }
76 76
 
77
-	$res = '';
78
-	$block = '';
79
-	$initiale = '';
80
-	$block_actif = false;
81
-	foreach ($liste_plugins as $plug => $nom) {
82
-		if (($i = substr($nom, 0, 1)) !== $initiale) {
83
-			$res .= $block_par_lettre ? affiche_block_initiale($initiale, $block, $block_actif) : $block;
84
-			$initiale = $i;
85
-			$block = '';
86
-			$block_actif = false;
87
-		}
88
-		// le rep suivant
89
-		$actif = isset($fast_liste_plugins_actifs[$plug]);
90
-		$checked = isset($fast_liste_plugins_checked[$plug]);
91
-		$block_actif = $block_actif | $actif;
92
-		$expose = ($exposed and ($exposed == $plug or $exposed == $dir_plugins . $plug or $exposed == substr(
93
-			$dir_plugins,
94
-			strlen(_DIR_RACINE)
95
-		) . $plug));
96
-		$block .= $ligne_plug($url_page, $plug, $checked, $actif, $expose, 'item', $dir_plugins) . "\n";
97
-	}
98
-	$res .= $block_par_lettre ? affiche_block_initiale($initiale, $block, $block_actif) : $block;
99
-	$class = basename($dir_plugins);
77
+    $res = '';
78
+    $block = '';
79
+    $initiale = '';
80
+    $block_actif = false;
81
+    foreach ($liste_plugins as $plug => $nom) {
82
+        if (($i = substr($nom, 0, 1)) !== $initiale) {
83
+            $res .= $block_par_lettre ? affiche_block_initiale($initiale, $block, $block_actif) : $block;
84
+            $initiale = $i;
85
+            $block = '';
86
+            $block_actif = false;
87
+        }
88
+        // le rep suivant
89
+        $actif = isset($fast_liste_plugins_actifs[$plug]);
90
+        $checked = isset($fast_liste_plugins_checked[$plug]);
91
+        $block_actif = $block_actif | $actif;
92
+        $expose = ($exposed and ($exposed == $plug or $exposed == $dir_plugins . $plug or $exposed == substr(
93
+            $dir_plugins,
94
+            strlen(_DIR_RACINE)
95
+        ) . $plug));
96
+        $block .= $ligne_plug($url_page, $plug, $checked, $actif, $expose, 'item', $dir_plugins) . "\n";
97
+    }
98
+    $res .= $block_par_lettre ? affiche_block_initiale($initiale, $block, $block_actif) : $block;
99
+    $class = basename($dir_plugins);
100 100
 
101
-	return $res ? "<ul class='liste-items plugins $class'>$res</ul>" : '';
101
+    return $res ? "<ul class='liste-items plugins $class'>$res</ul>" : '';
102 102
 }
103 103
 
104 104
 
105 105
 function affiche_block_initiale($initiale, $block, $block_actif) {
106
-	if (strlen($block)) {
107
-		return "<li class='item'>"
108
-		. bouton_block_depliable($initiale, $block_actif ? true : false)
109
-		. debut_block_depliable($block_actif)
110
-		. "<ul>$block</ul>"
111
-		. fin_block()
112
-		. '</li>';
113
-	}
106
+    if (strlen($block)) {
107
+        return "<li class='item'>"
108
+        . bouton_block_depliable($initiale, $block_actif ? true : false)
109
+        . debut_block_depliable($block_actif)
110
+        . "<ul>$block</ul>"
111
+        . fin_block()
112
+        . '</li>';
113
+    }
114 114
 
115
-	return '';
115
+    return '';
116 116
 }
Please login to merge, or discard this patch.
ecrire/inc/lien.php 1 patch
Indentation   +291 added lines, -291 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('base/abstract_sql');
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
23 23
 //
24 24
 
25 25
 function inc_lien_dist(
26
-	$lien,
27
-	$texte = '',
28
-	$class = '',
29
-	$title = '',
30
-	$hlang = '',
31
-	$rel = '',
32
-	string $connect = '',
33
-	$env = []
26
+    $lien,
27
+    $texte = '',
28
+    $class = '',
29
+    $title = '',
30
+    $hlang = '',
31
+    $rel = '',
32
+    string $connect = '',
33
+    $env = []
34 34
 ) {
35
-	return $lien;
35
+    return $lien;
36 36
 }
37 37
 
38 38
 // Regexp des raccourcis, aussi utilisee pour la fusion de sauvegarde Spip
@@ -43,28 +43,28 @@  discard block
 block discarded – undo
43 43
 
44 44
 function expanser_liens($t, string $connect = '', $env = []) {
45 45
 
46
-	$t = pipeline('pre_liens', $t);
46
+    $t = pipeline('pre_liens', $t);
47 47
 
48
-	// on passe a traiter_modeles la liste des liens reperes pour lui permettre
49
-	// de remettre le texte d'origine dans les parametres du modele
50
-	$t = traiter_modeles($t, false, false, $connect);
48
+    // on passe a traiter_modeles la liste des liens reperes pour lui permettre
49
+    // de remettre le texte d'origine dans les parametres du modele
50
+    $t = traiter_modeles($t, false, false, $connect);
51 51
 
52
-	return $t;
52
+    return $t;
53 53
 }
54 54
 
55 55
 // Meme analyse mais pour eliminer les liens
56 56
 // et ne laisser que leur titre, a expliciter si ce n'est fait
57 57
 function nettoyer_raccourcis_typo($texte, string $connect = '') {
58
-	return $texte;
58
+    return $texte;
59 59
 }
60 60
 
61 61
 // Repere dans la partie texte d'un raccourci [texte->...]
62 62
 // la langue et la bulle eventuelles
63 63
 function traiter_raccourci_lien_atts($texte) {
64
-	$bulle = '';
65
-	$hlang = '';
64
+    $bulle = '';
65
+    $hlang = '';
66 66
 
67
-	return [trim($texte), $bulle, $hlang];
67
+    return [trim($texte), $bulle, $hlang];
68 68
 }
69 69
 
70 70
 define('_RACCOURCI_CHAPO', '/^(\W*)(\W*)(\w*\d+([?#].*)?)$/');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
  * @return string
81 81
  */
82 82
 function virtuel_redirige($virtuel, $url = false) {
83
-	return $virtuel;
83
+    return $virtuel;
84 84
 }
85 85
 
86 86
 // Cherche un lien du type [->raccourci 123]
@@ -93,121 +93,121 @@  discard block
 block discarded – undo
93 93
 // 'url':   seulement U  (i.e. generer_url_RACCOURCI)
94 94
 
95 95
 function calculer_url($ref, $texte = '', $pour = 'url', string $connect = '', $echappe_typo = true) {
96
-	$r = traiter_lien_implicite($ref, $texte, $pour, $connect);
96
+    $r = traiter_lien_implicite($ref, $texte, $pour, $connect);
97 97
 
98
-	return $r ?: traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo);
98
+    return $r ?: traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo);
99 99
 }
100 100
 
101 101
 define('_EXTRAIRE_LIEN', ',^\s*(?:' . _PROTOCOLES_STD . '):?/?/?\s*$,iS');
102 102
 
103 103
 function traiter_lien_explicite($ref, $texte = '', $pour = 'url', string $connect = '', $echappe_typo = true) {
104
-	if (preg_match(_EXTRAIRE_LIEN, $ref)) {
105
-		return ($pour != 'tout') ? '' : ['', '', '', ''];
106
-	}
107
-
108
-	$lien = entites_html(trim($ref));
109
-
110
-	// Liens explicites
111
-	if (!$texte) {
112
-		$texte = str_replace('"', '', $lien);
113
-		// evite l'affichage de trops longues urls.
114
-		$lien_court = charger_fonction('lien_court', 'inc');
115
-		$texte = $lien_court($texte);
116
-		if ($echappe_typo) {
117
-			$texte = '<html>' . quote_amp($texte) . '</html>';
118
-		}
119
-	}
120
-
121
-	// petites corrections d'URL
122
-	if (preg_match('/^www\.[^@]+$/S', $lien)) {
123
-		$lien = 'http://' . $lien;
124
-	} else {
125
-		if (strpos($lien, '@') && email_valide($lien)) {
126
-			if (!$texte) {
127
-				$texte = $lien;
128
-			}
129
-			$lien = 'mailto:' . $lien;
130
-		}
131
-	}
132
-
133
-	if ($pour == 'url') {
134
-		return $lien;
135
-	}
136
-
137
-	if ($pour == 'titre') {
138
-		return $texte;
139
-	}
140
-
141
-	return ['url' => $lien, 'titre' => $texte];
104
+    if (preg_match(_EXTRAIRE_LIEN, $ref)) {
105
+        return ($pour != 'tout') ? '' : ['', '', '', ''];
106
+    }
107
+
108
+    $lien = entites_html(trim($ref));
109
+
110
+    // Liens explicites
111
+    if (!$texte) {
112
+        $texte = str_replace('"', '', $lien);
113
+        // evite l'affichage de trops longues urls.
114
+        $lien_court = charger_fonction('lien_court', 'inc');
115
+        $texte = $lien_court($texte);
116
+        if ($echappe_typo) {
117
+            $texte = '<html>' . quote_amp($texte) . '</html>';
118
+        }
119
+    }
120
+
121
+    // petites corrections d'URL
122
+    if (preg_match('/^www\.[^@]+$/S', $lien)) {
123
+        $lien = 'http://' . $lien;
124
+    } else {
125
+        if (strpos($lien, '@') && email_valide($lien)) {
126
+            if (!$texte) {
127
+                $texte = $lien;
128
+            }
129
+            $lien = 'mailto:' . $lien;
130
+        }
131
+    }
132
+
133
+    if ($pour == 'url') {
134
+        return $lien;
135
+    }
136
+
137
+    if ($pour == 'titre') {
138
+        return $texte;
139
+    }
140
+
141
+    return ['url' => $lien, 'titre' => $texte];
142 142
 }
143 143
 
144 144
 function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, string $connect = '') {
145
-	if (function_exists($f = 'glossaire_' . $ancre)) {
146
-		$url = $f($texte, $id);
147
-	} else {
148
-		$url = glossaire_std($texte);
149
-	}
145
+    if (function_exists($f = 'glossaire_' . $ancre)) {
146
+        $url = $f($texte, $id);
147
+    } else {
148
+        $url = glossaire_std($texte);
149
+    }
150 150
 
151
-	return $url;
151
+    return $url;
152 152
 }
153 153
 
154 154
 function traiter_lien_implicite($ref, $texte = '', $pour = 'url', string $connect = '') {
155
-	$url = null;
156
-	if (!($match = typer_raccourci($ref))) {
157
-		return false;
158
-	}
159
-	[$type, , $id, , $args, , $ancre] = array_pad($match, 7, null);
160
-	// attention dans le cas des sites le lien doit pointer non pas sur
161
-	// la page locale du site, mais directement sur le site lui-meme
162
-	if ($f = charger_fonction("implicite_$type", 'liens', true)) {
163
-		$url = $f($texte, $id, $type, $args, $ancre, $connect);
164
-	}
165
-	if (!$url) {
166
-		$url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', null, '', $connect);
167
-	}
168
-	if (!$url) {
169
-		return false;
170
-	}
171
-	if (is_array($url)) {
172
-		[$type, $id] = array_pad($url, 2, null);
173
-		$url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', null, '', $connect);
174
-	}
175
-	if ($pour === 'url') {
176
-		return $url;
177
-	}
178
-	$r = traiter_raccourci_titre($id, $type, $connect);
179
-	if ($r) {
180
-		$r['class'] = ($type == 'site') ? 'spip_out' : 'spip_in';
181
-	}
182
-	if ($texte = trim($texte)) {
183
-		$r['titre'] = $texte;
184
-	}
185
-	if (!@$r['titre']) {
186
-		$r['titre'] = _T($type) . " $id";
187
-	}
188
-	if ($pour == 'titre') {
189
-		return $r['titre'];
190
-	}
191
-	$r['url'] = $url;
192
-
193
-	// dans le cas d'un lien vers un doc, ajouter le type='mime/type'
194
-	if (
195
-		$type == 'document'
196
-		and $mime = sql_getfetsel(
197
-			'mime_type',
198
-			'spip_types_documents',
199
-			'extension IN (' . sql_get_select('extension', 'spip_documents', 'id_document=' . sql_quote($id)) . ')',
200
-			'',
201
-			'',
202
-			'',
203
-			'',
204
-			$connect
205
-		)
206
-	) {
207
-		$r['mime'] = $mime;
208
-	}
209
-
210
-	return $r;
155
+    $url = null;
156
+    if (!($match = typer_raccourci($ref))) {
157
+        return false;
158
+    }
159
+    [$type, , $id, , $args, , $ancre] = array_pad($match, 7, null);
160
+    // attention dans le cas des sites le lien doit pointer non pas sur
161
+    // la page locale du site, mais directement sur le site lui-meme
162
+    if ($f = charger_fonction("implicite_$type", 'liens', true)) {
163
+        $url = $f($texte, $id, $type, $args, $ancre, $connect);
164
+    }
165
+    if (!$url) {
166
+        $url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', null, '', $connect);
167
+    }
168
+    if (!$url) {
169
+        return false;
170
+    }
171
+    if (is_array($url)) {
172
+        [$type, $id] = array_pad($url, 2, null);
173
+        $url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', null, '', $connect);
174
+    }
175
+    if ($pour === 'url') {
176
+        return $url;
177
+    }
178
+    $r = traiter_raccourci_titre($id, $type, $connect);
179
+    if ($r) {
180
+        $r['class'] = ($type == 'site') ? 'spip_out' : 'spip_in';
181
+    }
182
+    if ($texte = trim($texte)) {
183
+        $r['titre'] = $texte;
184
+    }
185
+    if (!@$r['titre']) {
186
+        $r['titre'] = _T($type) . " $id";
187
+    }
188
+    if ($pour == 'titre') {
189
+        return $r['titre'];
190
+    }
191
+    $r['url'] = $url;
192
+
193
+    // dans le cas d'un lien vers un doc, ajouter le type='mime/type'
194
+    if (
195
+        $type == 'document'
196
+        and $mime = sql_getfetsel(
197
+            'mime_type',
198
+            'spip_types_documents',
199
+            'extension IN (' . sql_get_select('extension', 'spip_documents', 'id_document=' . sql_quote($id)) . ')',
200
+            '',
201
+            '',
202
+            '',
203
+            '',
204
+            $connect
205
+        )
206
+    ) {
207
+        $r['mime'] = $mime;
208
+    }
209
+
210
+    return $r;
211 211
 }
212 212
 
213 213
 // analyse des raccourcis issus de [TITRE->RACCOURCInnn] et connexes
@@ -215,41 +215,41 @@  discard block
 block discarded – undo
215 215
 define('_RACCOURCI_URL', '/^\s*(\w*?)\s*(\d+)(\?(.*?))?(#([^\s]*))?\s*$/S');
216 216
 
217 217
 function typer_raccourci($lien) {
218
-	if (!preg_match(_RACCOURCI_URL, $lien, $match)) {
219
-		return [];
220
-	}
221
-	$f = $match[1];
222
-	// valeur par defaut et alias historiques
223
-	if (!$f) {
224
-		$f = 'article';
225
-	} else {
226
-		if ($f == 'art') {
227
-			$f = 'article';
228
-		} else {
229
-			if ($f == 'br') {
230
-				$f = 'breve';
231
-			} else {
232
-				if ($f == 'rub') {
233
-					$f = 'rubrique';
234
-				} else {
235
-					if ($f == 'aut') {
236
-						$f = 'auteur';
237
-					} else {
238
-						if ($f == 'doc' or $f == 'im' or $f == 'img' or $f == 'image' or $f == 'emb') {
239
-							$f = 'document';
240
-						} else {
241
-							if (preg_match('/^br..?ve$/S', $f)) {
242
-								$f = 'breve';
243
-							}
244
-						}
245
-					}
246
-				}
247
-			}
248
-		}
249
-	} # accents :(
250
-	$match[0] = $f;
251
-
252
-	return $match;
218
+    if (!preg_match(_RACCOURCI_URL, $lien, $match)) {
219
+        return [];
220
+    }
221
+    $f = $match[1];
222
+    // valeur par defaut et alias historiques
223
+    if (!$f) {
224
+        $f = 'article';
225
+    } else {
226
+        if ($f == 'art') {
227
+            $f = 'article';
228
+        } else {
229
+            if ($f == 'br') {
230
+                $f = 'breve';
231
+            } else {
232
+                if ($f == 'rub') {
233
+                    $f = 'rubrique';
234
+                } else {
235
+                    if ($f == 'aut') {
236
+                        $f = 'auteur';
237
+                    } else {
238
+                        if ($f == 'doc' or $f == 'im' or $f == 'img' or $f == 'image' or $f == 'emb') {
239
+                            $f = 'document';
240
+                        } else {
241
+                            if (preg_match('/^br..?ve$/S', $f)) {
242
+                                $f = 'breve';
243
+                            }
244
+                        }
245
+                    }
246
+                }
247
+            }
248
+        }
249
+    } # accents :(
250
+    $match[0] = $f;
251
+
252
+    return $match;
253 253
 }
254 254
 
255 255
 /**
@@ -264,25 +264,25 @@  discard block
 block discarded – undo
264 264
  * }
265 265
  **/
266 266
 function traiter_raccourci_titre($id, $type, $connect = null) {
267
-	$trouver_table = charger_fonction('trouver_table', 'base');
268
-	$desc = $trouver_table(table_objet($type));
269
-	if (!($desc and $s = $desc['titre'])) {
270
-		return [];
271
-	}
272
-	$_id = $desc['key']['PRIMARY KEY'];
273
-	$r = sql_fetsel($s, $desc['table'], "$_id=$id", '', '', '', '', $connect);
274
-	if (!$r) {
275
-		return [];
276
-	}
277
-	$r['titre'] = supprimer_numero($r['titre']);
278
-	if (!$r['titre'] and !empty($r['surnom'])) {
279
-		$r['titre'] = $r['surnom'];
280
-	}
281
-	if (!isset($r['lang'])) {
282
-		$r['lang'] = '';
283
-	}
284
-
285
-	return $r;
267
+    $trouver_table = charger_fonction('trouver_table', 'base');
268
+    $desc = $trouver_table(table_objet($type));
269
+    if (!($desc and $s = $desc['titre'])) {
270
+        return [];
271
+    }
272
+    $_id = $desc['key']['PRIMARY KEY'];
273
+    $r = sql_fetsel($s, $desc['table'], "$_id=$id", '', '', '', '', $connect);
274
+    if (!$r) {
275
+        return [];
276
+    }
277
+    $r['titre'] = supprimer_numero($r['titre']);
278
+    if (!$r['titre'] and !empty($r['surnom'])) {
279
+        $r['titre'] = $r['surnom'];
280
+    }
281
+    if (!isset($r['lang'])) {
282
+        $r['lang'] = '';
283
+    }
284
+
285
+    return $r;
286 286
 }
287 287
 
288 288
 // traite les modeles (dans la fonction typo), en remplacant
@@ -293,136 +293,136 @@  discard block
 block discarded – undo
293 293
 // mais on renvoie les params (pour l'indexation par le moteur de recherche)
294 294
 
295 295
 define(
296
-	'_RACCOURCI_MODELE',
297
-	'(<([a-z_-]{3,})' # <modele
298
-	. '\s*([0-9]*)\s*' # id
299
-	. '([|](?:<[^<>]*>|[^>])*?)?' # |arguments (y compris des tags <...>)
300
-	. '\s*/?' . '>)' # fin du modele >
301
-	. '\s*(<\/a>)?' # eventuel </a>
296
+    '_RACCOURCI_MODELE',
297
+    '(<([a-z_-]{3,})' # <modele
298
+    . '\s*([0-9]*)\s*' # id
299
+    . '([|](?:<[^<>]*>|[^>])*?)?' # |arguments (y compris des tags <...>)
300
+    . '\s*/?' . '>)' # fin du modele >
301
+    . '\s*(<\/a>)?' # eventuel </a>
302 302
 );
303 303
 
304 304
 define('_RACCOURCI_MODELE_DEBUT', '@^' . _RACCOURCI_MODELE . '@isS');
305 305
 
306 306
 function traiter_modeles($texte, $doublons = false, $echap = '', string $connect = '', $liens = null, $env = []) {
307
-	// preserver la compatibilite : true = recherche des documents
308
-	if ($doublons === true) {
309
-		$doublons = ['documents' => ['doc', 'emb', 'img']];
310
-	}
311
-	// detecter les modeles (rapide)
312
-	if (
313
-		strpos($texte, '<') !== false and
314
-		preg_match_all('/<[a-z_-]{3,}\s*[0-9|]+/iS', $texte, $matches, PREG_SET_ORDER)
315
-	) {
316
-		include_spip('public/assembler');
317
-		$wrap_embed_html = charger_fonction('wrap_embed_html', 'inc', true);
318
-		foreach ($matches as $match) {
319
-			// Recuperer l'appel complet (y compris un eventuel lien)
320
-
321
-			$a = strpos($texte, (string) $match[0]);
322
-			preg_match(
323
-				_RACCOURCI_MODELE_DEBUT,
324
-				substr($texte, $a),
325
-				$regs
326
-			);
327
-			$regs[] = ''; // s'assurer qu'il y a toujours un 5e arg, eventuellement vide
328
-			[, $mod, $type, $id, $params, $fin] = $regs;
329
-			if (
330
-				$fin and
331
-				preg_match(
332
-					'/<a\s[^<>]*>\s*$/i',
333
-					substr($texte, 0, $a),
334
-					$r
335
-				)
336
-			) {
337
-				$lien = [
338
-					'href' => extraire_attribut($r[0], 'href'),
339
-					'class' => extraire_attribut($r[0], 'class'),
340
-					'mime' => extraire_attribut($r[0], 'type'),
341
-					'title' => extraire_attribut($r[0], 'title'),
342
-					'hreflang' => extraire_attribut($r[0], 'hreflang')
343
-				];
344
-				$n = strlen($r[0]);
345
-				$a -= $n;
346
-				$cherche = $n + strlen($regs[0]);
347
-			} else {
348
-				$lien = false;
349
-				$cherche = strlen($mod);
350
-			}
351
-
352
-			// calculer le modele
353
-			# hack indexation
354
-			if ($doublons) {
355
-				$texte .= preg_replace(',[|][^|=]*,s', ' ', $params);
356
-			} # version normale
357
-			else {
358
-				// si un tableau de liens a ete passe, reinjecter le contenu d'origine
359
-				// dans les parametres, plutot que les liens echappes
360
-				if (!is_null($liens)) {
361
-					$params = str_replace($liens[0], $liens[1], $params);
362
-				}
363
-				$modele = inclure_modele($type, $id, $params, $lien, $connect, $env);
364
-				// en cas d'echec,
365
-				// si l'objet demande a une url,
366
-				// creer un petit encadre vers elle
367
-				if ($modele === false) {
368
-					if (!$lien) {
369
-						$lien = traiter_lien_implicite("$type$id", '', 'tout', $connect);
370
-					}
371
-					if ($lien) {
372
-						$modele = '<a href="'
373
-							. $lien['url']
374
-							. '" class="spip_modele'
375
-							. '">'
376
-							. sinon($lien['titre'], _T('ecrire:info_sans_titre'))
377
-							. '</a>';
378
-					} else {
379
-						$modele = '';
380
-						if (test_espace_prive()) {
381
-							$modele = entites_html(substr($texte, $a, $cherche));
382
-							if (!is_null($liens)) {
383
-								$modele = '<pre>' . str_replace($liens[0], $liens[1], $modele) . '</pre>';
384
-							}
385
-						}
386
-					}
387
-				}
388
-				// le remplacer dans le texte
389
-				if ($modele !== false) {
390
-					$modele = protege_js_modeles($modele);
391
-					if ($wrap_embed_html) {
392
-						$modele = $wrap_embed_html($mod, $modele);
393
-					}
394
-					$rempl = code_echappement($modele, $echap);
395
-					$texte = substr($texte, 0, $a)
396
-						. $rempl
397
-						. substr($texte, $a + $cherche);
398
-				}
399
-			}
400
-
401
-			// hack pour tout l'espace prive
402
-			if (((!_DIR_RESTREINT) or ($doublons)) and ($id)) {
403
-				foreach ($doublons ?: ['documents' => ['doc', 'emb', 'img']] as $quoi => $modeles) {
404
-					if (in_array($type, $modeles)) {
405
-						$GLOBALS["doublons_{$quoi}_inclus"][] = $id;
406
-					}
407
-				}
408
-			}
409
-		}
410
-	}
411
-
412
-	return $texte;
307
+    // preserver la compatibilite : true = recherche des documents
308
+    if ($doublons === true) {
309
+        $doublons = ['documents' => ['doc', 'emb', 'img']];
310
+    }
311
+    // detecter les modeles (rapide)
312
+    if (
313
+        strpos($texte, '<') !== false and
314
+        preg_match_all('/<[a-z_-]{3,}\s*[0-9|]+/iS', $texte, $matches, PREG_SET_ORDER)
315
+    ) {
316
+        include_spip('public/assembler');
317
+        $wrap_embed_html = charger_fonction('wrap_embed_html', 'inc', true);
318
+        foreach ($matches as $match) {
319
+            // Recuperer l'appel complet (y compris un eventuel lien)
320
+
321
+            $a = strpos($texte, (string) $match[0]);
322
+            preg_match(
323
+                _RACCOURCI_MODELE_DEBUT,
324
+                substr($texte, $a),
325
+                $regs
326
+            );
327
+            $regs[] = ''; // s'assurer qu'il y a toujours un 5e arg, eventuellement vide
328
+            [, $mod, $type, $id, $params, $fin] = $regs;
329
+            if (
330
+                $fin and
331
+                preg_match(
332
+                    '/<a\s[^<>]*>\s*$/i',
333
+                    substr($texte, 0, $a),
334
+                    $r
335
+                )
336
+            ) {
337
+                $lien = [
338
+                    'href' => extraire_attribut($r[0], 'href'),
339
+                    'class' => extraire_attribut($r[0], 'class'),
340
+                    'mime' => extraire_attribut($r[0], 'type'),
341
+                    'title' => extraire_attribut($r[0], 'title'),
342
+                    'hreflang' => extraire_attribut($r[0], 'hreflang')
343
+                ];
344
+                $n = strlen($r[0]);
345
+                $a -= $n;
346
+                $cherche = $n + strlen($regs[0]);
347
+            } else {
348
+                $lien = false;
349
+                $cherche = strlen($mod);
350
+            }
351
+
352
+            // calculer le modele
353
+            # hack indexation
354
+            if ($doublons) {
355
+                $texte .= preg_replace(',[|][^|=]*,s', ' ', $params);
356
+            } # version normale
357
+            else {
358
+                // si un tableau de liens a ete passe, reinjecter le contenu d'origine
359
+                // dans les parametres, plutot que les liens echappes
360
+                if (!is_null($liens)) {
361
+                    $params = str_replace($liens[0], $liens[1], $params);
362
+                }
363
+                $modele = inclure_modele($type, $id, $params, $lien, $connect, $env);
364
+                // en cas d'echec,
365
+                // si l'objet demande a une url,
366
+                // creer un petit encadre vers elle
367
+                if ($modele === false) {
368
+                    if (!$lien) {
369
+                        $lien = traiter_lien_implicite("$type$id", '', 'tout', $connect);
370
+                    }
371
+                    if ($lien) {
372
+                        $modele = '<a href="'
373
+                            . $lien['url']
374
+                            . '" class="spip_modele'
375
+                            . '">'
376
+                            . sinon($lien['titre'], _T('ecrire:info_sans_titre'))
377
+                            . '</a>';
378
+                    } else {
379
+                        $modele = '';
380
+                        if (test_espace_prive()) {
381
+                            $modele = entites_html(substr($texte, $a, $cherche));
382
+                            if (!is_null($liens)) {
383
+                                $modele = '<pre>' . str_replace($liens[0], $liens[1], $modele) . '</pre>';
384
+                            }
385
+                        }
386
+                    }
387
+                }
388
+                // le remplacer dans le texte
389
+                if ($modele !== false) {
390
+                    $modele = protege_js_modeles($modele);
391
+                    if ($wrap_embed_html) {
392
+                        $modele = $wrap_embed_html($mod, $modele);
393
+                    }
394
+                    $rempl = code_echappement($modele, $echap);
395
+                    $texte = substr($texte, 0, $a)
396
+                        . $rempl
397
+                        . substr($texte, $a + $cherche);
398
+                }
399
+            }
400
+
401
+            // hack pour tout l'espace prive
402
+            if (((!_DIR_RESTREINT) or ($doublons)) and ($id)) {
403
+                foreach ($doublons ?: ['documents' => ['doc', 'emb', 'img']] as $quoi => $modeles) {
404
+                    if (in_array($type, $modeles)) {
405
+                        $GLOBALS["doublons_{$quoi}_inclus"][] = $id;
406
+                    }
407
+                }
408
+            }
409
+        }
410
+    }
411
+
412
+    return $texte;
413 413
 }
414 414
 
415 415
 //
416 416
 // Raccourcis ancre [#ancre<-]
417 417
 //
418 418
 function traiter_raccourci_ancre($letexte) {
419
-	return $letexte;
419
+    return $letexte;
420 420
 }
421 421
 
422 422
 function traiter_raccourci_glossaire($texte) {
423
-	return $texte;
423
+    return $texte;
424 424
 }
425 425
 
426 426
 function glossaire_std($terme) {
427
-	return $terme;
427
+    return $terme;
428 428
 }
Please login to merge, or discard this patch.
ecrire/balise/url_.php 1 patch
Indentation   +155 added lines, -155 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  **/
20 20
 
21 21
 if (!defined('_ECRIRE_INC_VERSION')) {
22
-	return;
22
+    return;
23 23
 }
24 24
 
25 25
 /**
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
  *     Code compilé
38 38
  **/
39 39
 function generer_generer_url($type, $p) {
40
-	$_id = interprete_argument_balise(1, $p);
40
+    $_id = interprete_argument_balise(1, $p);
41 41
 
42
-	if (!$_id) {
43
-		$primary = id_table_objet($type);
44
-		$_id = champ_sql($primary, $p);
45
-	}
42
+    if (!$_id) {
43
+        $primary = id_table_objet($type);
44
+        $_id = champ_sql($primary, $p);
45
+    }
46 46
 
47
-	return generer_generer_url_arg($type, $p, $_id);
47
+    return generer_generer_url_arg($type, $p, $_id);
48 48
 }
49 49
 
50 50
 /**
@@ -73,28 +73,28 @@  discard block
 block discarded – undo
73 73
  *     Code compilé
74 74
  **/
75 75
 function generer_generer_url_arg($type, $p, $_id) {
76
-	if ($s = trouver_nom_serveur_distant($p)) {
77
-		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
78
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
79
-			return $f($type, $_id, $s);
80
-		}
81
-		if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
82
-			return null;
83
-		}
84
-		$s = _q($s);
85
-		# exception des urls de documents sur un serveur distant...
86
-		if ($type == 'document') {
87
-			return
88
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
89
-				"quete_meta('dir_img', $s) . \n\t" .
90
-				"quete_fichier($_id,$s)";
91
-		}
92
-		$s = ", '', '', $s, quete_meta('type_urls', $s)";
93
-	} else {
94
-		$s = ", '', '', true";
95
-	}
96
-
97
-	return "urlencode_1738(generer_objet_url($_id, '$type'$s))";
76
+    if ($s = trouver_nom_serveur_distant($p)) {
77
+        // si une fonction de generation des url a ete definie pour ce connect l'utiliser
78
+        if (function_exists($f = 'generer_generer_url_' . $s)) {
79
+            return $f($type, $_id, $s);
80
+        }
81
+        if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
82
+            return null;
83
+        }
84
+        $s = _q($s);
85
+        # exception des urls de documents sur un serveur distant...
86
+        if ($type == 'document') {
87
+            return
88
+                "quete_meta('adresse_site', $s) . '/' .\n\t" .
89
+                "quete_meta('dir_img', $s) . \n\t" .
90
+                "quete_fichier($_id,$s)";
91
+        }
92
+        $s = ", '', '', $s, quete_meta('type_urls', $s)";
93
+    } else {
94
+        $s = ", '', '', true";
95
+    }
96
+
97
+    return "urlencode_1738(generer_objet_url($_id, '$type'$s))";
98 98
 }
99 99
 
100 100
 
@@ -119,27 +119,27 @@  discard block
 block discarded – undo
119 119
  */
120 120
 function balise_URL__dist($p) {
121 121
 
122
-	$nom = $p->nom_champ;
123
-	if ($nom === 'URL_') {
124
-		$msg = ['zbug_balise_sans_argument', ['balise' => ' URL_']];
125
-		erreur_squelette($msg, $p);
126
-		$p->interdire_scripts = false;
127
-
128
-		return $p;
129
-	} elseif ($f = charger_fonction($nom, 'balise', true)) {
130
-		return $f($p);
131
-	} else {
132
-		$nom = strtolower($nom);
133
-		$code = generer_generer_url(substr($nom, 4), $p);
134
-		$code = champ_sql($nom, $p, $code);
135
-		$p->code = $code;
136
-		if (!$p->etoile) {
137
-			$p->code = "vider_url($code)";
138
-		}
139
-		$p->interdire_scripts = false;
140
-
141
-		return $p;
142
-	}
122
+    $nom = $p->nom_champ;
123
+    if ($nom === 'URL_') {
124
+        $msg = ['zbug_balise_sans_argument', ['balise' => ' URL_']];
125
+        erreur_squelette($msg, $p);
126
+        $p->interdire_scripts = false;
127
+
128
+        return $p;
129
+    } elseif ($f = charger_fonction($nom, 'balise', true)) {
130
+        return $f($p);
131
+    } else {
132
+        $nom = strtolower($nom);
133
+        $code = generer_generer_url(substr($nom, 4), $p);
134
+        $code = champ_sql($nom, $p, $code);
135
+        $p->code = $code;
136
+        if (!$p->etoile) {
137
+            $p->code = "vider_url($code)";
138
+        }
139
+        $p->interdire_scripts = false;
140
+
141
+        return $p;
142
+    }
143 143
 }
144 144
 
145 145
 /**
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
  */
164 164
 function balise_URL_ARTICLE_dist($p) {
165 165
 
166
-	// Cas particulier des boucles (SYNDIC_ARTICLES)
167
-	if ($p->type_requete == 'syndic_articles') {
168
-		$code = champ_sql('url', $p);
169
-	} else {
170
-		$code = generer_generer_url('article', $p);
171
-	}
166
+    // Cas particulier des boucles (SYNDIC_ARTICLES)
167
+    if ($p->type_requete == 'syndic_articles') {
168
+        $code = champ_sql('url', $p);
169
+    } else {
170
+        $code = generer_generer_url('article', $p);
171
+    }
172 172
 
173
-	$p->code = $code;
174
-	if (!$p->etoile) {
175
-		$p->code = "vider_url($code)";
176
-	}
177
-	$p->interdire_scripts = false;
173
+    $p->code = $code;
174
+    if (!$p->etoile) {
175
+        $p->code = "vider_url($code)";
176
+    }
177
+    $p->interdire_scripts = false;
178 178
 
179
-	return $p;
179
+    return $p;
180 180
 }
181 181
 
182 182
 /**
@@ -196,21 +196,21 @@  discard block
 block discarded – undo
196 196
  *     Pile complétée par le code à générer
197 197
  */
198 198
 function balise_URL_SITE_dist($p) {
199
-	$code = champ_sql('url_site', $p, '');
200
-	if (!$code) {
201
-		$code = generer_generer_url('site', $p);
202
-		if ($code === null) {
203
-			return null;
204
-		}
205
-	} else {
206
-		if (!$p->etoile) {
207
-			$code = "calculer_url($code,'','url', \$connect)";
208
-		}
209
-	}
210
-	$p->code = $code;
211
-	$p->interdire_scripts = false;
212
-
213
-	return $p;
199
+    $code = champ_sql('url_site', $p, '');
200
+    if (!$code) {
201
+        $code = generer_generer_url('site', $p);
202
+        if ($code === null) {
203
+            return null;
204
+        }
205
+    } else {
206
+        if (!$p->etoile) {
207
+            $code = "calculer_url($code,'','url', \$connect)";
208
+        }
209
+    }
210
+    $p->code = $code;
211
+    $p->interdire_scripts = false;
212
+
213
+    return $p;
214 214
 }
215 215
 
216 216
 // Autres balises URL_*, qui ne concernent pas une table
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
  *     Pile complétée par le code à générer
230 230
  */
231 231
 function balise_URL_SITE_SPIP_dist($p) {
232
-	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
233
-	$p->code = 'spip_htmlspecialchars(' . $p->code . ')';
234
-	$p->interdire_scripts = false;
232
+    $p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
233
+    $p->code = 'spip_htmlspecialchars(' . $p->code . ')';
234
+    $p->interdire_scripts = false;
235 235
 
236
-	return $p;
236
+    return $p;
237 237
 }
238 238
 
239 239
 
@@ -262,42 +262,42 @@  discard block
 block discarded – undo
262 262
  */
263 263
 function balise_URL_PAGE_dist($p) {
264 264
 
265
-	$code = interprete_argument_balise(1, $p);
266
-	$args = interprete_argument_balise(2, $p);
267
-	if ($args == null) {
268
-		$args = "''";
269
-	}
270
-
271
-	if ($s = trouver_nom_serveur_distant($p)) {
272
-		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
273
-		// elle devra aussi traiter le cas derogatoire type=page
274
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
275
-			if ($args and $args !== "''") {
276
-				$code .= ", $args";
277
-			}
278
-			$code = $f('page', $code, $s);
279
-			$p->code = $code;
280
-			return $p;
281
-		}
282
-		$s = 'connect=' . addslashes($s);
283
-		$args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
284
-	}
285
-
286
-	if (!$code) {
287
-		$noentities = $p->etoile ? "'&'" : '';
288
-		$code = "url_de_base() . preg_replace(',^./,', '', self($noentities))";
289
-	} else {
290
-		if (!$args) {
291
-			$args = "''";
292
-		}
293
-		$noentities = $p->etoile ? ', true' : '';
294
-		$code = "generer_url_public($code, $args$noentities)";
295
-	}
296
-	$p->code = $code;
297
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
298
-
299
-	#$p->interdire_scripts = true;
300
-	return $p;
265
+    $code = interprete_argument_balise(1, $p);
266
+    $args = interprete_argument_balise(2, $p);
267
+    if ($args == null) {
268
+        $args = "''";
269
+    }
270
+
271
+    if ($s = trouver_nom_serveur_distant($p)) {
272
+        // si une fonction de generation des url a ete definie pour ce connect l'utiliser
273
+        // elle devra aussi traiter le cas derogatoire type=page
274
+        if (function_exists($f = 'generer_generer_url_' . $s)) {
275
+            if ($args and $args !== "''") {
276
+                $code .= ", $args";
277
+            }
278
+            $code = $f('page', $code, $s);
279
+            $p->code = $code;
280
+            return $p;
281
+        }
282
+        $s = 'connect=' . addslashes($s);
283
+        $args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
284
+    }
285
+
286
+    if (!$code) {
287
+        $noentities = $p->etoile ? "'&'" : '';
288
+        $code = "url_de_base() . preg_replace(',^./,', '', self($noentities))";
289
+    } else {
290
+        if (!$args) {
291
+            $args = "''";
292
+        }
293
+        $noentities = $p->etoile ? ', true' : '';
294
+        $code = "generer_url_public($code, $args$noentities)";
295
+    }
296
+    $p->code = $code;
297
+    spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
298
+
299
+    #$p->interdire_scripts = true;
300
+    return $p;
301 301
 }
302 302
 
303 303
 
@@ -324,24 +324,24 @@  discard block
 block discarded – undo
324 324
  */
325 325
 function balise_URL_ECRIRE_dist($p) {
326 326
 
327
-	$code = interprete_argument_balise(1, $p);
328
-	if (!$code) {
329
-		$fonc = "''";
330
-	} else {
331
-		$fonc = $code;
332
-		$args = interprete_argument_balise(2, $p);
333
-		if ($args === null) {
334
-			$args = "''";
335
-		}
336
-		$noentities = $p->etoile ? ', true' : '';
337
-		if (($args != "''") or $noentities) {
338
-			$fonc .= ",$args$noentities";
339
-		}
340
-	}
341
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
342
-	$p->interdire_scripts = false;
343
-
344
-	return $p;
327
+    $code = interprete_argument_balise(1, $p);
328
+    if (!$code) {
329
+        $fonc = "''";
330
+    } else {
331
+        $fonc = $code;
332
+        $args = interprete_argument_balise(2, $p);
333
+        if ($args === null) {
334
+            $args = "''";
335
+        }
336
+        $noentities = $p->etoile ? ', true' : '';
337
+        if (($args != "''") or $noentities) {
338
+            $fonc .= ",$args$noentities";
339
+        }
340
+    }
341
+    $p->code = 'generer_url_ecrire(' . $fonc . ')';
342
+    $p->interdire_scripts = false;
343
+
344
+    return $p;
345 345
 }
346 346
 
347 347
 
@@ -367,24 +367,24 @@  discard block
 block discarded – undo
367 367
  *     Pile complétée par le code à générer
368 368
  */
369 369
 function balise_URL_ACTION_AUTEUR_dist($p) {
370
-	$p->descr['session'] = true;
371
-
372
-	$p->code = interprete_argument_balise(1, $p);
373
-
374
-	$args = interprete_argument_balise(2, $p);
375
-	if ($args != "''" && $args !== null) {
376
-		$p->code .= ',' . $args;
377
-	}
378
-	$redirect = interprete_argument_balise(3, $p);
379
-	if ($redirect != "''" && $redirect !== null) {
380
-		if ($args == "''" || $args === null) {
381
-			$p->code .= ",''";
382
-		}
383
-		$p->code .= ',' . $redirect;
384
-	}
385
-
386
-	$p->code = 'generer_action_auteur(' . $p->code . ')';
387
-	$p->interdire_scripts = false;
388
-
389
-	return $p;
370
+    $p->descr['session'] = true;
371
+
372
+    $p->code = interprete_argument_balise(1, $p);
373
+
374
+    $args = interprete_argument_balise(2, $p);
375
+    if ($args != "''" && $args !== null) {
376
+        $p->code .= ',' . $args;
377
+    }
378
+    $redirect = interprete_argument_balise(3, $p);
379
+    if ($redirect != "''" && $redirect !== null) {
380
+        if ($args == "''" || $args === null) {
381
+            $p->code .= ",''";
382
+        }
383
+        $p->code .= ',' . $redirect;
384
+    }
385
+
386
+    $p->code = 'generer_action_auteur(' . $p->code . ')';
387
+    $p->interdire_scripts = false;
388
+
389
+    return $p;
390 390
 }
Please login to merge, or discard this patch.
ecrire/inc/plugin.php 1 patch
Indentation   +984 added lines, -984 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  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
 /** l'adresse du repertoire de telechargement et de decompactage des plugins */
24 24
 if (!defined('_DIR_PLUGINS_AUTO')) {
25
-	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/');
25
+    define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/');
26 26
 }
27 27
 
28 28
 #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins.
@@ -47,27 +47,27 @@  discard block
 block discarded – undo
47 47
  * @return array
48 48
 **/
49 49
 function liste_plugin_files($dir_plugins = null) {
50
-	static $plugin_files = [];
51
-	if (is_null($dir_plugins)) {
52
-		$dir_plugins = _DIR_PLUGINS;
53
-	}
54
-	if (
55
-		!isset($plugin_files[$dir_plugins])
56
-		or (is_countable($plugin_files[$dir_plugins]) ? count($plugin_files[$dir_plugins]) : 0) == 0
57
-	) {
58
-		$plugin_files[$dir_plugins] = [];
59
-		foreach (fast_find_plugin_dirs($dir_plugins) as $plugin) {
60
-			$plugin_files[$dir_plugins][] = substr($plugin, strlen($dir_plugins));
61
-		}
62
-
63
-		sort($plugin_files[$dir_plugins]);
64
-		// et on lit le XML de tous les plugins pour le mettre en cache
65
-		// et en profiter pour nettoyer ceux qui n'existent plus du cache
66
-		$get_infos = charger_fonction('get_infos', 'plugins');
67
-		$get_infos($plugin_files[$dir_plugins], false, $dir_plugins, true);
68
-	}
69
-
70
-	return $plugin_files[$dir_plugins];
50
+    static $plugin_files = [];
51
+    if (is_null($dir_plugins)) {
52
+        $dir_plugins = _DIR_PLUGINS;
53
+    }
54
+    if (
55
+        !isset($plugin_files[$dir_plugins])
56
+        or (is_countable($plugin_files[$dir_plugins]) ? count($plugin_files[$dir_plugins]) : 0) == 0
57
+    ) {
58
+        $plugin_files[$dir_plugins] = [];
59
+        foreach (fast_find_plugin_dirs($dir_plugins) as $plugin) {
60
+            $plugin_files[$dir_plugins][] = substr($plugin, strlen($dir_plugins));
61
+        }
62
+
63
+        sort($plugin_files[$dir_plugins]);
64
+        // et on lit le XML de tous les plugins pour le mettre en cache
65
+        // et en profiter pour nettoyer ceux qui n'existent plus du cache
66
+        $get_infos = charger_fonction('get_infos', 'plugins');
67
+        $get_infos($plugin_files[$dir_plugins], false, $dir_plugins, true);
68
+    }
69
+
70
+    return $plugin_files[$dir_plugins];
71 71
 }
72 72
 
73 73
 /**
@@ -83,45 +83,45 @@  discard block
 block discarded – undo
83 83
  *     Liste complète des répeertoires
84 84
 **/
85 85
 function fast_find_plugin_dirs($dir, $max_prof = 100) {
86
-	$fichiers = [];
87
-	// revenir au repertoire racine si on a recu dossier/truc
88
-	// pour regarder dossier/truc/ ne pas oublier le / final
89
-	$dir = preg_replace(',/[^/]*$,', '', $dir);
90
-	if ($dir == '') {
91
-		$dir = '.';
92
-	}
93
-
94
-	if (!is_dir($dir)) {
95
-		return $fichiers;
96
-	}
97
-	if (is_plugin_dir($dir, '')) {
98
-		$fichiers[] = $dir;
99
-
100
-		return $fichiers;
101
-	}
102
-	if ($max_prof <= 0) {
103
-		return $fichiers;
104
-	}
105
-
106
-	$subdirs = [];
107
-	if (@is_dir($dir) and is_readable($dir) and $d = opendir($dir)) {
108
-		while (($f = readdir($d)) !== false) {
109
-			if (
110
-				$f[0] != '.' # ignorer . .. .svn etc
111
-				and $f != 'CVS'
112
-				and is_dir($f = "$dir/$f")
113
-			) {
114
-				$subdirs[] = $f;
115
-			}
116
-		}
117
-		closedir($d);
118
-	}
119
-
120
-	foreach ($subdirs as $d) {
121
-		$fichiers = array_merge($fichiers, fast_find_plugin_dirs("$d/", $max_prof - 1));
122
-	}
123
-
124
-	return $fichiers;
86
+    $fichiers = [];
87
+    // revenir au repertoire racine si on a recu dossier/truc
88
+    // pour regarder dossier/truc/ ne pas oublier le / final
89
+    $dir = preg_replace(',/[^/]*$,', '', $dir);
90
+    if ($dir == '') {
91
+        $dir = '.';
92
+    }
93
+
94
+    if (!is_dir($dir)) {
95
+        return $fichiers;
96
+    }
97
+    if (is_plugin_dir($dir, '')) {
98
+        $fichiers[] = $dir;
99
+
100
+        return $fichiers;
101
+    }
102
+    if ($max_prof <= 0) {
103
+        return $fichiers;
104
+    }
105
+
106
+    $subdirs = [];
107
+    if (@is_dir($dir) and is_readable($dir) and $d = opendir($dir)) {
108
+        while (($f = readdir($d)) !== false) {
109
+            if (
110
+                $f[0] != '.' # ignorer . .. .svn etc
111
+                and $f != 'CVS'
112
+                and is_dir($f = "$dir/$f")
113
+            ) {
114
+                $subdirs[] = $f;
115
+            }
116
+        }
117
+        closedir($d);
118
+    }
119
+
120
+    foreach ($subdirs as $d) {
121
+        $fichiers = array_merge($fichiers, fast_find_plugin_dirs("$d/", $max_prof - 1));
122
+    }
123
+
124
+    return $fichiers;
125 125
 }
126 126
 
127 127
 /**
@@ -142,27 +142,27 @@  discard block
 block discarded – undo
142 142
 **/
143 143
 function is_plugin_dir($dir, $dir_plugins = null) {
144 144
 
145
-	if (is_array($dir)) {
146
-		foreach ($dir as $k => $d) {
147
-			if (!is_plugin_dir($d, $dir_plugins)) {
148
-				unset($dir[$k]);
149
-			}
150
-		}
151
-
152
-		return $dir;
153
-	}
154
-	if (is_null($dir_plugins)) {
155
-		$dir_plugins = _DIR_PLUGINS;
156
-	}
157
-	$search = ["$dir_plugins$dir/paquet.xml"];
158
-
159
-	foreach ($search as $s) {
160
-		if (file_exists($s)) {
161
-			return $dir;
162
-		}
163
-	}
164
-
165
-	return '';
145
+    if (is_array($dir)) {
146
+        foreach ($dir as $k => $d) {
147
+            if (!is_plugin_dir($d, $dir_plugins)) {
148
+                unset($dir[$k]);
149
+            }
150
+        }
151
+
152
+        return $dir;
153
+    }
154
+    if (is_null($dir_plugins)) {
155
+        $dir_plugins = _DIR_PLUGINS;
156
+    }
157
+    $search = ["$dir_plugins$dir/paquet.xml"];
158
+
159
+    foreach ($search as $s) {
160
+        if (file_exists($s)) {
161
+            return $dir;
162
+        }
163
+    }
164
+
165
+    return '';
166 166
 }
167 167
 
168 168
 /** Regexp d'extraction des informations d'un intervalle de compatibilité */
@@ -189,51 +189,51 @@  discard block
 block discarded – undo
189 189
  **/
190 190
 function plugin_version_compatible($intervalle, $version, $avec_quoi = '') {
191 191
 
192
-	if (!strlen($intervalle)) {
193
-		return true;
194
-	}
195
-	if (!preg_match(_EXTRAIRE_INTERVALLE, $intervalle, $regs)) {
196
-		return false;
197
-	}
198
-	// Extraction des bornes et traitement de * pour la borne sup :
199
-	// -- on autorise uniquement les ecritures 3.0.*, 3.*
200
-	$minimum = $regs[1];
201
-	$maximum = $regs[2];
202
-
203
-	//  si une version SPIP de compatibilité a été définie (dans
204
-	//  mes_options.php, sous la forme : define('_DEV_VERSION_SPIP_COMPAT', '3.1.0');
205
-	//  on l'utilise (phase de dev, de test...) mais *que* en cas de comparaison
206
-	//  avec la version de SPIP (ne nuit donc pas aux tests de necessite
207
-	//  entre plugins)
208
-	if (defined('_DEV_VERSION_SPIP_COMPAT') and $avec_quoi == 'spip' and $version !== _DEV_VERSION_SPIP_COMPAT) {
209
-		if (plugin_version_compatible($intervalle, _DEV_VERSION_SPIP_COMPAT, $avec_quoi)) {
210
-			return true;
211
-		}
212
-		// si pas de compatibilite avec _DEV_VERSION_SPIP_COMPAT, on essaye quand meme avec la vrai version
213
-		// cas du plugin qui n'est compatible qu'avec cette nouvelle version
214
-	}
215
-
216
-	$minimum_inc = $intervalle[0] == '[';
217
-	$maximum_inc = substr($intervalle, -1) == ']';
218
-
219
-	if (strlen($minimum)) {
220
-		if ($minimum_inc and spip_version_compare($version, $minimum, '<')) {
221
-			return false;
222
-		}
223
-		if (!$minimum_inc and spip_version_compare($version, $minimum, '<=')) {
224
-			return false;
225
-		}
226
-	}
227
-	if (strlen($maximum)) {
228
-		if ($maximum_inc and spip_version_compare($version, $maximum, '>')) {
229
-			return false;
230
-		}
231
-		if (!$maximum_inc and spip_version_compare($version, $maximum, '>=')) {
232
-			return false;
233
-		}
234
-	}
235
-
236
-	return true;
192
+    if (!strlen($intervalle)) {
193
+        return true;
194
+    }
195
+    if (!preg_match(_EXTRAIRE_INTERVALLE, $intervalle, $regs)) {
196
+        return false;
197
+    }
198
+    // Extraction des bornes et traitement de * pour la borne sup :
199
+    // -- on autorise uniquement les ecritures 3.0.*, 3.*
200
+    $minimum = $regs[1];
201
+    $maximum = $regs[2];
202
+
203
+    //  si une version SPIP de compatibilité a été définie (dans
204
+    //  mes_options.php, sous la forme : define('_DEV_VERSION_SPIP_COMPAT', '3.1.0');
205
+    //  on l'utilise (phase de dev, de test...) mais *que* en cas de comparaison
206
+    //  avec la version de SPIP (ne nuit donc pas aux tests de necessite
207
+    //  entre plugins)
208
+    if (defined('_DEV_VERSION_SPIP_COMPAT') and $avec_quoi == 'spip' and $version !== _DEV_VERSION_SPIP_COMPAT) {
209
+        if (plugin_version_compatible($intervalle, _DEV_VERSION_SPIP_COMPAT, $avec_quoi)) {
210
+            return true;
211
+        }
212
+        // si pas de compatibilite avec _DEV_VERSION_SPIP_COMPAT, on essaye quand meme avec la vrai version
213
+        // cas du plugin qui n'est compatible qu'avec cette nouvelle version
214
+    }
215
+
216
+    $minimum_inc = $intervalle[0] == '[';
217
+    $maximum_inc = substr($intervalle, -1) == ']';
218
+
219
+    if (strlen($minimum)) {
220
+        if ($minimum_inc and spip_version_compare($version, $minimum, '<')) {
221
+            return false;
222
+        }
223
+        if (!$minimum_inc and spip_version_compare($version, $minimum, '<=')) {
224
+            return false;
225
+        }
226
+    }
227
+    if (strlen($maximum)) {
228
+        if ($maximum_inc and spip_version_compare($version, $maximum, '>')) {
229
+            return false;
230
+        }
231
+        if (!$maximum_inc and spip_version_compare($version, $maximum, '>=')) {
232
+            return false;
233
+        }
234
+    }
235
+
236
+    return true;
237 237
 }
238 238
 
239 239
 /**
@@ -250,62 +250,62 @@  discard block
 block discarded – undo
250 250
  * @return array
251 251
  */
252 252
 function liste_plugin_valides($liste_plug, $force = false) {
253
-	$liste_ext = liste_plugin_files(_DIR_PLUGINS_DIST);
254
-	$get_infos = charger_fonction('get_infos', 'plugins');
255
-	$infos = [
256
-		// lister les extensions qui sont automatiquement actives
257
-		'_DIR_PLUGINS_DIST' => $get_infos($liste_ext, $force, _DIR_PLUGINS_DIST),
258
-		'_DIR_PLUGINS' => $get_infos($liste_plug, $force, _DIR_PLUGINS)
259
-	];
260
-
261
-	// creer une premiere liste non ordonnee mais qui ne retient
262
-	// que les plugins valides, et dans leur derniere version en cas de doublon
263
-	$infos['_DIR_RESTREINT'][''] = $get_infos('./', $force, _DIR_RESTREINT);
264
-	$infos['_DIR_RESTREINT']['SPIP']['version'] = $GLOBALS['spip_version_branche'];
265
-	$infos['_DIR_RESTREINT']['SPIP']['chemin'] = [];
266
-	$liste_non_classee = [
267
-		'SPIP' => [
268
-			'nom' => 'SPIP',
269
-			'etat' => 'stable',
270
-			'version' => $GLOBALS['spip_version_branche'],
271
-			'dir_type' => '_DIR_RESTREINT',
272
-			'dir' => '',
273
-		]
274
-	];
275
-
276
-	$invalides = [];
277
-	foreach ($liste_ext as $plug) {
278
-		if (isset($infos['_DIR_PLUGINS_DIST'][$plug])) {
279
-			plugin_valide_resume($liste_non_classee, $plug, $infos, '_DIR_PLUGINS_DIST');
280
-		}
281
-	}
282
-	foreach ($liste_plug as $plug) {
283
-		if (isset($infos['_DIR_PLUGINS'][$plug])) {
284
-			$r = plugin_valide_resume($liste_non_classee, $plug, $infos, '_DIR_PLUGINS');
285
-			if (is_array($r)) {
286
-				$invalides = array_merge($invalides, $r);
287
-			}
288
-		}
289
-	}
290
-
291
-	if (defined('_DIR_PLUGINS_SUPPL') and _DIR_PLUGINS_SUPPL) {
292
-		$infos['_DIR_PLUGINS_SUPPL'] = $get_infos($liste_plug, false, _DIR_PLUGINS_SUPPL);
293
-		foreach ($liste_plug as $plug) {
294
-			if (isset($infos['_DIR_PLUGINS_SUPPL'][$plug])) {
295
-				$r = plugin_valide_resume($liste_non_classee, $plug, $infos, '_DIR_PLUGINS_SUPPL');
296
-				if (is_array($r)) {
297
-					$invalides = array_merge($invalides, $r);
298
-				}
299
-			}
300
-		}
301
-	}
302
-
303
-	plugin_fixer_procure($liste_non_classee, $infos);
304
-
305
-	// les plugins qui sont dans $liste_non_classee ne sont pas invalides (on a trouve un autre version valide)
306
-	$invalides = array_diff_key($invalides, $liste_non_classee);
307
-
308
-	return [$infos, $liste_non_classee, $invalides];
253
+    $liste_ext = liste_plugin_files(_DIR_PLUGINS_DIST);
254
+    $get_infos = charger_fonction('get_infos', 'plugins');
255
+    $infos = [
256
+        // lister les extensions qui sont automatiquement actives
257
+        '_DIR_PLUGINS_DIST' => $get_infos($liste_ext, $force, _DIR_PLUGINS_DIST),
258
+        '_DIR_PLUGINS' => $get_infos($liste_plug, $force, _DIR_PLUGINS)
259
+    ];
260
+
261
+    // creer une premiere liste non ordonnee mais qui ne retient
262
+    // que les plugins valides, et dans leur derniere version en cas de doublon
263
+    $infos['_DIR_RESTREINT'][''] = $get_infos('./', $force, _DIR_RESTREINT);
264
+    $infos['_DIR_RESTREINT']['SPIP']['version'] = $GLOBALS['spip_version_branche'];
265
+    $infos['_DIR_RESTREINT']['SPIP']['chemin'] = [];
266
+    $liste_non_classee = [
267
+        'SPIP' => [
268
+            'nom' => 'SPIP',
269
+            'etat' => 'stable',
270
+            'version' => $GLOBALS['spip_version_branche'],
271
+            'dir_type' => '_DIR_RESTREINT',
272
+            'dir' => '',
273
+        ]
274
+    ];
275
+
276
+    $invalides = [];
277
+    foreach ($liste_ext as $plug) {
278
+        if (isset($infos['_DIR_PLUGINS_DIST'][$plug])) {
279
+            plugin_valide_resume($liste_non_classee, $plug, $infos, '_DIR_PLUGINS_DIST');
280
+        }
281
+    }
282
+    foreach ($liste_plug as $plug) {
283
+        if (isset($infos['_DIR_PLUGINS'][$plug])) {
284
+            $r = plugin_valide_resume($liste_non_classee, $plug, $infos, '_DIR_PLUGINS');
285
+            if (is_array($r)) {
286
+                $invalides = array_merge($invalides, $r);
287
+            }
288
+        }
289
+    }
290
+
291
+    if (defined('_DIR_PLUGINS_SUPPL') and _DIR_PLUGINS_SUPPL) {
292
+        $infos['_DIR_PLUGINS_SUPPL'] = $get_infos($liste_plug, false, _DIR_PLUGINS_SUPPL);
293
+        foreach ($liste_plug as $plug) {
294
+            if (isset($infos['_DIR_PLUGINS_SUPPL'][$plug])) {
295
+                $r = plugin_valide_resume($liste_non_classee, $plug, $infos, '_DIR_PLUGINS_SUPPL');
296
+                if (is_array($r)) {
297
+                    $invalides = array_merge($invalides, $r);
298
+                }
299
+            }
300
+        }
301
+    }
302
+
303
+    plugin_fixer_procure($liste_non_classee, $infos);
304
+
305
+    // les plugins qui sont dans $liste_non_classee ne sont pas invalides (on a trouve un autre version valide)
306
+    $invalides = array_diff_key($invalides, $liste_non_classee);
307
+
308
+    return [$infos, $liste_non_classee, $invalides];
309 309
 }
310 310
 
311 311
 /**
@@ -325,38 +325,38 @@  discard block
 block discarded – undo
325 325
  *   array description short si on ne le retient pas (pour memorisation dans une table des erreurs)
326 326
  */
327 327
 function plugin_valide_resume(&$liste, $plug, $infos, $dir_type) {
328
-	$i = $infos[$dir_type][$plug];
329
-	// minimum syndical pour afficher si le xml avait des erreurs éventuelles
330
-	$short_desc = [
331
-		'dir' => $plug,
332
-		'dir_type' => $dir_type
333
-	];
334
-	if (empty($i['prefix'])) {
335
-		// erreur xml ? mais sans connaissance du prefix, on retourne le chemin…
336
-		$short_desc['erreur'] = $i['erreur'] ?? ['?'];
337
-		return [$plug => $short_desc];
338
-	}
339
-
340
-	$p = strtoupper($i['prefix']);
341
-	$short_desc['nom'] = $i['nom'];
342
-	$short_desc['etat'] = $i['etat'];
343
-	$short_desc['version'] = $i['version'];
344
-
345
-	if (isset($i['erreur']) and $i['erreur']) {
346
-		$short_desc['erreur'] = $i['erreur'];
347
-		return [$p => $short_desc];
348
-	}
349
-	if (!plugin_version_compatible($i['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
350
-		return [$p => $short_desc];
351
-	}
352
-	if (
353
-		!isset($liste[$p])
354
-		or spip_version_compare($i['version'], $liste[$p]['version'], '>')
355
-	) {
356
-		$liste[$p] = $short_desc;
357
-	}
358
-	// ok le plugin etait deja dans la liste ou on a choisi une version plus recente
359
-	return $p;
328
+    $i = $infos[$dir_type][$plug];
329
+    // minimum syndical pour afficher si le xml avait des erreurs éventuelles
330
+    $short_desc = [
331
+        'dir' => $plug,
332
+        'dir_type' => $dir_type
333
+    ];
334
+    if (empty($i['prefix'])) {
335
+        // erreur xml ? mais sans connaissance du prefix, on retourne le chemin…
336
+        $short_desc['erreur'] = $i['erreur'] ?? ['?'];
337
+        return [$plug => $short_desc];
338
+    }
339
+
340
+    $p = strtoupper($i['prefix']);
341
+    $short_desc['nom'] = $i['nom'];
342
+    $short_desc['etat'] = $i['etat'];
343
+    $short_desc['version'] = $i['version'];
344
+
345
+    if (isset($i['erreur']) and $i['erreur']) {
346
+        $short_desc['erreur'] = $i['erreur'];
347
+        return [$p => $short_desc];
348
+    }
349
+    if (!plugin_version_compatible($i['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
350
+        return [$p => $short_desc];
351
+    }
352
+    if (
353
+        !isset($liste[$p])
354
+        or spip_version_compare($i['version'], $liste[$p]['version'], '>')
355
+    ) {
356
+        $liste[$p] = $short_desc;
357
+    }
358
+    // ok le plugin etait deja dans la liste ou on a choisi une version plus recente
359
+    return $p;
360 360
 }
361 361
 
362 362
 /**
@@ -372,47 +372,47 @@  discard block
 block discarded – undo
372 372
  * @param array $infos
373 373
  */
374 374
 function plugin_fixer_procure(&$liste, &$infos) {
375
-	foreach ($liste as $p => $resume) {
376
-		$i = $infos[$resume['dir_type']][$resume['dir']];
377
-		if (isset($i['procure']) and $i['procure']) {
378
-			foreach ($i['procure'] as $procure) {
379
-				$p = strtoupper($procure['nom']);
380
-				$dir = $resume['dir'];
381
-				if ($dir) {
382
-					$dir .= '/';
383
-				}
384
-				$dir .= 'procure:' . $procure['nom'];
385
-
386
-				$procure['etat'] = '?';
387
-				$procure['dir_type'] = $resume['dir_type'];
388
-				$procure['dir'] = $dir;
389
-
390
-				// si ce plugin n'est pas deja procure, ou dans une version plus ancienne
391
-				// on ajoute cette version a la liste
392
-				if (
393
-					!isset($liste[$p])
394
-					or spip_version_compare($procure['version'], $liste[$p]['version'], '>')
395
-				) {
396
-					$liste[$p] = $procure;
397
-
398
-					// on fournit une information minimale pour ne pas perturber la compilation
399
-					$infos[$resume['dir_type']][$dir] = [
400
-						'prefix' => $procure['nom'],
401
-						'nom' => $procure['nom'],
402
-						'etat' => $procure['etat'],
403
-						'version' => $procure['version'],
404
-						'chemin' => [],
405
-						'necessite' => [],
406
-						'utilise' => [],
407
-						'lib' => [],
408
-						'menu' => [],
409
-						'onglet' => [],
410
-						'procure' => [],
411
-					];
412
-				}
413
-			}
414
-		}
415
-	}
375
+    foreach ($liste as $p => $resume) {
376
+        $i = $infos[$resume['dir_type']][$resume['dir']];
377
+        if (isset($i['procure']) and $i['procure']) {
378
+            foreach ($i['procure'] as $procure) {
379
+                $p = strtoupper($procure['nom']);
380
+                $dir = $resume['dir'];
381
+                if ($dir) {
382
+                    $dir .= '/';
383
+                }
384
+                $dir .= 'procure:' . $procure['nom'];
385
+
386
+                $procure['etat'] = '?';
387
+                $procure['dir_type'] = $resume['dir_type'];
388
+                $procure['dir'] = $dir;
389
+
390
+                // si ce plugin n'est pas deja procure, ou dans une version plus ancienne
391
+                // on ajoute cette version a la liste
392
+                if (
393
+                    !isset($liste[$p])
394
+                    or spip_version_compare($procure['version'], $liste[$p]['version'], '>')
395
+                ) {
396
+                    $liste[$p] = $procure;
397
+
398
+                    // on fournit une information minimale pour ne pas perturber la compilation
399
+                    $infos[$resume['dir_type']][$dir] = [
400
+                        'prefix' => $procure['nom'],
401
+                        'nom' => $procure['nom'],
402
+                        'etat' => $procure['etat'],
403
+                        'version' => $procure['version'],
404
+                        'chemin' => [],
405
+                        'necessite' => [],
406
+                        'utilise' => [],
407
+                        'lib' => [],
408
+                        'menu' => [],
409
+                        'onglet' => [],
410
+                        'procure' => [],
411
+                    ];
412
+                }
413
+            }
414
+        }
415
+    }
416 416
 }
417 417
 
418 418
 /**
@@ -426,20 +426,20 @@  discard block
 block discarded – undo
426 426
  * @return array
427 427
  */
428 428
 function liste_chemin_plugin($liste, $dir_plugins = _DIR_PLUGINS) {
429
-	foreach ($liste as $prefix => $infos) {
430
-		if (
431
-			!$dir_plugins
432
-			or (
433
-				defined($infos['dir_type'])
434
-				and constant($infos['dir_type']) == $dir_plugins)
435
-		) {
436
-			$liste[$prefix] = $infos['dir'];
437
-		} else {
438
-			unset($liste[$prefix]);
439
-		}
440
-	}
441
-
442
-	return $liste;
429
+    foreach ($liste as $prefix => $infos) {
430
+        if (
431
+            !$dir_plugins
432
+            or (
433
+                defined($infos['dir_type'])
434
+                and constant($infos['dir_type']) == $dir_plugins)
435
+        ) {
436
+            $liste[$prefix] = $infos['dir'];
437
+        } else {
438
+            unset($liste[$prefix]);
439
+        }
440
+    }
441
+
442
+    return $liste;
443 443
 }
444 444
 
445 445
 /**
@@ -454,9 +454,9 @@  discard block
 block discarded – undo
454 454
  * @return array
455 455
  */
456 456
 function liste_chemin_plugin_actifs($dir_plugins = _DIR_PLUGINS) {
457
-	include_spip('plugins/installer');
457
+    include_spip('plugins/installer');
458 458
 
459
-	return liste_chemin_plugin(liste_plugin_actifs(), $dir_plugins);
459
+    return liste_chemin_plugin(liste_plugin_actifs(), $dir_plugins);
460 460
 }
461 461
 
462 462
 /**
@@ -487,54 +487,54 @@  discard block
 block discarded – undo
487 487
  *                qui n'ont pas satisfait leurs dépendances
488 488
 **/
489 489
 function plugin_trier($infos, $liste_non_classee) {
490
-	$toute_la_liste = $liste_non_classee;
491
-	$liste = $ordre = [];
492
-	$count = 0;
493
-
494
-	while ($c = count($liste_non_classee) and $c != $count) { // tant qu'il reste des plugins a classer, et qu'on ne stagne pas
495
-		#echo "tour::";var_dump($liste_non_classee);
496
-		$count = $c;
497
-		foreach ($liste_non_classee as $p => $resume) {
498
-			$plug = $resume['dir'];
499
-			$dir_type = $resume['dir_type'];
500
-			$info1 = $infos[$dir_type][$plug];
501
-			// si des plugins sont necessaires,
502
-			// on ne peut inserer qu'apres eux
503
-			foreach ($info1['necessite'] as $need) {
504
-				$nom = strtoupper($need['nom']);
505
-				$compat = $need['compatibilite'] ?? '';
506
-				if (!isset($liste[$nom]) or !plugin_version_compatible($compat, $liste[$nom]['version'])) {
507
-					$info1 = false;
508
-					break;
509
-				}
510
-			}
511
-			if (!$info1) {
512
-				continue;
513
-			}
514
-			// idem si des plugins sont utiles,
515
-			// sauf si ils sont de toute facon absents de la liste
516
-			foreach ($info1['utilise'] as $need) {
517
-				$nom = strtoupper($need['nom']);
518
-				$compat = $need['compatibilite'] ?? '';
519
-				if (isset($toute_la_liste[$nom])) {
520
-					if (
521
-						!isset($liste[$nom]) or
522
-						!plugin_version_compatible($compat, $liste[$nom]['version'])
523
-					) {
524
-						$info1 = false;
525
-						break;
526
-					}
527
-				}
528
-			}
529
-			if ($info1) {
530
-				$ordre[$p] = $info1;
531
-				$liste[$p] = $liste_non_classee[$p];
532
-				unset($liste_non_classee[$p]);
533
-			}
534
-		}
535
-	}
536
-
537
-	return [$liste, $ordre, $liste_non_classee];
490
+    $toute_la_liste = $liste_non_classee;
491
+    $liste = $ordre = [];
492
+    $count = 0;
493
+
494
+    while ($c = count($liste_non_classee) and $c != $count) { // tant qu'il reste des plugins a classer, et qu'on ne stagne pas
495
+        #echo "tour::";var_dump($liste_non_classee);
496
+        $count = $c;
497
+        foreach ($liste_non_classee as $p => $resume) {
498
+            $plug = $resume['dir'];
499
+            $dir_type = $resume['dir_type'];
500
+            $info1 = $infos[$dir_type][$plug];
501
+            // si des plugins sont necessaires,
502
+            // on ne peut inserer qu'apres eux
503
+            foreach ($info1['necessite'] as $need) {
504
+                $nom = strtoupper($need['nom']);
505
+                $compat = $need['compatibilite'] ?? '';
506
+                if (!isset($liste[$nom]) or !plugin_version_compatible($compat, $liste[$nom]['version'])) {
507
+                    $info1 = false;
508
+                    break;
509
+                }
510
+            }
511
+            if (!$info1) {
512
+                continue;
513
+            }
514
+            // idem si des plugins sont utiles,
515
+            // sauf si ils sont de toute facon absents de la liste
516
+            foreach ($info1['utilise'] as $need) {
517
+                $nom = strtoupper($need['nom']);
518
+                $compat = $need['compatibilite'] ?? '';
519
+                if (isset($toute_la_liste[$nom])) {
520
+                    if (
521
+                        !isset($liste[$nom]) or
522
+                        !plugin_version_compatible($compat, $liste[$nom]['version'])
523
+                    ) {
524
+                        $info1 = false;
525
+                        break;
526
+                    }
527
+                }
528
+            }
529
+            if ($info1) {
530
+                $ordre[$p] = $info1;
531
+                $liste[$p] = $liste_non_classee[$p];
532
+                unset($liste_non_classee[$p]);
533
+            }
534
+        }
535
+    }
536
+
537
+    return [$liste, $ordre, $liste_non_classee];
538 538
 }
539 539
 
540 540
 /**
@@ -551,40 +551,40 @@  discard block
 block discarded – undo
551 551
  *     Répertoire (plugins, plugins-dist, ...) => Couples (prefixes => infos completes) des plugins qu'ils contiennent
552 552
 **/
553 553
 function plugins_erreurs($liste_non_classee, $liste, $infos, $msg = []) {
554
-	static $erreurs = [];
555
-
556
-	if (!is_array($liste)) {
557
-		$liste = [];
558
-	}
559
-
560
-	// les plugins en erreur ne sont pas actifs ; ils ne doivent pas être dans la liste
561
-	$liste = array_diff_key($liste, $liste_non_classee);
562
-
563
-	foreach ($liste_non_classee as $p => $resume) {
564
-		$dir_type = $resume['dir_type'];
565
-		$plug = $resume['dir'];
566
-		$k = $infos[$dir_type][$plug];
567
-
568
-		$plug = constant($dir_type) . $plug;
569
-		if (!isset($msg[$p])) {
570
-			if (isset($resume['erreur']) and $resume['erreur']) {
571
-				$msg[$p] = [$resume['erreur']];
572
-			}
573
-			elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
574
-				$msg[$p] = [plugin_message_incompatibilite($k['compatibilite'], $GLOBALS['spip_version_branche'], 'SPIP', 'necessite')];
575
-			}
576
-			elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) {
577
-				$msg[$p] = plugin_necessite($k['utilise'], $liste, 'utilise');
578
-			}
579
-		} else {
580
-			foreach ($msg[$p] as $c => $l) {
581
-				$msg[$p][$c] = plugin_controler_lib($l['nom'], $l['lien']);
582
-			}
583
-		}
584
-		$erreurs[$plug] = $msg[$p];
585
-	}
586
-
587
-	ecrire_meta('plugin_erreur_activation', serialize($erreurs));
554
+    static $erreurs = [];
555
+
556
+    if (!is_array($liste)) {
557
+        $liste = [];
558
+    }
559
+
560
+    // les plugins en erreur ne sont pas actifs ; ils ne doivent pas être dans la liste
561
+    $liste = array_diff_key($liste, $liste_non_classee);
562
+
563
+    foreach ($liste_non_classee as $p => $resume) {
564
+        $dir_type = $resume['dir_type'];
565
+        $plug = $resume['dir'];
566
+        $k = $infos[$dir_type][$plug];
567
+
568
+        $plug = constant($dir_type) . $plug;
569
+        if (!isset($msg[$p])) {
570
+            if (isset($resume['erreur']) and $resume['erreur']) {
571
+                $msg[$p] = [$resume['erreur']];
572
+            }
573
+            elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
574
+                $msg[$p] = [plugin_message_incompatibilite($k['compatibilite'], $GLOBALS['spip_version_branche'], 'SPIP', 'necessite')];
575
+            }
576
+            elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) {
577
+                $msg[$p] = plugin_necessite($k['utilise'], $liste, 'utilise');
578
+            }
579
+        } else {
580
+            foreach ($msg[$p] as $c => $l) {
581
+                $msg[$p][$c] = plugin_controler_lib($l['nom'], $l['lien']);
582
+            }
583
+        }
584
+        $erreurs[$plug] = $msg[$p];
585
+    }
586
+
587
+    ecrire_meta('plugin_erreur_activation', serialize($erreurs));
588 588
 }
589 589
 
590 590
 /**
@@ -599,25 +599,25 @@  discard block
 block discarded – undo
599 599
  *     - Liste des erreurs ou code HTML des erreurs
600 600
 **/
601 601
 function plugin_donne_erreurs($raw = false, $raz = true) {
602
-	if (!isset($GLOBALS['meta']['plugin_erreur_activation'])) {
603
-		return $raw ? [] : '';
604
-	}
605
-	$list = @unserialize($GLOBALS['meta']['plugin_erreur_activation']);
606
-	// Compat ancienne version
607
-	if (!$list) {
608
-		$list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation'];
609
-	} elseif (!$raw) {
610
-		foreach ($list as $plug => $msg) {
611
-			$list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug])
612
-				. '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>';
613
-		}
614
-		$list = '<ul>' . join("\n", $list) . '</ul>';
615
-	}
616
-	if ($raz) {
617
-		effacer_meta('plugin_erreur_activation');
618
-	}
619
-
620
-	return $list;
602
+    if (!isset($GLOBALS['meta']['plugin_erreur_activation'])) {
603
+        return $raw ? [] : '';
604
+    }
605
+    $list = @unserialize($GLOBALS['meta']['plugin_erreur_activation']);
606
+    // Compat ancienne version
607
+    if (!$list) {
608
+        $list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation'];
609
+    } elseif (!$raw) {
610
+        foreach ($list as $plug => $msg) {
611
+            $list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug])
612
+                . '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>';
613
+        }
614
+        $list = '<ul>' . join("\n", $list) . '</ul>';
615
+    }
616
+    if ($raz) {
617
+        effacer_meta('plugin_erreur_activation');
618
+    }
619
+
620
+    return $list;
621 621
 }
622 622
 
623 623
 /**
@@ -637,21 +637,21 @@  discard block
 block discarded – undo
637 637
  *
638 638
  **/
639 639
 function plugin_necessite($n, $liste, $balise = 'necessite') {
640
-	$msg = [];
641
-	foreach ($n as $need) {
642
-		$id = strtoupper($need['nom']);
643
-		$r = plugin_controler_necessite(
644
-			$liste,
645
-			$id,
646
-			$need['compatibilite'] ?? '',
647
-			$balise
648
-		);
649
-		if ($r) {
650
-			$msg[] = $r;
651
-		}
652
-	}
653
-
654
-	return $msg;
640
+    $msg = [];
641
+    foreach ($n as $need) {
642
+        $id = strtoupper($need['nom']);
643
+        $r = plugin_controler_necessite(
644
+            $liste,
645
+            $id,
646
+            $need['compatibilite'] ?? '',
647
+            $balise
648
+        );
649
+        if ($r) {
650
+            $msg[] = $r;
651
+        }
652
+    }
653
+
654
+    return $msg;
655 655
 }
656 656
 
657 657
 /**
@@ -673,19 +673,19 @@  discard block
 block discarded – undo
673 673
  *    Message d'erreur lorsque la dépendance est absente.
674 674
  **/
675 675
 function plugin_controler_necessite($liste, $nom, $intervalle, $balise) {
676
-	if (isset($liste[$nom]) and plugin_version_compatible($intervalle, $liste[$nom]['version'])) {
677
-		return '';
678
-	}
679
-	// Si l'on a un <utilise="plugin non actif" />, ne pas renvoyer d'erreur
680
-	if ($balise === 'utilise' and !isset($liste[$nom])) {
681
-		return '';
682
-	}
683
-	return plugin_message_incompatibilite(
684
-		$intervalle,
685
-		(isset($liste[$nom]) ? $liste[$nom]['version'] : ''),
686
-		$nom,
687
-		$balise
688
-	);
676
+    if (isset($liste[$nom]) and plugin_version_compatible($intervalle, $liste[$nom]['version'])) {
677
+        return '';
678
+    }
679
+    // Si l'on a un <utilise="plugin non actif" />, ne pas renvoyer d'erreur
680
+    if ($balise === 'utilise' and !isset($liste[$nom])) {
681
+        return '';
682
+    }
683
+    return plugin_message_incompatibilite(
684
+        $intervalle,
685
+        (isset($liste[$nom]) ? $liste[$nom]['version'] : ''),
686
+        $nom,
687
+        $balise
688
+    );
689 689
 }
690 690
 
691 691
 /**
@@ -702,70 +702,70 @@  discard block
 block discarded – undo
702 702
  */
703 703
 function plugin_message_incompatibilite($intervalle, $version, $nom, $balise) {
704 704
 
705
-	// prendre en compte les erreurs de dépendances à PHP
706
-	// ou à une extension PHP avec des messages d'erreurs dédiés.
707
-	$type = 'plugin';
708
-	if ($nom === 'SPIP') {
709
-		$type = 'spip';
710
-	} elseif ($nom === 'PHP') {
711
-		$type = 'php';
712
-	} elseif (strncmp($nom, 'PHP:', 4) === 0) {
713
-		$type = 'extension_php';
714
-		[, $nom] = explode(':', $nom, 2);
715
-	}
716
-
717
-	if (preg_match(_EXTRAIRE_INTERVALLE, $intervalle, $regs)) {
718
-		$minimum = $regs[1];
719
-		$maximum = $regs[2];
720
-
721
-		$minimum_inclus = $intervalle[0] == '[';
722
-		$maximum_inclus = substr($intervalle, -1) == ']';
723
-
724
-		if (strlen($minimum)) {
725
-			if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
726
-				return _T("plugin_${balise}_${type}", [
727
-					'plugin' => $nom,
728
-					'version' => ' &ge; ' . $minimum
729
-				]);
730
-			}
731
-			if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
732
-				return _T("plugin_${balise}_${type}", [
733
-					'plugin' => $nom,
734
-					'version' => ' &gt; ' . $minimum
735
-				]);
736
-			}
737
-		}
738
-
739
-		if (strlen($maximum)) {
740
-			if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
741
-				return _T("plugin_${balise}_${type}", [
742
-					'plugin' => $nom,
743
-					'version' => ' &le; ' . $maximum
744
-				]);
745
-			}
746
-			if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
747
-				return _T("plugin_${balise}_plugin", [
748
-					'plugin' => $nom,
749
-					'version' => ' &lt; ' . $maximum
750
-				]);
751
-			}
752
-		}
753
-	}
754
-
755
-	// note : il ne peut pas y avoir d'erreur sur
756
-	// - un 'utilise' sans version.
757
-	// - un 'php' sans version.
758
-	return _T("plugin_necessite_${type}_sans_version", ['plugin' => $nom]);
705
+    // prendre en compte les erreurs de dépendances à PHP
706
+    // ou à une extension PHP avec des messages d'erreurs dédiés.
707
+    $type = 'plugin';
708
+    if ($nom === 'SPIP') {
709
+        $type = 'spip';
710
+    } elseif ($nom === 'PHP') {
711
+        $type = 'php';
712
+    } elseif (strncmp($nom, 'PHP:', 4) === 0) {
713
+        $type = 'extension_php';
714
+        [, $nom] = explode(':', $nom, 2);
715
+    }
716
+
717
+    if (preg_match(_EXTRAIRE_INTERVALLE, $intervalle, $regs)) {
718
+        $minimum = $regs[1];
719
+        $maximum = $regs[2];
720
+
721
+        $minimum_inclus = $intervalle[0] == '[';
722
+        $maximum_inclus = substr($intervalle, -1) == ']';
723
+
724
+        if (strlen($minimum)) {
725
+            if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
726
+                return _T("plugin_${balise}_${type}", [
727
+                    'plugin' => $nom,
728
+                    'version' => ' &ge; ' . $minimum
729
+                ]);
730
+            }
731
+            if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
732
+                return _T("plugin_${balise}_${type}", [
733
+                    'plugin' => $nom,
734
+                    'version' => ' &gt; ' . $minimum
735
+                ]);
736
+            }
737
+        }
738
+
739
+        if (strlen($maximum)) {
740
+            if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
741
+                return _T("plugin_${balise}_${type}", [
742
+                    'plugin' => $nom,
743
+                    'version' => ' &le; ' . $maximum
744
+                ]);
745
+            }
746
+            if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
747
+                return _T("plugin_${balise}_plugin", [
748
+                    'plugin' => $nom,
749
+                    'version' => ' &lt; ' . $maximum
750
+                ]);
751
+            }
752
+        }
753
+    }
754
+
755
+    // note : il ne peut pas y avoir d'erreur sur
756
+    // - un 'utilise' sans version.
757
+    // - un 'php' sans version.
758
+    return _T("plugin_necessite_${type}_sans_version", ['plugin' => $nom]);
759 759
 }
760 760
 
761 761
 
762 762
 function plugin_controler_lib($lib, $url) {
763
-	/* Feature sortie du core, voir STP
763
+    /* Feature sortie du core, voir STP
764 764
 	 * if ($url) {
765 765
 		include_spip('inc/charger_plugin');
766 766
 		$url = '<br />'	. bouton_telechargement_plugin($url, 'lib');
767 767
 	}*/
768
-	return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>";
768
+    return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>";
769 769
 }
770 770
 
771 771
 
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
  *     true si il y a eu des modifications sur la liste des plugins actifs, false sinon
781 781
  **/
782 782
 function actualise_plugins_actifs($pipe_recherche = false) {
783
-	return ecrire_plugin_actifs('', $pipe_recherche, 'force');
783
+    return ecrire_plugin_actifs('', $pipe_recherche, 'force');
784 784
 }
785 785
 
786 786
 
@@ -807,116 +807,116 @@  discard block
 block discarded – undo
807 807
  **/
808 808
 function ecrire_plugin_actifs($plugin, $pipe_recherche = false, $operation = 'raz') {
809 809
 
810
-	// creer le repertoire cache/ si necessaire ! (installation notamment)
811
-	$cache = sous_repertoire(_DIR_CACHE, '', false, true);
812
-
813
-	// Si on n'a ni cache accessible, ni connexion SQL, on ne peut pas faire grand chose encore.
814
-	if (!$cache and !spip_connect()) {
815
-		return false;
816
-	}
817
-
818
-	if ($operation != 'raz') {
819
-		$plugin_valides = liste_chemin_plugin_actifs();
820
-		$plugin_valides = is_plugin_dir($plugin_valides);
821
-		if (defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
822
-			$plugin_valides_supp = liste_chemin_plugin_actifs(_DIR_PLUGINS_SUPPL);
823
-			$plugin_valides_supp = is_plugin_dir($plugin_valides_supp, _DIR_PLUGINS_SUPPL);
824
-			$plugin_valides = array_merge($plugin_valides, $plugin_valides_supp);
825
-		}
826
-		// si des plugins sont en attentes (coches mais impossible a activer)
827
-		// on les reinjecte ici
828
-		if (
829
-			isset($GLOBALS['meta']['plugin_attente'])
830
-			and $a = unserialize($GLOBALS['meta']['plugin_attente'])
831
-		) {
832
-			$plugin_valides = $plugin_valides + liste_chemin_plugin($a);
833
-		}
834
-
835
-		if ($operation == 'ajoute') {
836
-			$plugin = array_merge($plugin_valides, $plugin);
837
-		} elseif ($operation == 'enleve') {
838
-			$plugin = array_diff($plugin_valides, $plugin);
839
-		} else {
840
-			$plugin = $plugin_valides;
841
-		}
842
-	}
843
-	$actifs_avant = $GLOBALS['meta']['plugin'] ?? '';
844
-
845
-	// si une fonction de gestion de dependances existe, l'appeler ici
846
-	if ($ajouter_dependances = charger_fonction('ajouter_dependances', 'plugins', true)) {
847
-		$plugin = $ajouter_dependances($plugin);
848
-	}
849
-
850
-	// recharger le xml des plugins a activer
851
-	// on force le reload ici, meme si le fichier xml n'a pas change
852
-	// pour ne pas rater l'ajout ou la suppression d'un fichier fonctions/options/administrations
853
-	// pourra etre evite quand on ne supportera plus les plugin.xml
854
-	// en deplacant la detection de ces fichiers dans la compilation ci dessous
855
-	[$infos, $liste, $invalides] = liste_plugin_valides($plugin, true);
856
-	// trouver l'ordre d'activation
857
-	[$plugin_valides, $ordre, $reste] = plugin_trier($infos, $liste);
858
-	if ($invalides or $reste) {
859
-		plugins_erreurs(array_merge($invalides, $reste), $liste, $infos);
860
-	}
861
-
862
-	// Ignorer les plugins necessitant une lib absente
863
-	// et preparer la meta d'entete Http
864
-	$err = $msg = $header = [];
865
-	foreach ($plugin_valides as $p => $resume) {
866
-		// Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
867
-		if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') {
868
-			$header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : '');
869
-		}
870
-		if ($resume['dir']) {
871
-			foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
872
-				if (!find_in_path($l['nom'], 'lib/')) {
873
-					$err[$p] = $resume;
874
-					$msg[$p][] = $l;
875
-					unset($plugin_valides[$p]);
876
-				}
877
-			}
878
-		}
879
-	}
880
-	if ($err) {
881
-		plugins_erreurs($err, '', $infos, $msg);
882
-	}
883
-
884
-	if (isset($GLOBALS['meta']['message_crash_plugins'])) {
885
-		effacer_meta('message_crash_plugins');
886
-	}
887
-	ecrire_meta('plugin', serialize($plugin_valides));
888
-	$liste = array_diff_key($liste, $plugin_valides);
889
-	ecrire_meta('plugin_attente', serialize($liste));
890
-	$header = strtolower(implode(',', $header));
891
-	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
892
-		ecrire_fichier(
893
-			_DIR_VAR . 'config.txt',
894
-			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header
895
-		);
896
-	} else {
897
-		@unlink(_DIR_VAR . 'config.txt');
898
-	}
899
-	// generer charger_plugins_chemin.php
900
-	plugins_precompile_chemin($plugin_valides, $ordre);
901
-	// generer les fichiers
902
-	// - charger_plugins_options.php
903
-	// - charger_plugins_fonctions.php
904
-	plugins_precompile_xxxtions($plugin_valides, $ordre);
905
-	// charger les chemins des plugins et les fichiers d'options
906
-	// (qui peuvent déclarer / utiliser des pipelines, ajouter d'autres chemins)
907
-	plugins_amorcer_plugins_actifs();
908
-	// mise a jour de la matrice des pipelines
909
-	$prepend_code = pipeline_matrice_precompile($plugin_valides, $ordre, $pipe_recherche);
910
-	// generer le fichier _CACHE_PIPELINE
911
-	pipeline_precompile($prepend_code);
912
-
913
-	if (spip_connect()) {
914
-		// lancer et initialiser les nouveaux crons !
915
-		include_spip('inc/genie');
916
-		genie_queue_watch_dist();
917
-	}
918
-
919
-	return ($GLOBALS['meta']['plugin'] != $actifs_avant);
810
+    // creer le repertoire cache/ si necessaire ! (installation notamment)
811
+    $cache = sous_repertoire(_DIR_CACHE, '', false, true);
812
+
813
+    // Si on n'a ni cache accessible, ni connexion SQL, on ne peut pas faire grand chose encore.
814
+    if (!$cache and !spip_connect()) {
815
+        return false;
816
+    }
817
+
818
+    if ($operation != 'raz') {
819
+        $plugin_valides = liste_chemin_plugin_actifs();
820
+        $plugin_valides = is_plugin_dir($plugin_valides);
821
+        if (defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
822
+            $plugin_valides_supp = liste_chemin_plugin_actifs(_DIR_PLUGINS_SUPPL);
823
+            $plugin_valides_supp = is_plugin_dir($plugin_valides_supp, _DIR_PLUGINS_SUPPL);
824
+            $plugin_valides = array_merge($plugin_valides, $plugin_valides_supp);
825
+        }
826
+        // si des plugins sont en attentes (coches mais impossible a activer)
827
+        // on les reinjecte ici
828
+        if (
829
+            isset($GLOBALS['meta']['plugin_attente'])
830
+            and $a = unserialize($GLOBALS['meta']['plugin_attente'])
831
+        ) {
832
+            $plugin_valides = $plugin_valides + liste_chemin_plugin($a);
833
+        }
834
+
835
+        if ($operation == 'ajoute') {
836
+            $plugin = array_merge($plugin_valides, $plugin);
837
+        } elseif ($operation == 'enleve') {
838
+            $plugin = array_diff($plugin_valides, $plugin);
839
+        } else {
840
+            $plugin = $plugin_valides;
841
+        }
842
+    }
843
+    $actifs_avant = $GLOBALS['meta']['plugin'] ?? '';
844
+
845
+    // si une fonction de gestion de dependances existe, l'appeler ici
846
+    if ($ajouter_dependances = charger_fonction('ajouter_dependances', 'plugins', true)) {
847
+        $plugin = $ajouter_dependances($plugin);
848
+    }
849
+
850
+    // recharger le xml des plugins a activer
851
+    // on force le reload ici, meme si le fichier xml n'a pas change
852
+    // pour ne pas rater l'ajout ou la suppression d'un fichier fonctions/options/administrations
853
+    // pourra etre evite quand on ne supportera plus les plugin.xml
854
+    // en deplacant la detection de ces fichiers dans la compilation ci dessous
855
+    [$infos, $liste, $invalides] = liste_plugin_valides($plugin, true);
856
+    // trouver l'ordre d'activation
857
+    [$plugin_valides, $ordre, $reste] = plugin_trier($infos, $liste);
858
+    if ($invalides or $reste) {
859
+        plugins_erreurs(array_merge($invalides, $reste), $liste, $infos);
860
+    }
861
+
862
+    // Ignorer les plugins necessitant une lib absente
863
+    // et preparer la meta d'entete Http
864
+    $err = $msg = $header = [];
865
+    foreach ($plugin_valides as $p => $resume) {
866
+        // Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
867
+        if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') {
868
+            $header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : '');
869
+        }
870
+        if ($resume['dir']) {
871
+            foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
872
+                if (!find_in_path($l['nom'], 'lib/')) {
873
+                    $err[$p] = $resume;
874
+                    $msg[$p][] = $l;
875
+                    unset($plugin_valides[$p]);
876
+                }
877
+            }
878
+        }
879
+    }
880
+    if ($err) {
881
+        plugins_erreurs($err, '', $infos, $msg);
882
+    }
883
+
884
+    if (isset($GLOBALS['meta']['message_crash_plugins'])) {
885
+        effacer_meta('message_crash_plugins');
886
+    }
887
+    ecrire_meta('plugin', serialize($plugin_valides));
888
+    $liste = array_diff_key($liste, $plugin_valides);
889
+    ecrire_meta('plugin_attente', serialize($liste));
890
+    $header = strtolower(implode(',', $header));
891
+    if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
892
+        ecrire_fichier(
893
+            _DIR_VAR . 'config.txt',
894
+            (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header
895
+        );
896
+    } else {
897
+        @unlink(_DIR_VAR . 'config.txt');
898
+    }
899
+    // generer charger_plugins_chemin.php
900
+    plugins_precompile_chemin($plugin_valides, $ordre);
901
+    // generer les fichiers
902
+    // - charger_plugins_options.php
903
+    // - charger_plugins_fonctions.php
904
+    plugins_precompile_xxxtions($plugin_valides, $ordre);
905
+    // charger les chemins des plugins et les fichiers d'options
906
+    // (qui peuvent déclarer / utiliser des pipelines, ajouter d'autres chemins)
907
+    plugins_amorcer_plugins_actifs();
908
+    // mise a jour de la matrice des pipelines
909
+    $prepend_code = pipeline_matrice_precompile($plugin_valides, $ordre, $pipe_recherche);
910
+    // generer le fichier _CACHE_PIPELINE
911
+    pipeline_precompile($prepend_code);
912
+
913
+    if (spip_connect()) {
914
+        // lancer et initialiser les nouveaux crons !
915
+        include_spip('inc/genie');
916
+        genie_queue_watch_dist();
917
+    }
918
+
919
+    return ($GLOBALS['meta']['plugin'] != $actifs_avant);
920 920
 }
921 921
 
922 922
 /**
@@ -935,74 +935,74 @@  discard block
 block discarded – undo
935 935
  *     Couples (prefixe => infos complètes) des plugins qui seront actifs, dans l'ordre de leurs dépendances
936 936
 **/
937 937
 function plugins_precompile_chemin($plugin_valides, $ordre) {
938
-	$chemins = [
939
-		'public' => [],
940
-		'prive' => []
941
-	];
942
-	$contenu = '';
943
-	foreach ($ordre as $p => $info) {
944
-		// $ordre peur contenir des plugins en attente et non valides pour ce hit
945
-		if (isset($plugin_valides[$p])) {
946
-			$dir_type = $plugin_valides[$p]['dir_type'];
947
-			$plug = $plugin_valides[$p]['dir'];
948
-			// definir le plugin, donc le path avant l'include du fichier options
949
-			// permet de faire des include_spip pour attraper un inc_ du plugin
950
-
951
-			$dir = $dir_type . ".'" . $plug . "/'";
952
-
953
-			$prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
954
-			if (
955
-				$prefix !== 'SPIP'
956
-				and strpos($dir, ':') === false // exclure le cas des procure:
957
-			) {
958
-				$contenu .= "define('_DIR_PLUGIN_$prefix',$dir);\n";
959
-				if (!$info['chemin']) {
960
-					$chemins['public'][] = "_DIR_PLUGIN_$prefix";
961
-					$chemins['prive'][] = "_DIR_PLUGIN_$prefix";
962
-					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
963
-						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
964
-					}
965
-				}
966
-				else {
967
-					foreach ($info['chemin'] as $chemin) {
968
-						if (
969
-							!isset($chemin['version']) or plugin_version_compatible(
970
-								$chemin['version'],
971
-								$GLOBALS['spip_version_branche'],
972
-								'spip'
973
-							)
974
-						) {
975
-							$dir = $chemin['path'];
976
-							if (strlen($dir) and $dir[0] == '/') {
977
-								$dir = substr($dir, 1);
978
-							}
979
-							if (strlen($dir) and $dir == './') {
980
-								$dir = '';
981
-							}
982
-							if (strlen($dir)) {
983
-								$dir = rtrim($dir, '/') . '/';
984
-							}
985
-							if (!isset($chemin['type']) or $chemin['type'] == 'public') {
986
-								$chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
987
-							}
988
-							if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
989
-								$chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
990
-							}
991
-						}
992
-					}
993
-				}
994
-			}
995
-		}
996
-	}
997
-	if (count($chemins['public']) or count($chemins['prive'])) {
998
-		$contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode(
999
-			',',
1000
-			array_reverse($chemins['public'])
1001
-		) . "]);\n"
1002
-			. 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n";
1003
-	}
1004
-
1005
-	ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
938
+    $chemins = [
939
+        'public' => [],
940
+        'prive' => []
941
+    ];
942
+    $contenu = '';
943
+    foreach ($ordre as $p => $info) {
944
+        // $ordre peur contenir des plugins en attente et non valides pour ce hit
945
+        if (isset($plugin_valides[$p])) {
946
+            $dir_type = $plugin_valides[$p]['dir_type'];
947
+            $plug = $plugin_valides[$p]['dir'];
948
+            // definir le plugin, donc le path avant l'include du fichier options
949
+            // permet de faire des include_spip pour attraper un inc_ du plugin
950
+
951
+            $dir = $dir_type . ".'" . $plug . "/'";
952
+
953
+            $prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
954
+            if (
955
+                $prefix !== 'SPIP'
956
+                and strpos($dir, ':') === false // exclure le cas des procure:
957
+            ) {
958
+                $contenu .= "define('_DIR_PLUGIN_$prefix',$dir);\n";
959
+                if (!$info['chemin']) {
960
+                    $chemins['public'][] = "_DIR_PLUGIN_$prefix";
961
+                    $chemins['prive'][] = "_DIR_PLUGIN_$prefix";
962
+                    if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
963
+                        $chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
964
+                    }
965
+                }
966
+                else {
967
+                    foreach ($info['chemin'] as $chemin) {
968
+                        if (
969
+                            !isset($chemin['version']) or plugin_version_compatible(
970
+                                $chemin['version'],
971
+                                $GLOBALS['spip_version_branche'],
972
+                                'spip'
973
+                            )
974
+                        ) {
975
+                            $dir = $chemin['path'];
976
+                            if (strlen($dir) and $dir[0] == '/') {
977
+                                $dir = substr($dir, 1);
978
+                            }
979
+                            if (strlen($dir) and $dir == './') {
980
+                                $dir = '';
981
+                            }
982
+                            if (strlen($dir)) {
983
+                                $dir = rtrim($dir, '/') . '/';
984
+                            }
985
+                            if (!isset($chemin['type']) or $chemin['type'] == 'public') {
986
+                                $chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
987
+                            }
988
+                            if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
989
+                                $chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
990
+                            }
991
+                        }
992
+                    }
993
+                }
994
+            }
995
+        }
996
+    }
997
+    if (count($chemins['public']) or count($chemins['prive'])) {
998
+        $contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode(
999
+            ',',
1000
+            array_reverse($chemins['public'])
1001
+        ) . "]);\n"
1002
+            . 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n";
1003
+    }
1004
+
1005
+    ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
1006 1006
 }
1007 1007
 
1008 1008
 /**
@@ -1020,67 +1020,67 @@  discard block
 block discarded – undo
1020 1020
  *     Couples (prefixe => infos complètes) des plugins qui seront actifs, dans l'ordre de leurs dépendances
1021 1021
 **/
1022 1022
 function plugins_precompile_xxxtions($plugin_valides, $ordre) {
1023
-	$contenu = ['options' => '', 'fonctions' => ''];
1024
-	$boutons = [];
1025
-	$onglets = [];
1026
-	$sign = '';
1027
-
1028
-	foreach ($ordre as $p => $info) {
1029
-		// $ordre peur contenir des plugins en attente et non valides pour ce hit
1030
-		if (isset($plugin_valides[$p])) {
1031
-			$dir_type = $plugin_valides[$p]['dir_type'];
1032
-			$plug = $plugin_valides[$p]['dir'];
1033
-			$dir = constant($dir_type);
1034
-			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1035
-			if ($info['menu']) {
1036
-				$boutons = array_merge($boutons, $info['menu']);
1037
-			}
1038
-			if ($info['onglet']) {
1039
-				$onglets = array_merge($onglets, $info['onglet']);
1040
-			}
1041
-			foreach ($contenu as $charge => $v) {
1042
-				// si pas declare/detecte a la lecture du paquet.xml,
1043
-				// detecer a nouveau ici puisque son ajout ne provoque pas une modif du paquet.xml
1044
-				// donc ni sa relecture, ni sa detection
1045
-				if (
1046
-					!isset($info[$charge])
1047
-					and $dir // exclure le cas du plugin "SPIP"
1048
-					and strpos($dir, ':') === false // exclure le cas des procure:
1049
-					and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1050
-				) {
1051
-					if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) {
1052
-						$info[$charge] = [$file];
1053
-					}
1054
-				}
1055
-				if (isset($info[$charge])) {
1056
-					$files = $info[$charge];
1057
-					foreach ($files as $k => $file) {
1058
-						// on genere un if file_exists devant chaque include
1059
-						// pour pouvoir garder le meme niveau d'erreur general
1060
-						$file = trim($file);
1061
-						if (
1062
-							!is_readable("$dir$plug/$file")
1063
-							// uniquement pour les paquet.xml
1064
-							and file_exists("$dir$plug/paquet.xml")
1065
-						) {
1066
-							unset($info[$charge][$k]);
1067
-						} else {
1068
-							$_file = $root_dir_type . ".'$plug/$file'";
1069
-							$contenu[$charge] .= "include_once_check($_file);\n";
1070
-						}
1071
-					}
1072
-				}
1073
-			}
1074
-			$sign .= md5(serialize($info));
1075
-		}
1076
-	}
1077
-
1078
-	$contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1079
-	$contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons)
1080
-		. plugin_ongletbouton('onglets_plugins', $onglets);
1081
-
1082
-	ecrire_fichier_php(_CACHE_PLUGINS_OPT, $contenu['options']);
1083
-	ecrire_fichier_php(_CACHE_PLUGINS_FCT, $contenu['fonctions']);
1023
+    $contenu = ['options' => '', 'fonctions' => ''];
1024
+    $boutons = [];
1025
+    $onglets = [];
1026
+    $sign = '';
1027
+
1028
+    foreach ($ordre as $p => $info) {
1029
+        // $ordre peur contenir des plugins en attente et non valides pour ce hit
1030
+        if (isset($plugin_valides[$p])) {
1031
+            $dir_type = $plugin_valides[$p]['dir_type'];
1032
+            $plug = $plugin_valides[$p]['dir'];
1033
+            $dir = constant($dir_type);
1034
+            $root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1035
+            if ($info['menu']) {
1036
+                $boutons = array_merge($boutons, $info['menu']);
1037
+            }
1038
+            if ($info['onglet']) {
1039
+                $onglets = array_merge($onglets, $info['onglet']);
1040
+            }
1041
+            foreach ($contenu as $charge => $v) {
1042
+                // si pas declare/detecte a la lecture du paquet.xml,
1043
+                // detecer a nouveau ici puisque son ajout ne provoque pas une modif du paquet.xml
1044
+                // donc ni sa relecture, ni sa detection
1045
+                if (
1046
+                    !isset($info[$charge])
1047
+                    and $dir // exclure le cas du plugin "SPIP"
1048
+                    and strpos($dir, ':') === false // exclure le cas des procure:
1049
+                    and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1050
+                ) {
1051
+                    if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) {
1052
+                        $info[$charge] = [$file];
1053
+                    }
1054
+                }
1055
+                if (isset($info[$charge])) {
1056
+                    $files = $info[$charge];
1057
+                    foreach ($files as $k => $file) {
1058
+                        // on genere un if file_exists devant chaque include
1059
+                        // pour pouvoir garder le meme niveau d'erreur general
1060
+                        $file = trim($file);
1061
+                        if (
1062
+                            !is_readable("$dir$plug/$file")
1063
+                            // uniquement pour les paquet.xml
1064
+                            and file_exists("$dir$plug/paquet.xml")
1065
+                        ) {
1066
+                            unset($info[$charge][$k]);
1067
+                        } else {
1068
+                            $_file = $root_dir_type . ".'$plug/$file'";
1069
+                            $contenu[$charge] .= "include_once_check($_file);\n";
1070
+                        }
1071
+                    }
1072
+                }
1073
+            }
1074
+            $sign .= md5(serialize($info));
1075
+        }
1076
+    }
1077
+
1078
+    $contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1079
+    $contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons)
1080
+        . plugin_ongletbouton('onglets_plugins', $onglets);
1081
+
1082
+    ecrire_fichier_php(_CACHE_PLUGINS_OPT, $contenu['options']);
1083
+    ecrire_fichier_php(_CACHE_PLUGINS_FCT, $contenu['fonctions']);
1084 1084
 }
1085 1085
 
1086 1086
 /**
@@ -1099,24 +1099,24 @@  discard block
 block discarded – undo
1099 1099
  * @return string Code php
1100 1100
  */
1101 1101
 function plugin_ongletbouton($nom, $val) {
1102
-	if (!$val) {
1103
-		$val = [];
1104
-	}
1105
-
1106
-	$val = serialize($val);
1107
-	$md5 = md5($val);
1108
-
1109
-	if (!defined("_UPDATED_$nom")) {
1110
-		define("_UPDATED_$nom", $val);
1111
-		define("_UPDATED_md5_$nom", $md5);
1112
-	}
1113
-	$val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1114
-
1115
-	return
1116
-		"if (!function_exists('$nom')) {\n"
1117
-		. "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1118
-		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1119
-		. "}\n";
1102
+    if (!$val) {
1103
+        $val = [];
1104
+    }
1105
+
1106
+    $val = serialize($val);
1107
+    $md5 = md5($val);
1108
+
1109
+    if (!defined("_UPDATED_$nom")) {
1110
+        define("_UPDATED_$nom", $val);
1111
+        define("_UPDATED_md5_$nom", $md5);
1112
+    }
1113
+    $val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1114
+
1115
+    return
1116
+        "if (!function_exists('$nom')) {\n"
1117
+        . "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1118
+        . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1119
+        . "}\n";
1120 1120
 }
1121 1121
 
1122 1122
 /**
@@ -1131,15 +1131,15 @@  discard block
 block discarded – undo
1131 1131
 **/
1132 1132
 function plugins_amorcer_plugins_actifs() {
1133 1133
 
1134
-	if (@is_readable(_CACHE_PLUGINS_PATH)) {
1135
-		include_once(_CACHE_PLUGINS_PATH);
1136
-	}
1134
+    if (@is_readable(_CACHE_PLUGINS_PATH)) {
1135
+        include_once(_CACHE_PLUGINS_PATH);
1136
+    }
1137 1137
 
1138
-	if (@is_readable(_CACHE_PLUGINS_OPT)) {
1139
-		include_once(_CACHE_PLUGINS_OPT);
1140
-	} else {
1141
-		spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT);
1142
-	}
1138
+    if (@is_readable(_CACHE_PLUGINS_OPT)) {
1139
+        include_once(_CACHE_PLUGINS_OPT);
1140
+    } else {
1141
+        spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT);
1142
+    }
1143 1143
 }
1144 1144
 
1145 1145
 /**
@@ -1162,140 +1162,140 @@  discard block
 block discarded – undo
1162 1162
  *     Couples (nom du pipeline => Code PHP à insérer au début du pipeline)
1163 1163
 **/
1164 1164
 function pipeline_matrice_precompile($plugin_valides, $ordre, $pipe_recherche) {
1165
-	static $liste_pipe_manquants = [];
1166
-	if (($pipe_recherche) && (!in_array($pipe_recherche, $liste_pipe_manquants))) {
1167
-		$liste_pipe_manquants[] = $pipe_recherche;
1168
-	}
1169
-
1170
-	$prepend_code = [];
1171
-
1172
-	foreach ($ordre as $p => $info) {
1173
-		// $ordre peur contenir des plugins en attente et non valides pour ce hit
1174
-		if (isset($plugin_valides[$p])) {
1175
-			$dir_type = $plugin_valides[$p]['dir_type'];
1176
-			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1177
-			$plug = $plugin_valides[$p]['dir'];
1178
-			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_');
1179
-			if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1180
-				foreach ($info['pipeline'] as $pipe) {
1181
-					$nom = $pipe['nom'];
1182
-					if (isset($pipe['action'])) {
1183
-						$action = $pipe['action'];
1184
-					} else {
1185
-						$action = $nom;
1186
-					}
1187
-					$nomlower = strtolower($nom);
1188
-					if (
1189
-						$nomlower != $nom
1190
-						and isset($GLOBALS['spip_pipeline'][$nom])
1191
-						and !isset($GLOBALS['spip_pipeline'][$nomlower])
1192
-					) {
1193
-						$GLOBALS['spip_pipeline'][$nomlower] = $GLOBALS['spip_pipeline'][$nom];
1194
-						unset($GLOBALS['spip_pipeline'][$nom]);
1195
-					}
1196
-					$nom = $nomlower;
1197
-					// une action vide est une declaration qui ne doit pas etre compilee !
1198
-					if (!isset($GLOBALS['spip_pipeline'][$nom])) { // creer le pipeline eventuel
1199
-					$GLOBALS['spip_pipeline'][$nom] = '';
1200
-					}
1201
-					if ($action) {
1202
-						if (strpos($GLOBALS['spip_pipeline'][$nom], (string) "|$prefix$action") === false) {
1203
-							$GLOBALS['spip_pipeline'][$nom] = preg_replace(
1204
-								',(\|\||$),',
1205
-								"|$prefix$action\\1",
1206
-								$GLOBALS['spip_pipeline'][$nom],
1207
-								1
1208
-							);
1209
-						}
1210
-						if (isset($pipe['inclure'])) {
1211
-							$GLOBALS['spip_matrice']["$prefix$action"] =
1212
-								"$root_dir_type:$plug/" . $pipe['inclure'];
1213
-						}
1214
-					}
1215
-				}
1216
-			}
1217
-			if (isset($info['genie']) and is_countable($info['genie']) ? count($info['genie']) : 0) {
1218
-				if (!isset($prepend_code['taches_generales_cron'])) {
1219
-					$prepend_code['taches_generales_cron'] = '';
1220
-				}
1221
-				foreach ($info['genie'] as $genie) {
1222
-					$nom = $prefix . $genie['nom'];
1223
-					$periode = max(60, intval($genie['periode']));
1224
-					if (charger_fonction($nom, 'genie', true)) {
1225
-						$prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
1226
-					} else {
1227
-						spip_log("Fonction genie_$nom introuvable", _LOG_ERREUR);
1228
-					}
1229
-				}
1230
-			}
1231
-			if (isset($info['style']) and is_countable($info['style']) ? count($info['style']) : 0) {
1232
-				if (!isset($prepend_code['insert_head_css'])) {
1233
-					$prepend_code['insert_head_css'] = '';
1234
-				}
1235
-				if (!isset($prepend_code['header_prive_css'])) {
1236
-					$prepend_code['header_prive_css'] = '';
1237
-				}
1238
-				foreach ($info['style'] as $style) {
1239
-					if (isset($style['path']) and $style['path']) {
1240
-						$code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1241
-					} else {
1242
-						$code = "if (\$f='" . addslashes($style['url']) . "') ";
1243
-					}
1244
-					$code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1245
-					if (isset($style['media']) and strlen($style['media'])) {
1246
-						$code .= ' media="' . addslashes($style['media']) . '"';
1247
-					}
1248
-					$code .= "/>';\n";
1249
-					if ($style['type'] != 'prive') {
1250
-						$prepend_code['insert_head_css'] .= $code;
1251
-					}
1252
-					if ($style['type'] != 'public') {
1253
-						$prepend_code['header_prive_css'] .= $code;
1254
-					}
1255
-				}
1256
-			}
1257
-			if (!isset($prepend_code['insert_head'])) {
1258
-				$prepend_code['insert_head'] = '';
1259
-			}
1260
-			if (!isset($prepend_code['header_prive'])) {
1261
-				$prepend_code['header_prive'] = '';
1262
-			}
1263
-			if (isset($info['script']) and is_countable($info['script']) ? count($info['script']) : 0) {
1264
-				foreach ($info['script'] as $script) {
1265
-					if (isset($script['path']) and $script['path']) {
1266
-						$code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1267
-					} else {
1268
-						$code = "if (\$f='" . addslashes($script['url']) . "') ";
1269
-					}
1270
-					$code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1271
-					if ($script['type'] != 'prive') {
1272
-						$prepend_code['insert_head'] .= $code;
1273
-					}
1274
-					if ($script['type'] != 'public') {
1275
-						$prepend_code['header_prive'] .= $code;
1276
-					}
1277
-				}
1278
-			}
1279
-		}
1280
-	}
1281
-
1282
-	$prepend_code['insert_head'] =
1283
-		"include_once_check(_DIR_RESTREINT . 'inc/pipelines.php');\n"
1284
-		. "\$val = minipipe('f_jQuery', \$val);\n"
1285
-		. $prepend_code['insert_head'];
1286
-	$prepend_code['header_prive'] =
1287
-		"include_once_check(_DIR_RESTREINT . 'inc/pipelines_ecrire.php');\n"
1288
-		. "\$val = minipipe('f_jQuery_prive', \$val);\n"
1289
-		. $prepend_code['header_prive'];
1290
-
1291
-	// on ajoute les pipe qui ont ete recenses manquants
1292
-	foreach ($liste_pipe_manquants as $add_pipe) {
1293
-		if (!isset($GLOBALS['spip_pipeline'][$add_pipe])) {
1294
-			$GLOBALS['spip_pipeline'][$add_pipe] = '';
1295
-		}
1296
-	}
1297
-
1298
-	return $prepend_code;
1165
+    static $liste_pipe_manquants = [];
1166
+    if (($pipe_recherche) && (!in_array($pipe_recherche, $liste_pipe_manquants))) {
1167
+        $liste_pipe_manquants[] = $pipe_recherche;
1168
+    }
1169
+
1170
+    $prepend_code = [];
1171
+
1172
+    foreach ($ordre as $p => $info) {
1173
+        // $ordre peur contenir des plugins en attente et non valides pour ce hit
1174
+        if (isset($plugin_valides[$p])) {
1175
+            $dir_type = $plugin_valides[$p]['dir_type'];
1176
+            $root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1177
+            $plug = $plugin_valides[$p]['dir'];
1178
+            $prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_');
1179
+            if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1180
+                foreach ($info['pipeline'] as $pipe) {
1181
+                    $nom = $pipe['nom'];
1182
+                    if (isset($pipe['action'])) {
1183
+                        $action = $pipe['action'];
1184
+                    } else {
1185
+                        $action = $nom;
1186
+                    }
1187
+                    $nomlower = strtolower($nom);
1188
+                    if (
1189
+                        $nomlower != $nom
1190
+                        and isset($GLOBALS['spip_pipeline'][$nom])
1191
+                        and !isset($GLOBALS['spip_pipeline'][$nomlower])
1192
+                    ) {
1193
+                        $GLOBALS['spip_pipeline'][$nomlower] = $GLOBALS['spip_pipeline'][$nom];
1194
+                        unset($GLOBALS['spip_pipeline'][$nom]);
1195
+                    }
1196
+                    $nom = $nomlower;
1197
+                    // une action vide est une declaration qui ne doit pas etre compilee !
1198
+                    if (!isset($GLOBALS['spip_pipeline'][$nom])) { // creer le pipeline eventuel
1199
+                    $GLOBALS['spip_pipeline'][$nom] = '';
1200
+                    }
1201
+                    if ($action) {
1202
+                        if (strpos($GLOBALS['spip_pipeline'][$nom], (string) "|$prefix$action") === false) {
1203
+                            $GLOBALS['spip_pipeline'][$nom] = preg_replace(
1204
+                                ',(\|\||$),',
1205
+                                "|$prefix$action\\1",
1206
+                                $GLOBALS['spip_pipeline'][$nom],
1207
+                                1
1208
+                            );
1209
+                        }
1210
+                        if (isset($pipe['inclure'])) {
1211
+                            $GLOBALS['spip_matrice']["$prefix$action"] =
1212
+                                "$root_dir_type:$plug/" . $pipe['inclure'];
1213
+                        }
1214
+                    }
1215
+                }
1216
+            }
1217
+            if (isset($info['genie']) and is_countable($info['genie']) ? count($info['genie']) : 0) {
1218
+                if (!isset($prepend_code['taches_generales_cron'])) {
1219
+                    $prepend_code['taches_generales_cron'] = '';
1220
+                }
1221
+                foreach ($info['genie'] as $genie) {
1222
+                    $nom = $prefix . $genie['nom'];
1223
+                    $periode = max(60, intval($genie['periode']));
1224
+                    if (charger_fonction($nom, 'genie', true)) {
1225
+                        $prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
1226
+                    } else {
1227
+                        spip_log("Fonction genie_$nom introuvable", _LOG_ERREUR);
1228
+                    }
1229
+                }
1230
+            }
1231
+            if (isset($info['style']) and is_countable($info['style']) ? count($info['style']) : 0) {
1232
+                if (!isset($prepend_code['insert_head_css'])) {
1233
+                    $prepend_code['insert_head_css'] = '';
1234
+                }
1235
+                if (!isset($prepend_code['header_prive_css'])) {
1236
+                    $prepend_code['header_prive_css'] = '';
1237
+                }
1238
+                foreach ($info['style'] as $style) {
1239
+                    if (isset($style['path']) and $style['path']) {
1240
+                        $code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1241
+                    } else {
1242
+                        $code = "if (\$f='" . addslashes($style['url']) . "') ";
1243
+                    }
1244
+                    $code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1245
+                    if (isset($style['media']) and strlen($style['media'])) {
1246
+                        $code .= ' media="' . addslashes($style['media']) . '"';
1247
+                    }
1248
+                    $code .= "/>';\n";
1249
+                    if ($style['type'] != 'prive') {
1250
+                        $prepend_code['insert_head_css'] .= $code;
1251
+                    }
1252
+                    if ($style['type'] != 'public') {
1253
+                        $prepend_code['header_prive_css'] .= $code;
1254
+                    }
1255
+                }
1256
+            }
1257
+            if (!isset($prepend_code['insert_head'])) {
1258
+                $prepend_code['insert_head'] = '';
1259
+            }
1260
+            if (!isset($prepend_code['header_prive'])) {
1261
+                $prepend_code['header_prive'] = '';
1262
+            }
1263
+            if (isset($info['script']) and is_countable($info['script']) ? count($info['script']) : 0) {
1264
+                foreach ($info['script'] as $script) {
1265
+                    if (isset($script['path']) and $script['path']) {
1266
+                        $code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1267
+                    } else {
1268
+                        $code = "if (\$f='" . addslashes($script['url']) . "') ";
1269
+                    }
1270
+                    $code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1271
+                    if ($script['type'] != 'prive') {
1272
+                        $prepend_code['insert_head'] .= $code;
1273
+                    }
1274
+                    if ($script['type'] != 'public') {
1275
+                        $prepend_code['header_prive'] .= $code;
1276
+                    }
1277
+                }
1278
+            }
1279
+        }
1280
+    }
1281
+
1282
+    $prepend_code['insert_head'] =
1283
+        "include_once_check(_DIR_RESTREINT . 'inc/pipelines.php');\n"
1284
+        . "\$val = minipipe('f_jQuery', \$val);\n"
1285
+        . $prepend_code['insert_head'];
1286
+    $prepend_code['header_prive'] =
1287
+        "include_once_check(_DIR_RESTREINT . 'inc/pipelines_ecrire.php');\n"
1288
+        . "\$val = minipipe('f_jQuery_prive', \$val);\n"
1289
+        . $prepend_code['header_prive'];
1290
+
1291
+    // on ajoute les pipe qui ont ete recenses manquants
1292
+    foreach ($liste_pipe_manquants as $add_pipe) {
1293
+        if (!isset($GLOBALS['spip_pipeline'][$add_pipe])) {
1294
+            $GLOBALS['spip_pipeline'][$add_pipe] = '';
1295
+        }
1296
+    }
1297
+
1298
+    return $prepend_code;
1299 1299
 }
1300 1300
 
1301 1301
 /**
@@ -1322,62 +1322,62 @@  discard block
 block discarded – undo
1322 1322
 **/
1323 1323
 function pipeline_precompile($prepend_code = []) {
1324 1324
 
1325
-	$all_pipes = $all_pipes_end = '';
1326
-	if (!empty($GLOBALS['spip_pipeline']['all'])) {
1327
-		$a = explode('||', $GLOBALS['spip_pipeline']['all'], 2);
1328
-		unset($GLOBALS['spip_pipeline']['all']);
1329
-		$all_pipes = trim(array_shift($a));
1330
-		if ($all_pipes) {
1331
-			$all_pipes = '|' . ltrim($all_pipes, '|');
1332
-		}
1333
-		if (count($a)) {
1334
-			$all_pipes_end = '||' . array_shift($a);
1335
-		}
1336
-	}
1337
-	$content = '';
1338
-	foreach ($GLOBALS['spip_pipeline'] as $action => $pipeline) {
1339
-		$s_inc = '';
1340
-		$s_call = '';
1341
-		if ($all_pipes) {
1342
-			$pipeline = preg_replace(',(\|\||$),', "$all_pipes\\1", $pipeline, 1);
1343
-		}
1344
-		if ($all_pipes_end) {
1345
-			$pipeline .= $all_pipes_end;
1346
-		}
1347
-		$pipe = array_filter(explode('|', $pipeline));
1348
-		// Eclater le pipeline en filtres et appliquer chaque filtre
1349
-		foreach ($pipe as $fonc) {
1350
-			$fonc = trim($fonc);
1351
-			$s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1352
-			if (isset($GLOBALS['spip_matrice'][$fonc])) {
1353
-				$file = $GLOBALS['spip_matrice'][$fonc];
1354
-				$file = "'$file'";
1355
-				// si un _DIR_XXX: est dans la chaine, on extrait la constante
1356
-				if (preg_match(',(_(DIR|ROOT)_[A-Z_]+):,Ums', $file, $regs)) {
1357
-					$dir = $regs[1];
1358
-					$root_dir = str_replace('_DIR_', '_ROOT_', $dir);
1359
-					if (defined($root_dir)) {
1360
-						$dir = $root_dir;
1361
-					}
1362
-					$file = str_replace($regs[0], "'." . $dir . ".'", $file);
1363
-					$file = str_replace("''.", '', $file);
1364
-					$file = str_replace(constant($dir), '', $file);
1365
-				}
1366
-				$s_inc .= "include_once_check($file);\n";
1367
-			}
1368
-		}
1369
-		if (strlen($s_inc)) {
1370
-			$s_inc = "static \$inc=null;\nif (!\$inc){\n$s_inc\$inc=true;\n}\n";
1371
-		}
1372
-		$content .= "// Pipeline $action \n"
1373
-			. "function execute_pipeline_$action(&\$val){\n"
1374
-			. $s_inc
1375
-			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1376
-			. $s_call
1377
-			. "return \$val;\n}\n";
1378
-	}
1379
-	ecrire_fichier_php(_CACHE_PIPELINES, $content);
1380
-	clear_path_cache();
1325
+    $all_pipes = $all_pipes_end = '';
1326
+    if (!empty($GLOBALS['spip_pipeline']['all'])) {
1327
+        $a = explode('||', $GLOBALS['spip_pipeline']['all'], 2);
1328
+        unset($GLOBALS['spip_pipeline']['all']);
1329
+        $all_pipes = trim(array_shift($a));
1330
+        if ($all_pipes) {
1331
+            $all_pipes = '|' . ltrim($all_pipes, '|');
1332
+        }
1333
+        if (count($a)) {
1334
+            $all_pipes_end = '||' . array_shift($a);
1335
+        }
1336
+    }
1337
+    $content = '';
1338
+    foreach ($GLOBALS['spip_pipeline'] as $action => $pipeline) {
1339
+        $s_inc = '';
1340
+        $s_call = '';
1341
+        if ($all_pipes) {
1342
+            $pipeline = preg_replace(',(\|\||$),', "$all_pipes\\1", $pipeline, 1);
1343
+        }
1344
+        if ($all_pipes_end) {
1345
+            $pipeline .= $all_pipes_end;
1346
+        }
1347
+        $pipe = array_filter(explode('|', $pipeline));
1348
+        // Eclater le pipeline en filtres et appliquer chaque filtre
1349
+        foreach ($pipe as $fonc) {
1350
+            $fonc = trim($fonc);
1351
+            $s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1352
+            if (isset($GLOBALS['spip_matrice'][$fonc])) {
1353
+                $file = $GLOBALS['spip_matrice'][$fonc];
1354
+                $file = "'$file'";
1355
+                // si un _DIR_XXX: est dans la chaine, on extrait la constante
1356
+                if (preg_match(',(_(DIR|ROOT)_[A-Z_]+):,Ums', $file, $regs)) {
1357
+                    $dir = $regs[1];
1358
+                    $root_dir = str_replace('_DIR_', '_ROOT_', $dir);
1359
+                    if (defined($root_dir)) {
1360
+                        $dir = $root_dir;
1361
+                    }
1362
+                    $file = str_replace($regs[0], "'." . $dir . ".'", $file);
1363
+                    $file = str_replace("''.", '', $file);
1364
+                    $file = str_replace(constant($dir), '', $file);
1365
+                }
1366
+                $s_inc .= "include_once_check($file);\n";
1367
+            }
1368
+        }
1369
+        if (strlen($s_inc)) {
1370
+            $s_inc = "static \$inc=null;\nif (!\$inc){\n$s_inc\$inc=true;\n}\n";
1371
+        }
1372
+        $content .= "// Pipeline $action \n"
1373
+            . "function execute_pipeline_$action(&\$val){\n"
1374
+            . $s_inc
1375
+            . ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1376
+            . $s_call
1377
+            . "return \$val;\n}\n";
1378
+    }
1379
+    ecrire_fichier_php(_CACHE_PIPELINES, $content);
1380
+    clear_path_cache();
1381 1381
 }
1382 1382
 
1383 1383
 
@@ -1390,12 +1390,12 @@  discard block
 block discarded – undo
1390 1390
  *     true si le plugin est actif, false sinon
1391 1391
 **/
1392 1392
 function plugin_est_installe($plug_path) {
1393
-	$plugin_installes = isset($GLOBALS['meta']['plugin_installes']) ? unserialize($GLOBALS['meta']['plugin_installes']) : [];
1394
-	if (!$plugin_installes) {
1395
-		return false;
1396
-	}
1393
+    $plugin_installes = isset($GLOBALS['meta']['plugin_installes']) ? unserialize($GLOBALS['meta']['plugin_installes']) : [];
1394
+    if (!$plugin_installes) {
1395
+        return false;
1396
+    }
1397 1397
 
1398
-	return in_array($plug_path, $plugin_installes);
1398
+    return in_array($plug_path, $plugin_installes);
1399 1399
 }
1400 1400
 
1401 1401
 
@@ -1408,46 +1408,46 @@  discard block
 block discarded – undo
1408 1408
  * @uses plugins_installer_dist()
1409 1409
  **/
1410 1410
 function plugin_installes_meta() {
1411
-	if (isset($GLOBALS['fichier_php_compile_recent'])) {
1412
-		// attendre eventuellement l'invalidation du cache opcode
1413
-		spip_attend_invalidation_opcode_cache($GLOBALS['fichier_php_compile_recent']);
1414
-	}
1415
-
1416
-	$installer_plugins = charger_fonction('installer', 'plugins');
1417
-	$meta_plug_installes = [];
1418
-	foreach (unserialize($GLOBALS['meta']['plugin']) as $prefix => $resume) {
1419
-		if ($plug = $resume['dir']) {
1420
-			$infos = $installer_plugins($plug, 'install', $resume['dir_type']);
1421
-			if ($infos) {
1422
-				if (!is_array($infos) or $infos['install_test'][0]) {
1423
-					$meta_plug_installes[] = $plug;
1424
-				}
1425
-				if (is_array($infos)) {
1426
-					[$ok, $trace] = $infos['install_test'];
1427
-					$titre = _T('plugin_titre_installation', ['plugin' => typo($infos['nom'])]);
1428
-					$result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec'));
1429
-					if (_IS_CLI) {
1430
-						include_spip('inc/filtres');
1431
-						$trace = ltrim(textebrut($trace) . "\n" . $result);
1432
-						$trace = '    ' . str_replace("\n", "\n    ", $trace);
1433
-						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1434
-						  $trace,
1435
-						  "\n";
1436
-					}
1437
-					else {
1438
-						include_spip('inc/filtres_boites');
1439
-						echo "<div class='install-plugins svp_retour'>"
1440
-							. boite_ouvrir($titre, ($ok ? 'success' : 'error'))
1441
-							. $trace
1442
-							. "<div class='result'>$result</div>"
1443
-							. boite_fermer()
1444
-							. '</div>';
1445
-					}
1446
-				}
1447
-			}
1448
-		}
1449
-	}
1450
-	ecrire_meta('plugin_installes', serialize($meta_plug_installes), 'non');
1411
+    if (isset($GLOBALS['fichier_php_compile_recent'])) {
1412
+        // attendre eventuellement l'invalidation du cache opcode
1413
+        spip_attend_invalidation_opcode_cache($GLOBALS['fichier_php_compile_recent']);
1414
+    }
1415
+
1416
+    $installer_plugins = charger_fonction('installer', 'plugins');
1417
+    $meta_plug_installes = [];
1418
+    foreach (unserialize($GLOBALS['meta']['plugin']) as $prefix => $resume) {
1419
+        if ($plug = $resume['dir']) {
1420
+            $infos = $installer_plugins($plug, 'install', $resume['dir_type']);
1421
+            if ($infos) {
1422
+                if (!is_array($infos) or $infos['install_test'][0]) {
1423
+                    $meta_plug_installes[] = $plug;
1424
+                }
1425
+                if (is_array($infos)) {
1426
+                    [$ok, $trace] = $infos['install_test'];
1427
+                    $titre = _T('plugin_titre_installation', ['plugin' => typo($infos['nom'])]);
1428
+                    $result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec'));
1429
+                    if (_IS_CLI) {
1430
+                        include_spip('inc/filtres');
1431
+                        $trace = ltrim(textebrut($trace) . "\n" . $result);
1432
+                        $trace = '    ' . str_replace("\n", "\n    ", $trace);
1433
+                        echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1434
+                            $trace,
1435
+                            "\n";
1436
+                    }
1437
+                    else {
1438
+                        include_spip('inc/filtres_boites');
1439
+                        echo "<div class='install-plugins svp_retour'>"
1440
+                            . boite_ouvrir($titre, ($ok ? 'success' : 'error'))
1441
+                            . $trace
1442
+                            . "<div class='result'>$result</div>"
1443
+                            . boite_fermer()
1444
+                            . '</div>';
1445
+                    }
1446
+                }
1447
+            }
1448
+        }
1449
+    }
1450
+    ecrire_meta('plugin_installes', serialize($meta_plug_installes), 'non');
1451 1451
 }
1452 1452
 
1453 1453
 /**
@@ -1461,29 +1461,29 @@  discard block
 block discarded – undo
1461 1461
  *     Commentaire : code écrit en tout début de fichier, après la balise PHP ouvrante
1462 1462
 **/
1463 1463
 function ecrire_fichier_php($nom, $contenu, $comment = '') {
1464
-	if (!isset($GLOBALS['fichier_php_compile_recent'])) {
1465
-		$GLOBALS['fichier_php_compile_recent'] = 0;
1466
-	}
1467
-
1468
-	$contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1469
-	// si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1470
-	// si pas de modif on ne touche pas au fichier initial
1471
-	if (file_exists($nom)) {
1472
-		if (substr($nom, -4) == '.php') {
1473
-			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1474
-		}
1475
-		else {
1476
-			$fichier_tmp = $nom . '.tmp';
1477
-		}
1478
-		file_put_contents($fichier_tmp, $contenu);
1479
-		if (md5_file($nom) == md5_file($fichier_tmp)) {
1480
-			$GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom));
1481
-			@unlink($fichier_tmp);
1482
-			return;
1483
-		}
1484
-		@unlink($fichier_tmp);
1485
-	}
1486
-	ecrire_fichier($nom, $contenu);
1487
-	$GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom));
1488
-	spip_clear_opcode_cache(realpath($nom));
1464
+    if (!isset($GLOBALS['fichier_php_compile_recent'])) {
1465
+        $GLOBALS['fichier_php_compile_recent'] = 0;
1466
+    }
1467
+
1468
+    $contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1469
+    // si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1470
+    // si pas de modif on ne touche pas au fichier initial
1471
+    if (file_exists($nom)) {
1472
+        if (substr($nom, -4) == '.php') {
1473
+            $fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1474
+        }
1475
+        else {
1476
+            $fichier_tmp = $nom . '.tmp';
1477
+        }
1478
+        file_put_contents($fichier_tmp, $contenu);
1479
+        if (md5_file($nom) == md5_file($fichier_tmp)) {
1480
+            $GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom));
1481
+            @unlink($fichier_tmp);
1482
+            return;
1483
+        }
1484
+        @unlink($fichier_tmp);
1485
+    }
1486
+    ecrire_fichier($nom, $contenu);
1487
+    $GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom));
1488
+    spip_clear_opcode_cache(realpath($nom));
1489 1489
 }
Please login to merge, or discard this patch.
ecrire/inc/pipelines_ecrire.php 1 patch
Indentation   +225 added lines, -225 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Pipelines
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 
@@ -35,36 +35,36 @@  discard block
 block discarded – undo
35 35
  * @return string          Contenu complété des scripts javascripts, dont jQuery
36 36
  **/
37 37
 function f_jQuery_prive($texte) {
38
-	$x = '';
39
-	$jquery_plugins = pipeline(
40
-		'jquery_plugins',
41
-		[
42
-			'prive/javascript/jquery.js',
43
-			'prive/javascript/jquery.form.js',
44
-			'prive/javascript/jquery.autosave.js',
45
-			'prive/javascript/jquery.placeholder-label.js',
46
-			'prive/javascript/ajaxCallback.js',
47
-			'prive/javascript/js.cookie.js',
48
-			'prive/javascript/spip_barre.js',
49
-		]
50
-	);
51
-	foreach (array_unique($jquery_plugins) as $script) {
52
-		if ($script = find_in_path(supprimer_timestamp($script))) {
53
-			$script = timestamp($script);
54
-			$x .= "\n<script src=\"$script\" type=\"text/javascript\"></script>\n";
55
-		}
56
-	}
57
-	// inserer avant le premier script externe ou a la fin
58
-	if (
59
-		preg_match(',<script[^><]*src=,', $texte, $match)
60
-		and $p = strpos($texte, (string) $match[0])
61
-	) {
62
-		$texte = substr_replace($texte, $x, $p, 0);
63
-	} else {
64
-		$texte .= $x;
65
-	}
38
+    $x = '';
39
+    $jquery_plugins = pipeline(
40
+        'jquery_plugins',
41
+        [
42
+            'prive/javascript/jquery.js',
43
+            'prive/javascript/jquery.form.js',
44
+            'prive/javascript/jquery.autosave.js',
45
+            'prive/javascript/jquery.placeholder-label.js',
46
+            'prive/javascript/ajaxCallback.js',
47
+            'prive/javascript/js.cookie.js',
48
+            'prive/javascript/spip_barre.js',
49
+        ]
50
+    );
51
+    foreach (array_unique($jquery_plugins) as $script) {
52
+        if ($script = find_in_path(supprimer_timestamp($script))) {
53
+            $script = timestamp($script);
54
+            $x .= "\n<script src=\"$script\" type=\"text/javascript\"></script>\n";
55
+        }
56
+    }
57
+    // inserer avant le premier script externe ou a la fin
58
+    if (
59
+        preg_match(',<script[^><]*src=,', $texte, $match)
60
+        and $p = strpos($texte, (string) $match[0])
61
+    ) {
62
+        $texte = substr_replace($texte, $x, $p, 0);
63
+    } else {
64
+        $texte .= $x;
65
+    }
66 66
 
67
-	return $texte;
67
+    return $texte;
68 68
 }
69 69
 
70 70
 
@@ -77,42 +77,42 @@  discard block
 block discarded – undo
77 77
  * @return string
78 78
  */
79 79
 function affichage_final_prive_title_auto($texte) {
80
-	if (
81
-		strpos($texte, '<title>') === false
82
-		and
83
-		(preg_match(',<h1[^>]*>(.+)</h1>,Uims', $texte, $match)
84
-			or preg_match(',<h[23][^>]*>(.+)</h[23]>,Uims', $texte, $match))
85
-		and $match = textebrut(trim($match[1]))
86
-		and ($p = strpos($texte, '<head>')) !== false
87
-	) {
88
-		if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']['nom_site']))) {
89
-			$nom_site_spip = _T('info_mon_site_spip');
90
-		}
80
+    if (
81
+        strpos($texte, '<title>') === false
82
+        and
83
+        (preg_match(',<h1[^>]*>(.+)</h1>,Uims', $texte, $match)
84
+            or preg_match(',<h[23][^>]*>(.+)</h[23]>,Uims', $texte, $match))
85
+        and $match = textebrut(trim($match[1]))
86
+        and ($p = strpos($texte, '<head>')) !== false
87
+    ) {
88
+        if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']['nom_site']))) {
89
+            $nom_site_spip = _T('info_mon_site_spip');
90
+        }
91 91
 
92
-		$titre = '<title>['
93
-			. $nom_site_spip
94
-			. '] ' . $match
95
-			. '</title>';
92
+        $titre = '<title>['
93
+            . $nom_site_spip
94
+            . '] ' . $match
95
+            . '</title>';
96 96
 
97
-		$texte = substr_replace($texte, $titre, $p + 6, 0);
98
-	}
97
+        $texte = substr_replace($texte, $titre, $p + 6, 0);
98
+    }
99 99
 
100
-	return $texte;
100
+    return $texte;
101 101
 }
102 102
 
103 103
 
104 104
 // Fonction standard pour le pipeline 'boite_infos'
105 105
 function f_boite_infos($flux) {
106
-	$args = $flux['args'];
107
-	$type = $args['type'];
108
-	unset($args['row']);
109
-	if (!trouver_fond($type, 'prive/objets/infos/')) {
110
-		$type = 'objet';
111
-	}
112
-	$args['espace_prive'] = 1;
113
-	$flux['data'] .= recuperer_fond("prive/objets/infos/$type", $args);
106
+    $args = $flux['args'];
107
+    $type = $args['type'];
108
+    unset($args['row']);
109
+    if (!trouver_fond($type, 'prive/objets/infos/')) {
110
+        $type = 'objet';
111
+    }
112
+    $args['espace_prive'] = 1;
113
+    $flux['data'] .= recuperer_fond("prive/objets/infos/$type", $args);
114 114
 
115
-	return $flux;
115
+    return $flux;
116 116
 }
117 117
 
118 118
 
@@ -131,97 +131,97 @@  discard block
 block discarded – undo
131 131
  * @return array Données du pipeline
132 132
  */
133 133
 function f_afficher_blocs_ecrire($flux) {
134
-	static $o = [];
135
-	if (is_string($fond = $flux['args']['fond'])) {
136
-		$exec = $flux['args']['contexte']['exec'] ?? _request('exec');
137
-		if (!isset($o[$exec])) {
138
-			$o[$exec] = trouver_objet_exec($exec);
139
-		}
140
-		// cas particulier
141
-		if ($exec == 'infos_perso') {
142
-			$flux['args']['contexte']['id_auteur'] = $GLOBALS['visiteur_session']['id_auteur'];
143
-		}
144
-		$typepage = ($flux['args']['contexte']['type-page'] ?? $exec);
145
-		if ($fond == "prive/squelettes/navigation/$typepage") {
146
-			$flux['data']['texte'] = pipeline(
147
-				'affiche_gauche',
148
-				['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
149
-			);
150
-		} elseif ($fond == "prive/squelettes/extra/$typepage") {
151
-			include_spip('inc/presentation_mini');
152
-			$flux['data']['texte'] = pipeline(
153
-				'affiche_droite',
154
-				['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
155
-			) . liste_objets_bloques(
156
-				$exec,
157
-				$flux['args']['contexte']
158
-			);
159
-		} elseif ($fond == "prive/squelettes/hierarchie/$typepage" and $o[$exec]) {
160
-			// id non defini sur les formulaire de nouveaux objets
161
-			$id = isset($flux['args']['contexte'][$o[$exec]['id_table_objet']]) ? intval($flux['args']['contexte'][$o[$exec]['id_table_objet']]) : 0;
162
-			$flux['data']['texte'] = pipeline(
163
-				'affiche_hierarchie',
164
-				['args' => ['objet' => $o[$exec]['type'], 'id_objet' => $id], 'data' => $flux['data']['texte']]
165
-			);
166
-		} elseif ($fond == "prive/squelettes/contenu/$typepage") {
167
-			// Préparation du marqueur affiche_milieu
168
-			// Si c'est la page d'un objet pas en édition, on l'encapsule dans un div
169
-			$est_page_objet = !empty($o[$exec]['type']);
170
-			$est_en_edition = (isset($o[$exec]['edition']) and $o[$exec]['edition'] === true);
171
-			$encapsuler_milieu = ($est_page_objet and !$est_en_edition);
172
-			$flux['data']['texte'] = afficher_blocs_ecrire_preparer_marqueur(
173
-				$flux['data']['texte'],
174
-				'<!--affiche_milieu-->',
175
-				'<div id=["\']wysiwyg',
176
-				$encapsuler_milieu ? '<div class="affiche_milieu">' : '',
177
-				$encapsuler_milieu ? '</div>' : ''
178
-			);
179
-			if (
180
-				$o[$exec]
181
-				and $objet = $o[$exec]['type']
182
-				and $o[$exec]['edition'] == false
183
-				and isset($flux['args']['contexte'][$o[$exec]['id_table_objet']])
184
-				and $id = intval($flux['args']['contexte'][$o[$exec]['id_table_objet']])
185
-			) {
186
-				// inserer le formulaire de traduction
187
-				$flux['data']['texte'] = str_replace('<!--affiche_milieu-->', recuperer_fond(
188
-					'prive/objets/editer/traductions',
189
-					['objet' => $objet, 'id_objet' => $id, 'espace_prive' => 1]
190
-				) . '<!--affiche_milieu-->', $flux['data']['texte']);
191
-				$flux['data']['texte'] = pipeline('afficher_fiche_objet', [
192
-					'args' => [
193
-						'contexte' => $flux['args']['contexte'],
194
-						'type' => $objet,
195
-						'id' => $id
196
-					],
197
-					'data' => $flux['data']['texte']
198
-				]);
199
-			}
200
-			$flux['data']['texte'] = pipeline(
201
-				'affiche_milieu',
202
-				['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
203
-			);
204
-		} elseif ($fond == 'prive/squelettes/inclure/pied') {
205
-			$flux['data']['texte'] = pipeline(
206
-				'affiche_pied',
207
-				['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
208
-			);
209
-		} elseif (
210
-			strncmp($fond, 'prive/objets/contenu/', 21) == 0
211
-			and $objet = basename($fond)
212
-			and $objet == substr($fond, 21)
213
-			and isset($o[$objet])
214
-			and $o[$objet]
215
-		) {
216
-			$id = intval($flux['args']['contexte'][$o[$exec]['id_table_objet']]);
217
-			$flux['data']['texte'] = pipeline('afficher_contenu_objet', [
218
-				'args' => ['type' => $objet, 'id_objet' => $id, 'contexte' => $flux['args']['contexte']],
219
-				'data' => $flux['data']['texte']
220
-			]);
221
-		}
222
-	}
134
+    static $o = [];
135
+    if (is_string($fond = $flux['args']['fond'])) {
136
+        $exec = $flux['args']['contexte']['exec'] ?? _request('exec');
137
+        if (!isset($o[$exec])) {
138
+            $o[$exec] = trouver_objet_exec($exec);
139
+        }
140
+        // cas particulier
141
+        if ($exec == 'infos_perso') {
142
+            $flux['args']['contexte']['id_auteur'] = $GLOBALS['visiteur_session']['id_auteur'];
143
+        }
144
+        $typepage = ($flux['args']['contexte']['type-page'] ?? $exec);
145
+        if ($fond == "prive/squelettes/navigation/$typepage") {
146
+            $flux['data']['texte'] = pipeline(
147
+                'affiche_gauche',
148
+                ['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
149
+            );
150
+        } elseif ($fond == "prive/squelettes/extra/$typepage") {
151
+            include_spip('inc/presentation_mini');
152
+            $flux['data']['texte'] = pipeline(
153
+                'affiche_droite',
154
+                ['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
155
+            ) . liste_objets_bloques(
156
+                $exec,
157
+                $flux['args']['contexte']
158
+            );
159
+        } elseif ($fond == "prive/squelettes/hierarchie/$typepage" and $o[$exec]) {
160
+            // id non defini sur les formulaire de nouveaux objets
161
+            $id = isset($flux['args']['contexte'][$o[$exec]['id_table_objet']]) ? intval($flux['args']['contexte'][$o[$exec]['id_table_objet']]) : 0;
162
+            $flux['data']['texte'] = pipeline(
163
+                'affiche_hierarchie',
164
+                ['args' => ['objet' => $o[$exec]['type'], 'id_objet' => $id], 'data' => $flux['data']['texte']]
165
+            );
166
+        } elseif ($fond == "prive/squelettes/contenu/$typepage") {
167
+            // Préparation du marqueur affiche_milieu
168
+            // Si c'est la page d'un objet pas en édition, on l'encapsule dans un div
169
+            $est_page_objet = !empty($o[$exec]['type']);
170
+            $est_en_edition = (isset($o[$exec]['edition']) and $o[$exec]['edition'] === true);
171
+            $encapsuler_milieu = ($est_page_objet and !$est_en_edition);
172
+            $flux['data']['texte'] = afficher_blocs_ecrire_preparer_marqueur(
173
+                $flux['data']['texte'],
174
+                '<!--affiche_milieu-->',
175
+                '<div id=["\']wysiwyg',
176
+                $encapsuler_milieu ? '<div class="affiche_milieu">' : '',
177
+                $encapsuler_milieu ? '</div>' : ''
178
+            );
179
+            if (
180
+                $o[$exec]
181
+                and $objet = $o[$exec]['type']
182
+                and $o[$exec]['edition'] == false
183
+                and isset($flux['args']['contexte'][$o[$exec]['id_table_objet']])
184
+                and $id = intval($flux['args']['contexte'][$o[$exec]['id_table_objet']])
185
+            ) {
186
+                // inserer le formulaire de traduction
187
+                $flux['data']['texte'] = str_replace('<!--affiche_milieu-->', recuperer_fond(
188
+                    'prive/objets/editer/traductions',
189
+                    ['objet' => $objet, 'id_objet' => $id, 'espace_prive' => 1]
190
+                ) . '<!--affiche_milieu-->', $flux['data']['texte']);
191
+                $flux['data']['texte'] = pipeline('afficher_fiche_objet', [
192
+                    'args' => [
193
+                        'contexte' => $flux['args']['contexte'],
194
+                        'type' => $objet,
195
+                        'id' => $id
196
+                    ],
197
+                    'data' => $flux['data']['texte']
198
+                ]);
199
+            }
200
+            $flux['data']['texte'] = pipeline(
201
+                'affiche_milieu',
202
+                ['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
203
+            );
204
+        } elseif ($fond == 'prive/squelettes/inclure/pied') {
205
+            $flux['data']['texte'] = pipeline(
206
+                'affiche_pied',
207
+                ['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']]
208
+            );
209
+        } elseif (
210
+            strncmp($fond, 'prive/objets/contenu/', 21) == 0
211
+            and $objet = basename($fond)
212
+            and $objet == substr($fond, 21)
213
+            and isset($o[$objet])
214
+            and $o[$objet]
215
+        ) {
216
+            $id = intval($flux['args']['contexte'][$o[$exec]['id_table_objet']]);
217
+            $flux['data']['texte'] = pipeline('afficher_contenu_objet', [
218
+                'args' => ['type' => $objet, 'id_objet' => $id, 'contexte' => $flux['args']['contexte']],
219
+                'data' => $flux['data']['texte']
220
+            ]);
221
+        }
222
+    }
223 223
 
224
-	return $flux;
224
+    return $flux;
225 225
 }
226 226
 
227 227
 /**
@@ -249,36 +249,36 @@  discard block
 block discarded – undo
249 249
  */
250 250
 function afficher_blocs_ecrire_preparer_marqueur(?string $texte, string $marqueur, string $inserer_avant, string $ouvrir = '', string $fermer = ''): ?string {
251 251
 
252
-	if ($texte) {
253
-		$encapsuler = (($ouvrir and $fermer) ? true : false);
254
-		$marqueur_pos = strpos($texte, $marqueur);
255
-		$full_marqueur = "$ouvrir$marqueur$fermer";
252
+    if ($texte) {
253
+        $encapsuler = (($ouvrir and $fermer) ? true : false);
254
+        $marqueur_pos = strpos($texte, $marqueur);
255
+        $full_marqueur = "$ouvrir$marqueur$fermer";
256 256
 
257
-		// Le marqueur est absent : on l'ajoute avant l'élément indiqué
258
-		if ($marqueur_pos  === false) {
259
-			$texte = preg_replace(
260
-				",$inserer_avant,",
261
-				"$full_marqueur\\0",
262
-				$texte
263
-			);
264
-		// Le marqueur est présent mais pas encapsulé : on ajoute les balises ouvrantes et fermantes.
265
-		// Pour vérifier, on prend le texte précédent et on regarde si ça correspond à la balise ouvrante.
266
-		// Il ne faut donc aucun espace blanc en trop.
267
-		} elseif (
268
-			$marqueur_pos !== false
269
-			and $encapsuler
270
-			and substr($texte, $marqueur_pos - strlen($ouvrir), strlen($ouvrir)) !== $ouvrir
271
-		) {
272
-			$texte = substr_replace(
273
-				$texte,
274
-				$full_marqueur,
275
-				$marqueur_pos,
276
-				strlen($marqueur)
277
-			);
278
-		}
279
-	}
257
+        // Le marqueur est absent : on l'ajoute avant l'élément indiqué
258
+        if ($marqueur_pos  === false) {
259
+            $texte = preg_replace(
260
+                ",$inserer_avant,",
261
+                "$full_marqueur\\0",
262
+                $texte
263
+            );
264
+        // Le marqueur est présent mais pas encapsulé : on ajoute les balises ouvrantes et fermantes.
265
+        // Pour vérifier, on prend le texte précédent et on regarde si ça correspond à la balise ouvrante.
266
+        // Il ne faut donc aucun espace blanc en trop.
267
+        } elseif (
268
+            $marqueur_pos !== false
269
+            and $encapsuler
270
+            and substr($texte, $marqueur_pos - strlen($ouvrir), strlen($ouvrir)) !== $ouvrir
271
+        ) {
272
+            $texte = substr_replace(
273
+                $texte,
274
+                $full_marqueur,
275
+                $marqueur_pos,
276
+                strlen($marqueur)
277
+            );
278
+        }
279
+    }
280 280
 
281
-	return $texte;
281
+    return $texte;
282 282
 }
283 283
 
284 284
 /**
@@ -289,23 +289,23 @@  discard block
 block discarded – undo
289 289
  * @return string
290 290
  */
291 291
 function f_queue_affiche_milieu($flux) {
292
-	$args = $flux['args'];
293
-	$res = '';
294
-	foreach ($args as $key => $arg) {
295
-		if (preg_match(',^id_,', $key) and is_numeric($arg) and $arg = intval($arg)) {
296
-			$objet = preg_replace(',^id_,', '', $key);
297
-			$res .= recuperer_fond(
298
-				'modeles/object_jobs_list',
299
-				['id_objet' => $arg, 'objet' => $objet, 'espace_prive' => 1],
300
-				['ajax' => true]
301
-			);
302
-		}
303
-	}
304
-	if ($res) {
305
-		$flux['data'] = $res . $flux['data'];
306
-	}
292
+    $args = $flux['args'];
293
+    $res = '';
294
+    foreach ($args as $key => $arg) {
295
+        if (preg_match(',^id_,', $key) and is_numeric($arg) and $arg = intval($arg)) {
296
+            $objet = preg_replace(',^id_,', '', $key);
297
+            $res .= recuperer_fond(
298
+                'modeles/object_jobs_list',
299
+                ['id_objet' => $arg, 'objet' => $objet, 'espace_prive' => 1],
300
+                ['ajax' => true]
301
+            );
302
+        }
303
+    }
304
+    if ($res) {
305
+        $flux['data'] = $res . $flux['data'];
306
+    }
307 307
 
308
-	return $flux;
308
+    return $flux;
309 309
 }
310 310
 
311 311
 /**
@@ -319,39 +319,39 @@  discard block
 block discarded – undo
319 319
  * @return array|bool
320 320
  */
321 321
 function trouver_objet_exec(?string $exec) {
322
-	static $objet_exec = [];
323
-	if (!$exec) {
324
-		return false;
325
-	}
326
-	// cas particulier
327
-	if ($exec === 'infos_perso') {
328
-		$exec = 'auteur';
329
-		set_request('id_auteur', $GLOBALS['visiteur_session']['id_auteur']);
330
-	}
331
-	if (!isset($objet_exec[$exec])) {
332
-		$objet_exec[$exec] = false;
333
-		$infos = lister_tables_objets_sql();
334
-		foreach ($infos as $t => $info) {
335
-			if ($exec === $info['url_edit'] and $info['editable']) {
336
-				return $objet_exec[$exec] = [
337
-					'edition' => $exec == $info['url_voir'] ? '' : true,
338
-					'table_objet_sql' => $t,
339
-					'table' => $info['table_objet'],
340
-					'type' => $info['type'],
341
-					'id_table_objet' => id_table_objet($info['type'])
342
-				];
343
-			}
344
-			if ($exec === $info['url_voir']) {
345
-				return $objet_exec[$exec] = [
346
-					'edition' => false,
347
-					'table_objet_sql' => $t,
348
-					'table' => $info['table_objet'],
349
-					'type' => $info['type'],
350
-					'id_table_objet' => id_table_objet($info['type'])
351
-				];
352
-			}
353
-		}
354
-	}
322
+    static $objet_exec = [];
323
+    if (!$exec) {
324
+        return false;
325
+    }
326
+    // cas particulier
327
+    if ($exec === 'infos_perso') {
328
+        $exec = 'auteur';
329
+        set_request('id_auteur', $GLOBALS['visiteur_session']['id_auteur']);
330
+    }
331
+    if (!isset($objet_exec[$exec])) {
332
+        $objet_exec[$exec] = false;
333
+        $infos = lister_tables_objets_sql();
334
+        foreach ($infos as $t => $info) {
335
+            if ($exec === $info['url_edit'] and $info['editable']) {
336
+                return $objet_exec[$exec] = [
337
+                    'edition' => $exec == $info['url_voir'] ? '' : true,
338
+                    'table_objet_sql' => $t,
339
+                    'table' => $info['table_objet'],
340
+                    'type' => $info['type'],
341
+                    'id_table_objet' => id_table_objet($info['type'])
342
+                ];
343
+            }
344
+            if ($exec === $info['url_voir']) {
345
+                return $objet_exec[$exec] = [
346
+                    'edition' => false,
347
+                    'table_objet_sql' => $t,
348
+                    'table' => $info['table_objet'],
349
+                    'type' => $info['type'],
350
+                    'id_table_objet' => id_table_objet($info['type'])
351
+                ];
352
+            }
353
+        }
354
+    }
355 355
 
356
-	return $objet_exec[$exec];
356
+    return $objet_exec[$exec];
357 357
 }
Please login to merge, or discard this patch.
ecrire/lang/ecrire_uk.php 1 patch
Indentation   +836 added lines, -836 removed lines patch added patch discarded remove patch
@@ -4,868 +4,868 @@
 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' => 'Активувати плагін',
14
-	'affichage' => 'Показати',
15
-	'aide_non_disponible' => 'Цей розділ он-лайн допомоги ще не перекладено українською.',
16
-	'annuler_recherche' => 'Відмінити пошук',
17
-	'auteur' => 'Автор:',
18
-	'avis_acces_interdit' => 'Доступ заборонено.',
19
-	'avis_acces_interdit_prive' => 'У вас немає прав для перегляду сторінки <b>@exec@</b>.',
20
-	'avis_article_modifie' => 'Увага: @nom_auteur_modif@ вносив зміни в цю статтю @date_diff@ хвилин тому',
21
-	'avis_aucun_resultat' => 'Нічого не знайдено',
22
-	'avis_base_inaccessible' => 'Неможливо підключитися до бази @base@.',
23
-	'avis_chemin_invalide_1' => 'Шлях, що ви вибрали',
24
-	'avis_chemin_invalide_2' => 'схоже, що не вірно. Будь ласка, поверніться на попередню сторінку і перевірте надану інформацію.',
25
-	'avis_connexion_echec_1' => 'Не вдалося підключится до SQL серверу.',
26
-	'avis_connexion_echec_2' => 'Будь ласка, поверніться на попередню сторінку і перевірте внесену інформацію.',
27
-	'avis_connexion_echec_3' => '<b>N.B.</b> На багатьох серверах ви повинні зробити запит для включення вашого доступу до бази даних SQL перед тим, як використовувати її. Якщо ви не можете встановити з’єднання, упевніться, що цей запит дійсно було зроблено.',
28
-	'avis_connexion_erreur_creer_base' => 'База даних не може бути створена.',
29
-	'avis_connexion_erreur_nom_base' => 'Назва бази може складатися тільки з латинських букв, цифр і знаків нижнього підкреслювання.',
30
-	'avis_connexion_ldap_echec_1' => 'Не вдалося подключитися до LDAP.',
31
-	'avis_connexion_ldap_echec_2' => 'Поверніться на попередню сторінку і перевірте внесену вами інформацію.',
32
-	'avis_connexion_ldap_echec_3' => 'Крім того, не використовуйте підтримку LDAP для імпорту користувачів.',
33
-	'avis_deplacement_rubrique' => 'Увага! В цій рубриці знаходиться @contient_breves@ новин@scb@: якщо ви переміщуєте її, будь ласка, поставьте відмітку для підтвердження операції.',
34
-	'avis_erreur_connexion_mysql' => 'Помилка з’єднання з SQL ',
35
-	'avis_espace_interdit' => '<b>Заборонений простір</b> <div>SPIP вже встановлено.</div> ',
36
-	'avis_lecture_noms_bases_1' => 'Програма установки не змогла прочитати імена встановлених баз даних .',
37
-	'avis_lecture_noms_bases_2' => 'Жодна з баз даних не є доступною або функцію, що дозволяє вносити до списку бази даних, було вимкнено з метою безпеки (забагато послуг хостингу).',
38
-	'avis_lecture_noms_bases_3' => 'В другому випадку можливо, що база даних, названа за вашим логіном, может бути використана:',
39
-	'avis_non_acces_page' => 'У вас нема доступу до цієї сторінки.',
40
-	'avis_operation_echec' => 'Не вдалося виконати операцію.',
41
-	'avis_operation_impossible' => 'Неможливо виконати операцію',
42
-	'avis_suppression_base' => 'Увага: видалення даних неможливо відмінити',
12
+    // A
13
+    'activer_plugin' => 'Активувати плагін',
14
+    'affichage' => 'Показати',
15
+    'aide_non_disponible' => 'Цей розділ он-лайн допомоги ще не перекладено українською.',
16
+    'annuler_recherche' => 'Відмінити пошук',
17
+    'auteur' => 'Автор:',
18
+    'avis_acces_interdit' => 'Доступ заборонено.',
19
+    'avis_acces_interdit_prive' => 'У вас немає прав для перегляду сторінки <b>@exec@</b>.',
20
+    'avis_article_modifie' => 'Увага: @nom_auteur_modif@ вносив зміни в цю статтю @date_diff@ хвилин тому',
21
+    'avis_aucun_resultat' => 'Нічого не знайдено',
22
+    'avis_base_inaccessible' => 'Неможливо підключитися до бази @base@.',
23
+    'avis_chemin_invalide_1' => 'Шлях, що ви вибрали',
24
+    'avis_chemin_invalide_2' => 'схоже, що не вірно. Будь ласка, поверніться на попередню сторінку і перевірте надану інформацію.',
25
+    'avis_connexion_echec_1' => 'Не вдалося підключится до SQL серверу.',
26
+    'avis_connexion_echec_2' => 'Будь ласка, поверніться на попередню сторінку і перевірте внесену інформацію.',
27
+    'avis_connexion_echec_3' => '<b>N.B.</b> На багатьох серверах ви повинні зробити запит для включення вашого доступу до бази даних SQL перед тим, як використовувати її. Якщо ви не можете встановити з’єднання, упевніться, що цей запит дійсно було зроблено.',
28
+    'avis_connexion_erreur_creer_base' => 'База даних не може бути створена.',
29
+    'avis_connexion_erreur_nom_base' => 'Назва бази може складатися тільки з латинських букв, цифр і знаків нижнього підкреслювання.',
30
+    'avis_connexion_ldap_echec_1' => 'Не вдалося подключитися до LDAP.',
31
+    'avis_connexion_ldap_echec_2' => 'Поверніться на попередню сторінку і перевірте внесену вами інформацію.',
32
+    'avis_connexion_ldap_echec_3' => 'Крім того, не використовуйте підтримку LDAP для імпорту користувачів.',
33
+    'avis_deplacement_rubrique' => 'Увага! В цій рубриці знаходиться @contient_breves@ новин@scb@: якщо ви переміщуєте її, будь ласка, поставьте відмітку для підтвердження операції.',
34
+    'avis_erreur_connexion_mysql' => 'Помилка з’єднання з SQL ',
35
+    'avis_espace_interdit' => '<b>Заборонений простір</b> <div>SPIP вже встановлено.</div> ',
36
+    'avis_lecture_noms_bases_1' => 'Програма установки не змогла прочитати імена встановлених баз даних .',
37
+    'avis_lecture_noms_bases_2' => 'Жодна з баз даних не є доступною або функцію, що дозволяє вносити до списку бази даних, було вимкнено з метою безпеки (забагато послуг хостингу).',
38
+    'avis_lecture_noms_bases_3' => 'В другому випадку можливо, що база даних, названа за вашим логіном, может бути використана:',
39
+    'avis_non_acces_page' => 'У вас нема доступу до цієї сторінки.',
40
+    'avis_operation_echec' => 'Не вдалося виконати операцію.',
41
+    'avis_operation_impossible' => 'Неможливо виконати операцію',
42
+    'avis_suppression_base' => 'Увага: видалення даних неможливо відмінити',
43 43
 
44
-	// B
45
-	'bouton_acces_ldap' => 'Додати доступ до LDAP',
46
-	'bouton_ajouter' => 'Додати',
47
-	'bouton_annuler' => 'Відмінити',
48
-	'bouton_cache_activer' => 'Увімкнути кешування',
49
-	'bouton_cache_desactiver' => 'Виключити кешування',
50
-	'bouton_demande_publication' => 'Запитати публікацію цієї статті',
51
-	'bouton_desactive_tout' => 'Усе відключити',
52
-	'bouton_desinstaller' => 'Видалити',
53
-	'bouton_effacer_tout' => 'Видалити УСЕ',
54
-	'bouton_envoyer_message' => 'Заключне повідомлення: Надіслати',
55
-	'bouton_fermer' => 'Закрити',
56
-	'bouton_mettre_a_jour_base' => 'Оновити базу даних',
57
-	'bouton_modifier' => 'Змінити',
58
-	'bouton_radio_afficher' => 'Показати',
59
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Показувати у переліку авторів, що знаходяться на сайті',
60
-	'bouton_radio_envoi_annonces_adresse' => 'Відправити оголошення на адресу:',
61
-	'bouton_radio_envoi_liste_nouveautes' => 'Відправити список останніх новин',
62
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Не показувати у переліку авторів, що знаходяться на сайті',
63
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Не відправляти ніяких редакційних оголошень',
64
-	'bouton_redirection' => 'ПЕРЕНАПРАВЛЕННЯ',
65
-	'bouton_reinitialiser_aux_valeurs_par_defaut' => 'Відновити початкові значення',
66
-	'bouton_relancer_inscription' => 'Перезапустити реєстрацію',
67
-	'bouton_relancer_inscriptions' => 'Перезапустити реєстрації',
68
-	'bouton_relancer_installation' => 'Перезапустити установку',
69
-	'bouton_reset_password' => 'Створити новий пароль і відправити по e-mail',
70
-	'bouton_suivant' => 'Наступний',
71
-	'bouton_tenter_recuperation' => 'Спробуємо відремонтувати базу',
72
-	'bouton_test_proxy' => 'Перевірити проксі',
73
-	'bouton_vider_cache' => 'Очистити кеш',
44
+    // B
45
+    'bouton_acces_ldap' => 'Додати доступ до LDAP',
46
+    'bouton_ajouter' => 'Додати',
47
+    'bouton_annuler' => 'Відмінити',
48
+    'bouton_cache_activer' => 'Увімкнути кешування',
49
+    'bouton_cache_desactiver' => 'Виключити кешування',
50
+    'bouton_demande_publication' => 'Запитати публікацію цієї статті',
51
+    'bouton_desactive_tout' => 'Усе відключити',
52
+    'bouton_desinstaller' => 'Видалити',
53
+    'bouton_effacer_tout' => 'Видалити УСЕ',
54
+    'bouton_envoyer_message' => 'Заключне повідомлення: Надіслати',
55
+    'bouton_fermer' => 'Закрити',
56
+    'bouton_mettre_a_jour_base' => 'Оновити базу даних',
57
+    'bouton_modifier' => 'Змінити',
58
+    'bouton_radio_afficher' => 'Показати',
59
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Показувати у переліку авторів, що знаходяться на сайті',
60
+    'bouton_radio_envoi_annonces_adresse' => 'Відправити оголошення на адресу:',
61
+    'bouton_radio_envoi_liste_nouveautes' => 'Відправити список останніх новин',
62
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Не показувати у переліку авторів, що знаходяться на сайті',
63
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Не відправляти ніяких редакційних оголошень',
64
+    'bouton_redirection' => 'ПЕРЕНАПРАВЛЕННЯ',
65
+    'bouton_reinitialiser_aux_valeurs_par_defaut' => 'Відновити початкові значення',
66
+    'bouton_relancer_inscription' => 'Перезапустити реєстрацію',
67
+    'bouton_relancer_inscriptions' => 'Перезапустити реєстрації',
68
+    'bouton_relancer_installation' => 'Перезапустити установку',
69
+    'bouton_reset_password' => 'Створити новий пароль і відправити по e-mail',
70
+    'bouton_suivant' => 'Наступний',
71
+    'bouton_tenter_recuperation' => 'Спробуємо відремонтувати базу',
72
+    'bouton_test_proxy' => 'Перевірити проксі',
73
+    'bouton_vider_cache' => 'Очистити кеш',
74 74
 
75
-	// C
76
-	'cache_modifiable_webmestre' => 'Цей параметр може бути змінений тільки вебмастером.',
77
-	'calendrier_synchro' => 'Якщо ви використовуєте календар, сумісний з <b>iCal</b>, ви можете узгодити його з даними сайту.',
78
-	'config_activer_champs' => 'Увімкнути наступні поля',
79
-	'config_choix_base_sup' => 'Виберіть базу на цьому сервері',
80
-	'config_erreur_base_sup' => 'SPIP не може відобразити список доступних баз даних',
81
-	'config_info_base_sup' => 'Якщо вам потрібний запит інших баз даних, використовуючи SPIP, незалежно від того, чи знаходяться вони на тому ж SQL сервері або де-інде, використовуйте форму, що показана нижче для їх опису. Якщо ви залишите деякі поля пустими, то пов’язані деталі будуть використовуватися з основною базой даних.',
82
-	'config_info_base_sup_disponibles' => 'Додаткові бази даних, до яких можна відправити запити:',
83
-	'config_info_enregistree' => 'Нові налаштування збережено',
84
-	'config_info_logos' => 'Кожному елементу сайту можна встановити свій логотип і також логотип для відображення «при наведенні миші»',
85
-	'config_info_logos_utiliser' => 'Використовувати логотипи',
86
-	'config_info_logos_utiliser_non' => 'Не використовувати логотипи',
87
-	'config_info_logos_utiliser_survol' => 'Дозволити додавати логотип для відображення «при наведенні миші»',
88
-	'config_info_logos_utiliser_survol_non' => 'Заборонити додавати логотип для відображення «при наведенні миші»',
89
-	'config_info_redirection' => 'Віртуальна стаття - це можливість перенаправляти відвідувачів по довільному URL, як на іншу сторінку цього сайта, так і на будь-яке посилання в інтернеті.',
90
-	'config_redirection' => 'Віртуальні статті (редирект)',
91
-	'config_titre_base_sup' => 'Опис додаткової бази даних',
92
-	'config_titre_base_sup_choix' => 'Виберіть додаткову базу даних',
93
-	'connexion_ldap' => 'З’єднання:',
94
-	'creer_et_associer_un_auteur' => 'Створити і додати автора',
75
+    // C
76
+    'cache_modifiable_webmestre' => 'Цей параметр може бути змінений тільки вебмастером.',
77
+    'calendrier_synchro' => 'Якщо ви використовуєте календар, сумісний з <b>iCal</b>, ви можете узгодити його з даними сайту.',
78
+    'config_activer_champs' => 'Увімкнути наступні поля',
79
+    'config_choix_base_sup' => 'Виберіть базу на цьому сервері',
80
+    'config_erreur_base_sup' => 'SPIP не може відобразити список доступних баз даних',
81
+    'config_info_base_sup' => 'Якщо вам потрібний запит інших баз даних, використовуючи SPIP, незалежно від того, чи знаходяться вони на тому ж SQL сервері або де-інде, використовуйте форму, що показана нижче для їх опису. Якщо ви залишите деякі поля пустими, то пов’язані деталі будуть використовуватися з основною базой даних.',
82
+    'config_info_base_sup_disponibles' => 'Додаткові бази даних, до яких можна відправити запити:',
83
+    'config_info_enregistree' => 'Нові налаштування збережено',
84
+    'config_info_logos' => 'Кожному елементу сайту можна встановити свій логотип і також логотип для відображення «при наведенні миші»',
85
+    'config_info_logos_utiliser' => 'Використовувати логотипи',
86
+    'config_info_logos_utiliser_non' => 'Не використовувати логотипи',
87
+    'config_info_logos_utiliser_survol' => 'Дозволити додавати логотип для відображення «при наведенні миші»',
88
+    'config_info_logos_utiliser_survol_non' => 'Заборонити додавати логотип для відображення «при наведенні миші»',
89
+    'config_info_redirection' => 'Віртуальна стаття - це можливість перенаправляти відвідувачів по довільному URL, як на іншу сторінку цього сайта, так і на будь-яке посилання в інтернеті.',
90
+    'config_redirection' => 'Віртуальні статті (редирект)',
91
+    'config_titre_base_sup' => 'Опис додаткової бази даних',
92
+    'config_titre_base_sup_choix' => 'Виберіть додаткову базу даних',
93
+    'connexion_ldap' => 'З’єднання:',
94
+    'creer_et_associer_un_auteur' => 'Створити і додати автора',
95 95
 
96
-	// D
97
-	'date_mot_heures' => ':',
96
+    // D
97
+    'date_mot_heures' => ':',
98 98
 
99
-	// E
100
-	'ecran_connexion_couleur_principale' => 'Головний колір',
101
-	'ecran_connexion_image_fond' => 'Зображення на тло',
102
-	'ecran_connexion_image_fond_explication' => 'Використати зображення (JPEG, 1920x1080 пікселів)',
103
-	'ecran_connexion_image_revenir_couleur_defaut' => 'Повернути кольори за замовчуванням',
104
-	'ecran_connexion_titre' => 'Сторінка входу',
105
-	'ecran_securite' => ' + сервіс безпеки @version@',
106
-	'email' => 'email',
107
-	'email_2' => 'email:',
108
-	'en_savoir_plus' => 'Детальніше',
109
-	'entree_adresse_annuaire' => 'Довідник адрес',
110
-	'entree_adresse_email' => 'Ваша адреса електронної пошти',
111
-	'entree_adresse_email_2' => 'E-mail',
112
-	'entree_base_donnee_1' => 'Адреса серверу бази даних',
113
-	'entree_base_donnee_2' => '(Зазвичай це «localhost», але ви можете уточнити в налаштуваннях хостінгу)',
114
-	'entree_biographie' => 'Коротка біографія на декілька слів.',
115
-	'entree_chemin_acces' => 'Ввести шлях доступу:',
116
-	'entree_cle_pgp' => 'Ваш ключ  PGP',
117
-	'entree_cle_pgp_2' => 'Ключ PGP ',
118
-	'entree_contenu_rubrique' => '(Короткий зміст рубрики.)',
119
-	'entree_identifiants_connexion' => 'Логін і пароль',
120
-	'entree_identifiants_connexion_2' => 'Інформація про підключення',
121
-	'entree_informations_connexion_ldap' => 'Будь ласка, вкажіть параметри підключення до LDAP. Ви можете отримати цю інформацію у вашого системного адміністратора.',
122
-	'entree_infos_perso' => 'Хто ви?',
123
-	'entree_infos_perso_2' => 'Хто автор?',
124
-	'entree_interieur_rubrique' => 'В розділі:',
125
-	'entree_liens_sites' => '<b>Гіперпосилання</b> (посилання, сайт для відвідування...)',
126
-	'entree_login' => 'Ваш логін',
127
-	'entree_login_connexion_1' => 'Логін з’єднання',
128
-	'entree_login_connexion_2' => '(Іноді відповідає вашому логіну FTP доступу, а іноді залишається порожнім)',
129
-	'entree_mot_passe' => 'Ваш пароль',
130
-	'entree_mot_passe_1' => 'Пароль',
131
-	'entree_mot_passe_2' => '(Іноді відповідає вашому паролю FTP доступу, а іноді залишається порожнім)',
132
-	'entree_nom_fichier' => 'Будь ласка, виберіть файл з резервною копією @texte_compresse@:',
133
-	'entree_nom_pseudo' => 'Ваше ім’я або псевдонім',
134
-	'entree_nom_pseudo_1' => '(Ваше ім’я або псевдонім)',
135
-	'entree_nom_pseudo_2' => 'Ім’я або псевдонім',
136
-	'entree_nom_site' => 'Назва вашого сайту',
137
-	'entree_nom_site_2' => 'Назва сайту',
138
-	'entree_nouveau_passe' => 'Новий пароль',
139
-	'entree_passe_ldap' => 'Пароль',
140
-	'entree_port_annuaire' => 'Номер порту каталогу',
141
-	'entree_signature' => 'Підпис',
142
-	'entree_titre_obligatoire' => '<b>Заголовок</b> [обов’язково]<br />',
143
-	'entree_url' => 'Адреса (URL) вашого сайту',
144
-	'entree_url_2' => 'URL',
145
-	'erreur_connect_deja_existant' => 'Сервер з такою назвою вже існує',
146
-	'erreur_contenu_suspect' => 'Текст екрановано',
147
-	'erreur_email_deja_existant' => 'Ця адреса електронної пошти вже зареєстрована.',
148
-	'erreur_nom_connect_incorrect' => 'Неприпустиме ім’я серверу',
149
-	'erreur_plugin_attribut_balise_manquant' => 'Атрибут @attribut@ відсутній в тезі @balise@.',
150
-	'erreur_plugin_desinstalation_echouee' => 'Не вдалося видалити плагін, але ви можете відключити його.',
151
-	'erreur_plugin_fichier_absent' => 'Відсутній файл',
152
-	'erreur_plugin_fichier_def_absent' => 'Файл визначення  відсутній',
153
-	'erreur_plugin_nom_fonction_interdit' => 'Ім´я функції заборонено',
154
-	'erreur_plugin_nom_manquant' => 'Відсутня назва плагіну ',
155
-	'erreur_plugin_prefix_manquant' => 'Простір імен плагіна невизначений',
156
-	'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; відсутнє в файлі опису',
157
-	'erreur_plugin_version_manquant' => 'Відсутня версія плагіну',
158
-	'erreur_type_fichier' => 'Неконкретний тип файлу',
99
+    // E
100
+    'ecran_connexion_couleur_principale' => 'Головний колір',
101
+    'ecran_connexion_image_fond' => 'Зображення на тло',
102
+    'ecran_connexion_image_fond_explication' => 'Використати зображення (JPEG, 1920x1080 пікселів)',
103
+    'ecran_connexion_image_revenir_couleur_defaut' => 'Повернути кольори за замовчуванням',
104
+    'ecran_connexion_titre' => 'Сторінка входу',
105
+    'ecran_securite' => ' + сервіс безпеки @version@',
106
+    'email' => 'email',
107
+    'email_2' => 'email:',
108
+    'en_savoir_plus' => 'Детальніше',
109
+    'entree_adresse_annuaire' => 'Довідник адрес',
110
+    'entree_adresse_email' => 'Ваша адреса електронної пошти',
111
+    'entree_adresse_email_2' => 'E-mail',
112
+    'entree_base_donnee_1' => 'Адреса серверу бази даних',
113
+    'entree_base_donnee_2' => '(Зазвичай це «localhost», але ви можете уточнити в налаштуваннях хостінгу)',
114
+    'entree_biographie' => 'Коротка біографія на декілька слів.',
115
+    'entree_chemin_acces' => 'Ввести шлях доступу:',
116
+    'entree_cle_pgp' => 'Ваш ключ  PGP',
117
+    'entree_cle_pgp_2' => 'Ключ PGP ',
118
+    'entree_contenu_rubrique' => '(Короткий зміст рубрики.)',
119
+    'entree_identifiants_connexion' => 'Логін і пароль',
120
+    'entree_identifiants_connexion_2' => 'Інформація про підключення',
121
+    'entree_informations_connexion_ldap' => 'Будь ласка, вкажіть параметри підключення до LDAP. Ви можете отримати цю інформацію у вашого системного адміністратора.',
122
+    'entree_infos_perso' => 'Хто ви?',
123
+    'entree_infos_perso_2' => 'Хто автор?',
124
+    'entree_interieur_rubrique' => 'В розділі:',
125
+    'entree_liens_sites' => '<b>Гіперпосилання</b> (посилання, сайт для відвідування...)',
126
+    'entree_login' => 'Ваш логін',
127
+    'entree_login_connexion_1' => 'Логін з’єднання',
128
+    'entree_login_connexion_2' => '(Іноді відповідає вашому логіну FTP доступу, а іноді залишається порожнім)',
129
+    'entree_mot_passe' => 'Ваш пароль',
130
+    'entree_mot_passe_1' => 'Пароль',
131
+    'entree_mot_passe_2' => '(Іноді відповідає вашому паролю FTP доступу, а іноді залишається порожнім)',
132
+    'entree_nom_fichier' => 'Будь ласка, виберіть файл з резервною копією @texte_compresse@:',
133
+    'entree_nom_pseudo' => 'Ваше ім’я або псевдонім',
134
+    'entree_nom_pseudo_1' => '(Ваше ім’я або псевдонім)',
135
+    'entree_nom_pseudo_2' => 'Ім’я або псевдонім',
136
+    'entree_nom_site' => 'Назва вашого сайту',
137
+    'entree_nom_site_2' => 'Назва сайту',
138
+    'entree_nouveau_passe' => 'Новий пароль',
139
+    'entree_passe_ldap' => 'Пароль',
140
+    'entree_port_annuaire' => 'Номер порту каталогу',
141
+    'entree_signature' => 'Підпис',
142
+    'entree_titre_obligatoire' => '<b>Заголовок</b> [обов’язково]<br />',
143
+    'entree_url' => 'Адреса (URL) вашого сайту',
144
+    'entree_url_2' => 'URL',
145
+    'erreur_connect_deja_existant' => 'Сервер з такою назвою вже існує',
146
+    'erreur_contenu_suspect' => 'Текст екрановано',
147
+    'erreur_email_deja_existant' => 'Ця адреса електронної пошти вже зареєстрована.',
148
+    'erreur_nom_connect_incorrect' => 'Неприпустиме ім’я серверу',
149
+    'erreur_plugin_attribut_balise_manquant' => 'Атрибут @attribut@ відсутній в тезі @balise@.',
150
+    'erreur_plugin_desinstalation_echouee' => 'Не вдалося видалити плагін, але ви можете відключити його.',
151
+    'erreur_plugin_fichier_absent' => 'Відсутній файл',
152
+    'erreur_plugin_fichier_def_absent' => 'Файл визначення  відсутній',
153
+    'erreur_plugin_nom_fonction_interdit' => 'Ім´я функції заборонено',
154
+    'erreur_plugin_nom_manquant' => 'Відсутня назва плагіну ',
155
+    'erreur_plugin_prefix_manquant' => 'Простір імен плагіна невизначений',
156
+    'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; відсутнє в файлі опису',
157
+    'erreur_plugin_version_manquant' => 'Відсутня версія плагіну',
158
+    'erreur_type_fichier' => 'Неконкретний тип файлу',
159 159
 
160
-	// H
161
-	'htaccess_a_simuler' => 'Увага: в налаштуваннях веб-серверу відключено використання @htaccess@ файлів. Для забезпечення достатнього рівня безпеки внесіть зміни до налаштувань серверу самостійно або зверніться до технічної підтримки хостінгу. Ви також можете задати константи @constantes@ (в файлі mes_options.php) так, щоб ці Файли знаходились поза папкою @document_root@.',
162
-	'htaccess_inoperant' => 'htaccess не робочий',
160
+    // H
161
+    'htaccess_a_simuler' => 'Увага: в налаштуваннях веб-серверу відключено використання @htaccess@ файлів. Для забезпечення достатнього рівня безпеки внесіть зміни до налаштувань серверу самостійно або зверніться до технічної підтримки хостінгу. Ви також можете задати константи @constantes@ (в файлі mes_options.php) так, щоб ці Файли знаходились поза папкою @document_root@.',
162
+    'htaccess_inoperant' => 'htaccess не робочий',
163 163
 
164
-	// I
165
-	'ical_info1' => 'Ця сторінка надає вам декілька методів для підтримки зв’язку з діяльністю цього сайту',
166
-	'ical_info2' => 'Ви можете дізнатися більше в <a href="@spipnet@">документації про SPIP</a>.',
167
-	'ical_info_calendrier' => 'В вашему розпорядженні є два календарі. Перший - це карта сайту, що відображає всі опубліковані статті. Другий містить редакторські оголошення, а також ваші останні особисті повідомлення: його збережено для вас завдяки ключу, який ви можете змінити будь-коли, підтвердивши свій пароль.',
168
-	'ical_methode_http' => 'Завантаження',
169
-	'ical_methode_webcal' => 'Синхронізація (webcal://)',
170
-	'ical_texte_js' => 'Ви можете вставити цей javascript код на будь-який сайт, щоб відображати останні опубліковані статті і матеріали вашого сайту.',
171
-	'ical_texte_prive' => 'Цей календар є строго особистим, він інформує вас про роботу зі статтями на цьому сайті (завдання, персональні налаштування, відправлені статті і новини дня...).',
172
-	'ical_texte_public' => 'Цей календар дозволяє вам слідкувати за основною діяльністю цього сайту (публікація статтей і новин).',
173
-	'ical_texte_rss' => 'Ви можете експортувати останні поновлення на вашому сайті в форматі XML/RSS (Rich Site Summary). Також, завдяки цьому формату даних, ви можете імпортувати інформацію з інших сайтів в ІнтерНемаі.',
174
-	'ical_titre_js' => 'Javascript',
175
-	'ical_titre_mailing' => 'Список адресатів',
176
-	'ical_titre_rss' => 'Отримання статей і новин з інших сайтов по RSS',
177
-	'icone_accueil' => 'Головна',
178
-	'icone_activer_cookie' => 'Помістити cookie',
179
-	'icone_activite' => 'Зворотній зв’язок',
180
-	'icone_admin_plugin' => 'Плагіни',
181
-	'icone_administration' => 'Обслуговування',
182
-	'icone_afficher_auteurs' => 'Показати авторів',
183
-	'icone_afficher_visiteurs' => 'Показати відвідувачів',
184
-	'icone_arret_discussion' => 'Припинити участь в цьому обговоренні',
185
-	'icone_calendrier' => 'Календар',
186
-	'icone_configuration' => 'Конфігурація',
187
-	'icone_creer_auteur' => 'Створити автора і додати до статті',
188
-	'icone_creer_mot_cle' => 'Створити нове ключове слово і пов’язати його із цією статтею.',
189
-	'icone_creer_rubrique_2' => 'Створити нову рубрику',
190
-	'icone_developpement' => 'У розвитку',
191
-	'icone_edition' => 'Редагувати',
192
-	'icone_ma_langue' => 'Моя мова',
193
-	'icone_mes_infos' => 'Моя інформація',
194
-	'icone_mes_preferences' => 'Мої уподобання',
195
-	'icone_modifier_article' => 'Змінити статтю',
196
-	'icone_modifier_rubrique' => 'Змінити розділ',
197
-	'icone_publication' => 'Публікації',
198
-	'icone_relancer_signataire' => 'Відновити підпис',
199
-	'icone_retour' => 'Назад',
200
-	'icone_retour_article' => 'Назад до статті',
201
-	'icone_squelette' => 'Шаблони',
202
-	'icone_suivi_publication' => 'Моніторинг публікації',
203
-	'icone_supprimer_cookie' => 'Видалити cookie',
204
-	'icone_supprimer_rubrique' => 'Видалити розділ',
205
-	'icone_supprimer_signature' => 'Видалити підпис',
206
-	'icone_valider_signature' => 'Затвердити підпис',
207
-	'image_administrer_rubrique' => 'Ви можете керувати цим розділом',
208
-	'impossible_modifier_login_auteur' => 'Неможливо змінити логін.',
209
-	'impossible_modifier_pass_auteur' => 'Неможливо змінити пароль.',
210
-	'info_1_article' => '1 стаття',
211
-	'info_1_auteur' => '1 автор',
212
-	'info_1_message' => '1 повідомлення',
213
-	'info_1_mot_cle' => '1 ключове слово',
214
-	'info_1_rubrique' => '1 розділ',
215
-	'info_1_visiteur' => '1 відвідувач',
216
-	'info_activer_cookie' => 'Ви можете увімкнути <b>адміністративні cookie</b>, що дозволить вам легко перемикатися  між основною і адміністративною частиною сайту.',
217
-	'info_activer_menu_developpement' => 'Показати меню розвитку',
218
-	'info_admin_etre_webmestre' => 'Надати мені права вебмастера',
219
-	'info_admin_je_suis_webmestre' => 'Я <b>вебмастер</b>',
220
-	'info_admin_statuer_webmestre' => 'Надати цьому адміністратору права веб-майстра',
221
-	'info_admin_webmestre' => 'Адміністратор є <b>вебмастером</b>',
222
-	'info_administrateur' => 'Адміністратор',
223
-	'info_administrateur_1' => 'Адміністратор',
224
-	'info_administrateur_2' => 'на цьому сайті (<i>використовувати з пересторогою</i>)',
225
-	'info_administrateur_site_01' => 'Якщо ви адміністратор сайта, будь ласка',
226
-	'info_administrateur_site_02' => 'натисніть тут',
227
-	'info_administrateurs' => 'Адміністратори',
228
-	'info_administrer_rubrique' => 'Ви можете управляти цією рубрикою',
229
-	'info_adresse' => 'за адресою:',
230
-	'info_adresse_desinscription' => 'Адреса щоб відписатися:',
231
-	'info_adresse_url' => 'Адреса (URL) загального сайту',
232
-	'info_afficher_par_nb' => 'Показати',
233
-	'info_aide_en_ligne' => 'SPIP Oнлайн Допомога',
234
-	'info_ajout_image' => 'Коли ви додаєте зображення як прикріплені документи до статті, SPIP може автоматично створити зменшену копію цих зображень. Це дозволить, наприклад, автоматично створювати галерею чи портфоліо.',
235
-	'info_ajouter_rubrique' => 'Додати іншу рубрику для управління:',
236
-	'info_annonce_nouveautes' => 'Анонси останніх новин',
237
-	'info_article' => 'стаття',
238
-	'info_article_2' => 'статті',
239
-	'info_article_a_paraitre' => 'статті, які будуть опубліковані в майбутньому',
240
-	'info_articles_02' => 'статті',
241
-	'info_articles_2' => 'Статті',
242
-	'info_articles_auteur' => 'Статті автора',
243
-	'info_articles_miens' => 'Мої статті',
244
-	'info_articles_tous' => 'Усі статті',
245
-	'info_articles_trouves' => 'Знайдені статті',
246
-	'info_attente_validation' => 'Ваші статті на затвердженні',
247
-	'info_aucun_article' => 'Нема статтей',
248
-	'info_aucun_auteur' => 'Нема авторів',
249
-	'info_aucun_message' => 'Нема повідомлень',
250
-	'info_aucun_rubrique' => 'Нема розділів',
251
-	'info_aujourdhui' => 'сьогодні:',
252
-	'info_auteur_gere_rubriques' => 'Автор керує наступними розділами:',
253
-	'info_auteur_gere_toutes_rubriques' => 'Автор керує <b>всіма рубриками</b>',
254
-	'info_auteur_gere_toutes_rubriques_2' => 'Я керую <b>всіма розділами</b>',
255
-	'info_auteurs' => 'Автори',
256
-	'info_auteurs_par_tri' => 'Автори@partri@',
257
-	'info_auteurs_trouves' => 'Знайдені автори',
258
-	'info_authentification_externe' => 'Зовнішня аутентифікація',
259
-	'info_avertissement' => 'Попередження',
260
-	'info_barre_outils' => 'з панеллю інструментів?',
261
-	'info_base_installee' => 'Структуру вашої бази даних встановлено.',
262
-	'info_bio' => 'Біографія',
263
-	'info_cache_desactive' => 'Кешування вимкнено.',
264
-	'info_chapeau' => 'Вступ',
265
-	'info_chapeau_2' => 'Вступ:',
266
-	'info_chemin_acces_1' => 'Опції: <b>Шлях доступу до каталогу</b>',
267
-	'info_chemin_acces_2' => 'Тепер ви повинні налаштувати шлях доступу до інформації в  довіднику. Ця інформація необхідна для перегляду профілів користувачів, записаних в  довіднику.',
268
-	'info_chemin_acces_annuaire' => 'Опції: <b>Шлях доступу к каталогу</b>',
269
-	'info_choix_base' => 'Третій етап:',
270
-	'info_classement_1' => ' з @liste@',
271
-	'info_classement_2' => ' з @liste@',
272
-	'info_code_acces' => 'Не забудьте ваші власні коди доступу!',
273
-	'info_config_suivi' => 'Якщо ця адреса відповідає списку адресатів, ви можете вказати нижче адресу, за якою учасники сайту можуть зареєструватися. Цією адресою може бути адреса сайту (наприклад сторінка списка реєстрації через мережу) або адреса електронної пошти з певною темою (наприклад: <tt>@adresse_suivi@?subject=subscribe</tt>):',
274
-	'info_config_suivi_explication' => 'Ви можете підписатися на почтову розсилку цього сайту і отримувати на email інформацію про статті та новини, відправлені для публікації.',
275
-	'info_confirmer_passe' => 'Підтвердіть новий пароль:',
276
-	'info_conflit_edition_avis_non_sauvegarde' => 'Увага! Наступні поля були змінені. Ваші внесені зміни в цих полях не були враховані.',
277
-	'info_conflit_edition_differences' => 'Відмінності:',
278
-	'info_conflit_edition_version_enregistree' => 'Зареєстрована версія:',
279
-	'info_conflit_edition_votre_version' => 'Ваша версія:',
280
-	'info_connexion_base' => 'Спроба з’єднання з базою даних',
281
-	'info_connexion_base_donnee' => 'Підключення до бази даних',
282
-	'info_connexion_ldap_ok' => '<b>З’єднання з LDAP встановлено. </b> <p>Ви можете перейти до наступного кроку.</p>',
283
-	'info_connexion_mysql' => 'Ваше з’єднання з SQL',
284
-	'info_connexion_ok' => 'З’єднання встановлено.',
285
-	'info_contact' => 'Контакт',
286
-	'info_contenu_articles' => 'Зміст статтей',
287
-	'info_contributions' => 'Внески',
288
-	'info_creation_paragraphe' => '(Розділяйте абзаци порожніми строками)',
289
-	'info_creation_rubrique' => 'Перед тим, як писати статті, необхідно створити хоча б одну рубрику. ',
290
-	'info_creation_tables' => 'Створення таблиць бази даних',
291
-	'info_creer_base' => '<b>Створити</b> нову базу даних:',
292
-	'info_dans_rubrique' => 'У рубриці :',
293
-	'info_date_publication_anterieure' => 'Дата попередньої редакції :',
294
-	'info_date_referencement' => 'ДАТА ПОСИЛАННЯ НА ЦЕЙ САЙТ:',
295
-	'info_derniere_etape' => 'Готово!',
296
-	'info_descriptif' => 'Опис:',
297
-	'info_desinstaller_plugin' => 'видаляє дані і відключає плагін',
298
-	'info_discussion_cours' => 'Поточні обговорення',
299
-	'info_ecrire_article' => 'Перед тим, як писати статті, необхідно створити хоча б одну рубрику.',
300
-	'info_email_envoi' => ' Адреса електронної пошти (необов’язково)',
301
-	'info_email_envoi_txt' => 'Введіть e-mail адресу відправника, що використовується для відправлення електронних листів (зазвичай адреса користувача використовується як адреса відправника):',
302
-	'info_email_webmestre' => 'E-mail веб-мастера',
303
-	'info_envoi_email_automatique' => 'Автоматична відправка повідомлення електронної пошти ',
304
-	'info_envoyer_maintenant' => 'Відправити зараз',
305
-	'info_etape_suivante' => 'Перейти до наступного етапу',
306
-	'info_etape_suivante_1' => 'Ви можете перейти до наступного етапу.',
307
-	'info_etape_suivante_2' => 'Ви можете перейти до наступного етапу.',
308
-	'info_exceptions_proxy' => 'Винятки для проксі',
309
-	'info_exportation_base' => 'експортувати базу даних в @archive@',
310
-	'info_facilite_suivi_activite' => 'Для полегшення моніторингу діяльності   редакційних SPIP сайт може відправити його поштою, наприклад, на  список розсилки редакторів, бізнес-додатки публікації та перевірки статей.',
311
-	'info_fichiers_authent' => 'Файл аутентифікації «.htpasswd»',
312
-	'info_forums_abo_invites' => 'Ваш сайт має форуми за підпискою; відвідувачі можуть зареєструватися на них на основному сайті.',
313
-	'info_gauche_admin_tech' => '<b>Сторінка тільки для вебмастера сайта.</b> <p>Ви можете виконувати завдання щодо експлуатації сайту. Частина з них може потребувати FTP-доступу до сайту.</p>',
314
-	'info_gauche_admin_vider' => '<b>Тільки вебмастери мають доступ до цієї сторінки.</b> <p>Тут є можливість виконувати різні завдання по обслуговуванню сайта. Для виконання окремих завдань необхідний доступ до сайту по FTP.</p>',
315
-	'info_gauche_auteurs' => 'Перелік всіх авторів сайту. Статус автора позначений кольором (адміністратор = зелений; автор = жовтий).',
316
-	'info_gauche_auteurs_exterieurs' => 'Користувачі, що зареєструвалися, позначені синім кольором, а видалені користувачі - іконкою кошика.',
317
-	'info_gauche_messagerie' => 'Передача повідомлень дозволяє обмінюватися повідомленнями між редакторами, зберигати нотатки (для вашого особистого використання) або показувати оголошення на основній сторінці адміністративної частини (якщо ви - адміністратор).',
318
-	'info_gauche_statistiques_referers' => 'Ця сторінка показує список <i>посилань</i>, тобто ті сайти, які мають посилання на ваш сайт, тільки для вчора і сьогодні: фактично цей список поновлюється кожні 24 години.',
319
-	'info_gauche_visiteurs_enregistres' => 'Ви знайдете тут зареєстрованних відвідувачів основноі частини сайту (форуми за підпискою).',
320
-	'info_generation_miniatures_images' => 'Створення зменшених зображень',
321
-	'info_gerer_trad_objets' => '@objets@ : управління перекладами',
322
-	'info_hebergeur_desactiver_envoi_email' => 'Деякі хости відключають  автоматизовану відправку листів на своих серверах. В цьому випадку наступні можливості SPIP не можуть бути здійснені.',
323
-	'info_hier' => 'вчора:',
324
-	'info_identification_publique' => 'Ваша публична ідентифікація...',
325
-	'info_image_process' => 'Виберіть кращий метод для створення зменшеної копії, натиснувши на відповідну картинку.',
326
-	'info_image_process2' => 'Якщо картинки не відображаються, це значить, що ваш хостінг не підтримує розширения по роботі з зображеннями. Уточніть в технічній підтримці хостінгу про можливості використовувати бібліотеки «GD» або «Imagemagic».',
327
-	'info_images_auto' => 'Кеш файлів зображень',
328
-	'info_informations_personnelles' => 'Налаштування профиля',
329
-	'info_inscription' => 'Реєстрація',
330
-	'info_inscription_automatique' => 'Автоматична реєстрація нових авторів',
331
-	'info_jeu_caractere' => 'Кодування сайту',
332
-	'info_jours' => 'дні',
333
-	'info_laisser_champs_vides' => 'залиште ці поля порожніми)',
334
-	'info_langues' => 'Мови сайту',
335
-	'info_ldap_ok' => 'Встанослення справжності LDAP.',
336
-	'info_lien_hypertexte' => 'Гиперпосилання:',
337
-	'info_liste_nouveautes_envoyee' => 'Інформацію про останні оновлення відправлено',
338
-	'info_liste_redacteurs_connectes' => 'Автори онлайн',
339
-	'info_login_existant' => 'Цей логін вже використовується.',
340
-	'info_login_trop_court' => 'Занадто короткий логін.',
341
-	'info_login_trop_court_car_pluriel' => 'Логін повинен складатися мінімум з @nb@ символів.',
342
-	'info_logos' => 'Логотипи',
343
-	'info_maximum' => 'максимум:',
344
-	'info_meme_rubrique' => 'В розділі:',
345
-	'info_message_en_redaction' => 'Ваше повідомлення в роботі',
346
-	'info_message_technique' => 'Технічене повідомлення:',
347
-	'info_messagerie_interne' => 'Внутрішня передача повідомлень',
348
-	'info_mise_a_niveau_base' => 'оновлення бази даних SQL',
349
-	'info_mise_a_niveau_base_2' => '{{Попередження!}} Ви встановили версію SPIP файлів {старіше} ніж та, яку було попередньо встановлено на цьому сайті: ви ризикуєте втратити базу даних, і тоді ваш сайт не зможе працювати належним чином. <br /> {{Перевстановіть SPIP файли.}}',
350
-	'info_modification_enregistree' => 'Ваши зміни збережено',
351
-	'info_modifier_auteur' => 'Змінити автора:',
352
-	'info_modifier_rubrique' => 'Змінити розділ:',
353
-	'info_modifier_titre' => 'Змінити: @titre@',
354
-	'info_mon_site_spip' => 'Мій сайт ',
355
-	'info_moyenne' => 'в средньому:',
356
-	'info_multi_cet_article' => 'Мова статті:',
357
-	'info_multi_langues_choisies' => 'Виберіть мови для редагування матеріалів на сайті. Мови, які вже використовує ваш сайт (наверху списку) не можуть бути вимкнені.',
358
-	'info_multi_objets' => '@objets@ : увімкнути мовне меню',
359
-	'info_multi_secteurs' => '... тільки для розділів в корені сайту?',
360
-	'info_nb_articles' => '@nb@ статтей',
361
-	'info_nb_auteurs' => '@nb@ авторів',
362
-	'info_nb_messages' => '@nb@ повідомлень',
363
-	'info_nb_mots_cles' => '@nb@ ключових слів',
364
-	'info_nb_rubriques' => '@nb@ розділ(ів)',
365
-	'info_nb_visiteurs' => '@nb@ відвідувачів',
366
-	'info_nom' => 'Ім’я',
367
-	'info_nom_destinataire' => 'Ім’я користувача',
368
-	'info_nom_pas_conforme' => 'HTML теги не допускаються',
369
-	'info_nom_site' => 'Назва вашого сайта',
370
-	'info_nombre_articles' => '@nb_articles@ статті,',
371
-	'info_nombre_rubriques' => '@nb_rubriques@ рубрики,',
372
-	'info_nombre_sites' => '@nb_sites@ сайти,',
373
-	'info_non_deplacer' => 'Не переміщувати...',
374
-	'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP может регулярно відправляти новини, оголошення сайта
164
+    // I
165
+    'ical_info1' => 'Ця сторінка надає вам декілька методів для підтримки зв’язку з діяльністю цього сайту',
166
+    'ical_info2' => 'Ви можете дізнатися більше в <a href="@spipnet@">документації про SPIP</a>.',
167
+    'ical_info_calendrier' => 'В вашему розпорядженні є два календарі. Перший - це карта сайту, що відображає всі опубліковані статті. Другий містить редакторські оголошення, а також ваші останні особисті повідомлення: його збережено для вас завдяки ключу, який ви можете змінити будь-коли, підтвердивши свій пароль.',
168
+    'ical_methode_http' => 'Завантаження',
169
+    'ical_methode_webcal' => 'Синхронізація (webcal://)',
170
+    'ical_texte_js' => 'Ви можете вставити цей javascript код на будь-який сайт, щоб відображати останні опубліковані статті і матеріали вашого сайту.',
171
+    'ical_texte_prive' => 'Цей календар є строго особистим, він інформує вас про роботу зі статтями на цьому сайті (завдання, персональні налаштування, відправлені статті і новини дня...).',
172
+    'ical_texte_public' => 'Цей календар дозволяє вам слідкувати за основною діяльністю цього сайту (публікація статтей і новин).',
173
+    'ical_texte_rss' => 'Ви можете експортувати останні поновлення на вашому сайті в форматі XML/RSS (Rich Site Summary). Також, завдяки цьому формату даних, ви можете імпортувати інформацію з інших сайтів в ІнтерНемаі.',
174
+    'ical_titre_js' => 'Javascript',
175
+    'ical_titre_mailing' => 'Список адресатів',
176
+    'ical_titre_rss' => 'Отримання статей і новин з інших сайтов по RSS',
177
+    'icone_accueil' => 'Головна',
178
+    'icone_activer_cookie' => 'Помістити cookie',
179
+    'icone_activite' => 'Зворотній зв’язок',
180
+    'icone_admin_plugin' => 'Плагіни',
181
+    'icone_administration' => 'Обслуговування',
182
+    'icone_afficher_auteurs' => 'Показати авторів',
183
+    'icone_afficher_visiteurs' => 'Показати відвідувачів',
184
+    'icone_arret_discussion' => 'Припинити участь в цьому обговоренні',
185
+    'icone_calendrier' => 'Календар',
186
+    'icone_configuration' => 'Конфігурація',
187
+    'icone_creer_auteur' => 'Створити автора і додати до статті',
188
+    'icone_creer_mot_cle' => 'Створити нове ключове слово і пов’язати його із цією статтею.',
189
+    'icone_creer_rubrique_2' => 'Створити нову рубрику',
190
+    'icone_developpement' => 'У розвитку',
191
+    'icone_edition' => 'Редагувати',
192
+    'icone_ma_langue' => 'Моя мова',
193
+    'icone_mes_infos' => 'Моя інформація',
194
+    'icone_mes_preferences' => 'Мої уподобання',
195
+    'icone_modifier_article' => 'Змінити статтю',
196
+    'icone_modifier_rubrique' => 'Змінити розділ',
197
+    'icone_publication' => 'Публікації',
198
+    'icone_relancer_signataire' => 'Відновити підпис',
199
+    'icone_retour' => 'Назад',
200
+    'icone_retour_article' => 'Назад до статті',
201
+    'icone_squelette' => 'Шаблони',
202
+    'icone_suivi_publication' => 'Моніторинг публікації',
203
+    'icone_supprimer_cookie' => 'Видалити cookie',
204
+    'icone_supprimer_rubrique' => 'Видалити розділ',
205
+    'icone_supprimer_signature' => 'Видалити підпис',
206
+    'icone_valider_signature' => 'Затвердити підпис',
207
+    'image_administrer_rubrique' => 'Ви можете керувати цим розділом',
208
+    'impossible_modifier_login_auteur' => 'Неможливо змінити логін.',
209
+    'impossible_modifier_pass_auteur' => 'Неможливо змінити пароль.',
210
+    'info_1_article' => '1 стаття',
211
+    'info_1_auteur' => '1 автор',
212
+    'info_1_message' => '1 повідомлення',
213
+    'info_1_mot_cle' => '1 ключове слово',
214
+    'info_1_rubrique' => '1 розділ',
215
+    'info_1_visiteur' => '1 відвідувач',
216
+    'info_activer_cookie' => 'Ви можете увімкнути <b>адміністративні cookie</b>, що дозволить вам легко перемикатися  між основною і адміністративною частиною сайту.',
217
+    'info_activer_menu_developpement' => 'Показати меню розвитку',
218
+    'info_admin_etre_webmestre' => 'Надати мені права вебмастера',
219
+    'info_admin_je_suis_webmestre' => 'Я <b>вебмастер</b>',
220
+    'info_admin_statuer_webmestre' => 'Надати цьому адміністратору права веб-майстра',
221
+    'info_admin_webmestre' => 'Адміністратор є <b>вебмастером</b>',
222
+    'info_administrateur' => 'Адміністратор',
223
+    'info_administrateur_1' => 'Адміністратор',
224
+    'info_administrateur_2' => 'на цьому сайті (<i>використовувати з пересторогою</i>)',
225
+    'info_administrateur_site_01' => 'Якщо ви адміністратор сайта, будь ласка',
226
+    'info_administrateur_site_02' => 'натисніть тут',
227
+    'info_administrateurs' => 'Адміністратори',
228
+    'info_administrer_rubrique' => 'Ви можете управляти цією рубрикою',
229
+    'info_adresse' => 'за адресою:',
230
+    'info_adresse_desinscription' => 'Адреса щоб відписатися:',
231
+    'info_adresse_url' => 'Адреса (URL) загального сайту',
232
+    'info_afficher_par_nb' => 'Показати',
233
+    'info_aide_en_ligne' => 'SPIP Oнлайн Допомога',
234
+    'info_ajout_image' => 'Коли ви додаєте зображення як прикріплені документи до статті, SPIP може автоматично створити зменшену копію цих зображень. Це дозволить, наприклад, автоматично створювати галерею чи портфоліо.',
235
+    'info_ajouter_rubrique' => 'Додати іншу рубрику для управління:',
236
+    'info_annonce_nouveautes' => 'Анонси останніх новин',
237
+    'info_article' => 'стаття',
238
+    'info_article_2' => 'статті',
239
+    'info_article_a_paraitre' => 'статті, які будуть опубліковані в майбутньому',
240
+    'info_articles_02' => 'статті',
241
+    'info_articles_2' => 'Статті',
242
+    'info_articles_auteur' => 'Статті автора',
243
+    'info_articles_miens' => 'Мої статті',
244
+    'info_articles_tous' => 'Усі статті',
245
+    'info_articles_trouves' => 'Знайдені статті',
246
+    'info_attente_validation' => 'Ваші статті на затвердженні',
247
+    'info_aucun_article' => 'Нема статтей',
248
+    'info_aucun_auteur' => 'Нема авторів',
249
+    'info_aucun_message' => 'Нема повідомлень',
250
+    'info_aucun_rubrique' => 'Нема розділів',
251
+    'info_aujourdhui' => 'сьогодні:',
252
+    'info_auteur_gere_rubriques' => 'Автор керує наступними розділами:',
253
+    'info_auteur_gere_toutes_rubriques' => 'Автор керує <b>всіма рубриками</b>',
254
+    'info_auteur_gere_toutes_rubriques_2' => 'Я керую <b>всіма розділами</b>',
255
+    'info_auteurs' => 'Автори',
256
+    'info_auteurs_par_tri' => 'Автори@partri@',
257
+    'info_auteurs_trouves' => 'Знайдені автори',
258
+    'info_authentification_externe' => 'Зовнішня аутентифікація',
259
+    'info_avertissement' => 'Попередження',
260
+    'info_barre_outils' => 'з панеллю інструментів?',
261
+    'info_base_installee' => 'Структуру вашої бази даних встановлено.',
262
+    'info_bio' => 'Біографія',
263
+    'info_cache_desactive' => 'Кешування вимкнено.',
264
+    'info_chapeau' => 'Вступ',
265
+    'info_chapeau_2' => 'Вступ:',
266
+    'info_chemin_acces_1' => 'Опції: <b>Шлях доступу до каталогу</b>',
267
+    'info_chemin_acces_2' => 'Тепер ви повинні налаштувати шлях доступу до інформації в  довіднику. Ця інформація необхідна для перегляду профілів користувачів, записаних в  довіднику.',
268
+    'info_chemin_acces_annuaire' => 'Опції: <b>Шлях доступу к каталогу</b>',
269
+    'info_choix_base' => 'Третій етап:',
270
+    'info_classement_1' => ' з @liste@',
271
+    'info_classement_2' => ' з @liste@',
272
+    'info_code_acces' => 'Не забудьте ваші власні коди доступу!',
273
+    'info_config_suivi' => 'Якщо ця адреса відповідає списку адресатів, ви можете вказати нижче адресу, за якою учасники сайту можуть зареєструватися. Цією адресою може бути адреса сайту (наприклад сторінка списка реєстрації через мережу) або адреса електронної пошти з певною темою (наприклад: <tt>@adresse_suivi@?subject=subscribe</tt>):',
274
+    'info_config_suivi_explication' => 'Ви можете підписатися на почтову розсилку цього сайту і отримувати на email інформацію про статті та новини, відправлені для публікації.',
275
+    'info_confirmer_passe' => 'Підтвердіть новий пароль:',
276
+    'info_conflit_edition_avis_non_sauvegarde' => 'Увага! Наступні поля були змінені. Ваші внесені зміни в цих полях не були враховані.',
277
+    'info_conflit_edition_differences' => 'Відмінності:',
278
+    'info_conflit_edition_version_enregistree' => 'Зареєстрована версія:',
279
+    'info_conflit_edition_votre_version' => 'Ваша версія:',
280
+    'info_connexion_base' => 'Спроба з’єднання з базою даних',
281
+    'info_connexion_base_donnee' => 'Підключення до бази даних',
282
+    'info_connexion_ldap_ok' => '<b>З’єднання з LDAP встановлено. </b> <p>Ви можете перейти до наступного кроку.</p>',
283
+    'info_connexion_mysql' => 'Ваше з’єднання з SQL',
284
+    'info_connexion_ok' => 'З’єднання встановлено.',
285
+    'info_contact' => 'Контакт',
286
+    'info_contenu_articles' => 'Зміст статтей',
287
+    'info_contributions' => 'Внески',
288
+    'info_creation_paragraphe' => '(Розділяйте абзаци порожніми строками)',
289
+    'info_creation_rubrique' => 'Перед тим, як писати статті, необхідно створити хоча б одну рубрику. ',
290
+    'info_creation_tables' => 'Створення таблиць бази даних',
291
+    'info_creer_base' => '<b>Створити</b> нову базу даних:',
292
+    'info_dans_rubrique' => 'У рубриці :',
293
+    'info_date_publication_anterieure' => 'Дата попередньої редакції :',
294
+    'info_date_referencement' => 'ДАТА ПОСИЛАННЯ НА ЦЕЙ САЙТ:',
295
+    'info_derniere_etape' => 'Готово!',
296
+    'info_descriptif' => 'Опис:',
297
+    'info_desinstaller_plugin' => 'видаляє дані і відключає плагін',
298
+    'info_discussion_cours' => 'Поточні обговорення',
299
+    'info_ecrire_article' => 'Перед тим, як писати статті, необхідно створити хоча б одну рубрику.',
300
+    'info_email_envoi' => ' Адреса електронної пошти (необов’язково)',
301
+    'info_email_envoi_txt' => 'Введіть e-mail адресу відправника, що використовується для відправлення електронних листів (зазвичай адреса користувача використовується як адреса відправника):',
302
+    'info_email_webmestre' => 'E-mail веб-мастера',
303
+    'info_envoi_email_automatique' => 'Автоматична відправка повідомлення електронної пошти ',
304
+    'info_envoyer_maintenant' => 'Відправити зараз',
305
+    'info_etape_suivante' => 'Перейти до наступного етапу',
306
+    'info_etape_suivante_1' => 'Ви можете перейти до наступного етапу.',
307
+    'info_etape_suivante_2' => 'Ви можете перейти до наступного етапу.',
308
+    'info_exceptions_proxy' => 'Винятки для проксі',
309
+    'info_exportation_base' => 'експортувати базу даних в @archive@',
310
+    'info_facilite_suivi_activite' => 'Для полегшення моніторингу діяльності   редакційних SPIP сайт може відправити його поштою, наприклад, на  список розсилки редакторів, бізнес-додатки публікації та перевірки статей.',
311
+    'info_fichiers_authent' => 'Файл аутентифікації «.htpasswd»',
312
+    'info_forums_abo_invites' => 'Ваш сайт має форуми за підпискою; відвідувачі можуть зареєструватися на них на основному сайті.',
313
+    'info_gauche_admin_tech' => '<b>Сторінка тільки для вебмастера сайта.</b> <p>Ви можете виконувати завдання щодо експлуатації сайту. Частина з них може потребувати FTP-доступу до сайту.</p>',
314
+    'info_gauche_admin_vider' => '<b>Тільки вебмастери мають доступ до цієї сторінки.</b> <p>Тут є можливість виконувати різні завдання по обслуговуванню сайта. Для виконання окремих завдань необхідний доступ до сайту по FTP.</p>',
315
+    'info_gauche_auteurs' => 'Перелік всіх авторів сайту. Статус автора позначений кольором (адміністратор = зелений; автор = жовтий).',
316
+    'info_gauche_auteurs_exterieurs' => 'Користувачі, що зареєструвалися, позначені синім кольором, а видалені користувачі - іконкою кошика.',
317
+    'info_gauche_messagerie' => 'Передача повідомлень дозволяє обмінюватися повідомленнями між редакторами, зберигати нотатки (для вашого особистого використання) або показувати оголошення на основній сторінці адміністративної частини (якщо ви - адміністратор).',
318
+    'info_gauche_statistiques_referers' => 'Ця сторінка показує список <i>посилань</i>, тобто ті сайти, які мають посилання на ваш сайт, тільки для вчора і сьогодні: фактично цей список поновлюється кожні 24 години.',
319
+    'info_gauche_visiteurs_enregistres' => 'Ви знайдете тут зареєстрованних відвідувачів основноі частини сайту (форуми за підпискою).',
320
+    'info_generation_miniatures_images' => 'Створення зменшених зображень',
321
+    'info_gerer_trad_objets' => '@objets@ : управління перекладами',
322
+    'info_hebergeur_desactiver_envoi_email' => 'Деякі хости відключають  автоматизовану відправку листів на своих серверах. В цьому випадку наступні можливості SPIP не можуть бути здійснені.',
323
+    'info_hier' => 'вчора:',
324
+    'info_identification_publique' => 'Ваша публична ідентифікація...',
325
+    'info_image_process' => 'Виберіть кращий метод для створення зменшеної копії, натиснувши на відповідну картинку.',
326
+    'info_image_process2' => 'Якщо картинки не відображаються, це значить, що ваш хостінг не підтримує розширения по роботі з зображеннями. Уточніть в технічній підтримці хостінгу про можливості використовувати бібліотеки «GD» або «Imagemagic».',
327
+    'info_images_auto' => 'Кеш файлів зображень',
328
+    'info_informations_personnelles' => 'Налаштування профиля',
329
+    'info_inscription' => 'Реєстрація',
330
+    'info_inscription_automatique' => 'Автоматична реєстрація нових авторів',
331
+    'info_jeu_caractere' => 'Кодування сайту',
332
+    'info_jours' => 'дні',
333
+    'info_laisser_champs_vides' => 'залиште ці поля порожніми)',
334
+    'info_langues' => 'Мови сайту',
335
+    'info_ldap_ok' => 'Встанослення справжності LDAP.',
336
+    'info_lien_hypertexte' => 'Гиперпосилання:',
337
+    'info_liste_nouveautes_envoyee' => 'Інформацію про останні оновлення відправлено',
338
+    'info_liste_redacteurs_connectes' => 'Автори онлайн',
339
+    'info_login_existant' => 'Цей логін вже використовується.',
340
+    'info_login_trop_court' => 'Занадто короткий логін.',
341
+    'info_login_trop_court_car_pluriel' => 'Логін повинен складатися мінімум з @nb@ символів.',
342
+    'info_logos' => 'Логотипи',
343
+    'info_maximum' => 'максимум:',
344
+    'info_meme_rubrique' => 'В розділі:',
345
+    'info_message_en_redaction' => 'Ваше повідомлення в роботі',
346
+    'info_message_technique' => 'Технічене повідомлення:',
347
+    'info_messagerie_interne' => 'Внутрішня передача повідомлень',
348
+    'info_mise_a_niveau_base' => 'оновлення бази даних SQL',
349
+    'info_mise_a_niveau_base_2' => '{{Попередження!}} Ви встановили версію SPIP файлів {старіше} ніж та, яку було попередньо встановлено на цьому сайті: ви ризикуєте втратити базу даних, і тоді ваш сайт не зможе працювати належним чином. <br /> {{Перевстановіть SPIP файли.}}',
350
+    'info_modification_enregistree' => 'Ваши зміни збережено',
351
+    'info_modifier_auteur' => 'Змінити автора:',
352
+    'info_modifier_rubrique' => 'Змінити розділ:',
353
+    'info_modifier_titre' => 'Змінити: @titre@',
354
+    'info_mon_site_spip' => 'Мій сайт ',
355
+    'info_moyenne' => 'в средньому:',
356
+    'info_multi_cet_article' => 'Мова статті:',
357
+    'info_multi_langues_choisies' => 'Виберіть мови для редагування матеріалів на сайті. Мови, які вже використовує ваш сайт (наверху списку) не можуть бути вимкнені.',
358
+    'info_multi_objets' => '@objets@ : увімкнути мовне меню',
359
+    'info_multi_secteurs' => '... тільки для розділів в корені сайту?',
360
+    'info_nb_articles' => '@nb@ статтей',
361
+    'info_nb_auteurs' => '@nb@ авторів',
362
+    'info_nb_messages' => '@nb@ повідомлень',
363
+    'info_nb_mots_cles' => '@nb@ ключових слів',
364
+    'info_nb_rubriques' => '@nb@ розділ(ів)',
365
+    'info_nb_visiteurs' => '@nb@ відвідувачів',
366
+    'info_nom' => 'Ім’я',
367
+    'info_nom_destinataire' => 'Ім’я користувача',
368
+    'info_nom_pas_conforme' => 'HTML теги не допускаються',
369
+    'info_nom_site' => 'Назва вашого сайта',
370
+    'info_nombre_articles' => '@nb_articles@ статті,',
371
+    'info_nombre_rubriques' => '@nb_rubriques@ рубрики,',
372
+    'info_nombre_sites' => '@nb_sites@ сайти,',
373
+    'info_non_deplacer' => 'Не переміщувати...',
374
+    'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP может регулярно відправляти новини, оголошення сайта
375 375
   (недавно опубліковані статті і новини).',
376
-	'info_non_envoi_liste_nouveautes' => 'Не відправляти список останніх новин',
377
-	'info_non_modifiable' => 'не может бути змінено',
378
-	'info_non_suppression_mot_cle' => 'Я НЕ хочу видаляти це ключове слово.',
379
-	'info_notes' => 'Примітки',
380
-	'info_nouvel_article' => 'Новая стаття',
381
-	'info_nouvelle_traduction' => 'Новий переклад:',
382
-	'info_numero_article' => 'НОМЕР СТАТТІ:',
383
-	'info_obligatoire_02' => '(обов’язково)',
384
-	'info_option_accepter_visiteurs' => 'Увімкнути реєстрацію відвідувачів на сайті',
385
-	'info_option_ne_pas_accepter_visiteurs' => 'Відключити реєстрацію відвідувачів на сайті',
386
-	'info_options_avancees' => 'ДОДАТКОВІ НАЛАШТУВАННЯ',
387
-	'info_ou' => 'або...',
388
-	'info_page_interdite' => 'Заборонена сторінка',
389
-	'info_par_nom' => 'за назвою',
390
-	'info_par_nombre_article' => 'за номерами статтей',
391
-	'info_par_statut' => 'за статусом',
392
-	'info_par_tri' => '’(за @tri@)’',
393
-	'info_passe_trop_court' => 'Пароль надто короткий.',
394
-	'info_passe_trop_court_car_pluriel' => 'Пароль повинен мати мінімум @nb@ символів.',
395
-	'info_passes_identiques' => 'Два паролі не співпадають.',
396
-	'info_plus_cinq_car' => 'понад 5 символів',
397
-	'info_plus_cinq_car_2' => '(Понад 5 символів)',
398
-	'info_plus_trois_car' => '(Понад 3 символи)',
399
-	'info_popularite' => 'популярність: @popularite@; відвідання: @visites@',
400
-	'info_post_scriptum' => 'Постскриптум',
401
-	'info_post_scriptum_2' => 'Постскриптум: ',
402
-	'info_pour' => 'для',
403
-	'info_preview_texte' => 'Налаштування попереднього перегляду. Ви можете подивитися, як виглядають на сайті матеріали зі статусом «представлено». Увімкнути цю можливість для усіх авторів, тільки для адміністраторов або відключити взагалі?',
404
-	'info_procedez_par_etape' => 'Будь ласка, виконуйте покроково',
405
-	'info_procedure_maj_version' => 'необхідно запустити процедуру оновлення поточної бази даних для новоі версії SPIP.',
406
-	'info_proxy_ok' => 'Проксі сервер працює.',
407
-	'info_ps' => 'P.S.',
408
-	'info_publier' => 'опублікувати',
409
-	'info_publies' => 'Ваші статті, опубліковані на сайті:',
410
-	'info_question_accepter_visiteurs' => 'Якщо шаблони вашого сайту дозволяють відвідувачам реєструватися, не входячи в адміністративну частину, будь ласка, включіть наступну опцію:',
411
-	'info_question_inscription_nouveaux_redacteurs' => 'Ви хочете дозволити реєстрацію нових користувачів на сайті? Якщо так, то відвідувачі зможуть реєструватися самостійно, використовуючи стандартну форму. Також у них буде доступ в адміністративну частину сайту і можливість створювати нові матеріали.  <div class="notice">Пароль для доступу буде відправлено користувачу  email’ом автоматично. Якщо ваш хостінг не підтримує відправку листів, то ця опція буде марна.</div>',
412
-	'info_qui_edite' => '@nom_auteur_modif@ працював над цим матеріалом @date_diff@ хвилин назад',
413
-	'info_racine_site' => 'Корінь сайту',
414
-	'info_recharger_page' => 'Будь ласка перезавантажте цю сторінку через декілька хвилин.',
415
-	'info_recherche_auteur_zero' => 'Нічого не знайдено на запит          «@cherche_auteur@».',
416
-	'info_recommencer' => 'Будь ласка, спопробуйте ще раз.',
417
-	'info_redacteur_1' => 'Автор',
418
-	'info_redacteur_2' => 'маючи доступ до адміністративної частини (<i>рекомендував</i>), ',
419
-	'info_redacteurs' => 'Автори',
420
-	'info_redaction_en_cours' => 'РЕДАГУЄТЬСЯ',
421
-	'info_redirection' => 'Перенаправлення',
422
-	'info_redirection_activee' => 'Перенаправлення включено.',
423
-	'info_redirection_boucle' => 'Ви намагаєтеся перенаправити статтю саму на себе.',
424
-	'info_redirection_desactivee' => 'Перенаправлення видалено.',
425
-	'info_refuses' => 'Ваші відхилені статті',
426
-	'info_reglage_ldap' => 'Опції <b>налаштування імпорту LDAP</b>',
427
-	'info_renvoi_article' => 'Відвідувач будет перенаправлений за наступним посиланням',
428
-	'info_reserve_admin' => 'Тільки адміністратори можуть змінити цю адресу.',
429
-	'info_restreindre_rubrique' => 'Надати права управління розділами:',
430
-	'info_resultat_recherche' => 'Результати пошуку:',
431
-	'info_rubriques' => 'Розділи',
432
-	'info_rubriques_02' => 'розділи',
433
-	'info_rubriques_trouvees' => 'Знайдені розділи',
434
-	'info_sans_titre' => 'Без назви',
435
-	'info_selection_chemin_acces' => '<b>Виберіть</b> шлях доступу до каталогу:',
436
-	'info_signatures' => 'підписи',
437
-	'info_site' => 'Сайт',
438
-	'info_site_2' => 'Сайт:',
439
-	'info_site_min' => 'сайт',
440
-	'info_site_reference_2' => 'Сайт, що реферується (Referenced site)',
441
-	'info_site_web' => 'САЙТ:',
442
-	'info_sites' => 'сайти',
443
-	'info_sites_lies_mot' => 'Сайти з цим ключовим словом',
444
-	'info_sites_proxy' => 'Використовувати проксі',
445
-	'info_sites_trouves' => 'знайдені сайти',
446
-	'info_sous_titre' => 'Підзаголовок:',
447
-	'info_statut_administrateur' => 'Адміністратор',
448
-	'info_statut_auteur' => 'Статус автора:',
449
-	'info_statut_auteur_2' => 'Я',
450
-	'info_statut_auteur_a_confirmer' => 'Реєстрація буде підтверджена',
451
-	'info_statut_auteur_autre' => 'Інший статус:',
452
-	'info_statut_redacteur' => 'Автор',
453
-	'info_statut_utilisateurs_1' => 'Усталений (default) статус для імпортованих користувачів',
454
-	'info_statut_utilisateurs_2' => 'Виберіть статус, що буде використовуватися для людей з каталогу LDAP, коли вони підключаться вперше. Пізніше ви зможете змінити це значення для кожного автора індивідуально.',
455
-	'info_suivi_activite' => 'Відстежування роботи редакторів',
456
-	'info_surtitre' => 'Топ-заголовок:',
457
-	'info_syndication_integrale_1' => 'Ваш сайт пропонує об’єднані файли (див. «<a href="@url@">@titre@</a>»).',
458
-	'info_syndication_integrale_2' => 'Відправити статтю повністю чи тільки перші абзаци?',
459
-	'info_table_prefix' => 'Ви можете задати свій префікс для імен таблиць бази даних (завдяки цьому ви можете встановити декілька сайтів на одну базу даних). Для написання префіксу використовуйте лише маленькі латинські букви і цифри.',
460
-	'info_taille_maximale_images' => 'Максимальний розмір картинок, з якими може працювати SPIP (у мільйонах пікселів).<br />SPIP не зможет стискати картинки більшого розміру.',
461
-	'info_taille_maximale_vignette' => 'Максимальний розмір зображень, створенних системою:',
462
-	'info_terminer_installation' => 'Теперь ви можете закінчити стандартний процес встановлення.',
463
-	'info_texte' => 'Текст',
464
-	'info_texte_explicatif' => 'Пояснювальний текст',
465
-	'info_texte_long' => '(Довгий текст: він з’явиться в декількох частинах, які будуть повторно зібрані після затвердження.)',
466
-	'info_texte_message' => 'Текст повідомлення:',
467
-	'info_texte_message_02' => 'Текст повідомлення',
468
-	'info_titre' => 'Заголовок:',
469
-	'info_total' => 'всього:',
470
-	'info_tous_articles_en_redaction' => 'Усі статті, що редагуються',
471
-	'info_tous_articles_presents' => 'Усі статті в розділі',
472
-	'info_tous_articles_refuses' => 'Усі відхилені статті',
473
-	'info_tous_les' => 'кожен:',
474
-	'info_tout_site' => 'Весь сайт',
475
-	'info_tout_site2' => 'Статтю не було перекладено на цю мову.',
476
-	'info_tout_site3' => 'Статтю було перекладено на цю мову, але з того часу в оригінал внесено зміни. Необхідно поновити переклад.',
477
-	'info_tout_site4' => 'Статтю було перекладено на цю мову, і переклад актуальний.',
478
-	'info_tout_site5' => 'Вихідна стаття.',
479
-	'info_tout_site6' => '<b>Попередження:</b> відображаються лише вихідні статті. Переклади, пов’язані з оригіналом, - в кольорі, що вказує їхній статус:',
480
-	'info_traductions' => 'Переклади',
481
-	'info_travail_colaboratif' => 'Сумісна робота над статтями',
482
-	'info_un_article' => 'стаття,',
483
-	'info_un_site' => 'сайт,',
484
-	'info_une_rubrique' => 'розділ,',
485
-	'info_une_rubrique_02' => '1 розділ',
486
-	'info_url' => 'Адреса:',
487
-	'info_url_proxy' => 'URL проксі',
488
-	'info_url_proxy_pas_conforme' => 'Невірний URL проксі серверу.',
489
-	'info_url_site_pas_conforme' => 'URL сайту не є валідним.',
490
-	'info_url_test_proxy' => 'URL для перевірки',
491
-	'info_urlref' => 'Гиперпосилання:',
492
-	'info_utilisation_spip' => 'SPIP готовий до роботи',
493
-	'info_visites_par_mois' => 'Щомісячний показ:',
494
-	'info_visiteur_1' => 'Відвідувач',
495
-	'info_visiteur_2' => 'з основної частини сайту',
496
-	'info_visiteurs' => 'Відвідувачі',
497
-	'info_visiteurs_02' => 'Відвідувачі основної частини сайту',
498
-	'info_webmestre_forces' => 'Список вебмастерів міститься в <tt>@file_options@</tt>.',
499
-	'install_adresse_base_hebergeur' => 'Адресу серверу бази даних ви можете дізнатися у свого хостера',
500
-	'install_connect_ok' => 'Була оголошена нова база на сервері @connect@.',
501
-	'install_echec_annonce' => 'Ця інсталяция, напевне, не буде працювати або приведе до нестійкої роботи сайту...',
502
-	'install_extension_mbstring' => 'SPIP не пращює з:',
503
-	'install_extension_php_obligatoire' => 'SPIP вимагає php розширень:',
504
-	'install_login_base_hebergeur' => 'Логін визначається постачальником послуг',
505
-	'install_nom_base_hebergeur' => 'Ім’я бази даних визначається постачальником послуг:',
506
-	'install_pas_table' => 'В базе даних ще нема таблиць',
507
-	'install_pass_base_hebergeur' => 'Ви можете встановити пароль через контрольну панель хостінгу або запитати його в службі підтримки вашого хостінгу.',
508
-	'install_php_version' => 'Версія PHP @version@ надто стара (мінімум = @minimum@)',
509
-	'install_select_langue' => 'Виберіть мову, потім натисніть кнопку «далі», щоб начати процедуру встановлення.',
510
-	'install_select_type_db' => 'Вкажіть тип бази даних:',
511
-	'install_select_type_mysql' => 'MySQL',
512
-	'install_select_type_pg' => 'PostgreSQL',
513
-	'install_select_type_sqlite2' => 'SQLite 2',
514
-	'install_select_type_sqlite3' => 'SQLite 3',
515
-	'install_serveur_hebergeur' => 'Сервер бази даних визначається постачальником послуг',
516
-	'install_table_prefix_hebergeur' => 'Префікс таблиці бази даних:',
517
-	'install_tables_base' => 'Таблиці баз даних',
518
-	'install_types_db_connus' => 'SPIP працює з <b>MySQL</b> і <b>SQLite</b>.',
519
-	'install_types_db_connus_avertissement' => 'Підтримка PostgreSQL поки на експеріментальному рівні. ',
520
-	'instituer_erreur_statut_a_change' => 'Статус вже був змінений',
521
-	'instituer_erreur_statut_non_autorise' => 'Ви не можете вибрати цей статус',
522
-	'intem_redacteur' => 'редактор',
523
-	'intitule_licence' => 'Дозвіл',
524
-	'item_accepter_inscriptions' => 'Дозволити реєстрацію',
525
-	'item_activer_messages_avertissement' => 'Попереджати про сумісну роботу',
526
-	'item_administrateur_2' => 'адміністратор',
527
-	'item_afficher_calendrier' => 'показувати в календарі',
528
-	'item_autoriser_syndication_integrale' => 'Включати цілі статті в об’єднані файли ',
529
-	'item_choix_administrateurs' => 'адміністратори',
530
-	'item_choix_generation_miniature' => 'Створювати зменшені копії автоматично.',
531
-	'item_choix_non_generation_miniature' => 'Не створювати зменшені копії.',
532
-	'item_choix_redacteurs' => 'редактори',
533
-	'item_choix_visiteurs' => 'відвідувачі сайту',
534
-	'item_creer_fichiers_authent' => 'Створити .htpasswd файли',
535
-	'item_login' => 'Логін',
536
-	'item_messagerie_agenda' => 'Увімкнути систему обміну повідомленнями і календар',
537
-	'item_mots_cles_association_articles' => 'статті',
538
-	'item_mots_cles_association_rubriques' => 'розділи',
539
-	'item_mots_cles_association_sites' => 'зробити посилання або об’єднати сайти.',
540
-	'item_non' => 'Ні',
541
-	'item_non_accepter_inscriptions' => 'Не дозволяти реєстрацію',
542
-	'item_non_activer_messages_avertissement' => 'НЕ попереджати про сумісну роботу',
543
-	'item_non_afficher_calendrier' => 'Не показувати календар',
544
-	'item_non_autoriser_syndication_integrale' => 'Відправляти лише короткий виклад',
545
-	'item_non_creer_fichiers_authent' => 'Не створювати ці файли',
546
-	'item_non_messagerie_agenda' => 'Відключити систему обміну повідомленнями і календар',
547
-	'item_non_publier_articles' => 'Публікувати статті тільки після вказаної дати публікації.',
548
-	'item_nouvel_auteur' => 'Новий автор',
549
-	'item_nouvelle_rubrique' => 'Новий розділ',
550
-	'item_oui' => 'Так',
551
-	'item_publier_articles' => 'Негайно публіковати статті, не дивлячись на дату публікації',
552
-	'item_reponse_article' => 'Відповісти на статтю',
553
-	'item_visiteur' => 'відвідувач',
376
+    'info_non_envoi_liste_nouveautes' => 'Не відправляти список останніх новин',
377
+    'info_non_modifiable' => 'не может бути змінено',
378
+    'info_non_suppression_mot_cle' => 'Я НЕ хочу видаляти це ключове слово.',
379
+    'info_notes' => 'Примітки',
380
+    'info_nouvel_article' => 'Новая стаття',
381
+    'info_nouvelle_traduction' => 'Новий переклад:',
382
+    'info_numero_article' => 'НОМЕР СТАТТІ:',
383
+    'info_obligatoire_02' => '(обов’язково)',
384
+    'info_option_accepter_visiteurs' => 'Увімкнути реєстрацію відвідувачів на сайті',
385
+    'info_option_ne_pas_accepter_visiteurs' => 'Відключити реєстрацію відвідувачів на сайті',
386
+    'info_options_avancees' => 'ДОДАТКОВІ НАЛАШТУВАННЯ',
387
+    'info_ou' => 'або...',
388
+    'info_page_interdite' => 'Заборонена сторінка',
389
+    'info_par_nom' => 'за назвою',
390
+    'info_par_nombre_article' => 'за номерами статтей',
391
+    'info_par_statut' => 'за статусом',
392
+    'info_par_tri' => '’(за @tri@)’',
393
+    'info_passe_trop_court' => 'Пароль надто короткий.',
394
+    'info_passe_trop_court_car_pluriel' => 'Пароль повинен мати мінімум @nb@ символів.',
395
+    'info_passes_identiques' => 'Два паролі не співпадають.',
396
+    'info_plus_cinq_car' => 'понад 5 символів',
397
+    'info_plus_cinq_car_2' => '(Понад 5 символів)',
398
+    'info_plus_trois_car' => '(Понад 3 символи)',
399
+    'info_popularite' => 'популярність: @popularite@; відвідання: @visites@',
400
+    'info_post_scriptum' => 'Постскриптум',
401
+    'info_post_scriptum_2' => 'Постскриптум: ',
402
+    'info_pour' => 'для',
403
+    'info_preview_texte' => 'Налаштування попереднього перегляду. Ви можете подивитися, як виглядають на сайті матеріали зі статусом «представлено». Увімкнути цю можливість для усіх авторів, тільки для адміністраторов або відключити взагалі?',
404
+    'info_procedez_par_etape' => 'Будь ласка, виконуйте покроково',
405
+    'info_procedure_maj_version' => 'необхідно запустити процедуру оновлення поточної бази даних для новоі версії SPIP.',
406
+    'info_proxy_ok' => 'Проксі сервер працює.',
407
+    'info_ps' => 'P.S.',
408
+    'info_publier' => 'опублікувати',
409
+    'info_publies' => 'Ваші статті, опубліковані на сайті:',
410
+    'info_question_accepter_visiteurs' => 'Якщо шаблони вашого сайту дозволяють відвідувачам реєструватися, не входячи в адміністративну частину, будь ласка, включіть наступну опцію:',
411
+    'info_question_inscription_nouveaux_redacteurs' => 'Ви хочете дозволити реєстрацію нових користувачів на сайті? Якщо так, то відвідувачі зможуть реєструватися самостійно, використовуючи стандартну форму. Також у них буде доступ в адміністративну частину сайту і можливість створювати нові матеріали.  <div class="notice">Пароль для доступу буде відправлено користувачу  email’ом автоматично. Якщо ваш хостінг не підтримує відправку листів, то ця опція буде марна.</div>',
412
+    'info_qui_edite' => '@nom_auteur_modif@ працював над цим матеріалом @date_diff@ хвилин назад',
413
+    'info_racine_site' => 'Корінь сайту',
414
+    'info_recharger_page' => 'Будь ласка перезавантажте цю сторінку через декілька хвилин.',
415
+    'info_recherche_auteur_zero' => 'Нічого не знайдено на запит          «@cherche_auteur@».',
416
+    'info_recommencer' => 'Будь ласка, спопробуйте ще раз.',
417
+    'info_redacteur_1' => 'Автор',
418
+    'info_redacteur_2' => 'маючи доступ до адміністративної частини (<i>рекомендував</i>), ',
419
+    'info_redacteurs' => 'Автори',
420
+    'info_redaction_en_cours' => 'РЕДАГУЄТЬСЯ',
421
+    'info_redirection' => 'Перенаправлення',
422
+    'info_redirection_activee' => 'Перенаправлення включено.',
423
+    'info_redirection_boucle' => 'Ви намагаєтеся перенаправити статтю саму на себе.',
424
+    'info_redirection_desactivee' => 'Перенаправлення видалено.',
425
+    'info_refuses' => 'Ваші відхилені статті',
426
+    'info_reglage_ldap' => 'Опції <b>налаштування імпорту LDAP</b>',
427
+    'info_renvoi_article' => 'Відвідувач будет перенаправлений за наступним посиланням',
428
+    'info_reserve_admin' => 'Тільки адміністратори можуть змінити цю адресу.',
429
+    'info_restreindre_rubrique' => 'Надати права управління розділами:',
430
+    'info_resultat_recherche' => 'Результати пошуку:',
431
+    'info_rubriques' => 'Розділи',
432
+    'info_rubriques_02' => 'розділи',
433
+    'info_rubriques_trouvees' => 'Знайдені розділи',
434
+    'info_sans_titre' => 'Без назви',
435
+    'info_selection_chemin_acces' => '<b>Виберіть</b> шлях доступу до каталогу:',
436
+    'info_signatures' => 'підписи',
437
+    'info_site' => 'Сайт',
438
+    'info_site_2' => 'Сайт:',
439
+    'info_site_min' => 'сайт',
440
+    'info_site_reference_2' => 'Сайт, що реферується (Referenced site)',
441
+    'info_site_web' => 'САЙТ:',
442
+    'info_sites' => 'сайти',
443
+    'info_sites_lies_mot' => 'Сайти з цим ключовим словом',
444
+    'info_sites_proxy' => 'Використовувати проксі',
445
+    'info_sites_trouves' => 'знайдені сайти',
446
+    'info_sous_titre' => 'Підзаголовок:',
447
+    'info_statut_administrateur' => 'Адміністратор',
448
+    'info_statut_auteur' => 'Статус автора:',
449
+    'info_statut_auteur_2' => 'Я',
450
+    'info_statut_auteur_a_confirmer' => 'Реєстрація буде підтверджена',
451
+    'info_statut_auteur_autre' => 'Інший статус:',
452
+    'info_statut_redacteur' => 'Автор',
453
+    'info_statut_utilisateurs_1' => 'Усталений (default) статус для імпортованих користувачів',
454
+    'info_statut_utilisateurs_2' => 'Виберіть статус, що буде використовуватися для людей з каталогу LDAP, коли вони підключаться вперше. Пізніше ви зможете змінити це значення для кожного автора індивідуально.',
455
+    'info_suivi_activite' => 'Відстежування роботи редакторів',
456
+    'info_surtitre' => 'Топ-заголовок:',
457
+    'info_syndication_integrale_1' => 'Ваш сайт пропонує об’єднані файли (див. «<a href="@url@">@titre@</a>»).',
458
+    'info_syndication_integrale_2' => 'Відправити статтю повністю чи тільки перші абзаци?',
459
+    'info_table_prefix' => 'Ви можете задати свій префікс для імен таблиць бази даних (завдяки цьому ви можете встановити декілька сайтів на одну базу даних). Для написання префіксу використовуйте лише маленькі латинські букви і цифри.',
460
+    'info_taille_maximale_images' => 'Максимальний розмір картинок, з якими може працювати SPIP (у мільйонах пікселів).<br />SPIP не зможет стискати картинки більшого розміру.',
461
+    'info_taille_maximale_vignette' => 'Максимальний розмір зображень, створенних системою:',
462
+    'info_terminer_installation' => 'Теперь ви можете закінчити стандартний процес встановлення.',
463
+    'info_texte' => 'Текст',
464
+    'info_texte_explicatif' => 'Пояснювальний текст',
465
+    'info_texte_long' => '(Довгий текст: він з’явиться в декількох частинах, які будуть повторно зібрані після затвердження.)',
466
+    'info_texte_message' => 'Текст повідомлення:',
467
+    'info_texte_message_02' => 'Текст повідомлення',
468
+    'info_titre' => 'Заголовок:',
469
+    'info_total' => 'всього:',
470
+    'info_tous_articles_en_redaction' => 'Усі статті, що редагуються',
471
+    'info_tous_articles_presents' => 'Усі статті в розділі',
472
+    'info_tous_articles_refuses' => 'Усі відхилені статті',
473
+    'info_tous_les' => 'кожен:',
474
+    'info_tout_site' => 'Весь сайт',
475
+    'info_tout_site2' => 'Статтю не було перекладено на цю мову.',
476
+    'info_tout_site3' => 'Статтю було перекладено на цю мову, але з того часу в оригінал внесено зміни. Необхідно поновити переклад.',
477
+    'info_tout_site4' => 'Статтю було перекладено на цю мову, і переклад актуальний.',
478
+    'info_tout_site5' => 'Вихідна стаття.',
479
+    'info_tout_site6' => '<b>Попередження:</b> відображаються лише вихідні статті. Переклади, пов’язані з оригіналом, - в кольорі, що вказує їхній статус:',
480
+    'info_traductions' => 'Переклади',
481
+    'info_travail_colaboratif' => 'Сумісна робота над статтями',
482
+    'info_un_article' => 'стаття,',
483
+    'info_un_site' => 'сайт,',
484
+    'info_une_rubrique' => 'розділ,',
485
+    'info_une_rubrique_02' => '1 розділ',
486
+    'info_url' => 'Адреса:',
487
+    'info_url_proxy' => 'URL проксі',
488
+    'info_url_proxy_pas_conforme' => 'Невірний URL проксі серверу.',
489
+    'info_url_site_pas_conforme' => 'URL сайту не є валідним.',
490
+    'info_url_test_proxy' => 'URL для перевірки',
491
+    'info_urlref' => 'Гиперпосилання:',
492
+    'info_utilisation_spip' => 'SPIP готовий до роботи',
493
+    'info_visites_par_mois' => 'Щомісячний показ:',
494
+    'info_visiteur_1' => 'Відвідувач',
495
+    'info_visiteur_2' => 'з основної частини сайту',
496
+    'info_visiteurs' => 'Відвідувачі',
497
+    'info_visiteurs_02' => 'Відвідувачі основної частини сайту',
498
+    'info_webmestre_forces' => 'Список вебмастерів міститься в <tt>@file_options@</tt>.',
499
+    'install_adresse_base_hebergeur' => 'Адресу серверу бази даних ви можете дізнатися у свого хостера',
500
+    'install_connect_ok' => 'Була оголошена нова база на сервері @connect@.',
501
+    'install_echec_annonce' => 'Ця інсталяция, напевне, не буде працювати або приведе до нестійкої роботи сайту...',
502
+    'install_extension_mbstring' => 'SPIP не пращює з:',
503
+    'install_extension_php_obligatoire' => 'SPIP вимагає php розширень:',
504
+    'install_login_base_hebergeur' => 'Логін визначається постачальником послуг',
505
+    'install_nom_base_hebergeur' => 'Ім’я бази даних визначається постачальником послуг:',
506
+    'install_pas_table' => 'В базе даних ще нема таблиць',
507
+    'install_pass_base_hebergeur' => 'Ви можете встановити пароль через контрольну панель хостінгу або запитати його в службі підтримки вашого хостінгу.',
508
+    'install_php_version' => 'Версія PHP @version@ надто стара (мінімум = @minimum@)',
509
+    'install_select_langue' => 'Виберіть мову, потім натисніть кнопку «далі», щоб начати процедуру встановлення.',
510
+    'install_select_type_db' => 'Вкажіть тип бази даних:',
511
+    'install_select_type_mysql' => 'MySQL',
512
+    'install_select_type_pg' => 'PostgreSQL',
513
+    'install_select_type_sqlite2' => 'SQLite 2',
514
+    'install_select_type_sqlite3' => 'SQLite 3',
515
+    'install_serveur_hebergeur' => 'Сервер бази даних визначається постачальником послуг',
516
+    'install_table_prefix_hebergeur' => 'Префікс таблиці бази даних:',
517
+    'install_tables_base' => 'Таблиці баз даних',
518
+    'install_types_db_connus' => 'SPIP працює з <b>MySQL</b> і <b>SQLite</b>.',
519
+    'install_types_db_connus_avertissement' => 'Підтримка PostgreSQL поки на експеріментальному рівні. ',
520
+    'instituer_erreur_statut_a_change' => 'Статус вже був змінений',
521
+    'instituer_erreur_statut_non_autorise' => 'Ви не можете вибрати цей статус',
522
+    'intem_redacteur' => 'редактор',
523
+    'intitule_licence' => 'Дозвіл',
524
+    'item_accepter_inscriptions' => 'Дозволити реєстрацію',
525
+    'item_activer_messages_avertissement' => 'Попереджати про сумісну роботу',
526
+    'item_administrateur_2' => 'адміністратор',
527
+    'item_afficher_calendrier' => 'показувати в календарі',
528
+    'item_autoriser_syndication_integrale' => 'Включати цілі статті в об’єднані файли ',
529
+    'item_choix_administrateurs' => 'адміністратори',
530
+    'item_choix_generation_miniature' => 'Створювати зменшені копії автоматично.',
531
+    'item_choix_non_generation_miniature' => 'Не створювати зменшені копії.',
532
+    'item_choix_redacteurs' => 'редактори',
533
+    'item_choix_visiteurs' => 'відвідувачі сайту',
534
+    'item_creer_fichiers_authent' => 'Створити .htpasswd файли',
535
+    'item_login' => 'Логін',
536
+    'item_messagerie_agenda' => 'Увімкнути систему обміну повідомленнями і календар',
537
+    'item_mots_cles_association_articles' => 'статті',
538
+    'item_mots_cles_association_rubriques' => 'розділи',
539
+    'item_mots_cles_association_sites' => 'зробити посилання або об’єднати сайти.',
540
+    'item_non' => 'Ні',
541
+    'item_non_accepter_inscriptions' => 'Не дозволяти реєстрацію',
542
+    'item_non_activer_messages_avertissement' => 'НЕ попереджати про сумісну роботу',
543
+    'item_non_afficher_calendrier' => 'Не показувати календар',
544
+    'item_non_autoriser_syndication_integrale' => 'Відправляти лише короткий виклад',
545
+    'item_non_creer_fichiers_authent' => 'Не створювати ці файли',
546
+    'item_non_messagerie_agenda' => 'Відключити систему обміну повідомленнями і календар',
547
+    'item_non_publier_articles' => 'Публікувати статті тільки після вказаної дати публікації.',
548
+    'item_nouvel_auteur' => 'Новий автор',
549
+    'item_nouvelle_rubrique' => 'Новий розділ',
550
+    'item_oui' => 'Так',
551
+    'item_publier_articles' => 'Негайно публіковати статті, не дивлячись на дату публікації',
552
+    'item_reponse_article' => 'Відповісти на статтю',
553
+    'item_visiteur' => 'відвідувач',
554 554
 
555
-	// J
556
-	'jour_non_connu_nc' => 'невідомий',
555
+    // J
556
+    'jour_non_connu_nc' => 'невідомий',
557 557
 
558
-	// L
559
-	'label_bando_outils' => 'Панель інструментів',
560
-	'label_bando_outils_afficher' => 'Показати інструменти',
561
-	'label_bando_outils_masquer' => 'Сховати інструменти',
562
-	'label_choix_langue' => 'Мова інтерфейсу',
563
-	'label_nom_fichier_connect' => 'Відображати ім’я серверу',
564
-	'label_slogan_site' => 'Слоган сайту',
565
-	'label_taille_ecran' => 'Ширина робочої області',
566
-	'label_texte_et_icones_navigation' => 'Головне меню',
567
-	'label_texte_et_icones_page' => 'Відоображення сторінки',
568
-	'ldap_correspondance' => 'наслідувати поле @champ@',
569
-	'ldap_correspondance_1' => 'Наслідувати поля LDAP',
570
-	'ldap_correspondance_2' => 'Вкажіть відповідне LDAP поле для кожного з даних полей. Залиште їх порожніми, якщо ви не хочете, щоб вони заповнювались. Декілька LDAP полей розділяються пробілом або комою.',
571
-	'lien_ajouter_auteur' => 'Додати автора',
572
-	'lien_ajouter_une_rubrique' => 'Додати розділ',
573
-	'lien_email' => 'Електронна пошта',
574
-	'lien_nom_site' => 'НАЗВА САЙТУ:',
575
-	'lien_rapide_contenu' => 'Перейти до змісту',
576
-	'lien_rapide_navigation' => 'Перейти до навігації',
577
-	'lien_rapide_recherche' => 'Перейти до пошуку',
578
-	'lien_retirer_auteur' => 'Видалити автора',
579
-	'lien_retirer_rubrique' => 'Видалити розділ',
580
-	'lien_retirer_tous_auteurs' => 'Видалити усіх авторів',
581
-	'lien_retirer_toutes_rubriques' => 'Видалити всі розділи',
582
-	'lien_site' => 'сайт',
583
-	'lien_tout_decocher' => 'Зніміть',
584
-	'lien_tout_deplier' => 'Развернуть усі ',
585
-	'lien_tout_replier' => 'Згорнути усе',
586
-	'lien_tout_supprimer' => 'Видалити усе',
587
-	'lien_trier_nom' => 'Сортирувати за ім´ям',
588
-	'lien_trier_nombre_articles' => 'Сортирувати за номерами статтей',
589
-	'lien_trier_statut' => 'Сортирувати за статусом',
590
-	'lien_voir_en_ligne' => 'ПЕРЕГЛЯД ОНЛАЙН:',
591
-	'logo_article' => 'ЛОГОТИП СТАТТІ',
592
-	'logo_auteur' => 'ЛОГОТИП АВТОРА',
593
-	'logo_rubrique' => 'ЛОГОТИП РОЗДІЛУ',
594
-	'logo_site' => 'ЛОГОТИП САЙТУ',
595
-	'logo_standard_rubrique' => 'Стандартний логотип розділу',
596
-	'logo_survol' => 'При наведенні миші',
558
+    // L
559
+    'label_bando_outils' => 'Панель інструментів',
560
+    'label_bando_outils_afficher' => 'Показати інструменти',
561
+    'label_bando_outils_masquer' => 'Сховати інструменти',
562
+    'label_choix_langue' => 'Мова інтерфейсу',
563
+    'label_nom_fichier_connect' => 'Відображати ім’я серверу',
564
+    'label_slogan_site' => 'Слоган сайту',
565
+    'label_taille_ecran' => 'Ширина робочої області',
566
+    'label_texte_et_icones_navigation' => 'Головне меню',
567
+    'label_texte_et_icones_page' => 'Відоображення сторінки',
568
+    'ldap_correspondance' => 'наслідувати поле @champ@',
569
+    'ldap_correspondance_1' => 'Наслідувати поля LDAP',
570
+    'ldap_correspondance_2' => 'Вкажіть відповідне LDAP поле для кожного з даних полей. Залиште їх порожніми, якщо ви не хочете, щоб вони заповнювались. Декілька LDAP полей розділяються пробілом або комою.',
571
+    'lien_ajouter_auteur' => 'Додати автора',
572
+    'lien_ajouter_une_rubrique' => 'Додати розділ',
573
+    'lien_email' => 'Електронна пошта',
574
+    'lien_nom_site' => 'НАЗВА САЙТУ:',
575
+    'lien_rapide_contenu' => 'Перейти до змісту',
576
+    'lien_rapide_navigation' => 'Перейти до навігації',
577
+    'lien_rapide_recherche' => 'Перейти до пошуку',
578
+    'lien_retirer_auteur' => 'Видалити автора',
579
+    'lien_retirer_rubrique' => 'Видалити розділ',
580
+    'lien_retirer_tous_auteurs' => 'Видалити усіх авторів',
581
+    'lien_retirer_toutes_rubriques' => 'Видалити всі розділи',
582
+    'lien_site' => 'сайт',
583
+    'lien_tout_decocher' => 'Зніміть',
584
+    'lien_tout_deplier' => 'Развернуть усі ',
585
+    'lien_tout_replier' => 'Згорнути усе',
586
+    'lien_tout_supprimer' => 'Видалити усе',
587
+    'lien_trier_nom' => 'Сортирувати за ім´ям',
588
+    'lien_trier_nombre_articles' => 'Сортирувати за номерами статтей',
589
+    'lien_trier_statut' => 'Сортирувати за статусом',
590
+    'lien_voir_en_ligne' => 'ПЕРЕГЛЯД ОНЛАЙН:',
591
+    'logo_article' => 'ЛОГОТИП СТАТТІ',
592
+    'logo_auteur' => 'ЛОГОТИП АВТОРА',
593
+    'logo_rubrique' => 'ЛОГОТИП РОЗДІЛУ',
594
+    'logo_site' => 'ЛОГОТИП САЙТУ',
595
+    'logo_standard_rubrique' => 'Стандартний логотип розділу',
596
+    'logo_survol' => 'При наведенні миші',
597 597
 
598
-	// M
599
-	'menu_aide_installation_choix_base' => 'Виберіть вашу базу даних',
600
-	'module_fichier_langue' => 'Мовний файл',
601
-	'module_raccourci' => 'Ярлик',
602
-	'module_texte_affiche' => 'Показаний текст',
603
-	'module_texte_explicatif' => 'Ви можете вставити наступні ярлики в шаблон вашого сайту. Їх будє автоматично перекладено на різні мови, для яких існує мовний файл.',
604
-	'module_texte_traduction' => 'Мовний файл «@module@» є доступним в:',
605
-	'mois_non_connu' => 'невідомий',
598
+    // M
599
+    'menu_aide_installation_choix_base' => 'Виберіть вашу базу даних',
600
+    'module_fichier_langue' => 'Мовний файл',
601
+    'module_raccourci' => 'Ярлик',
602
+    'module_texte_affiche' => 'Показаний текст',
603
+    'module_texte_explicatif' => 'Ви можете вставити наступні ярлики в шаблон вашого сайту. Їх будє автоматично перекладено на різні мови, для яких існує мовний файл.',
604
+    'module_texte_traduction' => 'Мовний файл «@module@» є доступним в:',
605
+    'mois_non_connu' => 'невідомий',
606 606
 
607
-	// N
608
-	'nouvelle_version_spip' => 'Доступне оновлення версії SPIP @version@ ',
609
-	'nouvelle_version_spip_majeure' => 'Доступна нова версія SPIP @version@ ',
607
+    // N
608
+    'nouvelle_version_spip' => 'Доступне оновлення версії SPIP @version@ ',
609
+    'nouvelle_version_spip_majeure' => 'Доступна нова версія SPIP @version@ ',
610 610
 
611
-	// O
612
-	'onglet_contenu' => 'Зміст',
613
-	'onglet_declarer_une_autre_base' => 'Об´явити іншу базу даних',
614
-	'onglet_discuter' => 'Обговорити',
615
-	'onglet_interactivite' => 'Інтерактивність',
616
-	'onglet_proprietes' => 'Властивості',
617
-	'onglet_repartition_actuelle' => 'зараз',
618
-	'onglet_sous_rubriques' => 'Підрубрики',
611
+    // O
612
+    'onglet_contenu' => 'Зміст',
613
+    'onglet_declarer_une_autre_base' => 'Об´явити іншу базу даних',
614
+    'onglet_discuter' => 'Обговорити',
615
+    'onglet_interactivite' => 'Інтерактивність',
616
+    'onglet_proprietes' => 'Властивості',
617
+    'onglet_repartition_actuelle' => 'зараз',
618
+    'onglet_sous_rubriques' => 'Підрубрики',
619 619
 
620
-	// P
621
-	'page_pas_proxy' => 'Ця сторінка не повинна проходити через проксі',
622
-	'pas_de_proxy_pour' => 'Якщо необхідно, вкажіть для яких комп’ютерів або доменів не треба застосовувати проксі (наприклад: @exemple@) ',
623
-	'phpinfo' => 'Конфігурація PHP',
624
-	'plugin_charge_paquet' => 'Завантаження архиву файлу @name@',
625
-	'plugin_charger' => 'Завантажити',
626
-	'plugin_erreur_charger' => 'Помилка: неможливо завантажити @zip@',
627
-	'plugin_erreur_droit1' => 'Нема прав для запису в папку  <code>@dest@</code>.',
628
-	'plugin_erreur_droit2' => 'Будь ласка, перевірте права на запис для цієї папки (і за необхідності створіть її). Або перепишіть файли по FTP.',
629
-	'plugin_erreur_zip' => 'pclzip збій: помилка @status@',
630
-	'plugin_etat_developpement' => 'у розробці',
631
-	'plugin_etat_experimental' => 'експериментальний',
632
-	'plugin_etat_stable' => 'стабільний',
633
-	'plugin_etat_test' => 'тестується',
634
-	'plugin_impossible_activer' => 'Неможливо увімкнути плагін @plugin@',
635
-	'plugin_info_automatique1' => 'щоб дозволити автоматичну установку плагінів:',
636
-	'plugin_info_automatique1_lib' => 'Якщо ви хочете дозволити автоматичну установку цієї бібліотеки, то:',
637
-	'plugin_info_automatique2' => 'Створіть папку <code>@rep@</code> ;',
638
-	'plugin_info_automatique3' => 'Встановіть права доступу до каталогу (755 або 777).',
639
-	'plugin_info_automatique_creer' => 'для створення в корені вебсайту.',
640
-	'plugin_info_automatique_exemples' => 'Офіціальні RSS аркуші з плагінами:',
641
-	'plugin_info_automatique_ftp' => 'Ви можете встановити плагіни по FTP в каталог <tt>@rep@</tt> ',
642
-	'plugin_info_automatique_lib' => 'Деякі плагіни повинні мати можливість завантажувати файли в каталог <code>lib/</code>. Можливо, його необхідно створити самостійно.',
643
-	'plugin_info_automatique_liste' => 'Ваші плагіни:',
644
-	'plugin_info_automatique_liste_officielle' => 'офіційні плагіни',
645
-	'plugin_info_automatique_liste_update' => 'Поновити списки',
646
-	'plugin_info_automatique_ou' => 'або...',
647
-	'plugin_info_automatique_select' => 'виберіть плагін, SPIP завантажить і встановить його в каталог <code>@rep@</code>. Якщо плагін вже встановлений, його буде оновлено.',
648
-	'plugin_info_credit' => 'Авторська інформація',
649
-	'plugin_info_erreur_xml' => 'Неправильна декларація плагіна',
650
-	'plugin_info_install_ok' => 'Встановлення пройшло успішно',
651
-	'plugin_info_necessite' => 'Необхідно:',
652
-	'plugin_info_non_compatible_spip' => 'Плагін несумісний з поточною версією SPIP',
653
-	'plugin_info_plugins_dist_1' => 'Ці плагіни завантажені і встановлені в папці @plugins_dist@.',
654
-	'plugin_info_plugins_dist_2' => 'Їх не можна відключити.',
655
-	'plugin_info_telecharger' => 'завантажити с @url@ і встановити в @rep@',
656
-	'plugin_info_upgrade_ok' => 'Обновлення пройшло успішно',
657
-	'plugin_librairies_installees' => 'Встановлені бібліотеки',
658
-	'plugin_necessite_extension_php' => 'Необхідно PHP-розширення @plugin@ версії @version@.',
659
-	'plugin_necessite_extension_php_sans_version' => 'Необхідно PHP-розширення @plugin@',
660
-	'plugin_necessite_lib' => 'Для цього плагіна необхідна бібліотека  @lib@',
661
-	'plugin_necessite_php' => 'Необхідно @plugin@ версії @version@.',
662
-	'plugin_necessite_plugin' => 'Для цього плагіна необхідний @plugin@  @version@ або новіший.',
663
-	'plugin_necessite_plugin_sans_version' => 'Потрібний плагін @plugin@',
664
-	'plugin_necessite_spip' => 'Для цього плагіна потрібний SPIP @version@ або новіший.',
665
-	'plugin_source' => 'джерело: ',
666
-	'plugin_titre_automatique' => 'Автоматичне встановлення',
667
-	'plugin_titre_automatique_ajouter' => 'Додати плагін',
668
-	'plugin_titre_installation' => 'Встановити плагін @plugin@ ',
669
-	'plugin_titre_modifier' => 'Мої плагіни',
670
-	'plugin_utilise_extension_php' => 'Використовується PHP-розширення @plugin@ версії @version@.',
671
-	'plugin_utilise_php' => 'Використовується @plugin@ версії @version@.',
672
-	'plugin_utilise_plugin' => 'Використовуйте плагін @plugin@ en версії @version@.',
673
-	'plugin_zip_active' => 'Продовжити для активації',
674
-	'plugin_zip_adresse' => 'Вкажіть посилання на zip файла плагіна для завантаження або адресу RSS листа плагінів.',
675
-	'plugin_zip_adresse_champ' => 'URL плагіна (zip file) або RSS листа',
676
-	'plugin_zip_content' => 'Він містить наступні файли(@taille@),<br />готові до встановлення в каталозі <code>@rep@</code>',
677
-	'plugin_zip_installe_finie' => 'Файл @zip@ распакований і встановлений.',
678
-	'plugin_zip_installe_rep_finie' => 'Файл @zip@ распакований і встановлений в каталозі @rep@ ',
679
-	'plugin_zip_installer' => 'Теперь ви можете встановити.',
680
-	'plugin_zip_telecharge' => 'Файл @zip@ було завантажено',
681
-	'plugins_actif_aucun' => 'Нема вимкенених плагінів.',
682
-	'plugins_actif_un' => 'Включений один плагін',
683
-	'plugins_actifs' => '@count@ плагінів включено.',
684
-	'plugins_actifs_liste' => 'Включені ',
685
-	'plugins_compte' => '@count@ плагіни',
686
-	'plugins_disponible_un' => 'Доступний один плагін',
687
-	'plugins_disponibles' => 'доступно @count@ плагінів.',
688
-	'plugins_erreur' => 'Помилка в плагінах: @plugins@',
689
-	'plugins_liste' => 'Встановлені плагіни',
690
-	'plugins_liste_dist' => 'Захищені плагіни',
691
-	'plugins_recents' => 'останні плагіни',
692
-	'plugins_tous_liste' => 'Усі',
693
-	'plugins_vue_hierarchie' => 'Ієрархія',
694
-	'plugins_vue_liste' => 'Список',
695
-	'protocole_ldap' => 'Версія протоколу:',
620
+    // P
621
+    'page_pas_proxy' => 'Ця сторінка не повинна проходити через проксі',
622
+    'pas_de_proxy_pour' => 'Якщо необхідно, вкажіть для яких комп’ютерів або доменів не треба застосовувати проксі (наприклад: @exemple@) ',
623
+    'phpinfo' => 'Конфігурація PHP',
624
+    'plugin_charge_paquet' => 'Завантаження архиву файлу @name@',
625
+    'plugin_charger' => 'Завантажити',
626
+    'plugin_erreur_charger' => 'Помилка: неможливо завантажити @zip@',
627
+    'plugin_erreur_droit1' => 'Нема прав для запису в папку  <code>@dest@</code>.',
628
+    'plugin_erreur_droit2' => 'Будь ласка, перевірте права на запис для цієї папки (і за необхідності створіть її). Або перепишіть файли по FTP.',
629
+    'plugin_erreur_zip' => 'pclzip збій: помилка @status@',
630
+    'plugin_etat_developpement' => 'у розробці',
631
+    'plugin_etat_experimental' => 'експериментальний',
632
+    'plugin_etat_stable' => 'стабільний',
633
+    'plugin_etat_test' => 'тестується',
634
+    'plugin_impossible_activer' => 'Неможливо увімкнути плагін @plugin@',
635
+    'plugin_info_automatique1' => 'щоб дозволити автоматичну установку плагінів:',
636
+    'plugin_info_automatique1_lib' => 'Якщо ви хочете дозволити автоматичну установку цієї бібліотеки, то:',
637
+    'plugin_info_automatique2' => 'Створіть папку <code>@rep@</code> ;',
638
+    'plugin_info_automatique3' => 'Встановіть права доступу до каталогу (755 або 777).',
639
+    'plugin_info_automatique_creer' => 'для створення в корені вебсайту.',
640
+    'plugin_info_automatique_exemples' => 'Офіціальні RSS аркуші з плагінами:',
641
+    'plugin_info_automatique_ftp' => 'Ви можете встановити плагіни по FTP в каталог <tt>@rep@</tt> ',
642
+    'plugin_info_automatique_lib' => 'Деякі плагіни повинні мати можливість завантажувати файли в каталог <code>lib/</code>. Можливо, його необхідно створити самостійно.',
643
+    'plugin_info_automatique_liste' => 'Ваші плагіни:',
644
+    'plugin_info_automatique_liste_officielle' => 'офіційні плагіни',
645
+    'plugin_info_automatique_liste_update' => 'Поновити списки',
646
+    'plugin_info_automatique_ou' => 'або...',
647
+    'plugin_info_automatique_select' => 'виберіть плагін, SPIP завантажить і встановить його в каталог <code>@rep@</code>. Якщо плагін вже встановлений, його буде оновлено.',
648
+    'plugin_info_credit' => 'Авторська інформація',
649
+    'plugin_info_erreur_xml' => 'Неправильна декларація плагіна',
650
+    'plugin_info_install_ok' => 'Встановлення пройшло успішно',
651
+    'plugin_info_necessite' => 'Необхідно:',
652
+    'plugin_info_non_compatible_spip' => 'Плагін несумісний з поточною версією SPIP',
653
+    'plugin_info_plugins_dist_1' => 'Ці плагіни завантажені і встановлені в папці @plugins_dist@.',
654
+    'plugin_info_plugins_dist_2' => 'Їх не можна відключити.',
655
+    'plugin_info_telecharger' => 'завантажити с @url@ і встановити в @rep@',
656
+    'plugin_info_upgrade_ok' => 'Обновлення пройшло успішно',
657
+    'plugin_librairies_installees' => 'Встановлені бібліотеки',
658
+    'plugin_necessite_extension_php' => 'Необхідно PHP-розширення @plugin@ версії @version@.',
659
+    'plugin_necessite_extension_php_sans_version' => 'Необхідно PHP-розширення @plugin@',
660
+    'plugin_necessite_lib' => 'Для цього плагіна необхідна бібліотека  @lib@',
661
+    'plugin_necessite_php' => 'Необхідно @plugin@ версії @version@.',
662
+    'plugin_necessite_plugin' => 'Для цього плагіна необхідний @plugin@  @version@ або новіший.',
663
+    'plugin_necessite_plugin_sans_version' => 'Потрібний плагін @plugin@',
664
+    'plugin_necessite_spip' => 'Для цього плагіна потрібний SPIP @version@ або новіший.',
665
+    'plugin_source' => 'джерело: ',
666
+    'plugin_titre_automatique' => 'Автоматичне встановлення',
667
+    'plugin_titre_automatique_ajouter' => 'Додати плагін',
668
+    'plugin_titre_installation' => 'Встановити плагін @plugin@ ',
669
+    'plugin_titre_modifier' => 'Мої плагіни',
670
+    'plugin_utilise_extension_php' => 'Використовується PHP-розширення @plugin@ версії @version@.',
671
+    'plugin_utilise_php' => 'Використовується @plugin@ версії @version@.',
672
+    'plugin_utilise_plugin' => 'Використовуйте плагін @plugin@ en версії @version@.',
673
+    'plugin_zip_active' => 'Продовжити для активації',
674
+    'plugin_zip_adresse' => 'Вкажіть посилання на zip файла плагіна для завантаження або адресу RSS листа плагінів.',
675
+    'plugin_zip_adresse_champ' => 'URL плагіна (zip file) або RSS листа',
676
+    'plugin_zip_content' => 'Він містить наступні файли(@taille@),<br />готові до встановлення в каталозі <code>@rep@</code>',
677
+    'plugin_zip_installe_finie' => 'Файл @zip@ распакований і встановлений.',
678
+    'plugin_zip_installe_rep_finie' => 'Файл @zip@ распакований і встановлений в каталозі @rep@ ',
679
+    'plugin_zip_installer' => 'Теперь ви можете встановити.',
680
+    'plugin_zip_telecharge' => 'Файл @zip@ було завантажено',
681
+    'plugins_actif_aucun' => 'Нема вимкенених плагінів.',
682
+    'plugins_actif_un' => 'Включений один плагін',
683
+    'plugins_actifs' => '@count@ плагінів включено.',
684
+    'plugins_actifs_liste' => 'Включені ',
685
+    'plugins_compte' => '@count@ плагіни',
686
+    'plugins_disponible_un' => 'Доступний один плагін',
687
+    'plugins_disponibles' => 'доступно @count@ плагінів.',
688
+    'plugins_erreur' => 'Помилка в плагінах: @plugins@',
689
+    'plugins_liste' => 'Встановлені плагіни',
690
+    'plugins_liste_dist' => 'Захищені плагіни',
691
+    'plugins_recents' => 'останні плагіни',
692
+    'plugins_tous_liste' => 'Усі',
693
+    'plugins_vue_hierarchie' => 'Ієрархія',
694
+    'plugins_vue_liste' => 'Список',
695
+    'protocole_ldap' => 'Версія протоколу:',
696 696
 
697
-	// Q
698
-	'queue_executer_maintenant' => 'Запустити',
699
-	'queue_info_purger' => 'Ви можете видалити усі поточні завдання і очистити всю чергу завдань',
700
-	'queue_nb_jobs_in_queue' => 'В черзі @nb@ завдань',
701
-	'queue_next_job_in_nb_sec' => 'Наступне завдання через @nb@ s',
702
-	'queue_no_job_in_queue' => 'Список завдань пустий',
703
-	'queue_one_job_in_queue' => '1 завдання в черзі',
704
-	'queue_priorite_tache' => 'пріорітет',
705
-	'queue_purger_queue' => 'Очистити список завдань',
706
-	'queue_titre' => 'Список завдань',
697
+    // Q
698
+    'queue_executer_maintenant' => 'Запустити',
699
+    'queue_info_purger' => 'Ви можете видалити усі поточні завдання і очистити всю чергу завдань',
700
+    'queue_nb_jobs_in_queue' => 'В черзі @nb@ завдань',
701
+    'queue_next_job_in_nb_sec' => 'Наступне завдання через @nb@ s',
702
+    'queue_no_job_in_queue' => 'Список завдань пустий',
703
+    'queue_one_job_in_queue' => '1 завдання в черзі',
704
+    'queue_priorite_tache' => 'пріорітет',
705
+    'queue_purger_queue' => 'Очистити список завдань',
706
+    'queue_titre' => 'Список завдань',
707 707
 
708
-	// R
709
-	'repertoire_plugins' => 'Репозиторій:',
710
-	'required' => '(обов’язково)',
708
+    // R
709
+    'repertoire_plugins' => 'Репозиторій:',
710
+    'required' => '(обов’язково)',
711 711
 
712
-	// S
713
-	'sans_heure' => 'час невизначений',
714
-	'statut_admin_restreint' => '(обмежений адміністратор)',
715
-	'statut_webmestre' => 'веб-майстер',
712
+    // S
713
+    'sans_heure' => 'час невизначений',
714
+    'statut_admin_restreint' => '(обмежений адміністратор)',
715
+    'statut_webmestre' => 'веб-майстер',
716 716
 
717
-	// T
718
-	'tache_cron_asap' => 'Завдання CRON @function@ (ASAP)',
719
-	'tache_cron_secondes' => 'Завдання CRON @function@ (кожні @nb@ с)',
720
-	'taille_cache_image' => 'Кеш файлів зображень (автоматично стиснені картинки, зображення формул в форматі TeX і текст, трасформований в графіку) займає @taille@ в каталозі @dir@.',
721
-	'taille_cache_infinie' => 'На вашому сайті нема обмежень на розмір кеша.',
722
-	'taille_cache_maxi' => 'Заданий максимальний розмір файлів кеша складає приблизно <b> @octets@ </b>.',
723
-	'taille_cache_moins_de' => 'Розмір кеша менше @octets@.',
724
-	'taille_cache_octets' => 'Приблизний розмір кеша @octets@.',
725
-	'taille_cache_vide' => 'Кеш очищено.',
726
-	'taille_repertoire_cache' => 'Поточний розмір кеша',
727
-	'text_article_propose_publication' => 'Статтю представлено до публікації.',
728
-	'texte_acces_ldap_anonyme_1' => 'Деякі сервери LDAP не дозволяють анонімного доступу. В цьому випадку ви повинні вказати вихідний ідентифікатор доступу, щоб згодом мати можливість шукати інформацію в каталозі. Але в більшості випадків наступні поля можна залишити порожніми.',
729
-	'texte_admin_effacer_01' => 'Ця команда видаляє <i>увесь</i> вміст бази даних, включаючи <i>усі</i> параметри доступу для редакторів і адміністраторів. Після її виконання ви повинні перевстановити SPIP, щоб відновити нову базу даних і доступ першого адміністратора.',
730
-	'texte_adresse_annuaire_1' => '(Якщо ваш каталог установлено на тому ж самому комп’ютері, що і ваш вебсайт, це, напевно, - «localhost».)',
731
-	'texte_ajout_auteur' => 'Наступний автор був доданий до статті:',
732
-	'texte_annuaire_ldap_1' => 'Якщо ви маєте доступ до каталогу(LDAP), то можете використовувати його для автоматичного імпорту користувачів SPIP.',
733
-	'texte_article_statut' => 'Статус статті:',
734
-	'texte_article_virtuel' => 'Віртуальна стаття',
735
-	'texte_article_virtuel_reference' => '<b>Віртуальна стаття:</b> стаття, на яку є посилання на вашому SPIP сайті, але яка насправді знаходиться на іншому URL. Щоб видалити перенаправлення, видаліть адресу, яку наведено вище.',
736
-	'texte_aucun_resultat_auteur' => 'Нема результатів для «@cherche_auteur@».',
737
-	'texte_auteur_messagerie' => 'Цей сайт може постійнно контролювати список редакторів, які знаходяться он-лайн, що дозволяє вам обмінюватися повідомленнями в реальному часі. Ви можете вирішити не з’являтися в цьому списку (тоді вас «не побачать» інші користувачі).',
738
-	'texte_auteurs' => 'АВТОРИ',
739
-	'texte_choix_base_1' => 'Вибрати вашу базу даних:',
740
-	'texte_choix_base_2' => 'SQL сервер містить декілька баз даних.',
741
-	'texte_choix_base_3' => '<b>Виберіть</b> нижче ту, яку ваш інтернет провайдер може віднести до вас:',
742
-	'texte_choix_table_prefix' => 'Префікс для таблиць БД:',
743
-	'texte_compte_element' => '@count@ елемент',
744
-	'texte_compte_elements' => '@count@ елементи',
745
-	'texte_conflit_edition_correction' => 'Будь ласка, перевірте нижче різницю між двома версіями. Таким чином ви можете зкопіювати ваші зміни і почати спочатку.',
746
-	'texte_connexion_mysql' => 'Параметри доступу до бази даних задаются в контрольній панелі хостінга. Якщо у вас нема можливості управляти вашими базами даних, ви можете запитати про допомогу в службі підтримки хостінгу.',
747
-	'texte_contenu_article' => '(Короткий зміст статті.)',
748
-	'texte_contenu_articles' => 'Вибрати додаткові інформаційні поля для статтей. В залежності від того, як запрограмовано ваш сайт, вони можуть відображатися або не відображатися в загальному доступі. ',
749
-	'texte_crash_base' => 'Якщо ваша база даних пошкоджена, ви можете спробувати відновити її автоматично.',
750
-	'texte_creer_rubrique' => 'Створіть хоча б одну рубрику, <br />щоб писати статті.',
751
-	'texte_date_creation_article' => 'ДАТА створення статті:',
752
-	'texte_date_creation_objet' => 'Дата створення:', # on ajoute le ":"
753
-	'texte_date_publication_anterieure' => 'Додаткова дата:',
754
-	'texte_date_publication_anterieure_nonaffichee' => 'Приховати дату більш ранньої публікації.',
755
-	'texte_date_publication_article' => 'ДАТА ОНЛАЙН ПУБЛИКАЦІИ:',
756
-	'texte_date_publication_objet' => 'Дата публікації:',
757
-	'texte_definir_comme_traduction_rubrique' => 'Ця рубрика є перекладом рубрики за номером:',
758
-	'texte_descriptif_rapide' => 'Короткий опис',
759
-	'texte_effacer_base' => 'Видалити базу даних SPIP',
760
-	'texte_effacer_statistiques' => 'Видалити статистику',
761
-	'texte_en_cours_validation' => 'Матеріали, що потребують перевірки. ',
762
-	'texte_enrichir_mise_a_jour' => 'Ви можете покращити свій текст, користуючись «типографськими скороченнями»',
763
-	'texte_fichier_authent' => '<b>Чи повинен SPIP створювати <tt>.htpasswd</tt> і <tt>.htpasswd-admin</tt> файли у папці @dossier@?</b> <p>Ці файли використовуються для обмеження доступу авторів і адміністраторов до інших частин сайту (наприклад, до папки з серверною статистикою).</p> <p>Якщо у вас нема необхідності в таких діях, то залиште це значення як усталено (default).</p>',
764
-	'texte_informations_personnelles_1' => 'Теперь система створить ваш обліковий запис на сайті.',
765
-	'texte_informations_personnelles_2' => '(Примітка: Якщо ви перевстановлюєте SPIP і ваш старий логін і пароль як і раніше працюють, ви можете',
766
-	'texte_introductif_article' => '(Вступний текст до статті)',
767
-	'texte_jeu_caractere' => 'Рекомендуємо використовувати кодування (<tt>utf-8</tt>) на вашому сайті. Це дасть можливість відображати текст будь-якою мовою. ',
768
-	'texte_jeu_caractere_3' => 'Поточне кодування:',
769
-	'texte_jeu_caractere_4' => 'Якщо це не відповідає ситуації з вашими даними (наприклад, після відновлення бази даних з резервної копії), або якщо <em>ви створюєте цей сайт</em> і хочете використовувати різні набори символів, будь ласка, вкажіть набор символів тут:',
770
-	'texte_login_ldap_1' => '(Залиште порожнім для анонімного доступу або введіть повний шлях, наприклад «<tt>uid=smith, ou=users, dc=my-domain, dc=com </tt>».)',
771
-	'texte_login_precaution' => 'Увага! Це ваш поточний логін на сайті, міняйте вдумливо.',
772
-	'texte_messagerie_agenda' => 'Система відправлення повідомлень дозволяє авторам сайту спілкуватися безпосередньо в редакційній частині сайту. Вона пов’язана з календарем.',
773
-	'texte_mise_a_niveau_base_1' => 'Ви тільки но поновили файли SPIP. Теперь ви повинні поновити базу даних сайту.',
774
-	'texte_modifier_article' => 'Змінити статтю:',
775
-	'texte_multilinguisme' => 'Якщо на сайті будуть розміщуватися матеріали деякільками мовами, ви можете додати «меню вибору мови» для цих матеріалів.',
776
-	'texte_multilinguisme_trad' => 'Також ви можете дозволити об’єднувати різні переклади одного і того ж матеріалу. ',
777
-	'texte_non_compresse' => '<i>розпакувати</i> (ваш сервер не підтримує цю функцію)',
778
-	'texte_nouvelle_version_spip_1' => 'Ви встановили нову версію SPIP.',
779
-	'texte_nouvelle_version_spip_2' => 'Щоб поновити сайт до нової версії, якщо ви вебмастер цього сайту, будь ласка, видаліть файл @connect@ і повторно почніть установку, щоб поновити налаштування підключення до бази даних. <p>(PS: Якщо ви забули свої параметри з’єднання, то вони зберігаються в файлі @connect@ </p>',
780
-	'texte_operation_echec' => 'Поверніться до попередньої сторінки, виберіть іншу базу даних або створіть нову. Перевірте інформацію, надану вашим хостом.',
781
-	'texte_plus_trois_car' => 'понад 3 символи',
782
-	'texte_plusieurs_articles' => 'Декілька авторів було знайдено для «@cherche_auteur@»:',
783
-	'texte_port_annuaire' => '(Усталене (default) значення є підходящим.)',
784
-	'texte_presente_plugin' => 'На цій сторінці перелік плагінів, доступних на вашому сайті. Включіть плагін, відзначивши відповідний квадратик.',
785
-	'texte_proposer_publication' => 'Коли ви закінчите роботу над статтею, <br />ви можете представити її до публікації.',
786
-	'texte_proxy' => 'В деяких випадках (внутрішні або захищені мережі...) необхідно використовувати <i>proxy HTTP</i>, щоб дістатися віддалених сайтів (SPIP документація, сайти, що реферуються і т.д.). В такому разі введіть його адресу нижче в форму <tt><html> http://proxy:8080 </html></tt> (@proxy_en_cours@). В більшості випадків ви можете залишити це поле порожнім.',
787
-	'texte_publication_articles_post_dates' => 'Коли публікувати статті з датою публікації в майбутньому?',
788
-	'texte_rappel_selection_champs' => '[Не забудьте правильно обрати поле.]',
789
-	'texte_recalcul_page' => 'Якщо ви хочете поновити тільки одну сторінку, то можете зробити це в основній частині, використовуючи кнопку «Поновити сторінку».',
790
-	'texte_recuperer_base' => 'Відновити базу даних',
791
-	'texte_reference_mais_redirige' => 'посилання на статтю вашого SPIP сайту, але переадресоване на іншу адресу.',
792
-	'texte_requetes_echouent' => '<b>Якщо при виконанні SQL запитів часто з’являються повідомлення про помилки, цілком можливо, що пошкоджено саму базу даних.</b> <p>В SQL вбудовано функцію ремонту і відновлення пошкоджених таблиць. Ви можете спробувати виконати процедуру відновлення або ремонту зараз.</p>',
793
-	'texte_selection_langue_principale' => 'Ви можете вибрати «головну мову» сайту. Вона задає: 
717
+    // T
718
+    'tache_cron_asap' => 'Завдання CRON @function@ (ASAP)',
719
+    'tache_cron_secondes' => 'Завдання CRON @function@ (кожні @nb@ с)',
720
+    'taille_cache_image' => 'Кеш файлів зображень (автоматично стиснені картинки, зображення формул в форматі TeX і текст, трасформований в графіку) займає @taille@ в каталозі @dir@.',
721
+    'taille_cache_infinie' => 'На вашому сайті нема обмежень на розмір кеша.',
722
+    'taille_cache_maxi' => 'Заданий максимальний розмір файлів кеша складає приблизно <b> @octets@ </b>.',
723
+    'taille_cache_moins_de' => 'Розмір кеша менше @octets@.',
724
+    'taille_cache_octets' => 'Приблизний розмір кеша @octets@.',
725
+    'taille_cache_vide' => 'Кеш очищено.',
726
+    'taille_repertoire_cache' => 'Поточний розмір кеша',
727
+    'text_article_propose_publication' => 'Статтю представлено до публікації.',
728
+    'texte_acces_ldap_anonyme_1' => 'Деякі сервери LDAP не дозволяють анонімного доступу. В цьому випадку ви повинні вказати вихідний ідентифікатор доступу, щоб згодом мати можливість шукати інформацію в каталозі. Але в більшості випадків наступні поля можна залишити порожніми.',
729
+    'texte_admin_effacer_01' => 'Ця команда видаляє <i>увесь</i> вміст бази даних, включаючи <i>усі</i> параметри доступу для редакторів і адміністраторів. Після її виконання ви повинні перевстановити SPIP, щоб відновити нову базу даних і доступ першого адміністратора.',
730
+    'texte_adresse_annuaire_1' => '(Якщо ваш каталог установлено на тому ж самому комп’ютері, що і ваш вебсайт, це, напевно, - «localhost».)',
731
+    'texte_ajout_auteur' => 'Наступний автор був доданий до статті:',
732
+    'texte_annuaire_ldap_1' => 'Якщо ви маєте доступ до каталогу(LDAP), то можете використовувати його для автоматичного імпорту користувачів SPIP.',
733
+    'texte_article_statut' => 'Статус статті:',
734
+    'texte_article_virtuel' => 'Віртуальна стаття',
735
+    'texte_article_virtuel_reference' => '<b>Віртуальна стаття:</b> стаття, на яку є посилання на вашому SPIP сайті, але яка насправді знаходиться на іншому URL. Щоб видалити перенаправлення, видаліть адресу, яку наведено вище.',
736
+    'texte_aucun_resultat_auteur' => 'Нема результатів для «@cherche_auteur@».',
737
+    'texte_auteur_messagerie' => 'Цей сайт може постійнно контролювати список редакторів, які знаходяться он-лайн, що дозволяє вам обмінюватися повідомленнями в реальному часі. Ви можете вирішити не з’являтися в цьому списку (тоді вас «не побачать» інші користувачі).',
738
+    'texte_auteurs' => 'АВТОРИ',
739
+    'texte_choix_base_1' => 'Вибрати вашу базу даних:',
740
+    'texte_choix_base_2' => 'SQL сервер містить декілька баз даних.',
741
+    'texte_choix_base_3' => '<b>Виберіть</b> нижче ту, яку ваш інтернет провайдер може віднести до вас:',
742
+    'texte_choix_table_prefix' => 'Префікс для таблиць БД:',
743
+    'texte_compte_element' => '@count@ елемент',
744
+    'texte_compte_elements' => '@count@ елементи',
745
+    'texte_conflit_edition_correction' => 'Будь ласка, перевірте нижче різницю між двома версіями. Таким чином ви можете зкопіювати ваші зміни і почати спочатку.',
746
+    'texte_connexion_mysql' => 'Параметри доступу до бази даних задаются в контрольній панелі хостінга. Якщо у вас нема можливості управляти вашими базами даних, ви можете запитати про допомогу в службі підтримки хостінгу.',
747
+    'texte_contenu_article' => '(Короткий зміст статті.)',
748
+    'texte_contenu_articles' => 'Вибрати додаткові інформаційні поля для статтей. В залежності від того, як запрограмовано ваш сайт, вони можуть відображатися або не відображатися в загальному доступі. ',
749
+    'texte_crash_base' => 'Якщо ваша база даних пошкоджена, ви можете спробувати відновити її автоматично.',
750
+    'texte_creer_rubrique' => 'Створіть хоча б одну рубрику, <br />щоб писати статті.',
751
+    'texte_date_creation_article' => 'ДАТА створення статті:',
752
+    'texte_date_creation_objet' => 'Дата створення:', # on ajoute le ":"
753
+    'texte_date_publication_anterieure' => 'Додаткова дата:',
754
+    'texte_date_publication_anterieure_nonaffichee' => 'Приховати дату більш ранньої публікації.',
755
+    'texte_date_publication_article' => 'ДАТА ОНЛАЙН ПУБЛИКАЦІИ:',
756
+    'texte_date_publication_objet' => 'Дата публікації:',
757
+    'texte_definir_comme_traduction_rubrique' => 'Ця рубрика є перекладом рубрики за номером:',
758
+    'texte_descriptif_rapide' => 'Короткий опис',
759
+    'texte_effacer_base' => 'Видалити базу даних SPIP',
760
+    'texte_effacer_statistiques' => 'Видалити статистику',
761
+    'texte_en_cours_validation' => 'Матеріали, що потребують перевірки. ',
762
+    'texte_enrichir_mise_a_jour' => 'Ви можете покращити свій текст, користуючись «типографськими скороченнями»',
763
+    'texte_fichier_authent' => '<b>Чи повинен SPIP створювати <tt>.htpasswd</tt> і <tt>.htpasswd-admin</tt> файли у папці @dossier@?</b> <p>Ці файли використовуються для обмеження доступу авторів і адміністраторов до інших частин сайту (наприклад, до папки з серверною статистикою).</p> <p>Якщо у вас нема необхідності в таких діях, то залиште це значення як усталено (default).</p>',
764
+    'texte_informations_personnelles_1' => 'Теперь система створить ваш обліковий запис на сайті.',
765
+    'texte_informations_personnelles_2' => '(Примітка: Якщо ви перевстановлюєте SPIP і ваш старий логін і пароль як і раніше працюють, ви можете',
766
+    'texte_introductif_article' => '(Вступний текст до статті)',
767
+    'texte_jeu_caractere' => 'Рекомендуємо використовувати кодування (<tt>utf-8</tt>) на вашому сайті. Це дасть можливість відображати текст будь-якою мовою. ',
768
+    'texte_jeu_caractere_3' => 'Поточне кодування:',
769
+    'texte_jeu_caractere_4' => 'Якщо це не відповідає ситуації з вашими даними (наприклад, після відновлення бази даних з резервної копії), або якщо <em>ви створюєте цей сайт</em> і хочете використовувати різні набори символів, будь ласка, вкажіть набор символів тут:',
770
+    'texte_login_ldap_1' => '(Залиште порожнім для анонімного доступу або введіть повний шлях, наприклад «<tt>uid=smith, ou=users, dc=my-domain, dc=com </tt>».)',
771
+    'texte_login_precaution' => 'Увага! Це ваш поточний логін на сайті, міняйте вдумливо.',
772
+    'texte_messagerie_agenda' => 'Система відправлення повідомлень дозволяє авторам сайту спілкуватися безпосередньо в редакційній частині сайту. Вона пов’язана з календарем.',
773
+    'texte_mise_a_niveau_base_1' => 'Ви тільки но поновили файли SPIP. Теперь ви повинні поновити базу даних сайту.',
774
+    'texte_modifier_article' => 'Змінити статтю:',
775
+    'texte_multilinguisme' => 'Якщо на сайті будуть розміщуватися матеріали деякільками мовами, ви можете додати «меню вибору мови» для цих матеріалів.',
776
+    'texte_multilinguisme_trad' => 'Також ви можете дозволити об’єднувати різні переклади одного і того ж матеріалу. ',
777
+    'texte_non_compresse' => '<i>розпакувати</i> (ваш сервер не підтримує цю функцію)',
778
+    'texte_nouvelle_version_spip_1' => 'Ви встановили нову версію SPIP.',
779
+    'texte_nouvelle_version_spip_2' => 'Щоб поновити сайт до нової версії, якщо ви вебмастер цього сайту, будь ласка, видаліть файл @connect@ і повторно почніть установку, щоб поновити налаштування підключення до бази даних. <p>(PS: Якщо ви забули свої параметри з’єднання, то вони зберігаються в файлі @connect@ </p>',
780
+    'texte_operation_echec' => 'Поверніться до попередньої сторінки, виберіть іншу базу даних або створіть нову. Перевірте інформацію, надану вашим хостом.',
781
+    'texte_plus_trois_car' => 'понад 3 символи',
782
+    'texte_plusieurs_articles' => 'Декілька авторів було знайдено для «@cherche_auteur@»:',
783
+    'texte_port_annuaire' => '(Усталене (default) значення є підходящим.)',
784
+    'texte_presente_plugin' => 'На цій сторінці перелік плагінів, доступних на вашому сайті. Включіть плагін, відзначивши відповідний квадратик.',
785
+    'texte_proposer_publication' => 'Коли ви закінчите роботу над статтею, <br />ви можете представити її до публікації.',
786
+    'texte_proxy' => 'В деяких випадках (внутрішні або захищені мережі...) необхідно використовувати <i>proxy HTTP</i>, щоб дістатися віддалених сайтів (SPIP документація, сайти, що реферуються і т.д.). В такому разі введіть його адресу нижче в форму <tt><html> http://proxy:8080 </html></tt> (@proxy_en_cours@). В більшості випадків ви можете залишити це поле порожнім.',
787
+    'texte_publication_articles_post_dates' => 'Коли публікувати статті з датою публікації в майбутньому?',
788
+    'texte_rappel_selection_champs' => '[Не забудьте правильно обрати поле.]',
789
+    'texte_recalcul_page' => 'Якщо ви хочете поновити тільки одну сторінку, то можете зробити це в основній частині, використовуючи кнопку «Поновити сторінку».',
790
+    'texte_recuperer_base' => 'Відновити базу даних',
791
+    'texte_reference_mais_redirige' => 'посилання на статтю вашого SPIP сайту, але переадресоване на іншу адресу.',
792
+    'texte_requetes_echouent' => '<b>Якщо при виконанні SQL запитів часто з’являються повідомлення про помилки, цілком можливо, що пошкоджено саму базу даних.</b> <p>В SQL вбудовано функцію ремонту і відновлення пошкоджених таблиць. Ви можете спробувати виконати процедуру відновлення або ремонту зараз.</p>',
793
+    'texte_selection_langue_principale' => 'Ви можете вибрати «головну мову» сайту. Вона задає: 
794 794
 <ul>
795 795
 <li>усталений формат виведення дати</li> 
796 796
 <li>усталену мову для використання на сайті</li> 
797 797
 <li>усталену мову для адміністративной частини.</li>
798 798
 </ul>',
799
-	'texte_sous_titre' => 'Підзаголовок',
800
-	'texte_statistiques_visites' => '(темні штрихи: неділя / темна крива: середній рівень)',
801
-	'texte_statut_attente_validation' => 'очікує затвердження',
802
-	'texte_statut_publies' => 'опубліковані на сайті',
803
-	'texte_statut_refuses' => 'відхилено',
804
-	'texte_suppression_fichiers' => 'використовуйте команду для видалення усіх файлів з кеша SPIP. Це дозволить поновити усі сторінки сайту. Це дуже зручно, якщо ви змінили шаблони або поновили значну кількість інформації на сайті.',
805
-	'texte_sur_titre' => 'Топ-заголовок',
806
-	'texte_table_ok' => ':  таблиця ОК.',
807
-	'texte_tentative_recuperation' => 'Спроба відновлення ',
808
-	'texte_tenter_reparation' => 'Спроба відновлення бази даних',
809
-	'texte_test_proxy' => 'Щоб спробувати проксі, введіть тут адрес вебсайта, який ви хочете перевірити.',
810
-	'texte_titre_02' => 'Заголовок:',
811
-	'texte_titre_obligatoire' => '<b>Заголовок</b> [обов’язково]',
812
-	'texte_travail_article' => '@nom_auteur_modif@ роботав над цією статтею @date_diff@ хвилин тому',
813
-	'texte_travail_collaboratif' => 'Якщо декілька авторів редагують одну і ту ж саму статтю, то система позначає її як «в роботі» і обмежує доступ до неї, щоб уникнути втрат інформації внаслідок одночасного редагування матеріалу. Зазвичай цю можливість відключено.',
814
-	'texte_vide' => 'очистити',
815
-	'texte_vider_cache' => 'Очистити кеш',
816
-	'titre_admin_tech' => 'Технічне обслуговування',
817
-	'titre_admin_vider' => 'Технічне обслуговування',
818
-	'titre_ajouter_un_auteur' => 'Додати автора',
819
-	'titre_ajouter_un_mot' => 'Додати ключове слово',
820
-	'titre_cadre_afficher_article' => 'Показати статті:',
821
-	'titre_cadre_afficher_traductions' => 'Показати стан перекладу для наступних мов:',
822
-	'titre_cadre_ajouter_auteur' => 'ДОДАТИ АВТОРА:',
823
-	'titre_cadre_interieur_rubrique' => 'В розділі',
824
-	'titre_cadre_numero_auteur' => 'НОМЕР АВТОРА',
825
-	'titre_cadre_numero_objet' => '@objet@ НОМЕР:',
826
-	'titre_cadre_signature_obligatoire' => '<b>Підпис</b> [обов’язково]<br />',
827
-	'titre_config_contenu_notifications' => 'Повідомлення',
828
-	'titre_config_contenu_prive' => 'У редакційній частині',
829
-	'titre_config_contenu_public' => 'В публічній частині',
830
-	'titre_config_fonctions' => 'Налаштування сайту',
831
-	'titre_config_langage' => 'Вибір мови інтерфейсу',
832
-	'titre_configuration' => 'Налаштування сайту',
833
-	'titre_configurer_preferences' => 'Змінити налаштування',
834
-	'titre_configurer_preferences_menus' => 'Налаштування меню',
835
-	'titre_conflit_edition' => 'Протиріччя в процесі зміни',
836
-	'titre_connexion_ldap' => 'Опції: <b>ваше LDAP з’єднання</b>',
837
-	'titre_groupe_mots' => 'ГРУППА КЛЮЧОВИХ СЛІВ:',
838
-	'titre_identite_site' => 'Інформація про сайт',
839
-	'titre_langue_article' => 'Мова статті',
840
-	'titre_langue_rubrique' => 'МОВА РОЗДІЛУ',
841
-	'titre_langue_trad_article' => 'МОВА та ПЕРЕКЛАДИ СТАТТІ',
842
-	'titre_les_articles' => 'СТАТТІ',
843
-	'titre_messagerie_agenda' => 'Система обміну повідомленнями і календар',
844
-	'titre_naviguer_dans_le_site' => 'Перегляд сайту...',
845
-	'titre_nouvelle_rubrique' => 'Новий розділ',
846
-	'titre_numero_rubrique' => 'НОМЕР РОЗДІЛУ:',
847
-	'titre_page_articles_edit' => 'Змінити: @titre@',
848
-	'titre_page_articles_page' => 'Статті',
849
-	'titre_page_articles_tous' => 'Весь сайт',
850
-	'titre_page_calendrier' => 'Календар @nom_mois@ @annee@',
851
-	'titre_page_config_contenu' => 'Налаштування сайту',
852
-	'titre_page_delete_all' => 'повне і незворотне видалення ',
853
-	'titre_page_recherche' => 'Результати пошуку @recherche@',
854
-	'titre_page_statistiques_referers' => 'Статистика (вхідні посилання)',
855
-	'titre_page_upgrade' => 'SPIP оновлення',
856
-	'titre_preference_menus_favoris' => 'Обране меню',
857
-	'titre_publication_articles_post_dates' => 'Відкладена публікація статтей',
858
-	'titre_reparation' => 'Відновити',
859
-	'titre_suivi_petition' => 'Відстеження звернень (петицій)',
860
-	'tls_ldap' => 'Transport Layer Security :',
861
-	'trad_article_traduction' => 'Усі версії цієї статті:',
862
-	'trad_delier' => 'Видалити зв’язок з цим перекладом',
863
-	'trad_lier' => 'Ця стаття є перекладом статті за номером:',
864
-	'trad_new' => 'Додати новий переклад',
799
+    'texte_sous_titre' => 'Підзаголовок',
800
+    'texte_statistiques_visites' => '(темні штрихи: неділя / темна крива: середній рівень)',
801
+    'texte_statut_attente_validation' => 'очікує затвердження',
802
+    'texte_statut_publies' => 'опубліковані на сайті',
803
+    'texte_statut_refuses' => 'відхилено',
804
+    'texte_suppression_fichiers' => 'використовуйте команду для видалення усіх файлів з кеша SPIP. Це дозволить поновити усі сторінки сайту. Це дуже зручно, якщо ви змінили шаблони або поновили значну кількість інформації на сайті.',
805
+    'texte_sur_titre' => 'Топ-заголовок',
806
+    'texte_table_ok' => ':  таблиця ОК.',
807
+    'texte_tentative_recuperation' => 'Спроба відновлення ',
808
+    'texte_tenter_reparation' => 'Спроба відновлення бази даних',
809
+    'texte_test_proxy' => 'Щоб спробувати проксі, введіть тут адрес вебсайта, який ви хочете перевірити.',
810
+    'texte_titre_02' => 'Заголовок:',
811
+    'texte_titre_obligatoire' => '<b>Заголовок</b> [обов’язково]',
812
+    'texte_travail_article' => '@nom_auteur_modif@ роботав над цією статтею @date_diff@ хвилин тому',
813
+    'texte_travail_collaboratif' => 'Якщо декілька авторів редагують одну і ту ж саму статтю, то система позначає її як «в роботі» і обмежує доступ до неї, щоб уникнути втрат інформації внаслідок одночасного редагування матеріалу. Зазвичай цю можливість відключено.',
814
+    'texte_vide' => 'очистити',
815
+    'texte_vider_cache' => 'Очистити кеш',
816
+    'titre_admin_tech' => 'Технічне обслуговування',
817
+    'titre_admin_vider' => 'Технічне обслуговування',
818
+    'titre_ajouter_un_auteur' => 'Додати автора',
819
+    'titre_ajouter_un_mot' => 'Додати ключове слово',
820
+    'titre_cadre_afficher_article' => 'Показати статті:',
821
+    'titre_cadre_afficher_traductions' => 'Показати стан перекладу для наступних мов:',
822
+    'titre_cadre_ajouter_auteur' => 'ДОДАТИ АВТОРА:',
823
+    'titre_cadre_interieur_rubrique' => 'В розділі',
824
+    'titre_cadre_numero_auteur' => 'НОМЕР АВТОРА',
825
+    'titre_cadre_numero_objet' => '@objet@ НОМЕР:',
826
+    'titre_cadre_signature_obligatoire' => '<b>Підпис</b> [обов’язково]<br />',
827
+    'titre_config_contenu_notifications' => 'Повідомлення',
828
+    'titre_config_contenu_prive' => 'У редакційній частині',
829
+    'titre_config_contenu_public' => 'В публічній частині',
830
+    'titre_config_fonctions' => 'Налаштування сайту',
831
+    'titre_config_langage' => 'Вибір мови інтерфейсу',
832
+    'titre_configuration' => 'Налаштування сайту',
833
+    'titre_configurer_preferences' => 'Змінити налаштування',
834
+    'titre_configurer_preferences_menus' => 'Налаштування меню',
835
+    'titre_conflit_edition' => 'Протиріччя в процесі зміни',
836
+    'titre_connexion_ldap' => 'Опції: <b>ваше LDAP з’єднання</b>',
837
+    'titre_groupe_mots' => 'ГРУППА КЛЮЧОВИХ СЛІВ:',
838
+    'titre_identite_site' => 'Інформація про сайт',
839
+    'titre_langue_article' => 'Мова статті',
840
+    'titre_langue_rubrique' => 'МОВА РОЗДІЛУ',
841
+    'titre_langue_trad_article' => 'МОВА та ПЕРЕКЛАДИ СТАТТІ',
842
+    'titre_les_articles' => 'СТАТТІ',
843
+    'titre_messagerie_agenda' => 'Система обміну повідомленнями і календар',
844
+    'titre_naviguer_dans_le_site' => 'Перегляд сайту...',
845
+    'titre_nouvelle_rubrique' => 'Новий розділ',
846
+    'titre_numero_rubrique' => 'НОМЕР РОЗДІЛУ:',
847
+    'titre_page_articles_edit' => 'Змінити: @titre@',
848
+    'titre_page_articles_page' => 'Статті',
849
+    'titre_page_articles_tous' => 'Весь сайт',
850
+    'titre_page_calendrier' => 'Календар @nom_mois@ @annee@',
851
+    'titre_page_config_contenu' => 'Налаштування сайту',
852
+    'titre_page_delete_all' => 'повне і незворотне видалення ',
853
+    'titre_page_recherche' => 'Результати пошуку @recherche@',
854
+    'titre_page_statistiques_referers' => 'Статистика (вхідні посилання)',
855
+    'titre_page_upgrade' => 'SPIP оновлення',
856
+    'titre_preference_menus_favoris' => 'Обране меню',
857
+    'titre_publication_articles_post_dates' => 'Відкладена публікація статтей',
858
+    'titre_reparation' => 'Відновити',
859
+    'titre_suivi_petition' => 'Відстеження звернень (петицій)',
860
+    'tls_ldap' => 'Transport Layer Security :',
861
+    'trad_article_traduction' => 'Усі версії цієї статті:',
862
+    'trad_delier' => 'Видалити зв’язок з цим перекладом',
863
+    'trad_lier' => 'Ця стаття є перекладом статті за номером:',
864
+    'trad_new' => 'Додати новий переклад',
865 865
 
866
-	// U
867
-	'utf8_convert_erreur_orig' => 'Помилка: набір символів @charset@ не підтримується.',
866
+    // U
867
+    'utf8_convert_erreur_orig' => 'Помилка: набір символів @charset@ не підтримується.',
868 868
 
869
-	// V
870
-	'version' => 'Версія:'
869
+    // V
870
+    'version' => 'Версія:'
871 871
 );
Please login to merge, or discard this patch.
prive/formulaires/editer_auteur.php 1 patch
Indentation   +345 added lines, -345 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  **/
8 8
 
9 9
 if (!defined('_ECRIRE_INC_VERSION')) {
10
-	return;
10
+    return;
11 11
 }
12 12
 
13 13
 include_spip('inc/actions');
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
  *     Environnement du formulaire
38 38
  **/
39 39
 function formulaires_editer_auteur_charger_dist(
40
-	$id_auteur = 'new',
41
-	$retour = '',
42
-	$associer_objet = '',
43
-	$config_fonc = 'auteurs_edit_config',
44
-	$row = [],
45
-	$hidden = ''
40
+    $id_auteur = 'new',
41
+    $retour = '',
42
+    $associer_objet = '',
43
+    $config_fonc = 'auteurs_edit_config',
44
+    $row = [],
45
+    $hidden = ''
46 46
 ) {
47
-	$valeurs = formulaires_editer_objet_charger('auteur', $id_auteur, 0, 0, $retour, $config_fonc, $row, $hidden);
48
-	$valeurs['new_login'] = $valeurs['login'];
47
+    $valeurs = formulaires_editer_objet_charger('auteur', $id_auteur, 0, 0, $retour, $config_fonc, $row, $hidden);
48
+    $valeurs['new_login'] = $valeurs['login'];
49 49
 
50
-	if (!autoriser('modifier', 'auteur', intval($id_auteur))) {
51
-		$valeurs['editable'] = '';
52
-	}
50
+    if (!autoriser('modifier', 'auteur', intval($id_auteur))) {
51
+        $valeurs['editable'] = '';
52
+    }
53 53
 
54
-	return $valeurs;
54
+    return $valeurs;
55 55
 }
56 56
 
57 57
 /**
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
  *     Hash du formulaire
76 76
  */
77 77
 function formulaires_editer_auteur_identifier_dist(
78
-	$id_auteur = 'new',
79
-	$retour = '',
80
-	$associer_objet = '',
81
-	$config_fonc = 'auteurs_edit_config',
82
-	$row = [],
83
-	$hidden = ''
78
+    $id_auteur = 'new',
79
+    $retour = '',
80
+    $associer_objet = '',
81
+    $config_fonc = 'auteurs_edit_config',
82
+    $row = [],
83
+    $hidden = ''
84 84
 ) {
85
-	return serialize([intval($id_auteur), $associer_objet]);
85
+    return serialize([intval($id_auteur), $associer_objet]);
86 86
 }
87 87
 
88 88
 
@@ -95,29 +95,29 @@  discard block
 block discarded – undo
95 95
  *     Configuration pour le formulaire
96 96
  */
97 97
 function auteurs_edit_config($row) {
98
-	global $spip_lang;
99
-
100
-	$config = $GLOBALS['meta'];
101
-	$config['lignes'] = 8;
102
-	$config['langue'] = $spip_lang;
103
-
104
-	// pour instituer_auteur
105
-	$config['auteur'] = $row;
106
-
107
-	//$config['restreint'] = ($row['statut'] == 'publie');
108
-	$auth_methode = $row['source'];
109
-	include_spip('inc/auth');
110
-	$config['edit_login'] =
111
-		(auth_autoriser_modifier_login($auth_methode)
112
-			and autoriser('modifier', 'auteur', $row['id_auteur'], null, ['login' => true])
113
-			// legacy : ne pas risquer d'autoriser la modif login si fonction d'autorisation pas mise a jour et ne teste que l'option email
114
-			and autoriser('modifier', 'auteur', $row['id_auteur'], null, ['email' => true])
115
-		);
116
-	$config['edit_pass'] =
117
-		(auth_autoriser_modifier_pass($auth_methode)
118
-			and autoriser('modifier', 'auteur', $row['id_auteur']));
119
-
120
-	return $config;
98
+    global $spip_lang;
99
+
100
+    $config = $GLOBALS['meta'];
101
+    $config['lignes'] = 8;
102
+    $config['langue'] = $spip_lang;
103
+
104
+    // pour instituer_auteur
105
+    $config['auteur'] = $row;
106
+
107
+    //$config['restreint'] = ($row['statut'] == 'publie');
108
+    $auth_methode = $row['source'];
109
+    include_spip('inc/auth');
110
+    $config['edit_login'] =
111
+        (auth_autoriser_modifier_login($auth_methode)
112
+            and autoriser('modifier', 'auteur', $row['id_auteur'], null, ['login' => true])
113
+            // legacy : ne pas risquer d'autoriser la modif login si fonction d'autorisation pas mise a jour et ne teste que l'option email
114
+            and autoriser('modifier', 'auteur', $row['id_auteur'], null, ['email' => true])
115
+        );
116
+    $config['edit_pass'] =
117
+        (auth_autoriser_modifier_pass($auth_methode)
118
+            and autoriser('modifier', 'auteur', $row['id_auteur']));
119
+
120
+    return $config;
121 121
 }
122 122
 
123 123
 /**
@@ -147,143 +147,143 @@  discard block
 block discarded – undo
147 147
  *     Erreurs des saisies
148 148
  **/
149 149
 function formulaires_editer_auteur_verifier_dist(
150
-	$id_auteur = 'new',
151
-	$retour = '',
152
-	$associer_objet = '',
153
-	$config_fonc = 'auteurs_edit_config',
154
-	$row = [],
155
-	$hidden = ''
150
+    $id_auteur = 'new',
151
+    $retour = '',
152
+    $associer_objet = '',
153
+    $config_fonc = 'auteurs_edit_config',
154
+    $row = [],
155
+    $hidden = ''
156 156
 ) {
157
-	// auto-renseigner le nom si il n'existe pas, sans couper
158
-	titre_automatique('nom', ['email', 'login'], 255);
159
-
160
-	$oblis = ['nom'];
161
-	// si on veut renvoyer des identifiants il faut un email et un login
162
-	if (_request('reset_password')) {
163
-		$oblis[] = 'email';
164
-		$oblis[] = 'new_login';
165
-	}
166
-	// mais il reste obligatoire si on a rien trouve
167
-	$erreurs = formulaires_editer_objet_verifier('auteur', $id_auteur, $oblis);
168
-	if (isset($erreurs['new_login'])) {
169
-		$erreurs['login'] = $erreurs['new_login'];
170
-		unset($erreurs['new_login']);
171
-	}
172
-
173
-	$auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
174
-	$auth_methode = ($auth_methode ?: 'spip');
175
-	include_spip('inc/auth');
176
-
177
-	if (!nom_acceptable(_request('nom'))) {
178
-		$erreurs['nom'] = _T('info_nom_pas_conforme');
179
-	}
180
-
181
-	if ($email = _request('email')) {
182
-		include_spip('inc/filtres');
183
-		include_spip('inc/autoriser');
184
-		// un redacteur qui modifie son email n'a pas le droit de le vider si il y en avait un
185
-		if (
186
-			!autoriser('modifier', 'auteur', $id_auteur, null, ['email' => '?'])
187
-			and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
188
-			and !strlen(trim($email))
189
-			and $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
190
-		) {
191
-			$erreurs['email'] = (($id_auteur == $GLOBALS['visiteur_session']['id_auteur']) ? _T('form_email_non_valide') : _T('form_prop_indiquer_email'));
192
-		} else {
193
-			if (!email_valide($email)) {
194
-				$erreurs['email'] = (($id_auteur == $GLOBALS['visiteur_session']['id_auteur']) ? _T('form_email_non_valide') : _T('form_prop_indiquer_email'));
195
-			}
196
-		}
197
-		# Ne pas autoriser d'avoir deux auteurs avec le même email
198
-		# cette fonctionalité nécessite que la base soit clean à l'activation : pas de
199
-		# doublon sur la requête select email,count(*) from spip_auteurs group by email ;
200
-		if (defined('_INTERDIRE_AUTEUR_MEME_EMAIL')) {
201
-			#Nouvel auteur
202
-			if (intval($id_auteur) == 0) {
203
-				#Un auteur existe deja avec cette adresse ?
204
-				if (sql_countsel('spip_auteurs', 'email=' . sql_quote($email)) > 0) {
205
-					$erreurs['email'] = _T('erreur_email_deja_existant');
206
-				}
207
-			} else {
208
-				#Un auteur existe deja avec cette adresse ? et n'est pas le user courant.
209
-				if (
210
-					(sql_countsel(
211
-						'spip_auteurs',
212
-						'email=' . sql_quote($email)
213
-					) > 0) and ($id_auteur != ($id_auteur_ancien = sql_getfetsel(
214
-						'id_auteur',
215
-						'spip_auteurs',
216
-						'email=' . sql_quote($email)
217
-					)))
218
-				) {
219
-					$erreurs['email'] = _T('erreur_email_deja_existant');
220
-				}
221
-			}
222
-		}
223
-	}
224
-
225
-	// quand c'est un auteur existant on fait le reset password ici
226
-	if (!(is_countable($erreurs) ? count($erreurs) : 0) and _request('reset_password') and intval($id_auteur)) {
227
-		$erreurs = auteur_reset_password($id_auteur, $erreurs);
228
-		return $erreurs;
229
-	}
230
-
231
-	// corriger un cas si frequent : www.example.org sans le http:// qui precede
232
-	if ($url = _request('url_site') and !tester_url_absolue($url)) {
233
-		if (strpos($url, ':') === false and strncasecmp($url, 'www.', 4) === 0) {
234
-			$url = 'http://' . $url;
235
-			set_request('url_site', $url);
236
-		}
237
-	}
238
-	// traiter les liens implicites avant de tester l'url
239
-	include_spip('inc/lien');
240
-	if ($url = calculer_url(_request('url_site')) and !tester_url_absolue($url)) {
241
-		$erreurs['url_site'] = _T('info_url_site_pas_conforme');
242
-	}
243
-
244
-	$erreurs['message_erreur'] = '';
245
-	if (_request('login')) {
246
-		// on n'est jamais cense poster le name 'login'
247
-		$erreurs['login'] = _T('info_non_modifiable');
248
-	}
249
-	elseif (
250
-		($login = _request('new_login')) and
251
-		$login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur))
252
-	) {
253
-		// on verifie la meme chose que dans auteurs_edit_config()
254
-		if (
255
-			! auth_autoriser_modifier_login($auth_methode)
256
-			or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['login' => true])
257
-			// legacy : ne pas risquer d'autoriser la modif login si fonction d'autorisation pas mise a jour et ne teste que l'option email
258
-			or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['email' => true])
259
-		) {
260
-			$erreurs['login'] = _T('info_non_modifiable');
261
-		}
262
-	}
263
-
264
-	if (empty($erreurs['login'])) {
265
-		if ($err = auth_verifier_login($auth_methode, _request('new_login'), $id_auteur)) {
266
-			$erreurs['login'] = $err;
267
-			$erreurs['message_erreur'] .= $err;
268
-		} else {
269
-			// pass trop court ou confirmation non identique
270
-			if ($p = _request('new_pass')) {
271
-				if ($p != _request('new_pass2')) {
272
-					$erreurs['new_pass'] = _T('info_passes_identiques');
273
-					$erreurs['message_erreur'] .= _T('info_passes_identiques');
274
-				} elseif ($err = auth_verifier_pass($auth_methode, _request('new_login'), $p, $id_auteur)) {
275
-					$erreurs['new_pass'] = $err;
276
-					$erreurs['message_erreur'] .= $err;
277
-				}
278
-			}
279
-		}
280
-	}
281
-
282
-	if (!$erreurs['message_erreur']) {
283
-		unset($erreurs['message_erreur']);
284
-	}
285
-
286
-	return $erreurs;
157
+    // auto-renseigner le nom si il n'existe pas, sans couper
158
+    titre_automatique('nom', ['email', 'login'], 255);
159
+
160
+    $oblis = ['nom'];
161
+    // si on veut renvoyer des identifiants il faut un email et un login
162
+    if (_request('reset_password')) {
163
+        $oblis[] = 'email';
164
+        $oblis[] = 'new_login';
165
+    }
166
+    // mais il reste obligatoire si on a rien trouve
167
+    $erreurs = formulaires_editer_objet_verifier('auteur', $id_auteur, $oblis);
168
+    if (isset($erreurs['new_login'])) {
169
+        $erreurs['login'] = $erreurs['new_login'];
170
+        unset($erreurs['new_login']);
171
+    }
172
+
173
+    $auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
174
+    $auth_methode = ($auth_methode ?: 'spip');
175
+    include_spip('inc/auth');
176
+
177
+    if (!nom_acceptable(_request('nom'))) {
178
+        $erreurs['nom'] = _T('info_nom_pas_conforme');
179
+    }
180
+
181
+    if ($email = _request('email')) {
182
+        include_spip('inc/filtres');
183
+        include_spip('inc/autoriser');
184
+        // un redacteur qui modifie son email n'a pas le droit de le vider si il y en avait un
185
+        if (
186
+            !autoriser('modifier', 'auteur', $id_auteur, null, ['email' => '?'])
187
+            and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
188
+            and !strlen(trim($email))
189
+            and $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
190
+        ) {
191
+            $erreurs['email'] = (($id_auteur == $GLOBALS['visiteur_session']['id_auteur']) ? _T('form_email_non_valide') : _T('form_prop_indiquer_email'));
192
+        } else {
193
+            if (!email_valide($email)) {
194
+                $erreurs['email'] = (($id_auteur == $GLOBALS['visiteur_session']['id_auteur']) ? _T('form_email_non_valide') : _T('form_prop_indiquer_email'));
195
+            }
196
+        }
197
+        # Ne pas autoriser d'avoir deux auteurs avec le même email
198
+        # cette fonctionalité nécessite que la base soit clean à l'activation : pas de
199
+        # doublon sur la requête select email,count(*) from spip_auteurs group by email ;
200
+        if (defined('_INTERDIRE_AUTEUR_MEME_EMAIL')) {
201
+            #Nouvel auteur
202
+            if (intval($id_auteur) == 0) {
203
+                #Un auteur existe deja avec cette adresse ?
204
+                if (sql_countsel('spip_auteurs', 'email=' . sql_quote($email)) > 0) {
205
+                    $erreurs['email'] = _T('erreur_email_deja_existant');
206
+                }
207
+            } else {
208
+                #Un auteur existe deja avec cette adresse ? et n'est pas le user courant.
209
+                if (
210
+                    (sql_countsel(
211
+                        'spip_auteurs',
212
+                        'email=' . sql_quote($email)
213
+                    ) > 0) and ($id_auteur != ($id_auteur_ancien = sql_getfetsel(
214
+                        'id_auteur',
215
+                        'spip_auteurs',
216
+                        'email=' . sql_quote($email)
217
+                    )))
218
+                ) {
219
+                    $erreurs['email'] = _T('erreur_email_deja_existant');
220
+                }
221
+            }
222
+        }
223
+    }
224
+
225
+    // quand c'est un auteur existant on fait le reset password ici
226
+    if (!(is_countable($erreurs) ? count($erreurs) : 0) and _request('reset_password') and intval($id_auteur)) {
227
+        $erreurs = auteur_reset_password($id_auteur, $erreurs);
228
+        return $erreurs;
229
+    }
230
+
231
+    // corriger un cas si frequent : www.example.org sans le http:// qui precede
232
+    if ($url = _request('url_site') and !tester_url_absolue($url)) {
233
+        if (strpos($url, ':') === false and strncasecmp($url, 'www.', 4) === 0) {
234
+            $url = 'http://' . $url;
235
+            set_request('url_site', $url);
236
+        }
237
+    }
238
+    // traiter les liens implicites avant de tester l'url
239
+    include_spip('inc/lien');
240
+    if ($url = calculer_url(_request('url_site')) and !tester_url_absolue($url)) {
241
+        $erreurs['url_site'] = _T('info_url_site_pas_conforme');
242
+    }
243
+
244
+    $erreurs['message_erreur'] = '';
245
+    if (_request('login')) {
246
+        // on n'est jamais cense poster le name 'login'
247
+        $erreurs['login'] = _T('info_non_modifiable');
248
+    }
249
+    elseif (
250
+        ($login = _request('new_login')) and
251
+        $login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur))
252
+    ) {
253
+        // on verifie la meme chose que dans auteurs_edit_config()
254
+        if (
255
+            ! auth_autoriser_modifier_login($auth_methode)
256
+            or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['login' => true])
257
+            // legacy : ne pas risquer d'autoriser la modif login si fonction d'autorisation pas mise a jour et ne teste que l'option email
258
+            or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['email' => true])
259
+        ) {
260
+            $erreurs['login'] = _T('info_non_modifiable');
261
+        }
262
+    }
263
+
264
+    if (empty($erreurs['login'])) {
265
+        if ($err = auth_verifier_login($auth_methode, _request('new_login'), $id_auteur)) {
266
+            $erreurs['login'] = $err;
267
+            $erreurs['message_erreur'] .= $err;
268
+        } else {
269
+            // pass trop court ou confirmation non identique
270
+            if ($p = _request('new_pass')) {
271
+                if ($p != _request('new_pass2')) {
272
+                    $erreurs['new_pass'] = _T('info_passes_identiques');
273
+                    $erreurs['message_erreur'] .= _T('info_passes_identiques');
274
+                } elseif ($err = auth_verifier_pass($auth_methode, _request('new_login'), $p, $id_auteur)) {
275
+                    $erreurs['new_pass'] = $err;
276
+                    $erreurs['message_erreur'] .= $err;
277
+                }
278
+            }
279
+        }
280
+    }
281
+
282
+    if (!$erreurs['message_erreur']) {
283
+        unset($erreurs['message_erreur']);
284
+    }
285
+
286
+    return $erreurs;
287 287
 }
288 288
 
289 289
 
@@ -320,128 +320,128 @@  discard block
 block discarded – undo
320 320
  *     Retour des traitements
321 321
  **/
322 322
 function formulaires_editer_auteur_traiter_dist(
323
-	$id_auteur = 'new',
324
-	$retour = '',
325
-	$associer_objet = '',
326
-	$config_fonc = 'auteurs_edit_config',
327
-	$row = [],
328
-	$hidden = ''
323
+    $id_auteur = 'new',
324
+    $retour = '',
325
+    $associer_objet = '',
326
+    $config_fonc = 'auteurs_edit_config',
327
+    $row = [],
328
+    $hidden = ''
329 329
 ) {
330
-	$id_objet = null;
331
-	if (_request('saisie_webmestre') or _request('webmestre')) {
332
-		set_request('webmestre', _request('webmestre') ?: 'non');
333
-	}
334
-	$retour = parametre_url($retour, 'email_confirm', '');
335
-
336
-	if ($restreintes = _request('restreintes')) {
337
-		foreach ($restreintes as $k => $v) {
338
-			if (strpos($v, 'rubrique|') === 0) {
339
-				$restreintes[$k] = substr($v, 9);
340
-			}
341
-		}
342
-		set_request('restreintes', $restreintes);
343
-	}
344
-
345
-	set_request(
346
-		'email',
347
-		email_valide(_request('email'))
348
-	); // eviter d'enregistrer les cas qui sont acceptés par email_valide dans le verifier :
349
-	// "[email protected]  " ou encore "Marie Toto <[email protected]>"
350
-
351
-	include_spip('inc/autoriser');
352
-	if (!autoriser('modifier', 'auteur', $id_auteur, null, ['email' => '?'])) {
353
-		$email_nouveau = _request('email');
354
-		set_request('email'); // vider la saisie car l'auteur n'a pas le droit de modifier cet email
355
-		// mais si c'est son propre profil on lui envoie un email à l'adresse qu'il a indique
356
-		// pour qu'il confirme qu'il possede bien cette adresse
357
-		// son clic sur l'url du message permettre de confirmer le changement
358
-		// et de revenir sur son profil
359
-		if (
360
-			$GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
361
-			and $email_nouveau !=
362
-				($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
363
-		) {
364
-			$envoyer_mail = charger_fonction('envoyer_mail', 'inc');
365
-			$texte = _T(
366
-				'form_auteur_mail_confirmation',
367
-				[
368
-					'url' => generer_action_auteur(
369
-						'confirmer_email',
370
-						$email_nouveau,
371
-						parametre_url($retour, 'email_modif', 'ok')
372
-					)
373
-				]
374
-			);
375
-			$envoyer_mail($email_nouveau, _T('form_auteur_confirmation'), $texte);
376
-			set_request('email_confirm', $email_nouveau);
377
-			if ($email_ancien) {
378
-				$envoyer_mail(
379
-					$email_ancien,
380
-					_T('form_auteur_confirmation'),
381
-					_T('form_auteur_envoi_mail_confirmation', ['email' => $email_nouveau])
382
-				);
383
-			}
384
-			$retour = parametre_url($retour, 'email_confirm', $email_nouveau);
385
-		}
386
-	}
387
-
388
-	$res = formulaires_editer_objet_traiter('auteur', $id_auteur, 0, 0, $retour, $config_fonc, $row, $hidden);
389
-
390
-	if (_request('reset_password') and !intval($id_auteur) and intval($res['id_auteur'])) {
391
-		$erreurs = [];
392
-		$erreurs = auteur_reset_password($res['id_auteur'], $erreurs);
393
-		if (isset($erreurs['message_ok'])) {
394
-			if (!isset($res['message_ok'])) { $res['message_ok'] = '';
395
-			}
396
-			$res['message_ok'] = trim($res['message_ok'] . ' ' . $erreurs['message_ok']);
397
-		}
398
-		if (isset($erreurs['message_erreur']) and $erreurs['message_erreur']) {
399
-			if (!isset($res['message_erreur'])) { $res['message_erreur'] = '';
400
-			}
401
-			$res['message_erreur'] = trim($res['message_erreur'] . ' ' . $erreurs['message_erreur']);
402
-		}
403
-	}
404
-
405
-	// Un lien auteur a prendre en compte ?
406
-	if ($associer_objet and $id_auteur = $res['id_auteur']) {
407
-		$objet = '';
408
-		if (intval($associer_objet)) {
409
-			$objet = 'article';
410
-			$id_objet = intval($associer_objet);
411
-		} elseif (preg_match(',^\w+\|[0-9]+$,', $associer_objet)) {
412
-			[$objet, $id_objet] = explode('|', $associer_objet);
413
-		}
414
-		if ($objet and $id_objet and autoriser('modifier', $objet, $id_objet)) {
415
-			include_spip('action/editer_auteur');
416
-			auteur_associer($id_auteur, [$objet => $id_objet]);
417
-			if (isset($res['redirect'])) {
418
-				$res['redirect'] = parametre_url($res['redirect'], 'id_lien_ajoute', $id_auteur, '&');
419
-			}
420
-		}
421
-	}
422
-
423
-	return $res;
330
+    $id_objet = null;
331
+    if (_request('saisie_webmestre') or _request('webmestre')) {
332
+        set_request('webmestre', _request('webmestre') ?: 'non');
333
+    }
334
+    $retour = parametre_url($retour, 'email_confirm', '');
335
+
336
+    if ($restreintes = _request('restreintes')) {
337
+        foreach ($restreintes as $k => $v) {
338
+            if (strpos($v, 'rubrique|') === 0) {
339
+                $restreintes[$k] = substr($v, 9);
340
+            }
341
+        }
342
+        set_request('restreintes', $restreintes);
343
+    }
344
+
345
+    set_request(
346
+        'email',
347
+        email_valide(_request('email'))
348
+    ); // eviter d'enregistrer les cas qui sont acceptés par email_valide dans le verifier :
349
+    // "[email protected]  " ou encore "Marie Toto <[email protected]>"
350
+
351
+    include_spip('inc/autoriser');
352
+    if (!autoriser('modifier', 'auteur', $id_auteur, null, ['email' => '?'])) {
353
+        $email_nouveau = _request('email');
354
+        set_request('email'); // vider la saisie car l'auteur n'a pas le droit de modifier cet email
355
+        // mais si c'est son propre profil on lui envoie un email à l'adresse qu'il a indique
356
+        // pour qu'il confirme qu'il possede bien cette adresse
357
+        // son clic sur l'url du message permettre de confirmer le changement
358
+        // et de revenir sur son profil
359
+        if (
360
+            $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
361
+            and $email_nouveau !=
362
+                ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
363
+        ) {
364
+            $envoyer_mail = charger_fonction('envoyer_mail', 'inc');
365
+            $texte = _T(
366
+                'form_auteur_mail_confirmation',
367
+                [
368
+                    'url' => generer_action_auteur(
369
+                        'confirmer_email',
370
+                        $email_nouveau,
371
+                        parametre_url($retour, 'email_modif', 'ok')
372
+                    )
373
+                ]
374
+            );
375
+            $envoyer_mail($email_nouveau, _T('form_auteur_confirmation'), $texte);
376
+            set_request('email_confirm', $email_nouveau);
377
+            if ($email_ancien) {
378
+                $envoyer_mail(
379
+                    $email_ancien,
380
+                    _T('form_auteur_confirmation'),
381
+                    _T('form_auteur_envoi_mail_confirmation', ['email' => $email_nouveau])
382
+                );
383
+            }
384
+            $retour = parametre_url($retour, 'email_confirm', $email_nouveau);
385
+        }
386
+    }
387
+
388
+    $res = formulaires_editer_objet_traiter('auteur', $id_auteur, 0, 0, $retour, $config_fonc, $row, $hidden);
389
+
390
+    if (_request('reset_password') and !intval($id_auteur) and intval($res['id_auteur'])) {
391
+        $erreurs = [];
392
+        $erreurs = auteur_reset_password($res['id_auteur'], $erreurs);
393
+        if (isset($erreurs['message_ok'])) {
394
+            if (!isset($res['message_ok'])) { $res['message_ok'] = '';
395
+            }
396
+            $res['message_ok'] = trim($res['message_ok'] . ' ' . $erreurs['message_ok']);
397
+        }
398
+        if (isset($erreurs['message_erreur']) and $erreurs['message_erreur']) {
399
+            if (!isset($res['message_erreur'])) { $res['message_erreur'] = '';
400
+            }
401
+            $res['message_erreur'] = trim($res['message_erreur'] . ' ' . $erreurs['message_erreur']);
402
+        }
403
+    }
404
+
405
+    // Un lien auteur a prendre en compte ?
406
+    if ($associer_objet and $id_auteur = $res['id_auteur']) {
407
+        $objet = '';
408
+        if (intval($associer_objet)) {
409
+            $objet = 'article';
410
+            $id_objet = intval($associer_objet);
411
+        } elseif (preg_match(',^\w+\|[0-9]+$,', $associer_objet)) {
412
+            [$objet, $id_objet] = explode('|', $associer_objet);
413
+        }
414
+        if ($objet and $id_objet and autoriser('modifier', $objet, $id_objet)) {
415
+            include_spip('action/editer_auteur');
416
+            auteur_associer($id_auteur, [$objet => $id_objet]);
417
+            if (isset($res['redirect'])) {
418
+                $res['redirect'] = parametre_url($res['redirect'], 'id_lien_ajoute', $id_auteur, '&');
419
+            }
420
+        }
421
+    }
422
+
423
+    return $res;
424 424
 }
425 425
 
426 426
 
427 427
 function auteur_reset_password($id_auteur, $erreurs = []) {
428
-	$auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
429
-	$config = auteurs_edit_config($auteur);
430
-
431
-	if ($config['edit_pass']) {
432
-		if ($email = auteur_regenerer_identifiants($id_auteur)) {
433
-			$erreurs['message_ok'] = _T('message_nouveaux_identifiants_ok', ['email' => $email]);
434
-			$erreurs['message_erreur'] = '';
435
-		} elseif ($email === false) {
436
-			$erreurs['message_erreur'] = _T('message_nouveaux_identifiants_echec_envoi');
437
-		} else {
438
-			$erreurs['message_erreur'] = _T('message_nouveaux_identifiants_echec');
439
-		}
440
-	} else {
441
-		$erreurs['message_erreur'] = _T('message_nouveaux_identifiants_echec');
442
-	}
443
-
444
-	return $erreurs;
428
+    $auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
429
+    $config = auteurs_edit_config($auteur);
430
+
431
+    if ($config['edit_pass']) {
432
+        if ($email = auteur_regenerer_identifiants($id_auteur)) {
433
+            $erreurs['message_ok'] = _T('message_nouveaux_identifiants_ok', ['email' => $email]);
434
+            $erreurs['message_erreur'] = '';
435
+        } elseif ($email === false) {
436
+            $erreurs['message_erreur'] = _T('message_nouveaux_identifiants_echec_envoi');
437
+        } else {
438
+            $erreurs['message_erreur'] = _T('message_nouveaux_identifiants_echec');
439
+        }
440
+    } else {
441
+        $erreurs['message_erreur'] = _T('message_nouveaux_identifiants_echec');
442
+    }
443
+
444
+    return $erreurs;
445 445
 }
446 446
 
447 447
 /**
@@ -452,53 +452,53 @@  discard block
 block discarded – undo
452 452
  * @return string
453 453
  */
454 454
 function auteur_regenerer_identifiants($id_auteur, $notifier = true, $contexte = []) {
455
-	if ($id_auteur) {
456
-		$set = [];
457
-		include_spip('inc/access');
458
-		$set['pass'] = creer_pass_aleatoire(max(_PASS_LONGUEUR_MINI, 16));
459
-
460
-		include_spip('action/editer_auteur');
461
-		auteur_modifier($id_auteur, $set);
462
-
463
-		$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
464
-		include_spip('inc/filtres');
465
-		if (
466
-			$notifier
467
-			and $row['email']
468
-			and email_valide($row['email'])
469
-			and trouver_fond($fond = 'modeles/mail_nouveaux_identifiants')
470
-		) {
471
-			// envoyer l'email avec login/pass
472
-			$c = [
473
-				'id_auteur' => $id_auteur,
474
-				'nom' => $row['nom'],
475
-				'mode' => $row['statut'],
476
-				'email' => $row['email'],
477
-				'pass' => $set['pass'],
478
-			];
479
-			// on merge avec les champs fournit en appel, qui sont passes au modele de notification donc
480
-			$contexte = array_merge($contexte, $c);
481
-			// si pas de langue explicitement demandee, prendre celle de l'auteur si on la connait, ou a defaut celle du site
482
-			// plutot que celle de l'admin qui vient de cliquer sur le bouton
483
-			if (!isset($contexte['lang']) or !$contexte['lang']) {
484
-				if (isset($row['lang']) and $row['lang']) {
485
-					$contexte['lang'] = $row['lang'];
486
-				}
487
-				else {
488
-					$contexte['lang'] = $GLOBALS['meta']['langue_site'];
489
-				}
490
-			}
491
-			lang_select($contexte['lang']);
492
-			$message = recuperer_fond($fond, $contexte);
493
-			include_spip('inc/notifications');
494
-			notifications_envoyer_mails($row['email'], $message);
495
-			lang_select();
496
-
497
-			return $row['email'];
498
-		}
499
-
500
-		return false;
501
-	}
502
-
503
-	return '';
455
+    if ($id_auteur) {
456
+        $set = [];
457
+        include_spip('inc/access');
458
+        $set['pass'] = creer_pass_aleatoire(max(_PASS_LONGUEUR_MINI, 16));
459
+
460
+        include_spip('action/editer_auteur');
461
+        auteur_modifier($id_auteur, $set);
462
+
463
+        $row = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
464
+        include_spip('inc/filtres');
465
+        if (
466
+            $notifier
467
+            and $row['email']
468
+            and email_valide($row['email'])
469
+            and trouver_fond($fond = 'modeles/mail_nouveaux_identifiants')
470
+        ) {
471
+            // envoyer l'email avec login/pass
472
+            $c = [
473
+                'id_auteur' => $id_auteur,
474
+                'nom' => $row['nom'],
475
+                'mode' => $row['statut'],
476
+                'email' => $row['email'],
477
+                'pass' => $set['pass'],
478
+            ];
479
+            // on merge avec les champs fournit en appel, qui sont passes au modele de notification donc
480
+            $contexte = array_merge($contexte, $c);
481
+            // si pas de langue explicitement demandee, prendre celle de l'auteur si on la connait, ou a defaut celle du site
482
+            // plutot que celle de l'admin qui vient de cliquer sur le bouton
483
+            if (!isset($contexte['lang']) or !$contexte['lang']) {
484
+                if (isset($row['lang']) and $row['lang']) {
485
+                    $contexte['lang'] = $row['lang'];
486
+                }
487
+                else {
488
+                    $contexte['lang'] = $GLOBALS['meta']['langue_site'];
489
+                }
490
+            }
491
+            lang_select($contexte['lang']);
492
+            $message = recuperer_fond($fond, $contexte);
493
+            include_spip('inc/notifications');
494
+            notifications_envoyer_mails($row['email'], $message);
495
+            lang_select();
496
+
497
+            return $row['email'];
498
+        }
499
+
500
+        return false;
501
+    }
502
+
503
+    return '';
504 504
 }
Please login to merge, or discard this patch.
prive/transmettre/rss/a_suivre_fonctions.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 function trier_rss($texte) {
8
-	if (preg_match_all(',<item.*</item>\s*?,Uims', $texte, $matches, PREG_SET_ORDER)) {
9
-		$placeholder = '<!--REINSERT-->';
10
-		$items = [];
11
-		foreach ($matches as $match) {
12
-			if (preg_match(',<dc:date>(.*)</dc:date>,Uims', $match[0], $r)) {
13
-				$items[strtotime($r[1])] = trim($match[0]);
14
-				$texte = str_replace($match[0], unique($placeholder), $texte);
15
-			}
16
-		}
17
-		krsort($items);
18
-		$texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte);
19
-	}
8
+    if (preg_match_all(',<item.*</item>\s*?,Uims', $texte, $matches, PREG_SET_ORDER)) {
9
+        $placeholder = '<!--REINSERT-->';
10
+        $items = [];
11
+        foreach ($matches as $match) {
12
+            if (preg_match(',<dc:date>(.*)</dc:date>,Uims', $match[0], $r)) {
13
+                $items[strtotime($r[1])] = trim($match[0]);
14
+                $texte = str_replace($match[0], unique($placeholder), $texte);
15
+            }
16
+        }
17
+        krsort($items);
18
+        $texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte);
19
+    }
20 20
 
21
-	return $texte;
21
+    return $texte;
22 22
 }
Please login to merge, or discard this patch.
ecrire/plugins/afficher_plugin.php 1 patch
Indentation   +303 added lines, -303 removed lines patch added patch discarded remove patch
@@ -17,212 +17,212 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 include_spip('inc/charsets');
23 23
 include_spip('inc/texte');
24 24
 include_spip('inc/plugin'); // pour plugin_est_installe
25 25
 
26 26
 function plugins_afficher_plugin_dist(
27
-	$url_page,
28
-	$plug_file,
29
-	$checked,
30
-	$actif,
31
-	$expose = false,
32
-	$class_li = 'item',
33
-	$dir_plugins = _DIR_PLUGINS
27
+    $url_page,
28
+    $plug_file,
29
+    $checked,
30
+    $actif,
31
+    $expose = false,
32
+    $class_li = 'item',
33
+    $dir_plugins = _DIR_PLUGINS
34 34
 ) {
35 35
 
36
-	static $id_input = 0;
37
-	static $versions = [];
38
-
39
-	$force_reload = (_request('var_mode') == 'recalcul');
40
-	$get_infos = charger_fonction('get_infos', 'plugins');
41
-	$info = $get_infos($plug_file, $force_reload, $dir_plugins);
42
-	$prefix = $info['prefix'];
43
-	$cfg = '';
44
-	$checkable = ($dir_plugins !== _DIR_PLUGINS_DIST);
45
-	$nom = plugin_nom($info, $dir_plugins, $plug_file);
46
-	$erreur = '';
47
-
48
-	if (!plugin_version_compatible($info['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
49
-		$info['slogan'] = _T('plugin_info_non_compatible_spip');
50
-		$erreur = http_img_pack(
51
-			'plugin-dis-32.png',
52
-			_T('plugin_info_non_compatible_spip'),
53
-			" class='picto_err'",
54
-			_T('plugin_info_non_compatible_spip')
55
-		);
56
-		$class_li .= ' disabled';
57
-		$checkable = false;
58
-	} elseif (isset($info['erreur'])) {
59
-		$class_li .= ' error';
60
-		$erreur = http_img_pack(
61
-			'plugin-err-32.png',
62
-			_T('plugin_info_erreur_xml'),
63
-			" class='picto_err'",
64
-			_T('plugin_info_erreur_xml')
65
-		)
66
-			. "<div class='erreur'>" . join('<br >', $info['erreur']) . '</div>';
67
-		$checkable = false;
68
-	} elseif (isset($GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file])) {
69
-		$class_li .= ' error';
70
-		$erreur = http_img_pack(
71
-			'plugin-err-32.png',
72
-			_T('plugin_impossible_activer', ['plugin' => $nom]),
73
-			" class='picto_err'",
74
-			_T('plugin_impossible_activer', ['plugin' => $nom])
75
-		)
76
-			. "<div class='erreur'>" . implode(
77
-				'<br />',
78
-				$GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file]
79
-			) . '</div>';
80
-	} else {
81
-		$cfg = $actif ? plugin_bouton_config($plug_file, $info, $dir_plugins) : '';
82
-		if (defined('_DEV_VERSION_SPIP_COMPAT') and !plugin_version_compatible($info['compatibilite'], $GLOBALS['spip_version_branche'])) {
83
-			//$info['slogan'] = _T('plugin_info_non_compatible_spip');
84
-			$erreur = http_img_pack(
85
-				'plugin-dis-32.png',
86
-				_T('plugin_info_non_compatible_spip'),
87
-				" class='picto_err picto_compat_forcee'",
88
-				_L('Version incompatible : compatibilité forcée')
89
-			);
90
-		}
91
-	}
92
-
93
-	// numerotons les occurrences d'un meme prefix
94
-	$versions[$prefix] = $id = isset($versions[$prefix]) ? intval($versions[$prefix]) + 1 : '';
95
-
96
-	$class_li .= ($actif ? ' actif' : '') . ($expose ? ' on' : '');
97
-
98
-	return "<li id='$prefix$id' class='$class_li'>"
99
-	. ((!$checkable and !$checked)
100
-		? '' : plugin_checkbox(++$id_input, $dir_plugins . $plug_file, $checked))
101
-	. plugin_resume($info, $dir_plugins, $plug_file, $url_page)
102
-	. $cfg
103
-	. $erreur
104
-	. (($dir_plugins !== _DIR_PLUGINS_DIST and plugin_est_installe($plug_file))
105
-		? plugin_desintalle($plug_file, $nom, $dir_plugins) : '')
106
-	. "<div class='details'>" // pour l'ajax de exec/info_plugin
107
-	. (!$expose ? '' : affiche_bloc_plugin($plug_file, $info, $dir_plugins))
108
-	. '</div>'
109
-	. '</li>';
36
+    static $id_input = 0;
37
+    static $versions = [];
38
+
39
+    $force_reload = (_request('var_mode') == 'recalcul');
40
+    $get_infos = charger_fonction('get_infos', 'plugins');
41
+    $info = $get_infos($plug_file, $force_reload, $dir_plugins);
42
+    $prefix = $info['prefix'];
43
+    $cfg = '';
44
+    $checkable = ($dir_plugins !== _DIR_PLUGINS_DIST);
45
+    $nom = plugin_nom($info, $dir_plugins, $plug_file);
46
+    $erreur = '';
47
+
48
+    if (!plugin_version_compatible($info['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
49
+        $info['slogan'] = _T('plugin_info_non_compatible_spip');
50
+        $erreur = http_img_pack(
51
+            'plugin-dis-32.png',
52
+            _T('plugin_info_non_compatible_spip'),
53
+            " class='picto_err'",
54
+            _T('plugin_info_non_compatible_spip')
55
+        );
56
+        $class_li .= ' disabled';
57
+        $checkable = false;
58
+    } elseif (isset($info['erreur'])) {
59
+        $class_li .= ' error';
60
+        $erreur = http_img_pack(
61
+            'plugin-err-32.png',
62
+            _T('plugin_info_erreur_xml'),
63
+            " class='picto_err'",
64
+            _T('plugin_info_erreur_xml')
65
+        )
66
+            . "<div class='erreur'>" . join('<br >', $info['erreur']) . '</div>';
67
+        $checkable = false;
68
+    } elseif (isset($GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file])) {
69
+        $class_li .= ' error';
70
+        $erreur = http_img_pack(
71
+            'plugin-err-32.png',
72
+            _T('plugin_impossible_activer', ['plugin' => $nom]),
73
+            " class='picto_err'",
74
+            _T('plugin_impossible_activer', ['plugin' => $nom])
75
+        )
76
+            . "<div class='erreur'>" . implode(
77
+                '<br />',
78
+                $GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file]
79
+            ) . '</div>';
80
+    } else {
81
+        $cfg = $actif ? plugin_bouton_config($plug_file, $info, $dir_plugins) : '';
82
+        if (defined('_DEV_VERSION_SPIP_COMPAT') and !plugin_version_compatible($info['compatibilite'], $GLOBALS['spip_version_branche'])) {
83
+            //$info['slogan'] = _T('plugin_info_non_compatible_spip');
84
+            $erreur = http_img_pack(
85
+                'plugin-dis-32.png',
86
+                _T('plugin_info_non_compatible_spip'),
87
+                " class='picto_err picto_compat_forcee'",
88
+                _L('Version incompatible : compatibilité forcée')
89
+            );
90
+        }
91
+    }
92
+
93
+    // numerotons les occurrences d'un meme prefix
94
+    $versions[$prefix] = $id = isset($versions[$prefix]) ? intval($versions[$prefix]) + 1 : '';
95
+
96
+    $class_li .= ($actif ? ' actif' : '') . ($expose ? ' on' : '');
97
+
98
+    return "<li id='$prefix$id' class='$class_li'>"
99
+    . ((!$checkable and !$checked)
100
+        ? '' : plugin_checkbox(++$id_input, $dir_plugins . $plug_file, $checked))
101
+    . plugin_resume($info, $dir_plugins, $plug_file, $url_page)
102
+    . $cfg
103
+    . $erreur
104
+    . (($dir_plugins !== _DIR_PLUGINS_DIST and plugin_est_installe($plug_file))
105
+        ? plugin_desintalle($plug_file, $nom, $dir_plugins) : '')
106
+    . "<div class='details'>" // pour l'ajax de exec/info_plugin
107
+    . (!$expose ? '' : affiche_bloc_plugin($plug_file, $info, $dir_plugins))
108
+    . '</div>'
109
+    . '</li>';
110 110
 }
111 111
 
112 112
 function plugin_bouton_config($nom, $infos, $dir) {
113
-	// la verification se base sur le filesystem
114
-	// il faut donc n'utiliser que des minuscules, par convention
115
-	$prefix = strtolower($infos['prefix']);
116
-	// si paquet.xml fournit un squelette, le prendre
117
-	if (isset($infos['config']) and $infos['config']) {
118
-		return recuperer_fond(
119
-			"$dir$nom/" . $infos['config'],
120
-			[
121
-				'script' => 'configurer_' . $prefix,
122
-				'nom' => $nom
123
-			]
124
-		);
125
-	}
126
-
127
-	// sinon prendre le squelette std sur le nom std
128
-	return recuperer_fond(
129
-		'prive/squelettes/inclure/cfg',
130
-		[
131
-			'script' => 'configurer_' . $prefix,
132
-			'nom' => $nom
133
-		]
134
-	);
113
+    // la verification se base sur le filesystem
114
+    // il faut donc n'utiliser que des minuscules, par convention
115
+    $prefix = strtolower($infos['prefix']);
116
+    // si paquet.xml fournit un squelette, le prendre
117
+    if (isset($infos['config']) and $infos['config']) {
118
+        return recuperer_fond(
119
+            "$dir$nom/" . $infos['config'],
120
+            [
121
+                'script' => 'configurer_' . $prefix,
122
+                'nom' => $nom
123
+            ]
124
+        );
125
+    }
126
+
127
+    // sinon prendre le squelette std sur le nom std
128
+    return recuperer_fond(
129
+        'prive/squelettes/inclure/cfg',
130
+        [
131
+            'script' => 'configurer_' . $prefix,
132
+            'nom' => $nom
133
+        ]
134
+    );
135 135
 }
136 136
 
137 137
 // checkbox pour activer ou desactiver
138 138
 // si ce n'est pas une extension
139 139
 
140 140
 function plugin_checkbox($id_input, $file, $actif) {
141
-	$name = substr(md5($file), 0, 16);
142
-
143
-	return "<div class='check'>\n"
144
-	. "<input type='checkbox' name='s$name' id='label_$id_input'"
145
-	. ($actif ? " checked='checked'" : '')
146
-	. " class='checkbox'  value='O' />"
147
-	. "\n<label for='label_$id_input'>" . _T('activer_plugin') . '</label>'
148
-	. '</div>';
141
+    $name = substr(md5($file), 0, 16);
142
+
143
+    return "<div class='check'>\n"
144
+    . "<input type='checkbox' name='s$name' id='label_$id_input'"
145
+    . ($actif ? " checked='checked'" : '')
146
+    . " class='checkbox'  value='O' />"
147
+    . "\n<label for='label_$id_input'>" . _T('activer_plugin') . '</label>'
148
+    . '</div>';
149 149
 }
150 150
 
151 151
 function plugin_nom($info, $dir_plugins, $plug_file) {
152
-	$prefix = $info['prefix'];
153
-	$dir = "$dir_plugins$plug_file";
154
-	// Si dtd paquet, on traite le nom soit par son item de langue soit par sa valeur immediate a l'index "nom"
155
-	if ($info['dtd'] == 'paquet') {
156
-		$nom = plugin_typo("{$prefix}_nom", "$dir/lang/paquet-$prefix");
157
-		if (!$nom) {
158
-			$nom = typo($info['nom']);
159
-		}
160
-	} else {
161
-		$nom = typo(attribut_html($info['nom']));
162
-	}
163
-
164
-	return trim($nom);
152
+    $prefix = $info['prefix'];
153
+    $dir = "$dir_plugins$plug_file";
154
+    // Si dtd paquet, on traite le nom soit par son item de langue soit par sa valeur immediate a l'index "nom"
155
+    if ($info['dtd'] == 'paquet') {
156
+        $nom = plugin_typo("{$prefix}_nom", "$dir/lang/paquet-$prefix");
157
+        if (!$nom) {
158
+            $nom = typo($info['nom']);
159
+        }
160
+    } else {
161
+        $nom = typo(attribut_html($info['nom']));
162
+    }
163
+
164
+    return trim($nom);
165 165
 }
166 166
 
167 167
 // Cartouche Resume
168 168
 function plugin_resume($info, $dir_plugins, $plug_file, $url_page) {
169
-	$prefix = $info['prefix'];
170
-	$dir = "$dir_plugins$plug_file";
171
-	$slogan = PtoBR(plugin_propre($info['slogan'], "$dir/lang/paquet-$prefix"));
172
-	// une seule ligne dans le slogan : couper si besoin
173
-	if (($p = strpos($slogan, '<br />')) !== false) {
174
-		$slogan = substr($slogan, 0, $p);
175
-	}
176
-	// couper par securite
177
-	$slogan = couper($slogan, 80);
178
-
179
-	$nom = plugin_nom($info, $dir_plugins, $plug_file);
180
-
181
-	$url = parametre_url($url_page, 'plugin', substr($dir, strlen(_DIR_RACINE)));
182
-
183
-	$icon_class = 'icon';
184
-	$img = '';
185
-	if (isset($info['logo']) and $i = trim($info['logo'])) {
186
-		$img = http_img_pack("$dir/$i", '', " width='32' height='32'", '', ['variante_svg_si_possible' => true, 'chemin_image' => false]);
187
-		if (!extraire_attribut($img, 'src')) {
188
-			$img = '';
189
-		}
190
-	}
191
-	if (!$img) {
192
-		$img = http_img_pack('plugin-xx.svg', '', " width='32' height='32'");
193
-		$icon_class .= ' no-logo';
194
-	}
195
-
196
-	$i = "<div class='$icon_class'><a href='$url' rel='info'>$img</a></div>";
197
-
198
-	return "<div class='resume'>"
199
-	. "<h3><a href='$url' rel='info'>"
200
-	. $nom
201
-	. '</a></h3>'
202
-	. " <span class='version'>" . $info['version'] . '</span>'
203
-	. " <span class='etat'> - "
204
-	. plugin_etat_en_clair($info['etat'])
205
-	. '</span>'
206
-	. "<div class='short'>" . $slogan . '</div>'
207
-	. $i
208
-	. '</div>';
169
+    $prefix = $info['prefix'];
170
+    $dir = "$dir_plugins$plug_file";
171
+    $slogan = PtoBR(plugin_propre($info['slogan'], "$dir/lang/paquet-$prefix"));
172
+    // une seule ligne dans le slogan : couper si besoin
173
+    if (($p = strpos($slogan, '<br />')) !== false) {
174
+        $slogan = substr($slogan, 0, $p);
175
+    }
176
+    // couper par securite
177
+    $slogan = couper($slogan, 80);
178
+
179
+    $nom = plugin_nom($info, $dir_plugins, $plug_file);
180
+
181
+    $url = parametre_url($url_page, 'plugin', substr($dir, strlen(_DIR_RACINE)));
182
+
183
+    $icon_class = 'icon';
184
+    $img = '';
185
+    if (isset($info['logo']) and $i = trim($info['logo'])) {
186
+        $img = http_img_pack("$dir/$i", '', " width='32' height='32'", '', ['variante_svg_si_possible' => true, 'chemin_image' => false]);
187
+        if (!extraire_attribut($img, 'src')) {
188
+            $img = '';
189
+        }
190
+    }
191
+    if (!$img) {
192
+        $img = http_img_pack('plugin-xx.svg', '', " width='32' height='32'");
193
+        $icon_class .= ' no-logo';
194
+    }
195
+
196
+    $i = "<div class='$icon_class'><a href='$url' rel='info'>$img</a></div>";
197
+
198
+    return "<div class='resume'>"
199
+    . "<h3><a href='$url' rel='info'>"
200
+    . $nom
201
+    . '</a></h3>'
202
+    . " <span class='version'>" . $info['version'] . '</span>'
203
+    . " <span class='etat'> - "
204
+    . plugin_etat_en_clair($info['etat'])
205
+    . '</span>'
206
+    . "<div class='short'>" . $slogan . '</div>'
207
+    . $i
208
+    . '</div>';
209 209
 }
210 210
 
211 211
 function plugin_desintalle($plug_file, $nom, $dir_plugins = null) {
212
-	if (!$dir_plugins) {
213
-		$dir_plugins = _DIR_PLUGINS;
214
-	}
212
+    if (!$dir_plugins) {
213
+        $dir_plugins = _DIR_PLUGINS;
214
+    }
215 215
 
216
-	$action = redirige_action_auteur('desinstaller_plugin', "$dir_plugins::$plug_file", 'admin_plugin');
217
-	$text = _T('bouton_desinstaller');
218
-	$text2 = _T('info_desinstaller_plugin');
219
-	$file = basename($plug_file);
216
+    $action = redirige_action_auteur('desinstaller_plugin', "$dir_plugins::$plug_file", 'admin_plugin');
217
+    $text = _T('bouton_desinstaller');
218
+    $text2 = _T('info_desinstaller_plugin');
219
+    $file = basename($plug_file);
220 220
 
221
-	return "<div class='actions'>[" .
222
-	"<a href='$action'
221
+    return "<div class='actions'>[" .
222
+    "<a href='$action'
223 223
 		onclick='return confirm(\"$text $nom ?\\n$text2\")'>"
224
-	. $text
225
-	. '</a>]</div>';
224
+    . $text
225
+    . '</a>]</div>';
226 226
 }
227 227
 
228 228
 /**
@@ -236,145 +236,145 @@  discard block
 block discarded – undo
236 236
  *     Traduction de l'état dans la langue en cours
237 237
  **/
238 238
 function plugin_etat_en_clair($etat) {
239
-	if (!in_array($etat, ['stable', 'test', 'experimental'])) {
240
-		$etat = 'developpement';
241
-	}
239
+    if (!in_array($etat, ['stable', 'test', 'experimental'])) {
240
+        $etat = 'developpement';
241
+    }
242 242
 
243
-	return _T('plugin_etat_' . $etat);
243
+    return _T('plugin_etat_' . $etat);
244 244
 }
245 245
 
246 246
 function plugin_propre($texte, $module = '', $propre = 'propre') {
247
-	// retirer le retour a la racine du module, car le find_in_path se fait depuis la racine
248
-	if (_DIR_RACINE and strncmp($module, _DIR_RACINE, strlen(_DIR_RACINE)) == 0) {
249
-		$module = substr($module, strlen(_DIR_RACINE));
250
-	}
251
-	if (preg_match('|^\w+_[\w_]+$|', $texte)) {
252
-		$texte = _T(($module ? "$module:" : '') . $texte, [], ['force' => false]);
253
-	}
254
-
255
-	return $propre($texte);
247
+    // retirer le retour a la racine du module, car le find_in_path se fait depuis la racine
248
+    if (_DIR_RACINE and strncmp($module, _DIR_RACINE, strlen(_DIR_RACINE)) == 0) {
249
+        $module = substr($module, strlen(_DIR_RACINE));
250
+    }
251
+    if (preg_match('|^\w+_[\w_]+$|', $texte)) {
252
+        $texte = _T(($module ? "$module:" : '') . $texte, [], ['force' => false]);
253
+    }
254
+
255
+    return $propre($texte);
256 256
 }
257 257
 
258 258
 function plugin_typo($texte, $module = '') {
259
-	return plugin_propre($texte, $module, 'typo');
259
+    return plugin_propre($texte, $module, 'typo');
260 260
 }
261 261
 
262 262
 
263 263
 function affiche_bloc_plugin($plug_file, $info, $dir_plugins = null) {
264
-	$log = null;
265
-	if (!$dir_plugins) {
266
-		$dir_plugins = _DIR_PLUGINS;
267
-	}
268
-
269
-	$prefix = $info['prefix'];
270
-	$dir = "$dir_plugins$plug_file/lang/paquet-$prefix";
271
-
272
-	$s = '';
273
-	// TODO: le traiter_multi ici n'est pas beau
274
-	// cf. description du plugin/_stable_/ortho/plugin.xml
275
-	// concerne les anciens plugin.xml donc on devrait plus en avoir besoin
276
-	$description = '';
277
-	if (isset($info['description'])) {
278
-		$description = plugin_propre($info['description'], $dir);
279
-	}
280
-
281
-	if (
282
-		isset($info['documentation'])
283
-		and $lien = $info['documentation']
284
-	) {
285
-		$description .= "<p><em class='site'><a href='$lien' class='spip_out'>" . _T('en_savoir_plus') . '</a></em></p>';
286
-	}
287
-	$s .= "<dd class='desc'>" . $description . "</dd>\n";
288
-
289
-	if (isset($info['auteur'])) {
290
-		if (is_array($info['auteur'])) {
291
-			$a = formater_credits($info['auteur'], ', ');
292
-		} // pour compat mais ne doit plus arriver
293
-		else {
294
-			$a = trim($info['auteur']);
295
-		}
296
-		if ($a) {
297
-			$s .= "<dt class='auteurs'>" . _T('public:par_auteur') . "</dt><dd class='auteurs'>" . PtoBR(propre(
298
-				$a,
299
-				$dir
300
-			)) . "</dd>\n";
301
-		}
302
-	}
303
-
304
-	if (isset($info['credit'])) {
305
-		if ($a = formater_credits($info['credit'], ', ')) {
306
-			$s .= "<dt class='credits'>" . _T('plugin_info_credit') . "</dt><dd class='credits'>" . PtoBR(propre(
307
-				$a,
308
-				$dir
309
-			)) . "</dd>\n";
310
-		}
311
-	}
312
-
313
-	if (isset($info['licence'])) {
314
-		if (is_array($info['licence'])) {
315
-			$a = formater_credits($info['licence'], ', ');
316
-		} // pour compat mais ne doit plus arriver
317
-		else {
318
-			$a = trim($info['licence']);
319
-		}
320
-		if ($a) {
321
-			$s .= "<dt class='licence'>" . _T('intitule_licence') . "</dt><dd class='licence'>" . PtoBR(propre(
322
-				$a,
323
-				$dir
324
-			)) . "</dd>\n";
325
-		}
326
-	}
327
-
328
-	$s = "<dl class='description'>$s</dl>";
329
-
330
-	//
331
-	// Ajouter les infos techniques
332
-	//
333
-	$infotech = [];
334
-
335
-	$version = '<dt>' . _T('version') . '</dt><dd>' . $info['version'];
336
-	// Version VCS
337
-	if ($vcs = version_vcs_courante($dir_plugins . $plug_file)) {
338
-		$version .= ' ' . $vcs;
339
-	}
340
-	$version .= '</dd>';
341
-	$infotech[] = $version;
342
-	$infotech[] = '<dt>' . _T('repertoire_plugins') . '</dt><dd>' . joli_repertoire("$dir_plugins$plug_file") . '</dd>';
343
-	// source zip le cas echeant
344
-	$infotech[] = (lire_fichier($dir_plugins . $plug_file . '/install.log', $log)
345
-		and preg_match(',^source:(.*)$,m', $log, $r))
346
-		? '<dt>' . _T('plugin_source') . '</dt><dd>' . trim($r[1]) . '</dd>'
347
-		: '';
348
-
349
-	$infotech[] = !$info['necessite'] ? '' :
350
-		('<dt>' . _T('plugin_info_necessite') . '</dt><dd>' . join(
351
-			' ',
352
-			array_map('array_shift', $info['necessite'])
353
-		) . '</dd>');
354
-
355
-	$s .= "<dl class='tech'>"
356
-		. join('', $infotech)
357
-		. '</dl>';
358
-
359
-
360
-	return $s;
264
+    $log = null;
265
+    if (!$dir_plugins) {
266
+        $dir_plugins = _DIR_PLUGINS;
267
+    }
268
+
269
+    $prefix = $info['prefix'];
270
+    $dir = "$dir_plugins$plug_file/lang/paquet-$prefix";
271
+
272
+    $s = '';
273
+    // TODO: le traiter_multi ici n'est pas beau
274
+    // cf. description du plugin/_stable_/ortho/plugin.xml
275
+    // concerne les anciens plugin.xml donc on devrait plus en avoir besoin
276
+    $description = '';
277
+    if (isset($info['description'])) {
278
+        $description = plugin_propre($info['description'], $dir);
279
+    }
280
+
281
+    if (
282
+        isset($info['documentation'])
283
+        and $lien = $info['documentation']
284
+    ) {
285
+        $description .= "<p><em class='site'><a href='$lien' class='spip_out'>" . _T('en_savoir_plus') . '</a></em></p>';
286
+    }
287
+    $s .= "<dd class='desc'>" . $description . "</dd>\n";
288
+
289
+    if (isset($info['auteur'])) {
290
+        if (is_array($info['auteur'])) {
291
+            $a = formater_credits($info['auteur'], ', ');
292
+        } // pour compat mais ne doit plus arriver
293
+        else {
294
+            $a = trim($info['auteur']);
295
+        }
296
+        if ($a) {
297
+            $s .= "<dt class='auteurs'>" . _T('public:par_auteur') . "</dt><dd class='auteurs'>" . PtoBR(propre(
298
+                $a,
299
+                $dir
300
+            )) . "</dd>\n";
301
+        }
302
+    }
303
+
304
+    if (isset($info['credit'])) {
305
+        if ($a = formater_credits($info['credit'], ', ')) {
306
+            $s .= "<dt class='credits'>" . _T('plugin_info_credit') . "</dt><dd class='credits'>" . PtoBR(propre(
307
+                $a,
308
+                $dir
309
+            )) . "</dd>\n";
310
+        }
311
+    }
312
+
313
+    if (isset($info['licence'])) {
314
+        if (is_array($info['licence'])) {
315
+            $a = formater_credits($info['licence'], ', ');
316
+        } // pour compat mais ne doit plus arriver
317
+        else {
318
+            $a = trim($info['licence']);
319
+        }
320
+        if ($a) {
321
+            $s .= "<dt class='licence'>" . _T('intitule_licence') . "</dt><dd class='licence'>" . PtoBR(propre(
322
+                $a,
323
+                $dir
324
+            )) . "</dd>\n";
325
+        }
326
+    }
327
+
328
+    $s = "<dl class='description'>$s</dl>";
329
+
330
+    //
331
+    // Ajouter les infos techniques
332
+    //
333
+    $infotech = [];
334
+
335
+    $version = '<dt>' . _T('version') . '</dt><dd>' . $info['version'];
336
+    // Version VCS
337
+    if ($vcs = version_vcs_courante($dir_plugins . $plug_file)) {
338
+        $version .= ' ' . $vcs;
339
+    }
340
+    $version .= '</dd>';
341
+    $infotech[] = $version;
342
+    $infotech[] = '<dt>' . _T('repertoire_plugins') . '</dt><dd>' . joli_repertoire("$dir_plugins$plug_file") . '</dd>';
343
+    // source zip le cas echeant
344
+    $infotech[] = (lire_fichier($dir_plugins . $plug_file . '/install.log', $log)
345
+        and preg_match(',^source:(.*)$,m', $log, $r))
346
+        ? '<dt>' . _T('plugin_source') . '</dt><dd>' . trim($r[1]) . '</dd>'
347
+        : '';
348
+
349
+    $infotech[] = !$info['necessite'] ? '' :
350
+        ('<dt>' . _T('plugin_info_necessite') . '</dt><dd>' . join(
351
+            ' ',
352
+            array_map('array_shift', $info['necessite'])
353
+        ) . '</dd>');
354
+
355
+    $s .= "<dl class='tech'>"
356
+        . join('', $infotech)
357
+        . '</dl>';
358
+
359
+
360
+    return $s;
361 361
 }
362 362
 
363 363
 function formater_credits($infos, $sep = ', ') {
364
-	$texte = '';
365
-
366
-	foreach ($infos as $_credit) {
367
-		if ($texte) {
368
-			$texte .= $sep;
369
-		}
370
-		// Si le credit en cours n'est pas un array c'est donc un copyright
371
-		$texte .=
372
-			(!is_array($_credit))
373
-				? PtoBR(propre($_credit))
374
-				: ($_credit['url'] ? '<a href="' . $_credit['url'] . '">' : '') .
375
-				$_credit['nom'] .
376
-				($_credit['url'] ? '</a>' : '');
377
-	}
378
-
379
-	return $texte;
364
+    $texte = '';
365
+
366
+    foreach ($infos as $_credit) {
367
+        if ($texte) {
368
+            $texte .= $sep;
369
+        }
370
+        // Si le credit en cours n'est pas un array c'est donc un copyright
371
+        $texte .=
372
+            (!is_array($_credit))
373
+                ? PtoBR(propre($_credit))
374
+                : ($_credit['url'] ? '<a href="' . $_credit['url'] . '">' : '') .
375
+                $_credit['nom'] .
376
+                ($_credit['url'] ? '</a>' : '');
377
+    }
378
+
379
+    return $texte;
380 380
 }
Please login to merge, or discard this patch.