Completed
Push — master ( 220241...0d968e )
by cam
01:07
created
ecrire/lang/spip_pt.php 1 patch
Indentation   +644 added lines, -644 removed lines patch added patch discarded remove patch
@@ -4,571 +4,571 @@  discard block
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'access_interface_graphique' => 'Voltar à interface gráfica completa',
14
-	'access_mode_texte' => 'Exibir a interface textual simplificada',
15
-	'admin_debug' => 'debug',
16
-	'admin_modifier_article' => 'Modificar este artigo',
17
-	'admin_modifier_auteur' => 'Modificar este autor',
18
-	'admin_modifier_breve' => 'Modificar esta notícia',
19
-	'admin_modifier_mot' => 'Modificar esta palavra-chave',
20
-	'admin_modifier_rubrique' => 'Modificar esta rubrica',
21
-	'admin_recalculer' => 'Recompor esta página',
22
-	'afficher_calendrier' => 'Exibir o calendário',
23
-	'afficher_trad' => 'exibir as traduções',
24
-	'alerte_maj_impossible' => '<b>Alerta !</b> A actualização da base de dados SQL para a versão @version@ é impossível, talvez por causa de um problema de permissão de modificação na base de dados. Por favor contacte o seu serviço de hospedagem.',
25
-	'alerte_modif_info_concourante' => 'ATTENÇÃO : Esta informação já foi modificada noutro menu. O valor actual é :',
26
-	'analyse_xml' => 'Análise XML',
27
-	'annuler' => 'Cancelar',
28
-	'antispam_champ_vide' => 'Por favor deixe este campo vazio :',
29
-	'articles_recents' => 'Artigos mais recentes',
30
-	'avis_archive_incorrect' => 'o ficheiro arquivo não é um ficheiro SPIP',
31
-	'avis_archive_invalide' => 'o ficheiro arquivo não é válido ',
32
-	'avis_attention' => ' ATENÇÂO!',
33
-	'avis_champ_incorrect_type_objet' => 'Nome de campo incorrecto @name@ para objecto de tipo @type@',
34
-	'avis_colonne_inexistante' => 'A coluna  @col@ não existe',
35
-	'avis_erreur' => 'Erro: ver mais abaixo',
36
-	'avis_erreur_connexion' => 'Erro de ligação ',
37
-	'avis_erreur_cookie' => 'problema de cookie',
38
-	'avis_erreur_fonction_contexte' => 'Erro de programação. Não se pode chamar esta função neste contexto.',
39
-	'avis_erreur_mysql' => 'Erro SQL',
40
-	'avis_erreur_sauvegarde' => 'Erro na cópia de segurança  (@type@ @id_objet@) !',
41
-	'avis_erreur_visiteur' => 'Problema de acesso à área privada',
12
+    // A
13
+    'access_interface_graphique' => 'Voltar à interface gráfica completa',
14
+    'access_mode_texte' => 'Exibir a interface textual simplificada',
15
+    'admin_debug' => 'debug',
16
+    'admin_modifier_article' => 'Modificar este artigo',
17
+    'admin_modifier_auteur' => 'Modificar este autor',
18
+    'admin_modifier_breve' => 'Modificar esta notícia',
19
+    'admin_modifier_mot' => 'Modificar esta palavra-chave',
20
+    'admin_modifier_rubrique' => 'Modificar esta rubrica',
21
+    'admin_recalculer' => 'Recompor esta página',
22
+    'afficher_calendrier' => 'Exibir o calendário',
23
+    'afficher_trad' => 'exibir as traduções',
24
+    'alerte_maj_impossible' => '<b>Alerta !</b> A actualização da base de dados SQL para a versão @version@ é impossível, talvez por causa de um problema de permissão de modificação na base de dados. Por favor contacte o seu serviço de hospedagem.',
25
+    'alerte_modif_info_concourante' => 'ATTENÇÃO : Esta informação já foi modificada noutro menu. O valor actual é :',
26
+    'analyse_xml' => 'Análise XML',
27
+    'annuler' => 'Cancelar',
28
+    'antispam_champ_vide' => 'Por favor deixe este campo vazio :',
29
+    'articles_recents' => 'Artigos mais recentes',
30
+    'avis_archive_incorrect' => 'o ficheiro arquivo não é um ficheiro SPIP',
31
+    'avis_archive_invalide' => 'o ficheiro arquivo não é válido ',
32
+    'avis_attention' => ' ATENÇÂO!',
33
+    'avis_champ_incorrect_type_objet' => 'Nome de campo incorrecto @name@ para objecto de tipo @type@',
34
+    'avis_colonne_inexistante' => 'A coluna  @col@ não existe',
35
+    'avis_erreur' => 'Erro: ver mais abaixo',
36
+    'avis_erreur_connexion' => 'Erro de ligação ',
37
+    'avis_erreur_cookie' => 'problema de cookie',
38
+    'avis_erreur_fonction_contexte' => 'Erro de programação. Não se pode chamar esta função neste contexto.',
39
+    'avis_erreur_mysql' => 'Erro SQL',
40
+    'avis_erreur_sauvegarde' => 'Erro na cópia de segurança  (@type@ @id_objet@) !',
41
+    'avis_erreur_visiteur' => 'Problema de acesso à área privada',
42 42
 
43
-	// B
44
-	'barre_a_accent_grave' => 'Inserir um A maiúsculo com acento grave',
45
-	'barre_aide' => 'Utilize as abreviaturas tipográficas para enriquecer a sua paginação.',
46
-	'barre_e_accent_aigu' => 'Inserir um E maiúsculo com acento agudo ',
47
-	'barre_eo' => 'Inserir um E no O',
48
-	'barre_eo_maj' => 'Inserir um E no O maiúsculo',
49
-	'barre_euro' => 'Inserir o símbolo €',
50
-	'barre_gras' => '  Escrever em {{negro}}',
51
-	'barre_guillemets' => 'Colocar entre "aspas" ',
52
-	'barre_guillemets_simples' => 'Colocar entre ’aspas simples’',
53
-	'barre_intertitre' => 'Transfomar em  {{{intertítulo}}} ',
54
-	'barre_italic' => 'Pôr em itálico ',
55
-	'barre_lien' => 'Transformar em [ligação hipertexto->http://...]',
56
-	'barre_lien_input' => 'Por favor indique o endereço da sua ligação (pode indicar um endereço Web sob a forma  http://www.monsite/com ou simplesmente indicar o número de um artigo deste sítio.) ',
57
-	'barre_note' => 'Transformar em  [[Nota de rodapé ]]',
58
-	'barre_paragraphe' => 'Criar um parágrafo',
59
-	'barre_quote' => '<quote>Citar uma  mensagem</quote>',
60
-	'bouton_changer' => 'Modificar',
61
-	'bouton_chercher' => 'Procurar',
62
-	'bouton_choisir' => 'Seleccionar',
63
-	'bouton_deplacer' => 'Mover',
64
-	'bouton_download' => 'Download',
65
-	'bouton_enregistrer' => 'Guardar',
66
-	'bouton_radio_desactiver_messagerie_interne' => 'Desactivar a caixa de correio interno',
67
-	'bouton_radio_envoi_annonces' => 'Enviar os anúncios editoriais',
68
-	'bouton_radio_non_envoi_annonces' => 'Não enviar anúncios',
69
-	'bouton_radio_non_envoi_liste_nouveautes' => 'Não enviar a lista das novidades',
70
-	'bouton_recharger_page' => 'recarregar esta página',
71
-	'bouton_telecharger' => 'Carregar',
72
-	'bouton_upload' => 'Carregar',
73
-	'bouton_valider' => 'Submeter',
43
+    // B
44
+    'barre_a_accent_grave' => 'Inserir um A maiúsculo com acento grave',
45
+    'barre_aide' => 'Utilize as abreviaturas tipográficas para enriquecer a sua paginação.',
46
+    'barre_e_accent_aigu' => 'Inserir um E maiúsculo com acento agudo ',
47
+    'barre_eo' => 'Inserir um E no O',
48
+    'barre_eo_maj' => 'Inserir um E no O maiúsculo',
49
+    'barre_euro' => 'Inserir o símbolo €',
50
+    'barre_gras' => '  Escrever em {{negro}}',
51
+    'barre_guillemets' => 'Colocar entre "aspas" ',
52
+    'barre_guillemets_simples' => 'Colocar entre ’aspas simples’',
53
+    'barre_intertitre' => 'Transfomar em  {{{intertítulo}}} ',
54
+    'barre_italic' => 'Pôr em itálico ',
55
+    'barre_lien' => 'Transformar em [ligação hipertexto->http://...]',
56
+    'barre_lien_input' => 'Por favor indique o endereço da sua ligação (pode indicar um endereço Web sob a forma  http://www.monsite/com ou simplesmente indicar o número de um artigo deste sítio.) ',
57
+    'barre_note' => 'Transformar em  [[Nota de rodapé ]]',
58
+    'barre_paragraphe' => 'Criar um parágrafo',
59
+    'barre_quote' => '<quote>Citar uma  mensagem</quote>',
60
+    'bouton_changer' => 'Modificar',
61
+    'bouton_chercher' => 'Procurar',
62
+    'bouton_choisir' => 'Seleccionar',
63
+    'bouton_deplacer' => 'Mover',
64
+    'bouton_download' => 'Download',
65
+    'bouton_enregistrer' => 'Guardar',
66
+    'bouton_radio_desactiver_messagerie_interne' => 'Desactivar a caixa de correio interno',
67
+    'bouton_radio_envoi_annonces' => 'Enviar os anúncios editoriais',
68
+    'bouton_radio_non_envoi_annonces' => 'Não enviar anúncios',
69
+    'bouton_radio_non_envoi_liste_nouveautes' => 'Não enviar a lista das novidades',
70
+    'bouton_recharger_page' => 'recarregar esta página',
71
+    'bouton_telecharger' => 'Carregar',
72
+    'bouton_upload' => 'Carregar',
73
+    'bouton_valider' => 'Submeter',
74 74
 
75
-	// C
76
-	'cal_apresmidi' => 'tarde',
77
-	'cal_jour_entier' => 'dia todo',
78
-	'cal_matin' => 'manhã',
79
-	'cal_par_jour' => 'calendário por dia',
80
-	'cal_par_mois' => 'calendário por mês',
81
-	'cal_par_semaine' => 'calendário por semana',
82
-	'choix_couleur_interface' => 'cor',
83
-	'choix_interface' => 'escolha da interface',
84
-	'colonne' => 'Coluna',
85
-	'confirm_changer_statut' => 'Atenção, solicitou a alteração do estatuto deste elemento. Deseja continuar?',
86
-	'correcte' => 'correcto',
75
+    // C
76
+    'cal_apresmidi' => 'tarde',
77
+    'cal_jour_entier' => 'dia todo',
78
+    'cal_matin' => 'manhã',
79
+    'cal_par_jour' => 'calendário por dia',
80
+    'cal_par_mois' => 'calendário por mês',
81
+    'cal_par_semaine' => 'calendário por semana',
82
+    'choix_couleur_interface' => 'cor',
83
+    'choix_interface' => 'escolha da interface',
84
+    'colonne' => 'Coluna',
85
+    'confirm_changer_statut' => 'Atenção, solicitou a alteração do estatuto deste elemento. Deseja continuar?',
86
+    'correcte' => 'correcto',
87 87
 
88
-	// D
89
-	'date_aujourdhui' => 'hoje',
90
-	'date_avant_jc' => 'a. J.C.',
91
-	'date_dans' => 'entre @delai@',
92
-	'date_de_mois_1' => '@j@ de @nommois@',
93
-	'date_de_mois_10' => '@j@ de @nommois@',
94
-	'date_de_mois_11' => '@j@ de @nommois@',
95
-	'date_de_mois_12' => '@j@ de @nommois@',
96
-	'date_de_mois_2' => '@j@ de @nommois@',
97
-	'date_de_mois_3' => '@j@ de @nommois@',
98
-	'date_de_mois_4' => '@j@ de @nommois@',
99
-	'date_de_mois_5' => '@j@ de @nommois@',
100
-	'date_de_mois_6' => '@j@ de @nommois@',
101
-	'date_de_mois_7' => '@j@ de @nommois@',
102
-	'date_de_mois_8' => '@j@ de @nommois@',
103
-	'date_de_mois_9' => '@j@ de @nommois@',
104
-	'date_demain' => 'amanhã',
105
-	'date_fmt_heures_minutes' => '@h@h@m@min',
106
-	'date_fmt_heures_minutes_court' => '@h@:@m@',
107
-	'date_fmt_jour' => '@nomjour@ @jour@',
108
-	'date_fmt_jour_heure' => '@jour@ a @heure@',
109
-	'date_fmt_jour_heure_debut_fin' => '@jour@ de @heure_debut@ a @heure_fin@', # MODIF
110
-	'date_fmt_jour_heure_debut_fin_abbr' => '@dtstart@@jour@ de @heure_debut@@dtabbr@ a @dtstart@@heure_fin@@dtend@', # MODIF
111
-	'date_fmt_jour_mois' => '@jour@ de @nommois@',
112
-	'date_fmt_jour_mois_annee' => '@jour@ de @nommois@ de @annee@',
113
-	'date_fmt_mois_annee' => '@nommois@ de @annee@',
114
-	'date_fmt_nomjour' => '@nomjour@ @date@',
115
-	'date_fmt_nomjour_date' => ' @nomjour@ @date@',
116
-	'date_fmt_periode' => 'De @date_debut@ a @date_fin@',
117
-	'date_fmt_periode_abbr' => 'De @dtart@@date_debut@@dtabbr@ a @dtend@@date_fin@@dtabbr@',
118
-	'date_fmt_periode_from' => 'De',
119
-	'date_fmt_periode_to' => 'a',
120
-	'date_heures' => 'horas',
121
-	'date_hier' => 'ontem',
122
-	'date_il_y_a' => 'há @delai@',
123
-	'date_jnum1' => '1',
124
-	'date_jnum10' => '10',
125
-	'date_jnum11' => '11',
126
-	'date_jnum12' => '12',
127
-	'date_jnum13' => '13',
128
-	'date_jnum14' => '14',
129
-	'date_jnum15' => '15',
130
-	'date_jnum16' => '16',
131
-	'date_jnum17' => '17',
132
-	'date_jnum18' => '18',
133
-	'date_jnum19' => '19',
134
-	'date_jnum2' => '2',
135
-	'date_jnum20' => '20',
136
-	'date_jnum21' => '21',
137
-	'date_jnum22' => '22',
138
-	'date_jnum23' => '23',
139
-	'date_jnum24' => '24',
140
-	'date_jnum25' => '25',
141
-	'date_jnum26' => '26',
142
-	'date_jnum27' => '27',
143
-	'date_jnum28' => '28',
144
-	'date_jnum29' => '29',
145
-	'date_jnum3' => '3',
146
-	'date_jnum30' => '30',
147
-	'date_jnum31' => '31',
148
-	'date_jnum4' => '4',
149
-	'date_jnum5' => '5',
150
-	'date_jnum6' => '6',
151
-	'date_jnum7' => '7',
152
-	'date_jnum8' => '8',
153
-	'date_jnum9' => '9',
154
-	'date_jour_1' => 'domingo',
155
-	'date_jour_1_abbr' => 'Dom.',
156
-	'date_jour_1_initiale' => 'D.',
157
-	'date_jour_2' => 'segunda-feira',
158
-	'date_jour_2_abbr' => 'Seg.',
159
-	'date_jour_2_initiale' => 'S.',
160
-	'date_jour_3' => 'terça-feira',
161
-	'date_jour_3_abbr' => 'Ter.',
162
-	'date_jour_3_initiale' => 'T.',
163
-	'date_jour_4' => 'quarta-feira',
164
-	'date_jour_4_abbr' => 'Qua.',
165
-	'date_jour_4_initiale' => 'Q.',
166
-	'date_jour_5' => 'quinta-feira',
167
-	'date_jour_5_abbr' => 'Qui.',
168
-	'date_jour_5_initiale' => 'Q.',
169
-	'date_jour_6' => 'sexta-feira',
170
-	'date_jour_6_abbr' => 'Sex.',
171
-	'date_jour_6_initiale' => 'S.',
172
-	'date_jour_7' => 'sábado',
173
-	'date_jour_7_abbr' => 'Sab.',
174
-	'date_jour_7_initiale' => 'S.',
175
-	'date_jours' => 'dias',
176
-	'date_minutes' => 'minutos',
177
-	'date_mois' => 'meses',
178
-	'date_mois_1' => 'Janeiro',
179
-	'date_mois_10' => 'Outubro',
180
-	'date_mois_10_abbr' => 'Out.',
181
-	'date_mois_11' => 'Novembro',
182
-	'date_mois_11_abbr' => 'Nov.',
183
-	'date_mois_12' => 'Dezembro',
184
-	'date_mois_12_abbr' => 'Dez.',
185
-	'date_mois_1_abbr' => 'Jan.',
186
-	'date_mois_2' => 'Fevereiro',
187
-	'date_mois_2_abbr' => 'Feb.',
188
-	'date_mois_3' => 'Março',
189
-	'date_mois_3_abbr' => 'Mar',
190
-	'date_mois_4' => 'Abril',
191
-	'date_mois_4_abbr' => 'Abr.',
192
-	'date_mois_5' => 'Maio',
193
-	'date_mois_5_abbr' => 'Mai',
194
-	'date_mois_6' => 'Junho',
195
-	'date_mois_6_abbr' => 'Jun',
196
-	'date_mois_7' => 'Julho',
197
-	'date_mois_7_abbr' => 'Jul',
198
-	'date_mois_8' => 'Agosto',
199
-	'date_mois_8_abbr' => 'Ago',
200
-	'date_mois_9' => 'Setembro',
201
-	'date_mois_9_abbr' => 'Set',
202
-	'date_saison_1' => 'inverno',
203
-	'date_saison_2' => 'primavera',
204
-	'date_saison_3' => 'verão',
205
-	'date_saison_4' => 'outono',
206
-	'date_secondes' => 'segundos',
207
-	'date_semaines' => 'semanas',
208
-	'date_un_mois' => 'mês',
209
-	'date_une_heure' => 'hora',
210
-	'date_une_minute' => 'minuto',
211
-	'date_une_seconde' => 'segundo',
212
-	'date_une_semaine' => 'semana',
213
-	'dirs_commencer' => 'a fim de começar realmente a instalação',
214
-	'dirs_preliminaire' => 'Preliminar : <b>Configurar os direitos de acesso</b>',
215
-	'dirs_probleme_droits' => 'Problema de direitos de acesso',
216
-	'dirs_repertoires_absents' => '<b>Os seguintes directórios não foram encontrados : <ul>@bad_dirs@.</ul> </b>
88
+    // D
89
+    'date_aujourdhui' => 'hoje',
90
+    'date_avant_jc' => 'a. J.C.',
91
+    'date_dans' => 'entre @delai@',
92
+    'date_de_mois_1' => '@j@ de @nommois@',
93
+    'date_de_mois_10' => '@j@ de @nommois@',
94
+    'date_de_mois_11' => '@j@ de @nommois@',
95
+    'date_de_mois_12' => '@j@ de @nommois@',
96
+    'date_de_mois_2' => '@j@ de @nommois@',
97
+    'date_de_mois_3' => '@j@ de @nommois@',
98
+    'date_de_mois_4' => '@j@ de @nommois@',
99
+    'date_de_mois_5' => '@j@ de @nommois@',
100
+    'date_de_mois_6' => '@j@ de @nommois@',
101
+    'date_de_mois_7' => '@j@ de @nommois@',
102
+    'date_de_mois_8' => '@j@ de @nommois@',
103
+    'date_de_mois_9' => '@j@ de @nommois@',
104
+    'date_demain' => 'amanhã',
105
+    'date_fmt_heures_minutes' => '@h@h@m@min',
106
+    'date_fmt_heures_minutes_court' => '@h@:@m@',
107
+    'date_fmt_jour' => '@nomjour@ @jour@',
108
+    'date_fmt_jour_heure' => '@jour@ a @heure@',
109
+    'date_fmt_jour_heure_debut_fin' => '@jour@ de @heure_debut@ a @heure_fin@', # MODIF
110
+    'date_fmt_jour_heure_debut_fin_abbr' => '@dtstart@@jour@ de @heure_debut@@dtabbr@ a @dtstart@@heure_fin@@dtend@', # MODIF
111
+    'date_fmt_jour_mois' => '@jour@ de @nommois@',
112
+    'date_fmt_jour_mois_annee' => '@jour@ de @nommois@ de @annee@',
113
+    'date_fmt_mois_annee' => '@nommois@ de @annee@',
114
+    'date_fmt_nomjour' => '@nomjour@ @date@',
115
+    'date_fmt_nomjour_date' => ' @nomjour@ @date@',
116
+    'date_fmt_periode' => 'De @date_debut@ a @date_fin@',
117
+    'date_fmt_periode_abbr' => 'De @dtart@@date_debut@@dtabbr@ a @dtend@@date_fin@@dtabbr@',
118
+    'date_fmt_periode_from' => 'De',
119
+    'date_fmt_periode_to' => 'a',
120
+    'date_heures' => 'horas',
121
+    'date_hier' => 'ontem',
122
+    'date_il_y_a' => 'há @delai@',
123
+    'date_jnum1' => '1',
124
+    'date_jnum10' => '10',
125
+    'date_jnum11' => '11',
126
+    'date_jnum12' => '12',
127
+    'date_jnum13' => '13',
128
+    'date_jnum14' => '14',
129
+    'date_jnum15' => '15',
130
+    'date_jnum16' => '16',
131
+    'date_jnum17' => '17',
132
+    'date_jnum18' => '18',
133
+    'date_jnum19' => '19',
134
+    'date_jnum2' => '2',
135
+    'date_jnum20' => '20',
136
+    'date_jnum21' => '21',
137
+    'date_jnum22' => '22',
138
+    'date_jnum23' => '23',
139
+    'date_jnum24' => '24',
140
+    'date_jnum25' => '25',
141
+    'date_jnum26' => '26',
142
+    'date_jnum27' => '27',
143
+    'date_jnum28' => '28',
144
+    'date_jnum29' => '29',
145
+    'date_jnum3' => '3',
146
+    'date_jnum30' => '30',
147
+    'date_jnum31' => '31',
148
+    'date_jnum4' => '4',
149
+    'date_jnum5' => '5',
150
+    'date_jnum6' => '6',
151
+    'date_jnum7' => '7',
152
+    'date_jnum8' => '8',
153
+    'date_jnum9' => '9',
154
+    'date_jour_1' => 'domingo',
155
+    'date_jour_1_abbr' => 'Dom.',
156
+    'date_jour_1_initiale' => 'D.',
157
+    'date_jour_2' => 'segunda-feira',
158
+    'date_jour_2_abbr' => 'Seg.',
159
+    'date_jour_2_initiale' => 'S.',
160
+    'date_jour_3' => 'terça-feira',
161
+    'date_jour_3_abbr' => 'Ter.',
162
+    'date_jour_3_initiale' => 'T.',
163
+    'date_jour_4' => 'quarta-feira',
164
+    'date_jour_4_abbr' => 'Qua.',
165
+    'date_jour_4_initiale' => 'Q.',
166
+    'date_jour_5' => 'quinta-feira',
167
+    'date_jour_5_abbr' => 'Qui.',
168
+    'date_jour_5_initiale' => 'Q.',
169
+    'date_jour_6' => 'sexta-feira',
170
+    'date_jour_6_abbr' => 'Sex.',
171
+    'date_jour_6_initiale' => 'S.',
172
+    'date_jour_7' => 'sábado',
173
+    'date_jour_7_abbr' => 'Sab.',
174
+    'date_jour_7_initiale' => 'S.',
175
+    'date_jours' => 'dias',
176
+    'date_minutes' => 'minutos',
177
+    'date_mois' => 'meses',
178
+    'date_mois_1' => 'Janeiro',
179
+    'date_mois_10' => 'Outubro',
180
+    'date_mois_10_abbr' => 'Out.',
181
+    'date_mois_11' => 'Novembro',
182
+    'date_mois_11_abbr' => 'Nov.',
183
+    'date_mois_12' => 'Dezembro',
184
+    'date_mois_12_abbr' => 'Dez.',
185
+    'date_mois_1_abbr' => 'Jan.',
186
+    'date_mois_2' => 'Fevereiro',
187
+    'date_mois_2_abbr' => 'Feb.',
188
+    'date_mois_3' => 'Março',
189
+    'date_mois_3_abbr' => 'Mar',
190
+    'date_mois_4' => 'Abril',
191
+    'date_mois_4_abbr' => 'Abr.',
192
+    'date_mois_5' => 'Maio',
193
+    'date_mois_5_abbr' => 'Mai',
194
+    'date_mois_6' => 'Junho',
195
+    'date_mois_6_abbr' => 'Jun',
196
+    'date_mois_7' => 'Julho',
197
+    'date_mois_7_abbr' => 'Jul',
198
+    'date_mois_8' => 'Agosto',
199
+    'date_mois_8_abbr' => 'Ago',
200
+    'date_mois_9' => 'Setembro',
201
+    'date_mois_9_abbr' => 'Set',
202
+    'date_saison_1' => 'inverno',
203
+    'date_saison_2' => 'primavera',
204
+    'date_saison_3' => 'verão',
205
+    'date_saison_4' => 'outono',
206
+    'date_secondes' => 'segundos',
207
+    'date_semaines' => 'semanas',
208
+    'date_un_mois' => 'mês',
209
+    'date_une_heure' => 'hora',
210
+    'date_une_minute' => 'minuto',
211
+    'date_une_seconde' => 'segundo',
212
+    'date_une_semaine' => 'semana',
213
+    'dirs_commencer' => 'a fim de começar realmente a instalação',
214
+    'dirs_preliminaire' => 'Preliminar : <b>Configurar os direitos de acesso</b>',
215
+    'dirs_probleme_droits' => 'Problema de direitos de acesso',
216
+    'dirs_repertoires_absents' => '<b>Os seguintes directórios não foram encontrados : <ul>@bad_dirs@.</ul> </b>
217 217
   <p>É provável que resulte de um problema de má colocação de maiúsculas ou minúsculas.
218 218
   Verifique que as minúsculas e maiúsculas destes directórios concordam com o que está exibido
219 219
  acima; se não for o caso, renomeie os repertórios com o seu software FTP de modo a corrigir o erro.
220 220
   <p>Terminada esta operação, poderá</p>',
221
-	'dirs_repertoires_suivants' => '<b>Os seguintes directórios não estão acessíveis para escrita: <ul>@bad_dirs@.</ul> </b>
221
+    'dirs_repertoires_suivants' => '<b>Os seguintes directórios não estão acessíveis para escrita: <ul>@bad_dirs@.</ul> </b>
222 222
   <p>Para corrigir, utilize o seu programa de FTP para configurar os direitos de acesso de cada um
223 223
   destes directórios. O procedimento está explicado em detalhe no manual de instalação.
224 224
   <p>Uma vez efectuada esta alteração, poderá',
225
-	'double_occurrence' => 'Dupla ocorrência de @balise@',
225
+    'double_occurrence' => 'Dupla ocorrência de @balise@',
226 226
 
227
-	// E
228
-	'en_cours' => 'em curso',
229
-	'envoi_via_le_site' => 'Envio pelo sítio',
230
-	'erreur' => 'Erro',
231
-	'erreur_balise_non_fermee' => 'última tag não fechada :',
232
-	'erreur_technique_ajaxform' => 'Ooops. Uum erro inesperado impediu o formulário de ser enviado. Por favor tente novamente.',
233
-	'erreur_technique_enregistrement_champs' => 'Um erro técnico impediu o registo correcto do campo @champs@.',
234
-	'erreur_technique_enregistrement_impossible' => 'Um erro técnico impediu o registo.',
235
-	'erreur_texte' => 'erro(s)',
236
-	'etape' => 'Etapa',
227
+    // E
228
+    'en_cours' => 'em curso',
229
+    'envoi_via_le_site' => 'Envio pelo sítio',
230
+    'erreur' => 'Erro',
231
+    'erreur_balise_non_fermee' => 'última tag não fechada :',
232
+    'erreur_technique_ajaxform' => 'Ooops. Uum erro inesperado impediu o formulário de ser enviado. Por favor tente novamente.',
233
+    'erreur_technique_enregistrement_champs' => 'Um erro técnico impediu o registo correcto do campo @champs@.',
234
+    'erreur_technique_enregistrement_impossible' => 'Um erro técnico impediu o registo.',
235
+    'erreur_texte' => 'erro(s)',
236
+    'etape' => 'Etapa',
237 237
 
238
-	// F
239
-	'fichier_introuvable' => 'Ficheiro @fichier@ não localizado', # MODIF
240
-	'form_auteur_confirmation' => 'Confirme o seu endereço e-mail',
241
-	'form_auteur_email_modifie' => 'O seu endereço e-mail foi alterado.',
242
-	'form_auteur_envoi_mail_confirmation' => 'Um e-mail de confirmação foi enviado para @email@. Para validar o seu endereço de e-mail, deve abrir o endereço Web mencionado na mensagem.',
243
-	'form_auteur_mail_confirmation' => 'Olá,
238
+    // F
239
+    'fichier_introuvable' => 'Ficheiro @fichier@ não localizado', # MODIF
240
+    'form_auteur_confirmation' => 'Confirme o seu endereço e-mail',
241
+    'form_auteur_email_modifie' => 'O seu endereço e-mail foi alterado.',
242
+    'form_auteur_envoi_mail_confirmation' => 'Um e-mail de confirmação foi enviado para @email@. Para validar o seu endereço de e-mail, deve abrir o endereço Web mencionado na mensagem.',
243
+    'form_auteur_mail_confirmation' => 'Olá,
244 244
 
245 245
 Pediu para alterar o seu endereço e-mail. Para confirmar o seu novo endereço, precisa de se conectar ao endereço abaixo (caso contrário, o seu pedido será ignorado) :
246 246
 
247 247
     @url@
248 248
 ',
249
-	'form_deja_inscrit' => 'Já está inscrito.',
250
-	'form_email_non_valide' => 'O seu endereço email não é válido',
251
-	'form_forum_access_refuse' => 'Você já não tem acesso a este sítio',
252
-	'form_forum_bonjour' => 'Bom dia @nom@,',
253
-	'form_forum_confirmer_email' => 'Para confirmar o seu endereço e-maill, abra esta ligação : @url_confirm@',
254
-	'form_forum_email_deja_enregistre' => 'Este endereço e-mail já está registado,pode portanto utilizar a sua palavra-passe habitual',
255
-	'form_forum_identifiant_mail' => 'O seu novo identificador acabou de lhe ser enviado por email.',
256
-	'form_forum_identifiants' => 'Identificadores pessoais',
257
-	'form_forum_indiquer_nom_email' => 'Indicar aqui o seu nome e o seu endereço email. O seu identificador pessoal ser-lhe-á enviado rapidamente por correio electrónico.',
258
-	'form_forum_login' => 'login:',
259
-	'form_forum_message_auto' => '(esta é uma mensagem automática)',
260
-	'form_forum_pass' => 'palavra-passe',
261
-	'form_forum_probleme_mail' => 'Problema de mail :o identificador não pôde ser enviado',
262
-	'form_forum_voici1' => 'Aqui estão os seus dados para poder aceder ao sítio Internet do  "@nom_site_spip@" (@adresse_site@):',
263
-	'form_forum_voici2' => 'Eis os seus identificadores para propor artigos no
249
+    'form_deja_inscrit' => 'Já está inscrito.',
250
+    'form_email_non_valide' => 'O seu endereço email não é válido',
251
+    'form_forum_access_refuse' => 'Você já não tem acesso a este sítio',
252
+    'form_forum_bonjour' => 'Bom dia @nom@,',
253
+    'form_forum_confirmer_email' => 'Para confirmar o seu endereço e-maill, abra esta ligação : @url_confirm@',
254
+    'form_forum_email_deja_enregistre' => 'Este endereço e-mail já está registado,pode portanto utilizar a sua palavra-passe habitual',
255
+    'form_forum_identifiant_mail' => 'O seu novo identificador acabou de lhe ser enviado por email.',
256
+    'form_forum_identifiants' => 'Identificadores pessoais',
257
+    'form_forum_indiquer_nom_email' => 'Indicar aqui o seu nome e o seu endereço email. O seu identificador pessoal ser-lhe-á enviado rapidamente por correio electrónico.',
258
+    'form_forum_login' => 'login:',
259
+    'form_forum_message_auto' => '(esta é uma mensagem automática)',
260
+    'form_forum_pass' => 'palavra-passe',
261
+    'form_forum_probleme_mail' => 'Problema de mail :o identificador não pôde ser enviado',
262
+    'form_forum_voici1' => 'Aqui estão os seus dados para poder aceder ao sítio Internet do  "@nom_site_spip@" (@adresse_site@):',
263
+    'form_forum_voici2' => 'Eis os seus identificadores para propor artigos no
264 264
  sítio "@nom_site_spip@" (@adresse_login@):',
265
-	'form_indiquer_email' => 'Por favor indique o seu endereço email.',
266
-	'form_indiquer_nom' => 'Por favor indique o seu nome.',
267
-	'form_indiquer_nom_site' => 'Por favor indique o nome do seu sítio.',
268
-	'form_pet_deja_enregistre' => 'Este sítio já está registado',
269
-	'form_pet_signature_pasprise' => 'A sua assinatura não está tomada em conta.',
270
-	'form_prop_confirmer_envoi' => 'Confirmar o envio',
271
-	'form_prop_description' => 'Descrição/comentário',
272
-	'form_prop_enregistre' => 'A sua proposta foi registada. Aparecerá online após a validação pelos responsáveis deste sítio.',
273
-	'form_prop_envoyer' => 'Enviar uma mensagem',
274
-	'form_prop_indiquer_email' => 'Por favor indique um endereço email válido',
275
-	'form_prop_indiquer_nom_site' => 'Por favor indique o nome do sítio.',
276
-	'form_prop_indiquer_sujet' => 'Por favor indique um tema',
277
-	'form_prop_message_envoye' => 'Mensagem enviada',
278
-	'form_prop_non_enregistre' => 'A sua proposta não foi registada.',
279
-	'form_prop_sujet' => 'Tema',
280
-	'form_prop_url_site' => 'Endereço (URL) do sítio',
281
-	'forum_non_inscrit' => 'Não está inscrito, ou o endereço ou a palavra-passe estão errados.',
282
-	'forum_par_auteur' => 'por @auteur@',
283
-	'forum_titre_erreur' => 'Erro...',
265
+    'form_indiquer_email' => 'Por favor indique o seu endereço email.',
266
+    'form_indiquer_nom' => 'Por favor indique o seu nome.',
267
+    'form_indiquer_nom_site' => 'Por favor indique o nome do seu sítio.',
268
+    'form_pet_deja_enregistre' => 'Este sítio já está registado',
269
+    'form_pet_signature_pasprise' => 'A sua assinatura não está tomada em conta.',
270
+    'form_prop_confirmer_envoi' => 'Confirmar o envio',
271
+    'form_prop_description' => 'Descrição/comentário',
272
+    'form_prop_enregistre' => 'A sua proposta foi registada. Aparecerá online após a validação pelos responsáveis deste sítio.',
273
+    'form_prop_envoyer' => 'Enviar uma mensagem',
274
+    'form_prop_indiquer_email' => 'Por favor indique um endereço email válido',
275
+    'form_prop_indiquer_nom_site' => 'Por favor indique o nome do sítio.',
276
+    'form_prop_indiquer_sujet' => 'Por favor indique um tema',
277
+    'form_prop_message_envoye' => 'Mensagem enviada',
278
+    'form_prop_non_enregistre' => 'A sua proposta não foi registada.',
279
+    'form_prop_sujet' => 'Tema',
280
+    'form_prop_url_site' => 'Endereço (URL) do sítio',
281
+    'forum_non_inscrit' => 'Não está inscrito, ou o endereço ou a palavra-passe estão errados.',
282
+    'forum_par_auteur' => 'por @auteur@',
283
+    'forum_titre_erreur' => 'Erro...',
284 284
 
285
-	// I
286
-	'ical_texte_rss_articles' => 'O ficheiro «backend» dos artigos deste sítio encontra-se neste endereço:',
287
-	'ical_texte_rss_articles2' => 'Pode igualmente obter os ficheiros «backend» para os artigos de cada rubrica do sítio:',
288
-	'ical_texte_rss_breves' => 'Existe também um ficheiro contendo notícias do sítio. Especificando um número de rubrica, obterá unicamente as notícias dessa rubrica.',
289
-	'icone_a_suivre' => 'Continua',
290
-	'icone_admin_site' => 'Administração do sítio',
291
-	'icone_agenda' => 'Agenda e correio',
292
-	'icone_aide_ligne' => 'Ajuda',
293
-	'icone_articles' => 'Artigos',
294
-	'icone_auteurs' => 'Autores',
295
-	'icone_brouteur' => 'Navegação rápida',
296
-	'icone_configuration_site' => 'Configuração',
297
-	'icone_configurer_site' => 'Configurar o seu sítio',
298
-	'icone_creer_nouvel_auteur' => 'Criar um novo autor',
299
-	'icone_creer_rubrique' => 'Criar uma rubrica',
300
-	'icone_creer_sous_rubrique' => 'Criar uma sub-rubrica',
301
-	'icone_deconnecter' => 'Sair',
302
-	'icone_discussions' => 'Discussões',
303
-	'icone_doc_rubrique' => 'Documentos das rubricas',
304
-	'icone_ecrire_article' => 'Escrever um novo artigo',
305
-	'icone_edition_site' => 'Edição',
306
-	'icone_gestion_langues' => 'Opções de idiomas',
307
-	'icone_informations_personnelles' => 'Informações pessoais',
308
-	'icone_interface_complet' => 'interface completa',
309
-	'icone_interface_simple' => 'Interface simplificada',
310
-	'icone_maintenance_site' => 'Manutenção do sítio',
311
-	'icone_messagerie_personnelle' => 'Mensagens privadas',
312
-	'icone_repartition_debut' => 'Exibir a distribuição desde o início',
313
-	'icone_rubriques' => 'Rubricas',
314
-	'icone_sauver_site' => 'Cópia de segurança do sítio',
315
-	'icone_site_entier' => 'Todo o sítio',
316
-	'icone_sites_references' => 'Sítios referenciados',
317
-	'icone_statistiques' => 'Estatísticas do sítio',
318
-	'icone_suivi_activite' => 'Acompanhar a actividade do sítio',
319
-	'icone_suivi_actualite' => 'Evolução do sítio',
320
-	'icone_suivi_pettions' => 'Seguir/gerir os abaixo-assinados',
321
-	'icone_suivi_revisions' => 'Modificações dos artigos',
322
-	'icone_supprimer_document' => 'Suprimir este documento',
323
-	'icone_supprimer_image' => 'Suprimir esta imagem',
324
-	'icone_tous_articles' => 'Todos os seus artigos',
325
-	'icone_tous_auteur' => 'Todos os autores',
326
-	'icone_tous_visiteur' => 'Todos os visitantes',
327
-	'icone_visiter_site' => 'Visitar o sítio público',
328
-	'icone_voir_en_ligne' => 'Ver online',
329
-	'img_indisponible' => 'imagem indisponível',
330
-	'impossible' => 'impossível',
331
-	'info_a_suivre' => 'A SEGUIR »',
332
-	'info_acces_interdit' => 'Acesso proibido',
333
-	'info_acces_refuse' => 'Acesso recusado',
334
-	'info_action' => 'Acção : @action@',
335
-	'info_administrer_rubriques' => 'Pode administrar esta rubrica e as suas sub-rubricas',
336
-	'info_adresse_non_indiquee' => 'Não indicou endereço a testar !',
337
-	'info_aide' => 'AJUDA',
338
-	'info_ajouter_mot' => 'Acrescentar esta palavra',
339
-	'info_annonce' => 'ANÚNCIO',
340
-	'info_annonces_generales' => 'Anúncios gerais :',
341
-	'info_article_propose' => 'Artigo proposto',
342
-	'info_article_publie' => 'Artigo publicado',
343
-	'info_article_redaction' => 'Artigo em curso de redacção',
344
-	'info_article_refuse' => 'Artigo recusado',
345
-	'info_article_supprime' => 'Artigo suprimido',
346
-	'info_articles' => 'Artigos',
347
-	'info_articles_a_valider' => 'Os artigos a validar',
348
-	'info_articles_nb' => '@nb@ artigos',
349
-	'info_articles_proposes' => 'Artigos propostos',
350
-	'info_articles_un' => '1 artigo',
351
-	'info_auteurs_nombre' => 'autor(es) :',
352
-	'info_authentification_ftp' => 'Autenticação (por FTP)',
353
-	'info_breves_2' => 'notícias',
354
-	'info_breves_nb' => '@nb@ notícias',
355
-	'info_breves_un' => '1 notícia',
356
-	'info_connexion_refusee' => 'Ligação recusada',
357
-	'info_contact_developpeur' => 'Por favor contacte um programador',
358
-	'info_contenance' => 'Este sítio contém:',
359
-	'info_contribution' => 'contribuições de fórum',
360
-	'info_copyright' => '@spip@ é um software livre distribuído @lien_gpl@.',
361
-	'info_copyright_doc' => 'Para mais informações, visite o sítio <a href="@spipnet@">@spipnet_affiche@</a',
362
-	'info_copyright_gpl' => 'sob licença GPL',
363
-	'info_cours_edition' => 'Os seus artigos em curso de redacção', # MODIF
364
-	'info_creer_repertoire' => 'Por favor crie um ficheiro ou um directório chamado :',
365
-	'info_creer_repertoire_2' => 'dentro do sub-directório <b>@repertoire@</b>, depois :',
366
-	'info_creer_vignette' => 'criação automática de miniatura',
367
-	'info_creerdansrubrique_non_autorise' => 'Não tem direitos suficientes para criar conteúdo nesta rubrica.',
368
-	'info_deplier' => 'Desenvolver',
369
-	'info_descriptif_nombre' => 'descritivo(s) :',
370
-	'info_description' => 'Descrição :',
371
-	'info_description_2' => 'Descrição :',
372
-	'info_dimension' => 'Dimensões :',
373
-	'info_documents_nb' => '@nb@ documentos',
374
-	'info_documents_un' => '1 documento',
375
-	'info_ecire_message_prive' => 'Escrever uma mensagem privada',
376
-	'info_email_invalide' => 'Endereço email inválido.',
377
-	'info_en_cours_validation' => 'Os seus artigos em curso de redação',
378
-	'info_en_ligne' => 'Actualmente online:',
379
-	'info_envoyer_message_prive' => 'Enviar uma mensagem privada a este autor',
380
-	'info_erreur_requete' => 'Erro no pedido :',
381
-	'info_erreur_squelette2' => 'Modelo <b>@fichier@</b> não disponível...',
382
-	'info_erreur_systeme' => 'Erro de Sistema (errno @errsys@)',
383
-	'info_erreur_systeme2' => 'O disco rígido poderá estar cheio, ou a base de dados danificada.<br />
285
+    // I
286
+    'ical_texte_rss_articles' => 'O ficheiro «backend» dos artigos deste sítio encontra-se neste endereço:',
287
+    'ical_texte_rss_articles2' => 'Pode igualmente obter os ficheiros «backend» para os artigos de cada rubrica do sítio:',
288
+    'ical_texte_rss_breves' => 'Existe também um ficheiro contendo notícias do sítio. Especificando um número de rubrica, obterá unicamente as notícias dessa rubrica.',
289
+    'icone_a_suivre' => 'Continua',
290
+    'icone_admin_site' => 'Administração do sítio',
291
+    'icone_agenda' => 'Agenda e correio',
292
+    'icone_aide_ligne' => 'Ajuda',
293
+    'icone_articles' => 'Artigos',
294
+    'icone_auteurs' => 'Autores',
295
+    'icone_brouteur' => 'Navegação rápida',
296
+    'icone_configuration_site' => 'Configuração',
297
+    'icone_configurer_site' => 'Configurar o seu sítio',
298
+    'icone_creer_nouvel_auteur' => 'Criar um novo autor',
299
+    'icone_creer_rubrique' => 'Criar uma rubrica',
300
+    'icone_creer_sous_rubrique' => 'Criar uma sub-rubrica',
301
+    'icone_deconnecter' => 'Sair',
302
+    'icone_discussions' => 'Discussões',
303
+    'icone_doc_rubrique' => 'Documentos das rubricas',
304
+    'icone_ecrire_article' => 'Escrever um novo artigo',
305
+    'icone_edition_site' => 'Edição',
306
+    'icone_gestion_langues' => 'Opções de idiomas',
307
+    'icone_informations_personnelles' => 'Informações pessoais',
308
+    'icone_interface_complet' => 'interface completa',
309
+    'icone_interface_simple' => 'Interface simplificada',
310
+    'icone_maintenance_site' => 'Manutenção do sítio',
311
+    'icone_messagerie_personnelle' => 'Mensagens privadas',
312
+    'icone_repartition_debut' => 'Exibir a distribuição desde o início',
313
+    'icone_rubriques' => 'Rubricas',
314
+    'icone_sauver_site' => 'Cópia de segurança do sítio',
315
+    'icone_site_entier' => 'Todo o sítio',
316
+    'icone_sites_references' => 'Sítios referenciados',
317
+    'icone_statistiques' => 'Estatísticas do sítio',
318
+    'icone_suivi_activite' => 'Acompanhar a actividade do sítio',
319
+    'icone_suivi_actualite' => 'Evolução do sítio',
320
+    'icone_suivi_pettions' => 'Seguir/gerir os abaixo-assinados',
321
+    'icone_suivi_revisions' => 'Modificações dos artigos',
322
+    'icone_supprimer_document' => 'Suprimir este documento',
323
+    'icone_supprimer_image' => 'Suprimir esta imagem',
324
+    'icone_tous_articles' => 'Todos os seus artigos',
325
+    'icone_tous_auteur' => 'Todos os autores',
326
+    'icone_tous_visiteur' => 'Todos os visitantes',
327
+    'icone_visiter_site' => 'Visitar o sítio público',
328
+    'icone_voir_en_ligne' => 'Ver online',
329
+    'img_indisponible' => 'imagem indisponível',
330
+    'impossible' => 'impossível',
331
+    'info_a_suivre' => 'A SEGUIR »',
332
+    'info_acces_interdit' => 'Acesso proibido',
333
+    'info_acces_refuse' => 'Acesso recusado',
334
+    'info_action' => 'Acção : @action@',
335
+    'info_administrer_rubriques' => 'Pode administrar esta rubrica e as suas sub-rubricas',
336
+    'info_adresse_non_indiquee' => 'Não indicou endereço a testar !',
337
+    'info_aide' => 'AJUDA',
338
+    'info_ajouter_mot' => 'Acrescentar esta palavra',
339
+    'info_annonce' => 'ANÚNCIO',
340
+    'info_annonces_generales' => 'Anúncios gerais :',
341
+    'info_article_propose' => 'Artigo proposto',
342
+    'info_article_publie' => 'Artigo publicado',
343
+    'info_article_redaction' => 'Artigo em curso de redacção',
344
+    'info_article_refuse' => 'Artigo recusado',
345
+    'info_article_supprime' => 'Artigo suprimido',
346
+    'info_articles' => 'Artigos',
347
+    'info_articles_a_valider' => 'Os artigos a validar',
348
+    'info_articles_nb' => '@nb@ artigos',
349
+    'info_articles_proposes' => 'Artigos propostos',
350
+    'info_articles_un' => '1 artigo',
351
+    'info_auteurs_nombre' => 'autor(es) :',
352
+    'info_authentification_ftp' => 'Autenticação (por FTP)',
353
+    'info_breves_2' => 'notícias',
354
+    'info_breves_nb' => '@nb@ notícias',
355
+    'info_breves_un' => '1 notícia',
356
+    'info_connexion_refusee' => 'Ligação recusada',
357
+    'info_contact_developpeur' => 'Por favor contacte um programador',
358
+    'info_contenance' => 'Este sítio contém:',
359
+    'info_contribution' => 'contribuições de fórum',
360
+    'info_copyright' => '@spip@ é um software livre distribuído @lien_gpl@.',
361
+    'info_copyright_doc' => 'Para mais informações, visite o sítio <a href="@spipnet@">@spipnet_affiche@</a',
362
+    'info_copyright_gpl' => 'sob licença GPL',
363
+    'info_cours_edition' => 'Os seus artigos em curso de redacção', # MODIF
364
+    'info_creer_repertoire' => 'Por favor crie um ficheiro ou um directório chamado :',
365
+    'info_creer_repertoire_2' => 'dentro do sub-directório <b>@repertoire@</b>, depois :',
366
+    'info_creer_vignette' => 'criação automática de miniatura',
367
+    'info_creerdansrubrique_non_autorise' => 'Não tem direitos suficientes para criar conteúdo nesta rubrica.',
368
+    'info_deplier' => 'Desenvolver',
369
+    'info_descriptif_nombre' => 'descritivo(s) :',
370
+    'info_description' => 'Descrição :',
371
+    'info_description_2' => 'Descrição :',
372
+    'info_dimension' => 'Dimensões :',
373
+    'info_documents_nb' => '@nb@ documentos',
374
+    'info_documents_un' => '1 documento',
375
+    'info_ecire_message_prive' => 'Escrever uma mensagem privada',
376
+    'info_email_invalide' => 'Endereço email inválido.',
377
+    'info_en_cours_validation' => 'Os seus artigos em curso de redação',
378
+    'info_en_ligne' => 'Actualmente online:',
379
+    'info_envoyer_message_prive' => 'Enviar uma mensagem privada a este autor',
380
+    'info_erreur_requete' => 'Erro no pedido :',
381
+    'info_erreur_squelette2' => 'Modelo <b>@fichier@</b> não disponível...',
382
+    'info_erreur_systeme' => 'Erro de Sistema (errno @errsys@)',
383
+    'info_erreur_systeme2' => 'O disco rígido poderá estar cheio, ou a base de dados danificada.<br />
384 384
 <span style="color:red;">Tente <a href=\'@script@\'>reparar a base de dados </a>, ou contacte o seu fornecedor de internet.</span>',
385
-	'info_fini' => 'Terminou !',
386
-	'info_format_image' => 'Formatos de imagens que podem ser utilizadas para criar vinhetas : @gd_formats@.',
387
-	'info_format_non_defini' => 'formato não definido',
388
-	'info_grand_ecran' => 'Ecrã total',
389
-	'info_image_aide' => 'AJUDA',
390
-	'info_image_process_titre' => 'Como criar miniaturas',
391
-	'info_impossible_lire_page' => '<b>Erro !</b> Impossível ler a página<tt><html>@test_proxy@</html></tt> através do proxy <tt>',
392
-	'info_installation_systeme_publication' => 'Instalação do sistema de publicação',
393
-	'info_installer_documents' => 'Pode instalar automaticamente todos os documentos contidos na pasta @upload@.',
394
-	'info_installer_ftp' => 'Como administrador, pode instalar (por FTP) ficheiros na pasta @upload@ para depois seleccioná-los directamente aqui.',
395
-	'info_installer_images' => 'Pode instalar imagens nos formatos JPEG, GIF e PNG.',
396
-	'info_installer_images_dossier' => 'Instalar imagens na pasta @upload@ para poder seleccioná-los aqui.',
397
-	'info_interface_complete' => 'Interface completa',
398
-	'info_interface_simple' => 'Interface simplificada',
399
-	'info_joindre_document_article' => 'Pode juntar a este artigo documentos de tipo',
400
-	'info_joindre_document_rubrique' => 'Pode acrescentar a esta rubrica documentos de tipo',
401
-	'info_joindre_documents_article' => 'Pode juntar ao seu artigo documentos de tipo :',
402
-	'info_l_article' => 'o artigo',
403
-	'info_la_breve' => 'a notícia',
404
-	'info_la_rubrique' => 'a rubrica',
405
-	'info_langue_principale' => 'Idioma principal do sítio',
406
-	'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ pixels',
407
-	'info_les_auteurs_1' => 'por @les_auteurs@',
408
-	'info_logo_format_interdit' => 'Apenas os ícones nos formatos @formats@ estão autorizados.',
409
-	'info_logo_max_poids' => 'Os ícones devem obrigatoriamente ter menos de @maxi@ (este arquivo tem @actuel@).',
410
-	'info_mail_fournisseur' => 'você@seucorreio.com',
411
-	'info_message_2' => 'MENSAGEM',
412
-	'info_message_supprime' => 'MENSAGEM ELIMINADA',
413
-	'info_messages_nb' => '@nb@ mensagens',
414
-	'info_messages_un' => '1 mensagem',
415
-	'info_mise_en_ligne' => 'Data de colocação online :',
416
-	'info_modification_parametres_securite' => 'modificação dos parâmetros de segurança',
417
-	'info_mois_courant' => 'Durante o mês :',
418
-	'info_mot_cle_ajoute' => 'A seguinte palavra-chave foi acrescentada a',
419
-	'info_multi_herit' => 'Idioma por defeito',
420
-	'info_multi_langues_soulignees' => 'Os <u>idiomas sublinhadas</u> beneficiam de uma tradução de todos os textos da interface. Se seleccionar esses idiomas, muitos elementos do sítio público (datas, formulários) serão automaticamente traduzidos. Para os idiomas não sublinhadas, esses elementos aparecerão no idioma principal do sítio.',
421
-	'info_multilinguisme' => 'Multilinguismo',
422
-	'info_nom_non_utilisateurs_connectes' => 'O seu nome não aparece na lista dos utilizadores ligados.',
423
-	'info_nom_utilisateurs_connectes' => 'O seu nome aparece na lista dos utilizadores ligados.',
424
-	'info_nombre_en_ligne' => 'Actualmente online :',
425
-	'info_non_resultat' => 'Nenhum resultado para "@cherche_mot@"',
426
-	'info_non_utilisation_messagerie' => 'Não utiliza o correio interno deste sítio.',
427
-	'info_nouveau_message' => 'TEM UMA NOVA MENSAGEM',
428
-	'info_nouveaux_messages' => 'TEM @total_messages@ NOVAS MENSAGENS',
429
-	'info_numero_abbreviation' => '<N° >',
430
-	'info_obligatoire' => 'Esta informação é obrigatória',
431
-	'info_pense_bete' => 'MEMORANDO',
432
-	'info_petit_ecran' => 'Ecrã Pequeno',
433
-	'info_petition_close' => 'Petição encerrada',
434
-	'info_pixels' => 'pixels',
435
-	'info_plusieurs_mots_trouves' => 'Muitas palavras-chave encontradas para "@cherche_mot@":',
436
-	'info_portfolio_automatique' => 'Portfolio automático :',
437
-	'info_premier_resultat' => '[@debut_limit@ primeiros resultados em @total@]',
438
-	'info_premier_resultat_sur' => '[@debut_limit@ primeiros resultados em @total@]',
439
-	'info_propose_1' => '[@nom_site_spip@] Proposto : @titre@',
440
-	'info_propose_2' => 'Artigos propostos
385
+    'info_fini' => 'Terminou !',
386
+    'info_format_image' => 'Formatos de imagens que podem ser utilizadas para criar vinhetas : @gd_formats@.',
387
+    'info_format_non_defini' => 'formato não definido',
388
+    'info_grand_ecran' => 'Ecrã total',
389
+    'info_image_aide' => 'AJUDA',
390
+    'info_image_process_titre' => 'Como criar miniaturas',
391
+    'info_impossible_lire_page' => '<b>Erro !</b> Impossível ler a página<tt><html>@test_proxy@</html></tt> através do proxy <tt>',
392
+    'info_installation_systeme_publication' => 'Instalação do sistema de publicação',
393
+    'info_installer_documents' => 'Pode instalar automaticamente todos os documentos contidos na pasta @upload@.',
394
+    'info_installer_ftp' => 'Como administrador, pode instalar (por FTP) ficheiros na pasta @upload@ para depois seleccioná-los directamente aqui.',
395
+    'info_installer_images' => 'Pode instalar imagens nos formatos JPEG, GIF e PNG.',
396
+    'info_installer_images_dossier' => 'Instalar imagens na pasta @upload@ para poder seleccioná-los aqui.',
397
+    'info_interface_complete' => 'Interface completa',
398
+    'info_interface_simple' => 'Interface simplificada',
399
+    'info_joindre_document_article' => 'Pode juntar a este artigo documentos de tipo',
400
+    'info_joindre_document_rubrique' => 'Pode acrescentar a esta rubrica documentos de tipo',
401
+    'info_joindre_documents_article' => 'Pode juntar ao seu artigo documentos de tipo :',
402
+    'info_l_article' => 'o artigo',
403
+    'info_la_breve' => 'a notícia',
404
+    'info_la_rubrique' => 'a rubrica',
405
+    'info_langue_principale' => 'Idioma principal do sítio',
406
+    'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ pixels',
407
+    'info_les_auteurs_1' => 'por @les_auteurs@',
408
+    'info_logo_format_interdit' => 'Apenas os ícones nos formatos @formats@ estão autorizados.',
409
+    'info_logo_max_poids' => 'Os ícones devem obrigatoriamente ter menos de @maxi@ (este arquivo tem @actuel@).',
410
+    'info_mail_fournisseur' => 'você@seucorreio.com',
411
+    'info_message_2' => 'MENSAGEM',
412
+    'info_message_supprime' => 'MENSAGEM ELIMINADA',
413
+    'info_messages_nb' => '@nb@ mensagens',
414
+    'info_messages_un' => '1 mensagem',
415
+    'info_mise_en_ligne' => 'Data de colocação online :',
416
+    'info_modification_parametres_securite' => 'modificação dos parâmetros de segurança',
417
+    'info_mois_courant' => 'Durante o mês :',
418
+    'info_mot_cle_ajoute' => 'A seguinte palavra-chave foi acrescentada a',
419
+    'info_multi_herit' => 'Idioma por defeito',
420
+    'info_multi_langues_soulignees' => 'Os <u>idiomas sublinhadas</u> beneficiam de uma tradução de todos os textos da interface. Se seleccionar esses idiomas, muitos elementos do sítio público (datas, formulários) serão automaticamente traduzidos. Para os idiomas não sublinhadas, esses elementos aparecerão no idioma principal do sítio.',
421
+    'info_multilinguisme' => 'Multilinguismo',
422
+    'info_nom_non_utilisateurs_connectes' => 'O seu nome não aparece na lista dos utilizadores ligados.',
423
+    'info_nom_utilisateurs_connectes' => 'O seu nome aparece na lista dos utilizadores ligados.',
424
+    'info_nombre_en_ligne' => 'Actualmente online :',
425
+    'info_non_resultat' => 'Nenhum resultado para "@cherche_mot@"',
426
+    'info_non_utilisation_messagerie' => 'Não utiliza o correio interno deste sítio.',
427
+    'info_nouveau_message' => 'TEM UMA NOVA MENSAGEM',
428
+    'info_nouveaux_messages' => 'TEM @total_messages@ NOVAS MENSAGENS',
429
+    'info_numero_abbreviation' => '<N° >',
430
+    'info_obligatoire' => 'Esta informação é obrigatória',
431
+    'info_pense_bete' => 'MEMORANDO',
432
+    'info_petit_ecran' => 'Ecrã Pequeno',
433
+    'info_petition_close' => 'Petição encerrada',
434
+    'info_pixels' => 'pixels',
435
+    'info_plusieurs_mots_trouves' => 'Muitas palavras-chave encontradas para "@cherche_mot@":',
436
+    'info_portfolio_automatique' => 'Portfolio automático :',
437
+    'info_premier_resultat' => '[@debut_limit@ primeiros resultados em @total@]',
438
+    'info_premier_resultat_sur' => '[@debut_limit@ primeiros resultados em @total@]',
439
+    'info_propose_1' => '[@nom_site_spip@] Proposto : @titre@',
440
+    'info_propose_2' => 'Artigos propostos
441 441
 ----------------',
442
-	'info_propose_3' => 'O artigo "@titre@" é proposto para publicação.',
443
-	'info_propose_4' => 'Está convidado a vir consultá-lo e a dar a sua opinião',
444
-	'info_propose_5' => 'no fórum que lhe está ligado. Está disponível no endereço:',
445
-	'info_publie_01' => 'O artigo "@titre@" foi validado por @connect_nom@.',
446
-	'info_publie_1' => '[@nom_site_spip@] PUBLICADO : @titre@',
447
-	'info_publie_2' => 'Artigo publicado
442
+    'info_propose_3' => 'O artigo "@titre@" é proposto para publicação.',
443
+    'info_propose_4' => 'Está convidado a vir consultá-lo e a dar a sua opinião',
444
+    'info_propose_5' => 'no fórum que lhe está ligado. Está disponível no endereço:',
445
+    'info_publie_01' => 'O artigo "@titre@" foi validado por @connect_nom@.',
446
+    'info_publie_1' => '[@nom_site_spip@] PUBLICADO : @titre@',
447
+    'info_publie_2' => 'Artigo publicado
448 448
 --------------',
449
-	'info_rechercher' => 'Procurar',
450
-	'info_rechercher_02' => 'Procurar :',
451
-	'info_remplacer_vignette' => 'Substituir a miniatura por defeito por um logotipo personalizado :',
452
-	'info_rubriques_nb' => '@nb@ rubricas',
453
-	'info_rubriques_un' => '1 rubrica',
454
-	'info_sans_titre_2' => 'sem título',
455
-	'info_selectionner_fichier' => 'Pode seleccionar um ficheiro da pasta @upload@',
456
-	'info_selectionner_fichier_2' => 'Seleccionar um ficheiro :',
457
-	'info_sites_nb' => '@nb@ sítios',
458
-	'info_sites_un' => '1 sítio',
459
-	'info_supprimer_vignette' => 'suprimir a miniatura',
460
-	'info_symbole_bleu' => 'O símbolo <b>azul</b> indica um<b>memorando </b>: isto é uma mensagem para o seu uso pessoal.',
461
-	'info_symbole_jaune' => 'O símbolo<b>amarelo</b> indica um <b>anúncio a todos os redactores</b> : modificável por todos os administradores, e visível por todos os redactores.',
462
-	'info_symbole_vert' => 'O símbolo<b>verde</b> indica as <b>mensagens trocadas com outros utilizadores</b> do sítio.',
463
-	'info_telecharger_nouveau_logo' => 'Telecarregar um novo logotipo :',
464
-	'info_telecharger_ordinateur' => 'Telecarregar do seu computador :',
465
-	'info_tous_resultats_enregistres' => '[todos os  resultados estão registados]',
466
-	'info_tout_afficher' => 'Exibir tudo',
467
-	'info_travaux_texte' => 'Este sítio ainda não está configurado. Volte mais tarde...',
468
-	'info_travaux_titre' => 'Sítio em construção',
469
-	'info_trop_resultat' => 'Demasiado resultados para "@cherche_mot@". Por favor afine a pesquisa.',
470
-	'info_utilisation_messagerie_interne' => 'Você utiliza o correio interno deste sítio.',
471
-	'info_valider_lien' => 'validar esta ligação',
472
-	'info_verifier_image' => ', Por favor verifique se as suas imagens foram transferidas correctamente.',
473
-	'info_vignette_defaut' => 'Miniatura por defeito',
474
-	'info_vignette_personnalisee' => 'Miniatura personalizada',
475
-	'info_visite' => 'visita :',
476
-	'info_vos_rendez_vous' => 'Os seus futuros encontros',
477
-	'infos_vos_pense_bete' => 'Os seus memorandos',
449
+    'info_rechercher' => 'Procurar',
450
+    'info_rechercher_02' => 'Procurar :',
451
+    'info_remplacer_vignette' => 'Substituir a miniatura por defeito por um logotipo personalizado :',
452
+    'info_rubriques_nb' => '@nb@ rubricas',
453
+    'info_rubriques_un' => '1 rubrica',
454
+    'info_sans_titre_2' => 'sem título',
455
+    'info_selectionner_fichier' => 'Pode seleccionar um ficheiro da pasta @upload@',
456
+    'info_selectionner_fichier_2' => 'Seleccionar um ficheiro :',
457
+    'info_sites_nb' => '@nb@ sítios',
458
+    'info_sites_un' => '1 sítio',
459
+    'info_supprimer_vignette' => 'suprimir a miniatura',
460
+    'info_symbole_bleu' => 'O símbolo <b>azul</b> indica um<b>memorando </b>: isto é uma mensagem para o seu uso pessoal.',
461
+    'info_symbole_jaune' => 'O símbolo<b>amarelo</b> indica um <b>anúncio a todos os redactores</b> : modificável por todos os administradores, e visível por todos os redactores.',
462
+    'info_symbole_vert' => 'O símbolo<b>verde</b> indica as <b>mensagens trocadas com outros utilizadores</b> do sítio.',
463
+    'info_telecharger_nouveau_logo' => 'Telecarregar um novo logotipo :',
464
+    'info_telecharger_ordinateur' => 'Telecarregar do seu computador :',
465
+    'info_tous_resultats_enregistres' => '[todos os  resultados estão registados]',
466
+    'info_tout_afficher' => 'Exibir tudo',
467
+    'info_travaux_texte' => 'Este sítio ainda não está configurado. Volte mais tarde...',
468
+    'info_travaux_titre' => 'Sítio em construção',
469
+    'info_trop_resultat' => 'Demasiado resultados para "@cherche_mot@". Por favor afine a pesquisa.',
470
+    'info_utilisation_messagerie_interne' => 'Você utiliza o correio interno deste sítio.',
471
+    'info_valider_lien' => 'validar esta ligação',
472
+    'info_verifier_image' => ', Por favor verifique se as suas imagens foram transferidas correctamente.',
473
+    'info_vignette_defaut' => 'Miniatura por defeito',
474
+    'info_vignette_personnalisee' => 'Miniatura personalizada',
475
+    'info_visite' => 'visita :',
476
+    'info_vos_rendez_vous' => 'Os seus futuros encontros',
477
+    'infos_vos_pense_bete' => 'Os seus memorandos',
478 478
 
479
-	// L
480
-	'label_ajout_id_rapide' => 'Adição rápida',
481
-	'label_poids_fichier' => 'Dimensões',
482
-	'lien_afficher_icones_seuls' => 'Exibir apenas os ícones',
483
-	'lien_afficher_texte_icones' => 'Exibir ícones e o texto',
484
-	'lien_afficher_texte_seul' => 'Exibir apenas o texto',
485
-	'lien_liberer' => 'desbloquear',
486
-	'lien_liberer_tous' => 'desbloquear estes artigos',
487
-	'lien_nouvea_pense_bete' => 'NOVO MEMORANDO',
488
-	'lien_nouveau_message' => 'NOVA MENSAGEM',
489
-	'lien_nouvelle_annonce' => 'NOVO ANÚNCIO',
490
-	'lien_petitions' => 'PETIÇÃO',
491
-	'lien_popularite' => 'popularidade : @popularite@%',
492
-	'lien_racine_site' => 'RAIZ DO SÍTIO',
493
-	'lien_reessayer' => 'tentar de novo',
494
-	'lien_repondre_message' => 'Responder a esta mensagem',
495
-	'lien_supprimer' => 'eliminar',
496
-	'lien_tout_afficher' => 'Exibir tudo',
497
-	'lien_visite_site' => 'visitar este sítio',
498
-	'lien_visites' => '@visites@ visitas',
499
-	'lien_voir_auteur' => 'Ver este autor',
500
-	'ligne' => 'Linha',
501
-	'login' => 'Ligação',
502
-	'login_acces_prive' => 'acesso ao espaço privado',
503
-	'login_autre_identifiant' => 'ligar-se sob um outro identificador',
504
-	'login_cookie_accepte' => 'Por favor configure o seu navegador para que os aceite (pelo menos para este sítio).',
505
-	'login_cookie_oblige' => 'Para se identificar de maneira segura neste sítio, deve aceitar os cookies.',
506
-	'login_deconnexion_ok' => 'Ligação terminada.',
507
-	'login_erreur_pass' => 'Erro de palavra-passe',
508
-	'login_espace_prive' => 'área privada',
509
-	'login_identifiant_inconnu' => 'O identificador « @login@ » é desconhecido.',
510
-	'login_login' => 'Login :',
511
-	'login_login2' => 'Login ou endereço de e-mail :',
512
-	'login_login_pass_incorrect' => '(Login ou palavra-passe incorrecta.)',
513
-	'login_motpasseoublie' => 'palavra - passe esquecida ?',
514
-	'login_non_securise' => 'Atenção, este formulário não é seguro.
479
+    // L
480
+    'label_ajout_id_rapide' => 'Adição rápida',
481
+    'label_poids_fichier' => 'Dimensões',
482
+    'lien_afficher_icones_seuls' => 'Exibir apenas os ícones',
483
+    'lien_afficher_texte_icones' => 'Exibir ícones e o texto',
484
+    'lien_afficher_texte_seul' => 'Exibir apenas o texto',
485
+    'lien_liberer' => 'desbloquear',
486
+    'lien_liberer_tous' => 'desbloquear estes artigos',
487
+    'lien_nouvea_pense_bete' => 'NOVO MEMORANDO',
488
+    'lien_nouveau_message' => 'NOVA MENSAGEM',
489
+    'lien_nouvelle_annonce' => 'NOVO ANÚNCIO',
490
+    'lien_petitions' => 'PETIÇÃO',
491
+    'lien_popularite' => 'popularidade : @popularite@%',
492
+    'lien_racine_site' => 'RAIZ DO SÍTIO',
493
+    'lien_reessayer' => 'tentar de novo',
494
+    'lien_repondre_message' => 'Responder a esta mensagem',
495
+    'lien_supprimer' => 'eliminar',
496
+    'lien_tout_afficher' => 'Exibir tudo',
497
+    'lien_visite_site' => 'visitar este sítio',
498
+    'lien_visites' => '@visites@ visitas',
499
+    'lien_voir_auteur' => 'Ver este autor',
500
+    'ligne' => 'Linha',
501
+    'login' => 'Ligação',
502
+    'login_acces_prive' => 'acesso ao espaço privado',
503
+    'login_autre_identifiant' => 'ligar-se sob um outro identificador',
504
+    'login_cookie_accepte' => 'Por favor configure o seu navegador para que os aceite (pelo menos para este sítio).',
505
+    'login_cookie_oblige' => 'Para se identificar de maneira segura neste sítio, deve aceitar os cookies.',
506
+    'login_deconnexion_ok' => 'Ligação terminada.',
507
+    'login_erreur_pass' => 'Erro de palavra-passe',
508
+    'login_espace_prive' => 'área privada',
509
+    'login_identifiant_inconnu' => 'O identificador « @login@ » é desconhecido.',
510
+    'login_login' => 'Login :',
511
+    'login_login2' => 'Login ou endereço de e-mail :',
512
+    'login_login_pass_incorrect' => '(Login ou palavra-passe incorrecta.)',
513
+    'login_motpasseoublie' => 'palavra - passe esquecida ?',
514
+    'login_non_securise' => 'Atenção, este formulário não é seguro.
515 515
  Se não quiser que a sua palavra-passe seja
516 516
  interceptada na rede, por favor active Javascript
517 517
  no seu navegador e',
518
-	'login_nouvelle_tentative' => 'Nova tentativa',
519
-	'login_par_ici' => 'Você está registado... por aqui....',
520
-	'login_pass2' => 'Palavra-passe :',
521
-	'login_preferez_refuser' => '<b>Se prefere recusar os cookies</b>, um outro método de ligação (menos seguro) está à sua disposição',
522
-	'login_recharger' => 'carregar de novo esta página ',
523
-	'login_rester_identifie' => 'Permanecer identificado durante alguns dias ', # MODIF
524
-	'login_retour_public' => 'Regresso ao sítio público',
525
-	'login_retour_site' => 'Regresso ao sítio público',
526
-	'login_retoursitepublic' => 'Regresso ao sítio público',
527
-	'login_securise' => 'Login seguro',
528
-	'login_sinscrire' => 'inscrever-se', # MODIF
529
-	'login_test_navigateur' => 'teste navegação/nova ligação',
530
-	'login_verifiez_navigateur' => '(Verifique, porém, que o seu navegador não memorizou a sua palavra-passe...)',
518
+    'login_nouvelle_tentative' => 'Nova tentativa',
519
+    'login_par_ici' => 'Você está registado... por aqui....',
520
+    'login_pass2' => 'Palavra-passe :',
521
+    'login_preferez_refuser' => '<b>Se prefere recusar os cookies</b>, um outro método de ligação (menos seguro) está à sua disposição',
522
+    'login_recharger' => 'carregar de novo esta página ',
523
+    'login_rester_identifie' => 'Permanecer identificado durante alguns dias ', # MODIF
524
+    'login_retour_public' => 'Regresso ao sítio público',
525
+    'login_retour_site' => 'Regresso ao sítio público',
526
+    'login_retoursitepublic' => 'Regresso ao sítio público',
527
+    'login_securise' => 'Login seguro',
528
+    'login_sinscrire' => 'inscrever-se', # MODIF
529
+    'login_test_navigateur' => 'teste navegação/nova ligação',
530
+    'login_verifiez_navigateur' => '(Verifique, porém, que o seu navegador não memorizou a sua palavra-passe...)',
531 531
 
532
-	// M
533
-	'masquer_colonne' => 'Ocultar esta coluna',
534
-	'masquer_trad' => 'ocultar as traduções',
535
-	'module_fichiers_langues' => 'Ficheiros de idioma',
532
+    // M
533
+    'masquer_colonne' => 'Ocultar esta coluna',
534
+    'masquer_trad' => 'ocultar as traduções',
535
+    'module_fichiers_langues' => 'Ficheiros de idioma',
536 536
 
537
-	// N
538
-	'navigateur_pas_redirige' => 'Se o seu navegador não está redireccionado, clique aqui para continuar.',
539
-	'numero' => 'Número',
537
+    // N
538
+    'navigateur_pas_redirige' => 'Se o seu navegador não está redireccionado, clique aqui para continuar.',
539
+    'numero' => 'Número',
540 540
 
541
-	// O
542
-	'occurence' => 'Ocorrência',
543
-	'onglet_affacer_base' => 'Apagar a base de dados',
544
-	'onglet_auteur' => 'O autor',
545
-	'onglet_contenu_site' => 'Conteúdo do sítio',
546
-	'onglet_evolution_visite_mod' => 'Evolução',
547
-	'onglet_fonctions_avances' => 'Funções avançadas',
548
-	'onglet_informations_personnelles' => 'Informações pessoais',
549
-	'onglet_interactivite' => 'Interactividade',
550
-	'onglet_messagerie' => 'Correio',
551
-	'onglet_repartition_rubrique' => 'Distribuição das rubricas',
552
-	'onglet_save_restaur_base' => 'Guardar uma cópia/restaurar a base',
553
-	'onglet_vider_cache' => 'Esvaziar a cache',
541
+    // O
542
+    'occurence' => 'Ocorrência',
543
+    'onglet_affacer_base' => 'Apagar a base de dados',
544
+    'onglet_auteur' => 'O autor',
545
+    'onglet_contenu_site' => 'Conteúdo do sítio',
546
+    'onglet_evolution_visite_mod' => 'Evolução',
547
+    'onglet_fonctions_avances' => 'Funções avançadas',
548
+    'onglet_informations_personnelles' => 'Informações pessoais',
549
+    'onglet_interactivite' => 'Interactividade',
550
+    'onglet_messagerie' => 'Correio',
551
+    'onglet_repartition_rubrique' => 'Distribuição das rubricas',
552
+    'onglet_save_restaur_base' => 'Guardar uma cópia/restaurar a base',
553
+    'onglet_vider_cache' => 'Esvaziar a cache',
554 554
 
555
-	// P
556
-	'pass_choix_pass' => 'Por favor escolha a sua nova palavra-passe',
557
-	'pass_erreur' => 'Erro',
558
-	'pass_erreur_acces_refuse' => '<b>Erro :</b> já não tem acesso a este sítio.',
559
-	'pass_erreur_code_inconnu' => '<b>Erro :</b> este código não corresponde a nenhum dos visitantes com acesso a este sítio.',
560
-	'pass_erreur_non_enregistre' => '<b>Erro :</b> o endereço <tt>@email_oubli@</tt> não está registado neste sítio. ',
561
-	'pass_erreur_non_valide' => '<b>Erro :</b> este email <tt>@email_oubli@</tt> não é válido !  ',
562
-	'pass_erreur_probleme_technique' => '<b>Erro :</b> por causa de um problema técnico, o email não pôde ser enviado.',
563
-	'pass_espace_prive_bla' => 'O espaço privado deste sítio está aberto aos
555
+    // P
556
+    'pass_choix_pass' => 'Por favor escolha a sua nova palavra-passe',
557
+    'pass_erreur' => 'Erro',
558
+    'pass_erreur_acces_refuse' => '<b>Erro :</b> já não tem acesso a este sítio.',
559
+    'pass_erreur_code_inconnu' => '<b>Erro :</b> este código não corresponde a nenhum dos visitantes com acesso a este sítio.',
560
+    'pass_erreur_non_enregistre' => '<b>Erro :</b> o endereço <tt>@email_oubli@</tt> não está registado neste sítio. ',
561
+    'pass_erreur_non_valide' => '<b>Erro :</b> este email <tt>@email_oubli@</tt> não é válido !  ',
562
+    'pass_erreur_probleme_technique' => '<b>Erro :</b> por causa de um problema técnico, o email não pôde ser enviado.',
563
+    'pass_espace_prive_bla' => 'O espaço privado deste sítio está aberto aos
564 564
  visitantes, após inscrição. Uma vez registado poderá consultar os artigos em curso de redacção,
565 565
 propor artigos e participar em todos os fóruns.',
566
-	'pass_forum_bla' => 'Pediu para intervir num fórum
566
+    'pass_forum_bla' => 'Pediu para intervir num fórum
567 567
  reservado aos visitadores registados.',
568
-	'pass_indiquez_cidessous' => 'Indique abaixo o endereço email sob o qual se registou. Receberá
568
+    'pass_indiquez_cidessous' => 'Indique abaixo o endereço email sob o qual se registou. Receberá
569 569
  um mail que indicará o procedimento a seguir para
570 570
         recuperar o seu acesso.',
571
-	'pass_mail_passcookie' => '(esta é uma mensagem automática)
571
+    'pass_mail_passcookie' => '(esta é uma mensagem automática)
572 572
 Para recuperar o seu acesso ao sítio
573 573
 @nom_site_spip@ (@adresse_site@)
574 574
 
@@ -578,137 +578,137 @@  discard block
 block discarded – undo
578 578
 
579 579
 Poderá então introduzir uma nova palavra-passe e reconectar-se ao sítio.
580 580
 ',
581
-	'pass_mot_oublie' => 'Palavra-passe esquecida',
582
-	'pass_nouveau_enregistre' => 'A sua nova palavra-passe foi registada',
583
-	'pass_nouveau_pass' => 'Nova palavra-passe',
584
-	'pass_ok' => 'OK',
585
-	'pass_oubli_mot' => 'Palavra-passe esquecida',
586
-	'pass_procedure_changer' => 'Para alterar a sua palavra-passe, temos primeiro de verificar a sua identidade. Por favor escreva o endereço e-mail associado a esta conta.', # MODIF
587
-	'pass_quitter_fenetre' => 'Fechar esta janela',
588
-	'pass_rappel_login' => 'Recorde : o seu identificador (login) é « @login@ ».',
589
-	'pass_recevoir_mail' => 'Vai receber um email que indica como recuperar o seu acesso ao sítio.', # MODIF
590
-	'pass_retour_public' => 'Regresso ao sítio público',
591
-	'pass_rien_a_faire_ici' => 'Nada a fazer aqui.',
592
-	'pass_vousinscrire' => 'Inscrever-se neste sítio',
593
-	'precedent' => 'anterior',
594
-	'previsualisation' => 'Visualização',
595
-	'previsualiser' => 'Pré-visualizar',
581
+    'pass_mot_oublie' => 'Palavra-passe esquecida',
582
+    'pass_nouveau_enregistre' => 'A sua nova palavra-passe foi registada',
583
+    'pass_nouveau_pass' => 'Nova palavra-passe',
584
+    'pass_ok' => 'OK',
585
+    'pass_oubli_mot' => 'Palavra-passe esquecida',
586
+    'pass_procedure_changer' => 'Para alterar a sua palavra-passe, temos primeiro de verificar a sua identidade. Por favor escreva o endereço e-mail associado a esta conta.', # MODIF
587
+    'pass_quitter_fenetre' => 'Fechar esta janela',
588
+    'pass_rappel_login' => 'Recorde : o seu identificador (login) é « @login@ ».',
589
+    'pass_recevoir_mail' => 'Vai receber um email que indica como recuperar o seu acesso ao sítio.', # MODIF
590
+    'pass_retour_public' => 'Regresso ao sítio público',
591
+    'pass_rien_a_faire_ici' => 'Nada a fazer aqui.',
592
+    'pass_vousinscrire' => 'Inscrever-se neste sítio',
593
+    'precedent' => 'anterior',
594
+    'previsualisation' => 'Visualização',
595
+    'previsualiser' => 'Pré-visualizar',
596 596
 
597
-	// R
598
-	'retour' => 'Retroceder',
597
+    // R
598
+    'retour' => 'Retroceder',
599 599
 
600
-	// S
601
-	'spip_conforme_dtd' => 'SPIP considera esta página em conforme com o seu DOCTYPE :',
602
-	'squelette' => 'modelo',
603
-	'squelette_inclus_ligne' => 'modelo incluído, linha',
604
-	'squelette_ligne' => 'modelo, linha',
605
-	'stats_visites_et_popularite' => '@visites@ visitas ; popularidade : @popularite@',
606
-	'suivant' => 'seguinte',
600
+    // S
601
+    'spip_conforme_dtd' => 'SPIP considera esta página em conforme com o seu DOCTYPE :',
602
+    'squelette' => 'modelo',
603
+    'squelette_inclus_ligne' => 'modelo incluído, linha',
604
+    'squelette_ligne' => 'modelo, linha',
605
+    'stats_visites_et_popularite' => '@visites@ visitas ; popularidade : @popularite@',
606
+    'suivant' => 'seguinte',
607 607
 
608
-	// T
609
-	'taille_go' => '@taille@ Gb',
610
-	'taille_ko' => '@taille@ kb',
611
-	'taille_mo' => '@taille@ Mb',
612
-	'taille_octets' => ' @taille@ bytes',
613
-	'taille_octets_bi' => ' @taille@ bytes',
614
-	'texte_actualite_site_1' => 'Quando estiver familiarizado(a) com a interface, poderá clicar em «',
615
-	'texte_actualite_site_2' => 'interface completa',
616
-	'texte_actualite_site_3' => '» para abrir mais possibilidades.',
617
-	'texte_creation_automatique_vignette' => 'A criação automática de miniaturas de pré-visualização está activada neste sítio. Se instalar a partir deste formulário imagens de formato(s) @gd_formats@, serão acompanhadas de uma miniatura de um tamanho máximo de @taille_preview@ pixels.',
618
-	'texte_documents_associes' => 'Os documentos seguintes estão associados ao artigo,
608
+    // T
609
+    'taille_go' => '@taille@ Gb',
610
+    'taille_ko' => '@taille@ kb',
611
+    'taille_mo' => '@taille@ Mb',
612
+    'taille_octets' => ' @taille@ bytes',
613
+    'taille_octets_bi' => ' @taille@ bytes',
614
+    'texte_actualite_site_1' => 'Quando estiver familiarizado(a) com a interface, poderá clicar em «',
615
+    'texte_actualite_site_2' => 'interface completa',
616
+    'texte_actualite_site_3' => '» para abrir mais possibilidades.',
617
+    'texte_creation_automatique_vignette' => 'A criação automática de miniaturas de pré-visualização está activada neste sítio. Se instalar a partir deste formulário imagens de formato(s) @gd_formats@, serão acompanhadas de uma miniatura de um tamanho máximo de @taille_preview@ pixels.',
618
+    'texte_documents_associes' => 'Os documentos seguintes estão associados ao artigo,
619 619
   mas não foram directamente
620 620
  inseridos nele. Conforme a paginação do sítio público,
621 621
   poderão aparecer sob forma de documentos anexados.',
622
-	'texte_erreur_mise_niveau_base' => 'Erro de base de dados por ocasião do nivelamento.
622
+    'texte_erreur_mise_niveau_base' => 'Erro de base de dados por ocasião do nivelamento.
623 623
    A imagem <b>@fichier@</b> não passou (artigo @id_article@).
624 624
   Note bem esta referência, volte a tentar o nivelamento, e verifique se as imagens aparecem sempre nos artigos.',
625
-	'texte_erreur_visiteur' => 'Tentou aceder à área privada usando um login não autorizado.',
626
-	'texte_inc_auth_1' => 'Você está identificado sob o
625
+    'texte_erreur_visiteur' => 'Tentou aceder à área privada usando um login não autorizado.',
626
+    'texte_inc_auth_1' => 'Você está identificado sob o
627 627
    login <b>@auth_login@</b>, mas este já/ não existe na base de dados.
628 628
  Tente',
629
-	'texte_inc_auth_2' => 'refazer a ligação',
630
-	'texte_inc_auth_3' => ', depois de eventualmente ter fechado e
629
+    'texte_inc_auth_2' => 'refazer a ligação',
630
+    'texte_inc_auth_3' => ', depois de eventualmente ter fechado e
631 631
  voltado a abrir o seu navegador.',
632
-	'texte_inc_config' => 'As modificações efectuadas nestas páginas influenciam muito o
632
+    'texte_inc_config' => 'As modificações efectuadas nestas páginas influenciam muito o
633 633
  funcionamento do seu sítio. Recomendamos que não intervenha enquanto não estiver familiarizado com o funcionamento do sistema SPIP. <br /><br /><b> Em
634 634
  geral, é fortemente recomendado
635 635
  deixar a responsabilidade dessas páginas ao webmaster principal do seu sítio. <b>',
636
-	'texte_inc_meta_1' => 'O sistema encontrou um erro durante a escrita do arquivo <code>@fichier@</code>. Como administrador do sítio, por favor,',
637
-	'texte_inc_meta_2' => 'verificar as permissões de escrita',
638
-	'texte_inc_meta_3' => 'no directório <code>@repertoire@</code>.',
639
-	'texte_statut_en_cours_redaction' => 'em curso de redacção',
640
-	'texte_statut_poubelle' => 'para o caixote de lixo',
641
-	'texte_statut_propose_evaluation' => 'proposto para avaliação',
642
-	'texte_statut_publie' => 'publicado online',
643
-	'texte_statut_refuse' => 'recusado',
644
-	'titre_ajouter_mot_cle' => 'ACRESCENTAR UMA PALAVRA-CHAVE',
645
-	'titre_cadre_raccourcis' => 'ATALHOS :',
646
-	'titre_changer_couleur_interface' => 'Mudar a cor da interface',
647
-	'titre_image_admin_article' => 'Pode administrar este artigo',
648
-	'titre_image_administrateur' => 'Administrador',
649
-	'titre_image_aide' => 'Ajuda sobre este elemento',
650
-	'titre_image_auteur_supprime' => 'Autor eliminado',
651
-	'titre_image_redacteur' => 'Redactor sem acesso',
652
-	'titre_image_redacteur_02' => 'Redactor',
653
-	'titre_image_selecteur' => 'Exibir a lista',
654
-	'titre_image_visiteur' => 'Visitante',
655
-	'titre_joindre_document' => 'ANEXAR UM DOCUMENTO',
656
-	'titre_mots_cles' => 'PALAVRAS-CHAVE',
657
-	'titre_probleme_technique' => 'Atenção : um problema técnico (servidor SQL) impede o acesso a esta parte do sítio. Obrigado pela sua compreensão.',
658
-	'titre_publier_document' => 'PUBLICAR UM DOCUMENTO NESTA RUBRICA',
659
-	'titre_signatures_attente' => 'Assinaturas aguardando validação',
660
-	'titre_signatures_confirmees' => 'Assinaturas confirmadas',
661
-	'titre_statistiques' => 'Estatísticas do sítio',
662
-	'titre_titre_document' => 'Título do documento :',
663
-	'todo' => 'a caminho',
664
-	'trad_reference' => '(referência para as traduções)',
636
+    'texte_inc_meta_1' => 'O sistema encontrou um erro durante a escrita do arquivo <code>@fichier@</code>. Como administrador do sítio, por favor,',
637
+    'texte_inc_meta_2' => 'verificar as permissões de escrita',
638
+    'texte_inc_meta_3' => 'no directório <code>@repertoire@</code>.',
639
+    'texte_statut_en_cours_redaction' => 'em curso de redacção',
640
+    'texte_statut_poubelle' => 'para o caixote de lixo',
641
+    'texte_statut_propose_evaluation' => 'proposto para avaliação',
642
+    'texte_statut_publie' => 'publicado online',
643
+    'texte_statut_refuse' => 'recusado',
644
+    'titre_ajouter_mot_cle' => 'ACRESCENTAR UMA PALAVRA-CHAVE',
645
+    'titre_cadre_raccourcis' => 'ATALHOS :',
646
+    'titre_changer_couleur_interface' => 'Mudar a cor da interface',
647
+    'titre_image_admin_article' => 'Pode administrar este artigo',
648
+    'titre_image_administrateur' => 'Administrador',
649
+    'titre_image_aide' => 'Ajuda sobre este elemento',
650
+    'titre_image_auteur_supprime' => 'Autor eliminado',
651
+    'titre_image_redacteur' => 'Redactor sem acesso',
652
+    'titre_image_redacteur_02' => 'Redactor',
653
+    'titre_image_selecteur' => 'Exibir a lista',
654
+    'titre_image_visiteur' => 'Visitante',
655
+    'titre_joindre_document' => 'ANEXAR UM DOCUMENTO',
656
+    'titre_mots_cles' => 'PALAVRAS-CHAVE',
657
+    'titre_probleme_technique' => 'Atenção : um problema técnico (servidor SQL) impede o acesso a esta parte do sítio. Obrigado pela sua compreensão.',
658
+    'titre_publier_document' => 'PUBLICAR UM DOCUMENTO NESTA RUBRICA',
659
+    'titre_signatures_attente' => 'Assinaturas aguardando validação',
660
+    'titre_signatures_confirmees' => 'Assinaturas confirmadas',
661
+    'titre_statistiques' => 'Estatísticas do sítio',
662
+    'titre_titre_document' => 'Título do documento :',
663
+    'todo' => 'a caminho',
664
+    'trad_reference' => '(referência para as traduções)',
665 665
 
666
-	// Z
667
-	'zbug_balise_b_aval' => ': tag B colocada demasiado tarde no laço infinito',
668
-	'zbug_balise_inexistante' => 'Tag @balise@ mal declarada para @from@',
669
-	'zbug_balise_sans_argument' => 'Argumento em falta na tag @balise@',
670
-	'zbug_boucle' => 'laço infinito',
671
-	'zbug_boucle_recursive_undef' => 'laço recursivo não definido @nom@',
672
-	'zbug_calcul' => 'cálculo',
673
-	'zbug_champ_hors_boucle' => 'Campo @champ@ fora do laço infinito',
674
-	'zbug_champ_hors_motif' => 'Campo @champ@ fora de contexto @motif@',
675
-	'zbug_code' => 'código',
676
-	'zbug_critere_inconnu' => 'critério desconhecido @critere@ ',
677
-	'zbug_distant_interdit' => 'Dados externos interditos',
678
-	'zbug_doublon_table_sans_cle_primaire' => 'Entradas duplas numa tabela que não tem uma chave primária simples',
679
-	'zbug_doublon_table_sans_index' => 'Entradas duplas numa tabela sem índice',
680
-	'zbug_erreur_boucle_double' => 'laço @id@: Dupla definição ',
681
-	'zbug_erreur_boucle_fermant' => 'laço @id@: tag final em falta   ',
682
-	'zbug_erreur_boucle_syntaxe' => 'Laço com sintaxe incorrecta @id@',
683
-	'zbug_erreur_compilation' => 'Erro de compilação',
684
-	'zbug_erreur_execution_page' => 'erro de execução da página',
685
-	'zbug_erreur_filtre' => 'Erro : filtro indefinido @filtre@ ',
686
-	'zbug_erreur_meme_parent' => '{meme_parent} aplica-se exclusivamente aos laços (FORUMS) ou (RUBRIQUES)',
687
-	'zbug_erreur_squelette' => 'Erro(s) no modelo',
688
-	'zbug_hors_compilation' => 'Não compilado',
689
-	'zbug_info_erreur_squelette' => 'Erro no sítio',
690
-	'zbug_inversion_ordre_inexistant' => 'inversão de uma ordem inexistente',
691
-	'zbug_pagination_sans_critere' => '#PAGINAÇÃO sem critério {paginação} ou usada num laço recursivo',
692
-	'zbug_parametres_inclus_incorrects' => 'Parâmetros de inclusão incorrectos: @param@',
693
-	'zbug_profile' => 'Cálculo de tempo : @time@',
694
-	'zbug_resultat' => 'resultado',
695
-	'zbug_serveur_indefini' => 'Sevidor SQL não definido',
696
-	'zbug_statistiques' => 'Estatísticas das consulta SQL classificadas por duração',
697
-	'zbug_table_inconnue' => 'Tabela SQL «@table@» desconhecida',
698
-	'zxml_connus_attributs' => 'attributos conhecidos',
699
-	'zxml_de' => 'de',
700
-	'zxml_inconnu_attribut' => 'atributo desconhecido',
701
-	'zxml_inconnu_balise' => 'tag desconhecida',
702
-	'zxml_inconnu_entite' => 'entidade desconhecida',
703
-	'zxml_inconnu_id' => 'ID desconhecido',
704
-	'zxml_mais_de' => 'mas de',
705
-	'zxml_non_conforme' => 'não está de acordo com o princípio',
706
-	'zxml_non_fils' => 'não é um filho de ',
707
-	'zxml_nonvide_balise' => 'a tag não está vazia',
708
-	'zxml_obligatoire_attribut' => 'atributo obrigatório está em falta',
709
-	'zxml_succession_fils_incorrecte' => 'sucessão de filhos incorrecta',
710
-	'zxml_survoler' => 'para visualizar os correctos, mover o rato por cima',
711
-	'zxml_valeur_attribut' => 'valor do atributo',
712
-	'zxml_vide_balise' => 'tag vazia',
713
-	'zxml_vu' => 'visualizado antes'
666
+    // Z
667
+    'zbug_balise_b_aval' => ': tag B colocada demasiado tarde no laço infinito',
668
+    'zbug_balise_inexistante' => 'Tag @balise@ mal declarada para @from@',
669
+    'zbug_balise_sans_argument' => 'Argumento em falta na tag @balise@',
670
+    'zbug_boucle' => 'laço infinito',
671
+    'zbug_boucle_recursive_undef' => 'laço recursivo não definido @nom@',
672
+    'zbug_calcul' => 'cálculo',
673
+    'zbug_champ_hors_boucle' => 'Campo @champ@ fora do laço infinito',
674
+    'zbug_champ_hors_motif' => 'Campo @champ@ fora de contexto @motif@',
675
+    'zbug_code' => 'código',
676
+    'zbug_critere_inconnu' => 'critério desconhecido @critere@ ',
677
+    'zbug_distant_interdit' => 'Dados externos interditos',
678
+    'zbug_doublon_table_sans_cle_primaire' => 'Entradas duplas numa tabela que não tem uma chave primária simples',
679
+    'zbug_doublon_table_sans_index' => 'Entradas duplas numa tabela sem índice',
680
+    'zbug_erreur_boucle_double' => 'laço @id@: Dupla definição ',
681
+    'zbug_erreur_boucle_fermant' => 'laço @id@: tag final em falta   ',
682
+    'zbug_erreur_boucle_syntaxe' => 'Laço com sintaxe incorrecta @id@',
683
+    'zbug_erreur_compilation' => 'Erro de compilação',
684
+    'zbug_erreur_execution_page' => 'erro de execução da página',
685
+    'zbug_erreur_filtre' => 'Erro : filtro indefinido @filtre@ ',
686
+    'zbug_erreur_meme_parent' => '{meme_parent} aplica-se exclusivamente aos laços (FORUMS) ou (RUBRIQUES)',
687
+    'zbug_erreur_squelette' => 'Erro(s) no modelo',
688
+    'zbug_hors_compilation' => 'Não compilado',
689
+    'zbug_info_erreur_squelette' => 'Erro no sítio',
690
+    'zbug_inversion_ordre_inexistant' => 'inversão de uma ordem inexistente',
691
+    'zbug_pagination_sans_critere' => '#PAGINAÇÃO sem critério {paginação} ou usada num laço recursivo',
692
+    'zbug_parametres_inclus_incorrects' => 'Parâmetros de inclusão incorrectos: @param@',
693
+    'zbug_profile' => 'Cálculo de tempo : @time@',
694
+    'zbug_resultat' => 'resultado',
695
+    'zbug_serveur_indefini' => 'Sevidor SQL não definido',
696
+    'zbug_statistiques' => 'Estatísticas das consulta SQL classificadas por duração',
697
+    'zbug_table_inconnue' => 'Tabela SQL «@table@» desconhecida',
698
+    'zxml_connus_attributs' => 'attributos conhecidos',
699
+    'zxml_de' => 'de',
700
+    'zxml_inconnu_attribut' => 'atributo desconhecido',
701
+    'zxml_inconnu_balise' => 'tag desconhecida',
702
+    'zxml_inconnu_entite' => 'entidade desconhecida',
703
+    'zxml_inconnu_id' => 'ID desconhecido',
704
+    'zxml_mais_de' => 'mas de',
705
+    'zxml_non_conforme' => 'não está de acordo com o princípio',
706
+    'zxml_non_fils' => 'não é um filho de ',
707
+    'zxml_nonvide_balise' => 'a tag não está vazia',
708
+    'zxml_obligatoire_attribut' => 'atributo obrigatório está em falta',
709
+    'zxml_succession_fils_incorrecte' => 'sucessão de filhos incorrecta',
710
+    'zxml_survoler' => 'para visualizar os correctos, mover o rato por cima',
711
+    'zxml_valeur_attribut' => 'valor do atributo',
712
+    'zxml_vide_balise' => 'tag vazia',
713
+    'zxml_vu' => 'visualizado antes'
714 714
 );
Please login to merge, or discard this patch.
ecrire/inc/filtres_ecrire.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		// confirmation du deplacement
118 118
 		if (
119 119
 			sql_table_exists('spip_breves')
120
-			and ($contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . intval($id_objet)))
120
+			and ($contient_breves = sql_countsel('spip_breves', 'id_rubrique='.intval($id_objet)))
121 121
 			and ($contient_breves > 0)
122 122
 		) {
123 123
 			// FIXME: utiliser singulier_ou_pluriel, migrer dans plugin Brèves
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 			);
132 132
 			$confirm .= "\n<div class='confirmer_deplacement verdana2'>"
133 133
 				. "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>"
134
-				. $scb .
134
+				. $scb.
135 135
 				"</label></div></div>\n";
136 136
 		} else {
137 137
 			$confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n";
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
 	$form .= $confirm;
141 141
 	if ($actionable) {
142 142
 		if (strpos($form, '<select') !== false) {
143
-			$form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
144
-				. '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>'
143
+			$form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>"
144
+				. '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>'
145 145
 				. '</div>';
146 146
 		}
147
-		$form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form;
147
+		$form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form;
148 148
 		if ($action = charger_fonction("editer_$objet", 'action', true)) {
149 149
 			$form = generer_action_auteur(
150 150
 				"editer_$objet",
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
 	include_spip('inc/presentation');
172 172
 
173
-	return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur();
173
+	return debut_cadre_couleur($logo, true, '', $titre).$form.fin_cadre_couleur();
174 174
 }
175 175
 
176 176
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	if ($statut == 'nouveau') {
247 247
 		if ($attente) {
248 248
 			$statut = $attente;
249
-			$plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')';
249
+			$plus = ' ('._T('info_statut_auteur_a_confirmer').')';
250 250
 		} else {
251 251
 			return _T('info_statut_auteur_a_confirmer');
252 252
 		}
@@ -259,16 +259,16 @@  discard block
 block discarded – undo
259 259
 		'5poubelle' => _T('texte_statut_poubelle'), // bouh
260 260
 	];
261 261
 	if (isset($recom[$statut])) {
262
-		return $recom[$statut] . $plus;
262
+		return $recom[$statut].$plus;
263 263
 	}
264 264
 
265 265
 	// retrouver directement par le statut sinon
266 266
 	if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) {
267 267
 		if (isset($recom[$t])) {
268
-			return $recom[$t] . $plus;
268
+			return $recom[$t].$plus;
269 269
 		}
270 270
 
271
-		return _T($t) . $plus;
271
+		return _T($t).$plus;
272 272
 	}
273 273
 
274 274
 	// si on a pas reussi a le traduire, retournons la chaine telle quelle
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 	if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) {
390 390
 		$in = !(is_countable($GLOBALS['connect_id_rubrique']) ? count($GLOBALS['connect_id_rubrique']) : 0)
391 391
 			? ''
392
-			: (' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
392
+			: (' AND '.sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
393 393
 
394 394
 		// on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement
395 395
 		if ($objet == 'rubrique') {
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 		return '';
424 424
 	}
425 425
 
426
-	return propre('[->' . $virtuel . ']');
426
+	return propre('[->'.$virtuel.']');
427 427
 }
428 428
 
429 429
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 	$clic = http_img_pack('rss-16.png', 'RSS', '', $title);
451 451
 
452 452
 	$url = generer_url_api_low_sec('transmettre', 'rss', $op, '', http_build_query($args), false, true);
453
-	return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>";
453
+	return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>";
454 454
 }
455 455
 
456 456
 
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 	);
527 527
 
528 528
 	if ($alertes = array_filter($alertes)) {
529
-		return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" .
529
+		return "<div class='wrap-messages-alertes'><div class='messages-alertes'>".
530 530
 		join(' | ', $alertes)
531 531
 		. '</div></div>';
532 532
 	}
@@ -562,13 +562,13 @@  discard block
 block discarded – undo
562 562
  */
563 563
 function afficher_plus_info($lien, $titre = '+', $titre_lien = '') {
564 564
 	$titre = attribut_html($titre);
565
-	$icone = "\n<a href='$lien' title='$titre' class='plus_info'>" .
566
-		http_img_pack('information-16.png', $titre) . '</a>';
565
+	$icone = "\n<a href='$lien' title='$titre' class='plus_info'>".
566
+		http_img_pack('information-16.png', $titre).'</a>';
567 567
 
568 568
 	if (!$titre_lien) {
569 569
 		return $icone;
570 570
 	} else {
571
-		return $icone . "\n<a href='$lien'>$titre_lien</a>";
571
+		return $icone."\n<a href='$lien'>$titre_lien</a>";
572 572
 	}
573 573
 }
574 574
 
Please login to merge, or discard this patch.
Indentation   +362 added lines, -362 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Filtres
17 17
  */
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 include_spip('inc/filtres_boites');
@@ -41,25 +41,25 @@  discard block
 block discarded – undo
41 41
  */
42 42
 function parametres_css_prive() {
43 43
 
44
-	$args = [];
45
-	$args['v'] = $GLOBALS['spip_version_code'];
46
-	$args['p'] = substr(md5($GLOBALS['meta']['plugin']), 0, 4);
47
-	$args['themes'] = implode(',', lister_themes_prives());
48
-	$args['ltr'] = $GLOBALS['spip_lang_left'];
49
-	// un md5 des menus : si un menu change il faut maj la css
50
-	$args['md5b'] = (function_exists('md5_boutons_plugins') ? md5_boutons_plugins() : '');
44
+    $args = [];
45
+    $args['v'] = $GLOBALS['spip_version_code'];
46
+    $args['p'] = substr(md5($GLOBALS['meta']['plugin']), 0, 4);
47
+    $args['themes'] = implode(',', lister_themes_prives());
48
+    $args['ltr'] = $GLOBALS['spip_lang_left'];
49
+    // un md5 des menus : si un menu change il faut maj la css
50
+    $args['md5b'] = (function_exists('md5_boutons_plugins') ? md5_boutons_plugins() : '');
51 51
 
52
-	$c = $GLOBALS['visiteur_session']['prefs']['couleur'] ?? 2;
52
+    $c = $GLOBALS['visiteur_session']['prefs']['couleur'] ?? 2;
53 53
 
54
-	$couleurs = charger_fonction('couleurs', 'inc');
55
-	parse_str($couleurs($c), $c);
56
-	$args = array_merge($args, $c);
54
+    $couleurs = charger_fonction('couleurs', 'inc');
55
+    parse_str($couleurs($c), $c);
56
+    $args = array_merge($args, $c);
57 57
 
58
-	if (_request('var_mode') == 'recalcul' or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul')) {
59
-		$args['var_mode'] = 'recalcul';
60
-	}
58
+    if (_request('var_mode') == 'recalcul' or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul')) {
59
+        $args['var_mode'] = 'recalcul';
60
+    }
61 61
 
62
-	return http_build_query($args);
62
+    return http_build_query($args);
63 63
 }
64 64
 
65 65
 
@@ -82,95 +82,95 @@  discard block
 block discarded – undo
82 82
  * @return string
83 83
  */
84 84
 function chercher_rubrique(
85
-	$titre,
86
-	$id_objet,
87
-	$id_parent,
88
-	$objet,
89
-	$id_secteur,
90
-	$restreint,
91
-	$actionable = false,
92
-	$retour_sans_cadre = false
85
+    $titre,
86
+    $id_objet,
87
+    $id_parent,
88
+    $objet,
89
+    $id_secteur,
90
+    $restreint,
91
+    $actionable = false,
92
+    $retour_sans_cadre = false
93 93
 ) {
94 94
 
95
-	include_spip('inc/autoriser');
96
-	if (intval($id_objet) && !autoriser('modifier', $objet, $id_objet)) {
97
-		return '';
98
-	}
99
-	if (!sql_countsel('spip_rubriques')) {
100
-		return '';
101
-	}
102
-	$chercher_rubrique = charger_fonction('chercher_rubrique', 'inc');
103
-	$form = $chercher_rubrique($id_parent, $objet, $restreint, ($objet == 'rubrique') ? $id_objet : 0);
104
-
105
-	if ($id_parent == 0) {
106
-		$logo = 'racine-24.png';
107
-	} elseif ($id_secteur == $id_parent) {
108
-		$logo = 'secteur-24.png';
109
-	} else {
110
-		$logo = 'rubrique-24.png';
111
-	}
112
-
113
-	$confirm = '';
114
-	if ($objet == 'rubrique') {
115
-		// FIXME: Migration plus adapté vers le plugin Brèves ?
116
-		// si c'est une rubrique-secteur contenant des breves, demander la
117
-		// confirmation du deplacement
118
-		if (
119
-			sql_table_exists('spip_breves')
120
-			and ($contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . intval($id_objet)))
121
-			and ($contient_breves > 0)
122
-		) {
123
-			// FIXME: utiliser singulier_ou_pluriel, migrer dans plugin Brèves
124
-			$scb = ($contient_breves > 1 ? 's' : '');
125
-			$scb = _T(
126
-				'avis_deplacement_rubrique',
127
-				[
128
-					'contient_breves' => $contient_breves,
129
-					'scb' => $scb
130
-				]
131
-			);
132
-			$confirm .= "\n<div class='confirmer_deplacement verdana2'>"
133
-				. "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>"
134
-				. $scb .
135
-				"</label></div></div>\n";
136
-		} else {
137
-			$confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n";
138
-		}
139
-	}
140
-	$form .= $confirm;
141
-	if ($actionable) {
142
-		if (strpos($form, '<select') !== false) {
143
-			$form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
144
-				. '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>'
145
-				. '</div>';
146
-		}
147
-		$form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form;
148
-		if ($action = charger_fonction("editer_$objet", 'action', true)) {
149
-			$form = generer_action_auteur(
150
-				"editer_$objet",
151
-				$id_objet,
152
-				self(),
153
-				$form,
154
-				" method='post' class='submit_plongeur'"
155
-			);
156
-		} else {
157
-			$form = generer_action_auteur(
158
-				'editer_objet',
159
-				"$objet/$id_objet",
160
-				self(),
161
-				$form,
162
-				" method='post' class='submit_plongeur'"
163
-			);
164
-		}
165
-	}
166
-
167
-	if ($retour_sans_cadre) {
168
-		return $form;
169
-	}
170
-
171
-	include_spip('inc/presentation');
172
-
173
-	return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur();
95
+    include_spip('inc/autoriser');
96
+    if (intval($id_objet) && !autoriser('modifier', $objet, $id_objet)) {
97
+        return '';
98
+    }
99
+    if (!sql_countsel('spip_rubriques')) {
100
+        return '';
101
+    }
102
+    $chercher_rubrique = charger_fonction('chercher_rubrique', 'inc');
103
+    $form = $chercher_rubrique($id_parent, $objet, $restreint, ($objet == 'rubrique') ? $id_objet : 0);
104
+
105
+    if ($id_parent == 0) {
106
+        $logo = 'racine-24.png';
107
+    } elseif ($id_secteur == $id_parent) {
108
+        $logo = 'secteur-24.png';
109
+    } else {
110
+        $logo = 'rubrique-24.png';
111
+    }
112
+
113
+    $confirm = '';
114
+    if ($objet == 'rubrique') {
115
+        // FIXME: Migration plus adapté vers le plugin Brèves ?
116
+        // si c'est une rubrique-secteur contenant des breves, demander la
117
+        // confirmation du deplacement
118
+        if (
119
+            sql_table_exists('spip_breves')
120
+            and ($contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . intval($id_objet)))
121
+            and ($contient_breves > 0)
122
+        ) {
123
+            // FIXME: utiliser singulier_ou_pluriel, migrer dans plugin Brèves
124
+            $scb = ($contient_breves > 1 ? 's' : '');
125
+            $scb = _T(
126
+                'avis_deplacement_rubrique',
127
+                [
128
+                    'contient_breves' => $contient_breves,
129
+                    'scb' => $scb
130
+                ]
131
+            );
132
+            $confirm .= "\n<div class='confirmer_deplacement verdana2'>"
133
+                . "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>"
134
+                . $scb .
135
+                "</label></div></div>\n";
136
+        } else {
137
+            $confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n";
138
+        }
139
+    }
140
+    $form .= $confirm;
141
+    if ($actionable) {
142
+        if (strpos($form, '<select') !== false) {
143
+            $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
144
+                . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>'
145
+                . '</div>';
146
+        }
147
+        $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form;
148
+        if ($action = charger_fonction("editer_$objet", 'action', true)) {
149
+            $form = generer_action_auteur(
150
+                "editer_$objet",
151
+                $id_objet,
152
+                self(),
153
+                $form,
154
+                " method='post' class='submit_plongeur'"
155
+            );
156
+        } else {
157
+            $form = generer_action_auteur(
158
+                'editer_objet',
159
+                "$objet/$id_objet",
160
+                self(),
161
+                $form,
162
+                " method='post' class='submit_plongeur'"
163
+            );
164
+        }
165
+    }
166
+
167
+    if ($retour_sans_cadre) {
168
+        return $form;
169
+    }
170
+
171
+    include_spip('inc/presentation');
172
+
173
+    return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur();
174 174
 }
175 175
 
176 176
 
@@ -184,24 +184,24 @@  discard block
 block discarded – undo
184 184
  * @return bool
185 185
  */
186 186
 function avoir_visiteurs($past = false, $accepter = true) {
187
-	if ($GLOBALS['meta']['forums_publics'] == 'abo') {
188
-		return true;
189
-	}
190
-	if ($accepter and $GLOBALS['meta']['accepter_visiteurs'] <> 'non') {
191
-		return true;
192
-	}
193
-	if (sql_countsel('spip_articles', "accepter_forum='abo'")) {
194
-		return true;
195
-	}
196
-	if (!$past) {
197
-		return false;
198
-	}
199
-
200
-	return sql_countsel(
201
-		'spip_auteurs',
202
-		"statut NOT IN ('0minirezo','1comite', '5poubelle')
187
+    if ($GLOBALS['meta']['forums_publics'] == 'abo') {
188
+        return true;
189
+    }
190
+    if ($accepter and $GLOBALS['meta']['accepter_visiteurs'] <> 'non') {
191
+        return true;
192
+    }
193
+    if (sql_countsel('spip_articles', "accepter_forum='abo'")) {
194
+        return true;
195
+    }
196
+    if (!$past) {
197
+        return false;
198
+    }
199
+
200
+    return sql_countsel(
201
+        'spip_auteurs',
202
+        "statut NOT IN ('0minirezo','1comite', '5poubelle')
203 203
 	                    AND (statut<>'nouveau' OR prefs NOT IN ('0minirezo','1comite', '5poubelle'))"
204
-	);
204
+    );
205 205
 }
206 206
 
207 207
 /**
@@ -217,18 +217,18 @@  discard block
 block discarded – undo
217 217
  * @return array
218 218
  */
219 219
 function statuts_articles_visibles($statut_auteur) {
220
-	static $auth = [];
221
-	if (!isset($auth[$statut_auteur])) {
222
-		$auth[$statut_auteur] = [];
223
-		$statuts = array_column(sql_allfetsel('distinct statut', 'spip_articles'), 'statut');
224
-		foreach ($statuts as $s) {
225
-			if (autoriser('voir', 'article', 0, ['statut' => $statut_auteur], ['statut' => $s])) {
226
-				$auth[$statut_auteur][] = $s;
227
-			}
228
-		}
229
-	}
230
-
231
-	return $auth[$statut_auteur];
220
+    static $auth = [];
221
+    if (!isset($auth[$statut_auteur])) {
222
+        $auth[$statut_auteur] = [];
223
+        $statuts = array_column(sql_allfetsel('distinct statut', 'spip_articles'), 'statut');
224
+        foreach ($statuts as $s) {
225
+            if (autoriser('voir', 'article', 0, ['statut' => $statut_auteur], ['statut' => $s])) {
226
+                $auth[$statut_auteur][] = $s;
227
+            }
228
+        }
229
+    }
230
+
231
+    return $auth[$statut_auteur];
232 232
 }
233 233
 
234 234
 /**
@@ -242,38 +242,38 @@  discard block
 block discarded – undo
242 242
  * @return string
243 243
  */
244 244
 function traduire_statut_auteur($statut, $attente = '') {
245
-	$plus = '';
246
-	if ($statut == 'nouveau') {
247
-		if ($attente) {
248
-			$statut = $attente;
249
-			$plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')';
250
-		} else {
251
-			return _T('info_statut_auteur_a_confirmer');
252
-		}
253
-	}
254
-
255
-	$recom = [
256
-		'info_administrateurs' => _T('item_administrateur_2'),
257
-		'info_redacteurs' => _T('intem_redacteur'),
258
-		'info_visiteurs' => _T('item_visiteur'),
259
-		'5poubelle' => _T('texte_statut_poubelle'), // bouh
260
-	];
261
-	if (isset($recom[$statut])) {
262
-		return $recom[$statut] . $plus;
263
-	}
264
-
265
-	// retrouver directement par le statut sinon
266
-	if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) {
267
-		if (isset($recom[$t])) {
268
-			return $recom[$t] . $plus;
269
-		}
270
-
271
-		return _T($t) . $plus;
272
-	}
273
-
274
-	// si on a pas reussi a le traduire, retournons la chaine telle quelle
275
-	// c'est toujours plus informatif que rien du tout
276
-	return $statut;
245
+    $plus = '';
246
+    if ($statut == 'nouveau') {
247
+        if ($attente) {
248
+            $statut = $attente;
249
+            $plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')';
250
+        } else {
251
+            return _T('info_statut_auteur_a_confirmer');
252
+        }
253
+    }
254
+
255
+    $recom = [
256
+        'info_administrateurs' => _T('item_administrateur_2'),
257
+        'info_redacteurs' => _T('intem_redacteur'),
258
+        'info_visiteurs' => _T('item_visiteur'),
259
+        '5poubelle' => _T('texte_statut_poubelle'), // bouh
260
+    ];
261
+    if (isset($recom[$statut])) {
262
+        return $recom[$statut] . $plus;
263
+    }
264
+
265
+    // retrouver directement par le statut sinon
266
+    if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) {
267
+        if (isset($recom[$t])) {
268
+            return $recom[$t] . $plus;
269
+        }
270
+
271
+        return _T($t) . $plus;
272
+    }
273
+
274
+    // si on a pas reussi a le traduire, retournons la chaine telle quelle
275
+    // c'est toujours plus informatif que rien du tout
276
+    return $statut;
277 277
 }
278 278
 
279 279
 /**
@@ -284,29 +284,29 @@  discard block
 block discarded – undo
284 284
  * @return string
285 285
  */
286 286
 function afficher_qui_edite($id_objet, $objet): string {
287
-	static $qui = [];
288
-	if (isset($qui[$objet][$id_objet])) {
289
-		return $qui[$objet][$id_objet];
290
-	}
291
-
292
-	include_spip('inc/config');
293
-	if (lire_config('articles_modif', 'non') === 'non') {
294
-		return $qui[$objet][$id_objet] = '';
295
-	}
296
-
297
-	include_spip('inc/drapeau_edition');
298
-	$modif = mention_qui_edite($id_objet, $objet);
299
-	if (!$modif) {
300
-		return $qui[$objet][$id_objet] = '';
301
-	}
302
-
303
-	include_spip('base/objets');
304
-	$infos = lister_tables_objets_sql(table_objet_sql($objet));
305
-	if (isset($infos['texte_signale_edition'])) {
306
-		return $qui[$objet][$id_objet] = _T($infos['texte_signale_edition'], $modif);
307
-	}
308
-
309
-	return $qui[$objet][$id_objet] = _T('info_qui_edite', $modif);
287
+    static $qui = [];
288
+    if (isset($qui[$objet][$id_objet])) {
289
+        return $qui[$objet][$id_objet];
290
+    }
291
+
292
+    include_spip('inc/config');
293
+    if (lire_config('articles_modif', 'non') === 'non') {
294
+        return $qui[$objet][$id_objet] = '';
295
+    }
296
+
297
+    include_spip('inc/drapeau_edition');
298
+    $modif = mention_qui_edite($id_objet, $objet);
299
+    if (!$modif) {
300
+        return $qui[$objet][$id_objet] = '';
301
+    }
302
+
303
+    include_spip('base/objets');
304
+    $infos = lister_tables_objets_sql(table_objet_sql($objet));
305
+    if (isset($infos['texte_signale_edition'])) {
306
+        return $qui[$objet][$id_objet] = _T($infos['texte_signale_edition'], $modif);
307
+    }
308
+
309
+    return $qui[$objet][$id_objet] = _T('info_qui_edite', $modif);
310 310
 }
311 311
 
312 312
 /**
@@ -324,53 +324,53 @@  discard block
 block discarded – undo
324 324
  * @return array
325 325
  */
326 326
 function auteurs_lister_statuts($quoi = 'tous', $en_base = true): array {
327
-	if (!defined('AUTEURS_MIN_REDAC')) {
328
-		define('AUTEURS_MIN_REDAC', '0minirezo,1comite,5poubelle');
329
-	}
330
-
331
-	switch ($quoi) {
332
-		case 'redacteurs':
333
-			$statut = AUTEURS_MIN_REDAC;
334
-			$statut = explode(',', $statut);
335
-			if ($en_base) {
336
-				$check = array_column(sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $statut)), 'statut');
337
-				$retire = array_diff($statut, $check);
338
-				$statut = array_diff($statut, $retire);
339
-			}
340
-
341
-			return array_unique($statut);
342
-
343
-		case 'visiteurs':
344
-			$statut = [];
345
-			$exclus = AUTEURS_MIN_REDAC;
346
-			$exclus = explode(',', $exclus);
347
-			if (!$en_base) {
348
-				// prendre aussi les statuts de la table des status qui ne sont pas dans le define
349
-				$statut = array_diff(array_values($GLOBALS['liste_des_statuts']), $exclus);
350
-			}
351
-			$s_complement = array_column(
352
-				sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $exclus, 'NOT')),
353
-				'statut'
354
-			);
355
-
356
-			return array_unique(array_merge($statut, $s_complement));
357
-
358
-		default:
359
-		case 'tous':
360
-			$statut = array_values($GLOBALS['liste_des_statuts']);
361
-			$s_complement = array_column(
362
-				sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $statut, 'NOT')),
363
-				'statut'
364
-			);
365
-			$statut = array_merge($statut, $s_complement);
366
-			if ($en_base) {
367
-				$check = array_column(sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $statut)), 'statut');
368
-				$retire = array_diff($statut, $check);
369
-				$statut = array_diff($statut, $retire);
370
-			}
371
-
372
-			return array_unique($statut);
373
-	}
327
+    if (!defined('AUTEURS_MIN_REDAC')) {
328
+        define('AUTEURS_MIN_REDAC', '0minirezo,1comite,5poubelle');
329
+    }
330
+
331
+    switch ($quoi) {
332
+        case 'redacteurs':
333
+            $statut = AUTEURS_MIN_REDAC;
334
+            $statut = explode(',', $statut);
335
+            if ($en_base) {
336
+                $check = array_column(sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $statut)), 'statut');
337
+                $retire = array_diff($statut, $check);
338
+                $statut = array_diff($statut, $retire);
339
+            }
340
+
341
+            return array_unique($statut);
342
+
343
+        case 'visiteurs':
344
+            $statut = [];
345
+            $exclus = AUTEURS_MIN_REDAC;
346
+            $exclus = explode(',', $exclus);
347
+            if (!$en_base) {
348
+                // prendre aussi les statuts de la table des status qui ne sont pas dans le define
349
+                $statut = array_diff(array_values($GLOBALS['liste_des_statuts']), $exclus);
350
+            }
351
+            $s_complement = array_column(
352
+                sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $exclus, 'NOT')),
353
+                'statut'
354
+            );
355
+
356
+            return array_unique(array_merge($statut, $s_complement));
357
+
358
+        default:
359
+        case 'tous':
360
+            $statut = array_values($GLOBALS['liste_des_statuts']);
361
+            $s_complement = array_column(
362
+                sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $statut, 'NOT')),
363
+                'statut'
364
+            );
365
+            $statut = array_merge($statut, $s_complement);
366
+            if ($en_base) {
367
+                $check = array_column(sql_allfetsel('DISTINCT statut', 'spip_auteurs', sql_in('statut', $statut)), 'statut');
368
+                $retire = array_diff($statut, $check);
369
+                $statut = array_diff($statut, $retire);
370
+            }
371
+
372
+            return array_unique($statut);
373
+    }
374 374
 }
375 375
 
376 376
 /**
@@ -386,28 +386,28 @@  discard block
 block discarded – undo
386 386
  */
387 387
 function trouver_rubrique_creer_objet($id_rubrique, $objet) {
388 388
 
389
-	if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) {
390
-		$in = !(is_countable($GLOBALS['connect_id_rubrique']) ? count($GLOBALS['connect_id_rubrique']) : 0)
391
-			? ''
392
-			: (' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
393
-
394
-		// on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement
395
-		if ($objet == 'rubrique') {
396
-			$id_rubrique = 0;
397
-		} else {
398
-			$id_rubrique = sql_getfetsel('id_rubrique', 'spip_rubriques', "id_parent=0$in", '', 'id_rubrique DESC', 1);
399
-		}
400
-
401
-		if (!autoriser("creer{$objet}dans", 'rubrique', $id_rubrique)) {
402
-			// manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises
403
-			$res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0');
404
-			while (!autoriser("creer{$objet}dans", 'rubrique', $id_rubrique) && $row_rub = sql_fetch($res)) {
405
-				$id_rubrique = $row_rub['id_rubrique'];
406
-			}
407
-		}
408
-	}
409
-
410
-	return $id_rubrique;
389
+    if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) {
390
+        $in = !(is_countable($GLOBALS['connect_id_rubrique']) ? count($GLOBALS['connect_id_rubrique']) : 0)
391
+            ? ''
392
+            : (' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']));
393
+
394
+        // on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement
395
+        if ($objet == 'rubrique') {
396
+            $id_rubrique = 0;
397
+        } else {
398
+            $id_rubrique = sql_getfetsel('id_rubrique', 'spip_rubriques', "id_parent=0$in", '', 'id_rubrique DESC', 1);
399
+        }
400
+
401
+        if (!autoriser("creer{$objet}dans", 'rubrique', $id_rubrique)) {
402
+            // manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises
403
+            $res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0');
404
+            while (!autoriser("creer{$objet}dans", 'rubrique', $id_rubrique) && $row_rub = sql_fetch($res)) {
405
+                $id_rubrique = $row_rub['id_rubrique'];
406
+            }
407
+        }
408
+    }
409
+
410
+    return $id_rubrique;
411 411
 }
412 412
 
413 413
 /**
@@ -418,12 +418,12 @@  discard block
 block discarded – undo
418 418
  * @return string
419 419
  */
420 420
 function lien_article_virtuel($virtuel) {
421
-	include_spip('inc/lien');
422
-	if (!$virtuel = virtuel_redirige($virtuel)) {
423
-		return '';
424
-	}
421
+    include_spip('inc/lien');
422
+    if (!$virtuel = virtuel_redirige($virtuel)) {
423
+        return '';
424
+    }
425 425
 
426
-	return propre('[->' . $virtuel . ']');
426
+    return propre('[->' . $virtuel . ']');
427 427
 }
428 428
 
429 429
 
@@ -446,11 +446,11 @@  discard block
 block discarded – undo
446 446
  * @filtre
447 447
  */
448 448
 function bouton_spip_rss($op, $args = [], $lang = '', $title = 'RSS') {
449
-	include_spip('inc/acces');
450
-	$clic = http_img_pack('rss-16.png', 'RSS', '', $title);
449
+    include_spip('inc/acces');
450
+    $clic = http_img_pack('rss-16.png', 'RSS', '', $title);
451 451
 
452
-	$url = generer_url_api_low_sec('transmettre', 'rss', $op, '', http_build_query($args), false, true);
453
-	return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>";
452
+    $url = generer_url_api_low_sec('transmettre', 'rss', $op, '', http_build_query($args), false, true);
453
+    return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>";
454 454
 }
455 455
 
456 456
 
@@ -462,76 +462,76 @@  discard block
 block discarded – undo
462 462
  */
463 463
 function alertes_auteur($id_auteur): string {
464 464
 
465
-	$alertes = [];
466
-
467
-	if (
468
-		isset($GLOBALS['meta']['message_crash_tables'])
469
-		and autoriser('detruire', null, null, $id_auteur)
470
-	) {
471
-		include_spip('genie/maintenance');
472
-		if ($msg = message_crash_tables()) {
473
-			$alertes[] = $msg;
474
-		}
475
-	}
476
-
477
-	if (
478
-		isset($GLOBALS['meta']['message_crash_plugins'])
479
-		and $GLOBALS['meta']['message_crash_plugins']
480
-		and autoriser('configurer', '_plugins', null, $id_auteur)
481
-		and is_array($msg = unserialize($GLOBALS['meta']['message_crash_plugins']))
482
-	) {
483
-		$msg = implode(', ', array_map('joli_repertoire', array_keys($msg)));
484
-		$alertes[] = _T('plugins_erreur', ['plugins' => $msg]);
485
-	}
486
-
487
-	$a = $GLOBALS['meta']['message_alertes_auteurs'] ?? '';
488
-	if (
489
-		$a
490
-		and is_array($a = unserialize($a))
491
-		and count($a)
492
-	) {
493
-		$update = false;
494
-		if (isset($a[$GLOBALS['visiteur_session']['statut']])) {
495
-			$alertes = array_merge($alertes, $a[$GLOBALS['visiteur_session']['statut']]);
496
-			unset($a[$GLOBALS['visiteur_session']['statut']]);
497
-			$update = true;
498
-		}
499
-		if (isset($a[''])) {
500
-			$alertes = array_merge($alertes, $a['']);
501
-			unset($a['']);
502
-			$update = true;
503
-		}
504
-		if ($update) {
505
-			ecrire_meta('message_alertes_auteurs', serialize($a));
506
-		}
507
-	}
508
-
509
-	if (
510
-		isset($GLOBALS['meta']['plugin_erreur_activation'])
511
-		and autoriser('configurer', '_plugins', null, $id_auteur)
512
-	) {
513
-		include_spip('inc/plugin');
514
-		$alertes[] = plugin_donne_erreurs();
515
-	}
516
-
517
-	$alertes = pipeline(
518
-		'alertes_auteur',
519
-		[
520
-			'args' => [
521
-				'id_auteur' => $id_auteur,
522
-				'exec' => _request('exec'),
523
-			],
524
-			'data' => $alertes
525
-		]
526
-	);
527
-
528
-	if ($alertes = array_filter($alertes)) {
529
-		return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" .
530
-		join(' | ', $alertes)
531
-		. '</div></div>';
532
-	}
533
-
534
-	return '';
465
+    $alertes = [];
466
+
467
+    if (
468
+        isset($GLOBALS['meta']['message_crash_tables'])
469
+        and autoriser('detruire', null, null, $id_auteur)
470
+    ) {
471
+        include_spip('genie/maintenance');
472
+        if ($msg = message_crash_tables()) {
473
+            $alertes[] = $msg;
474
+        }
475
+    }
476
+
477
+    if (
478
+        isset($GLOBALS['meta']['message_crash_plugins'])
479
+        and $GLOBALS['meta']['message_crash_plugins']
480
+        and autoriser('configurer', '_plugins', null, $id_auteur)
481
+        and is_array($msg = unserialize($GLOBALS['meta']['message_crash_plugins']))
482
+    ) {
483
+        $msg = implode(', ', array_map('joli_repertoire', array_keys($msg)));
484
+        $alertes[] = _T('plugins_erreur', ['plugins' => $msg]);
485
+    }
486
+
487
+    $a = $GLOBALS['meta']['message_alertes_auteurs'] ?? '';
488
+    if (
489
+        $a
490
+        and is_array($a = unserialize($a))
491
+        and count($a)
492
+    ) {
493
+        $update = false;
494
+        if (isset($a[$GLOBALS['visiteur_session']['statut']])) {
495
+            $alertes = array_merge($alertes, $a[$GLOBALS['visiteur_session']['statut']]);
496
+            unset($a[$GLOBALS['visiteur_session']['statut']]);
497
+            $update = true;
498
+        }
499
+        if (isset($a[''])) {
500
+            $alertes = array_merge($alertes, $a['']);
501
+            unset($a['']);
502
+            $update = true;
503
+        }
504
+        if ($update) {
505
+            ecrire_meta('message_alertes_auteurs', serialize($a));
506
+        }
507
+    }
508
+
509
+    if (
510
+        isset($GLOBALS['meta']['plugin_erreur_activation'])
511
+        and autoriser('configurer', '_plugins', null, $id_auteur)
512
+    ) {
513
+        include_spip('inc/plugin');
514
+        $alertes[] = plugin_donne_erreurs();
515
+    }
516
+
517
+    $alertes = pipeline(
518
+        'alertes_auteur',
519
+        [
520
+            'args' => [
521
+                'id_auteur' => $id_auteur,
522
+                'exec' => _request('exec'),
523
+            ],
524
+            'data' => $alertes
525
+        ]
526
+    );
527
+
528
+    if ($alertes = array_filter($alertes)) {
529
+        return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" .
530
+        join(' | ', $alertes)
531
+        . '</div></div>';
532
+    }
533
+
534
+    return '';
535 535
 }
536 536
 
537 537
 /**
@@ -541,9 +541,9 @@  discard block
 block discarded – undo
541 541
  * @return string
542 542
  */
543 543
 function filtre_afficher_enfant_rub_dist($id_rubrique) {
544
-	include_spip('inc/presenter_enfants');
544
+    include_spip('inc/presenter_enfants');
545 545
 
546
-	return afficher_enfant_rub(intval($id_rubrique));
546
+    return afficher_enfant_rub(intval($id_rubrique));
547 547
 }
548 548
 
549 549
 /**
@@ -561,15 +561,15 @@  discard block
 block discarded – undo
561 561
  * @return string
562 562
  */
563 563
 function afficher_plus_info($lien, $titre = '+', $titre_lien = '') {
564
-	$titre = attribut_html($titre);
565
-	$icone = "\n<a href='$lien' title='$titre' class='plus_info'>" .
566
-		http_img_pack('information-16.png', $titre) . '</a>';
567
-
568
-	if (!$titre_lien) {
569
-		return $icone;
570
-	} else {
571
-		return $icone . "\n<a href='$lien'>$titre_lien</a>";
572
-	}
564
+    $titre = attribut_html($titre);
565
+    $icone = "\n<a href='$lien' title='$titre' class='plus_info'>" .
566
+        http_img_pack('information-16.png', $titre) . '</a>';
567
+
568
+    if (!$titre_lien) {
569
+        return $icone;
570
+    } else {
571
+        return $icone . "\n<a href='$lien'>$titre_lien</a>";
572
+    }
573 573
 }
574 574
 
575 575
 
@@ -588,20 +588,20 @@  discard block
 block discarded – undo
588 588
  * @return array
589 589
  */
590 590
 function lister_objets_lies($objet_source, $objet, $id_objet, $objet_lien) {
591
-	$res = lister_objets_liens($objet_source, $objet, $id_objet, $objet_lien);
592
-	if (!(is_countable($res) ? count($res) : 0)) {
593
-		return [];
594
-	}
595
-	$r = reset($res);
596
-	$colonne_id = ($objet_source == $objet_lien ? id_table_objet($objet_source) : 'id_objet');
597
-	if (isset($r['rang_lien'])) {
598
-		$l = array_column($res, 'rang_lien', $colonne_id);
599
-		asort($l);
600
-		$l = array_keys($l);
601
-	} else {
602
-		// Si les liens qu'on cherche sont ceux de la table de lien, l'info est dans la clé de l'objet
603
-		// Sinon c'est dans "id_objet"
604
-		$l = array_column($res, $colonne_id);
605
-	}
606
-	return $l;
591
+    $res = lister_objets_liens($objet_source, $objet, $id_objet, $objet_lien);
592
+    if (!(is_countable($res) ? count($res) : 0)) {
593
+        return [];
594
+    }
595
+    $r = reset($res);
596
+    $colonne_id = ($objet_source == $objet_lien ? id_table_objet($objet_source) : 'id_objet');
597
+    if (isset($r['rang_lien'])) {
598
+        $l = array_column($res, 'rang_lien', $colonne_id);
599
+        asort($l);
600
+        $l = array_keys($l);
601
+    } else {
602
+        // Si les liens qu'on cherche sont ceux de la table de lien, l'info est dans la clé de l'objet
603
+        // Sinon c'est dans "id_objet"
604
+        $l = array_column($res, $colonne_id);
605
+    }
606
+    return $l;
607 607
 }
Please login to merge, or discard this patch.
ecrire/lang/spip_fr_tu.php 1 patch
Indentation   +673 added lines, -673 removed lines patch added patch discarded remove patch
@@ -4,248 +4,248 @@  discard block
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'access_interface_graphique' => 'Retour à l’interface graphique complète',
14
-	'access_mode_texte' => 'Afficher l’interface textuelle simplifiée',
15
-	'admin_debug' => 'debug',
16
-	'admin_modifier_article' => 'Modifier cet article',
17
-	'admin_modifier_auteur' => 'Modifier cet auteur',
18
-	'admin_modifier_breve' => 'Modifier cette brève',
19
-	'admin_modifier_mot' => 'Modifier ce mot-clé',
20
-	'admin_modifier_rubrique' => 'Modifier cette rubrique',
21
-	'admin_recalculer' => 'Recalculer cette page',
22
-	'afficher_calendrier' => 'Afficher le calendrier',
23
-	'afficher_trad' => 'afficher les traductions',
24
-	'alerte_maj_impossible' => '<b>Alerte !</b> La mise à jour de la base SQL vers la version @version@ est impossible, peut-être à cause d’un problème de droit de modification sur la base de données. Contacte ton hébergeur.',
25
-	'alerte_modif_info_concourante' => 'ATTENTION : Cette information a été modifiée par ailleurs. La valeur actuelle est :',
26
-	'analyse_xml' => 'Analyse XML',
27
-	'annuler' => 'Annuler',
28
-	'antispam_champ_vide' => 'Laisse ce champ vide :',
29
-	'articles_recents' => 'Articles les plus récents',
30
-	'attention_champ_mini_nb_caractères' => 'Attention ! @nb@ caractères au minimum',
31
-	'avis_1_erreur_saisie' => 'Il y a 1 erreur dans dans ta saisie, vérifie les informations.',
32
-	'avis_archive_incorrect' => 'le fichier archive n’est pas un fichier SPIP',
33
-	'avis_archive_invalide' => 'le fichier archive n’est pas valide',
34
-	'avis_attention' => 'ATTENTION !',
35
-	'avis_champ_incorrect_type_objet' => 'Nom de champ incorrect @name@ pour objet de type @type@',
36
-	'avis_colonne_inexistante' => 'La colonne @col@ n’existe pas',
37
-	'avis_erreur' => 'Erreur : voir ci-dessous',
38
-	'avis_erreur_connexion' => 'Erreur de connexion',
39
-	'avis_erreur_cookie' => 'problème de cookie',
40
-	'avis_erreur_fonction_contexte' => 'Erreur de programmation. Cette fonction ne doit pas être appelée dans ce contexte.',
41
-	'avis_erreur_mysql' => 'Erreur SQL',
42
-	'avis_erreur_sauvegarde' => 'Erreur dans la sauvegarde (@type@ @id_objet@) !',
43
-	'avis_erreur_visiteur' => 'Problème d’accès à l’espace privé',
44
-	'avis_nb_erreurs_saisie' => 'Il y a @nb@ erreurs dans ta saisie, vérifie les informations.',
12
+    // A
13
+    'access_interface_graphique' => 'Retour à l’interface graphique complète',
14
+    'access_mode_texte' => 'Afficher l’interface textuelle simplifiée',
15
+    'admin_debug' => 'debug',
16
+    'admin_modifier_article' => 'Modifier cet article',
17
+    'admin_modifier_auteur' => 'Modifier cet auteur',
18
+    'admin_modifier_breve' => 'Modifier cette brève',
19
+    'admin_modifier_mot' => 'Modifier ce mot-clé',
20
+    'admin_modifier_rubrique' => 'Modifier cette rubrique',
21
+    'admin_recalculer' => 'Recalculer cette page',
22
+    'afficher_calendrier' => 'Afficher le calendrier',
23
+    'afficher_trad' => 'afficher les traductions',
24
+    'alerte_maj_impossible' => '<b>Alerte !</b> La mise à jour de la base SQL vers la version @version@ est impossible, peut-être à cause d’un problème de droit de modification sur la base de données. Contacte ton hébergeur.',
25
+    'alerte_modif_info_concourante' => 'ATTENTION : Cette information a été modifiée par ailleurs. La valeur actuelle est :',
26
+    'analyse_xml' => 'Analyse XML',
27
+    'annuler' => 'Annuler',
28
+    'antispam_champ_vide' => 'Laisse ce champ vide :',
29
+    'articles_recents' => 'Articles les plus récents',
30
+    'attention_champ_mini_nb_caractères' => 'Attention ! @nb@ caractères au minimum',
31
+    'avis_1_erreur_saisie' => 'Il y a 1 erreur dans dans ta saisie, vérifie les informations.',
32
+    'avis_archive_incorrect' => 'le fichier archive n’est pas un fichier SPIP',
33
+    'avis_archive_invalide' => 'le fichier archive n’est pas valide',
34
+    'avis_attention' => 'ATTENTION !',
35
+    'avis_champ_incorrect_type_objet' => 'Nom de champ incorrect @name@ pour objet de type @type@',
36
+    'avis_colonne_inexistante' => 'La colonne @col@ n’existe pas',
37
+    'avis_erreur' => 'Erreur : voir ci-dessous',
38
+    'avis_erreur_connexion' => 'Erreur de connexion',
39
+    'avis_erreur_cookie' => 'problème de cookie',
40
+    'avis_erreur_fonction_contexte' => 'Erreur de programmation. Cette fonction ne doit pas être appelée dans ce contexte.',
41
+    'avis_erreur_mysql' => 'Erreur SQL',
42
+    'avis_erreur_sauvegarde' => 'Erreur dans la sauvegarde (@type@ @id_objet@) !',
43
+    'avis_erreur_visiteur' => 'Problème d’accès à l’espace privé',
44
+    'avis_nb_erreurs_saisie' => 'Il y a @nb@ erreurs dans ta saisie, vérifie les informations.',
45 45
 
46
-	// B
47
-	'barre_a_accent_grave' => 'Insérer un A accent grave majuscule',
48
-	'barre_aide' => 'Utilise les raccourcis typographiques pour enrichir ta mise en page',
49
-	'barre_e_accent_aigu' => 'Insérer un E accent aigu majuscule',
50
-	'barre_eo' => 'Insérer un E dans l’O',
51
-	'barre_eo_maj' => 'Insérer un E dans l’O majuscule',
52
-	'barre_euro' => 'Insérer le symbole ?',
53
-	'barre_gras' => 'Mettre en {{gras}}',
54
-	'barre_guillemets' => 'Entourer de « guillemets français »',
55
-	'barre_guillemets_simples' => 'Entourer de ?guillemets de second niveau ?',
56
-	'barre_intertitre' => 'Transformer en {{{intertitre}}}',
57
-	'barre_italic' => 'Mettre en {italique}',
58
-	'barre_lien' => 'Transformer en [lien hypertexte->http://...]',
59
-	'barre_lien_input' => 'Indiquer l’adresse de ton lien (tu peux indiquer une adresse Web sous la forme http://www.monsite/com ou simplement indiquer le numéro d’un article de ce site.',
60
-	'barre_note' => 'Transformer en [[Note de bas de page]]',
61
-	'barre_paragraphe' => 'Crée un paragraphe',
62
-	'barre_quote' => '<quote>Citer un message</quote>',
63
-	'bouton_changer' => 'Changer',
64
-	'bouton_chercher' => 'Chercher',
65
-	'bouton_choisir' => 'Choisir',
66
-	'bouton_deplacer' => 'Déplacer',
67
-	'bouton_download' => 'Télécharger',
68
-	'bouton_enregistrer' => 'Enregistrer',
69
-	'bouton_radio_desactiver_messagerie_interne' => 'Désactiver la messagerie interne',
70
-	'bouton_radio_envoi_annonces' => 'Envoyer les annonces éditoriales',
71
-	'bouton_radio_non_envoi_annonces' => 'Ne pas envoyer d’annonces',
72
-	'bouton_radio_non_envoi_liste_nouveautes' => 'Ne pas envoyer la liste des nouveautés',
73
-	'bouton_recharger_page' => 'recharger cette page',
74
-	'bouton_telecharger' => 'Télécharger',
75
-	'bouton_upload' => 'Téléverser',
76
-	'bouton_valider' => 'Valider',
46
+    // B
47
+    'barre_a_accent_grave' => 'Insérer un A accent grave majuscule',
48
+    'barre_aide' => 'Utilise les raccourcis typographiques pour enrichir ta mise en page',
49
+    'barre_e_accent_aigu' => 'Insérer un E accent aigu majuscule',
50
+    'barre_eo' => 'Insérer un E dans l’O',
51
+    'barre_eo_maj' => 'Insérer un E dans l’O majuscule',
52
+    'barre_euro' => 'Insérer le symbole ?',
53
+    'barre_gras' => 'Mettre en {{gras}}',
54
+    'barre_guillemets' => 'Entourer de « guillemets français »',
55
+    'barre_guillemets_simples' => 'Entourer de ?guillemets de second niveau ?',
56
+    'barre_intertitre' => 'Transformer en {{{intertitre}}}',
57
+    'barre_italic' => 'Mettre en {italique}',
58
+    'barre_lien' => 'Transformer en [lien hypertexte->http://...]',
59
+    'barre_lien_input' => 'Indiquer l’adresse de ton lien (tu peux indiquer une adresse Web sous la forme http://www.monsite/com ou simplement indiquer le numéro d’un article de ce site.',
60
+    'barre_note' => 'Transformer en [[Note de bas de page]]',
61
+    'barre_paragraphe' => 'Crée un paragraphe',
62
+    'barre_quote' => '<quote>Citer un message</quote>',
63
+    'bouton_changer' => 'Changer',
64
+    'bouton_chercher' => 'Chercher',
65
+    'bouton_choisir' => 'Choisir',
66
+    'bouton_deplacer' => 'Déplacer',
67
+    'bouton_download' => 'Télécharger',
68
+    'bouton_enregistrer' => 'Enregistrer',
69
+    'bouton_radio_desactiver_messagerie_interne' => 'Désactiver la messagerie interne',
70
+    'bouton_radio_envoi_annonces' => 'Envoyer les annonces éditoriales',
71
+    'bouton_radio_non_envoi_annonces' => 'Ne pas envoyer d’annonces',
72
+    'bouton_radio_non_envoi_liste_nouveautes' => 'Ne pas envoyer la liste des nouveautés',
73
+    'bouton_recharger_page' => 'recharger cette page',
74
+    'bouton_telecharger' => 'Télécharger',
75
+    'bouton_upload' => 'Téléverser',
76
+    'bouton_valider' => 'Valider',
77 77
 
78
-	// C
79
-	'cal_apresmidi' => 'après-midi',
80
-	'cal_jour_entier' => 'jour entier',
81
-	'cal_matin' => 'matin',
82
-	'cal_par_jour' => 'calendrier par jour',
83
-	'cal_par_mois' => 'calendrier par mois',
84
-	'cal_par_semaine' => 'calendrier par semaine',
85
-	'choix_couleur_interface' => 'couleur ',
86
-	'choix_interface' => 'choix  de l’interface',
87
-	'colonne' => 'Colonne',
88
-	'confirm_changer_statut' => 'Attention, tu as demandé à changer le statut de cet élément. Souhaites-tu continuer ?',
89
-	'correcte' => 'correcte',
78
+    // C
79
+    'cal_apresmidi' => 'après-midi',
80
+    'cal_jour_entier' => 'jour entier',
81
+    'cal_matin' => 'matin',
82
+    'cal_par_jour' => 'calendrier par jour',
83
+    'cal_par_mois' => 'calendrier par mois',
84
+    'cal_par_semaine' => 'calendrier par semaine',
85
+    'choix_couleur_interface' => 'couleur ',
86
+    'choix_interface' => 'choix  de l’interface',
87
+    'colonne' => 'Colonne',
88
+    'confirm_changer_statut' => 'Attention, tu as demandé à changer le statut de cet élément. Souhaites-tu continuer ?',
89
+    'correcte' => 'correcte',
90 90
 
91
-	// D
92
-	'date_aujourdhui' => 'aujourd’hui',
93
-	'date_avant_jc' => 'av. J.C.',
94
-	'date_dans' => 'dans @delai@',
95
-	'date_de_mois_1' => '@j@ @nommois@',
96
-	'date_de_mois_10' => '@j@ @nommois@',
97
-	'date_de_mois_11' => '@j@ @nommois@',
98
-	'date_de_mois_12' => '@j@ @nommois@',
99
-	'date_de_mois_2' => '@j@ @nommois@',
100
-	'date_de_mois_3' => '@j@ @nommois@',
101
-	'date_de_mois_4' => '@j@ @nommois@',
102
-	'date_de_mois_5' => '@j@ @nommois@',
103
-	'date_de_mois_6' => '@j@ @nommois@',
104
-	'date_de_mois_7' => '@j@ @nommois@',
105
-	'date_de_mois_8' => '@j@ @nommois@',
106
-	'date_de_mois_9' => '@j@ @nommois@',
107
-	'date_demain' => 'demain',
108
-	'date_fmt_heures_minutes' => '@h@h@m@min',
109
-	'date_fmt_heures_minutes_court' => '@h@h@m@',
110
-	'date_fmt_jour' => '@nomjour@ @jour@',
111
-	'date_fmt_jour_heure' => '@jour@ à @heure@',
112
-	'date_fmt_jour_heure_debut_fin' => 'le @jour@ de @heure_debut@ à @heure_fin@',
113
-	'date_fmt_jour_heure_debut_fin_abbr' => 'le @dtstart@@jour@ de @heure_debut@@dtabbr@ à @dtstart@@heure_fin@@dtend@',
114
-	'date_fmt_jour_mois' => '@jour@ @nommois@',
115
-	'date_fmt_jour_mois_annee' => '@jour@ @nommois@ @annee@',
116
-	'date_fmt_mois_annee' => '@nommois@ @annee@',
117
-	'date_fmt_nomjour' => '@nomjour@ @date@',
118
-	'date_fmt_nomjour_date' => 'le @nomjour@ @date@',
119
-	'date_fmt_periode' => 'Du @date_debut@ au @date_fin@',
120
-	'date_fmt_periode_abbr' => 'Du @dtart@@date_debut@@dtabbr@ au @dtend@@date_fin@@dtabbr@',
121
-	'date_fmt_periode_from' => 'Du',
122
-	'date_fmt_periode_to' => 'au',
123
-	'date_fmt_saison_annee' => '@saison@ @annee@',
124
-	'date_heures' => 'heures',
125
-	'date_hier' => 'hier',
126
-	'date_il_y_a' => 'il y a @delai@',
127
-	'date_jnum1' => '1er',
128
-	'date_jnum10' => '10',
129
-	'date_jnum11' => '11',
130
-	'date_jnum12' => '12',
131
-	'date_jnum13' => '13',
132
-	'date_jnum14' => '14',
133
-	'date_jnum15' => '15',
134
-	'date_jnum16' => '16',
135
-	'date_jnum17' => '17',
136
-	'date_jnum18' => '18',
137
-	'date_jnum19' => '19',
138
-	'date_jnum2' => '2',
139
-	'date_jnum20' => '20',
140
-	'date_jnum21' => '21',
141
-	'date_jnum22' => '22',
142
-	'date_jnum23' => '23',
143
-	'date_jnum24' => '24',
144
-	'date_jnum25' => '25',
145
-	'date_jnum26' => '26',
146
-	'date_jnum27' => '27',
147
-	'date_jnum28' => '28',
148
-	'date_jnum29' => '29',
149
-	'date_jnum3' => '3',
150
-	'date_jnum30' => '30',
151
-	'date_jnum31' => '31',
152
-	'date_jnum4' => '4',
153
-	'date_jnum5' => '5',
154
-	'date_jnum6' => '6',
155
-	'date_jnum7' => '7',
156
-	'date_jnum8' => '8',
157
-	'date_jnum9' => '9',
158
-	'date_jour_1' => 'dimanche',
159
-	'date_jour_1_abbr' => 'dim.',
160
-	'date_jour_1_initiale' => 'd.',
161
-	'date_jour_2' => 'lundi',
162
-	'date_jour_2_abbr' => 'lun.',
163
-	'date_jour_2_initiale' => 'l.',
164
-	'date_jour_3' => 'mardi',
165
-	'date_jour_3_abbr' => 'mar.',
166
-	'date_jour_3_initiale' => 'm.',
167
-	'date_jour_4' => 'mercredi',
168
-	'date_jour_4_abbr' => 'mer.',
169
-	'date_jour_4_initiale' => 'm.',
170
-	'date_jour_5' => 'jeudi',
171
-	'date_jour_5_abbr' => 'jeu.',
172
-	'date_jour_5_initiale' => 'j.',
173
-	'date_jour_6' => 'vendredi',
174
-	'date_jour_6_abbr' => 'ven.',
175
-	'date_jour_6_initiale' => 'v.',
176
-	'date_jour_7' => 'samedi',
177
-	'date_jour_7_abbr' => 'sam.',
178
-	'date_jour_7_initiale' => 's.',
179
-	'date_jours' => 'jours',
180
-	'date_minutes' => 'minutes',
181
-	'date_mois' => 'mois',
182
-	'date_mois_1' => 'janvier',
183
-	'date_mois_10' => 'octobre',
184
-	'date_mois_10_abbr' => 'oct.',
185
-	'date_mois_11' => 'novembre',
186
-	'date_mois_11_abbr' => 'nov.',
187
-	'date_mois_12' => 'décembre',
188
-	'date_mois_12_abbr' => 'déc.',
189
-	'date_mois_1_abbr' => 'janv.',
190
-	'date_mois_2' => 'février',
191
-	'date_mois_2_abbr' => 'févr.',
192
-	'date_mois_3' => 'mars',
193
-	'date_mois_3_abbr' => 'mars',
194
-	'date_mois_4' => 'avril',
195
-	'date_mois_4_abbr' => 'avr.',
196
-	'date_mois_5' => 'mai',
197
-	'date_mois_5_abbr' => 'mai',
198
-	'date_mois_6' => 'juin',
199
-	'date_mois_6_abbr' => 'juin',
200
-	'date_mois_7' => 'juillet',
201
-	'date_mois_7_abbr' => 'juil.',
202
-	'date_mois_8' => 'août',
203
-	'date_mois_8_abbr' => 'août',
204
-	'date_mois_9' => 'septembre',
205
-	'date_mois_9_abbr' => 'sept.',
206
-	'date_saison_1' => 'hiver',
207
-	'date_saison_2' => 'printemps',
208
-	'date_saison_3' => 'été',
209
-	'date_saison_4' => 'automne',
210
-	'date_secondes' => 'secondes',
211
-	'date_semaines' => 'semaines',
212
-	'date_un_mois' => 'mois',
213
-	'date_une_heure' => 'heure',
214
-	'date_une_minute' => 'minute',
215
-	'date_une_seconde' => 'seconde',
216
-	'date_une_semaine' => 'semaine',
217
-	'dirs_commencer' => ' afin de commencer réellement l’installation',
218
-	'dirs_preliminaire' => 'Préliminaire : <b>Régler les droits d’accès</b>',
219
-	'dirs_probleme_droits' => 'Problème de droits d’accès',
220
-	'dirs_repertoires_absents' => '<p><b>Les répertoires suivants n’ont pas été trouvés :</b></p><ul>@bad_dirs@.</ul>
91
+    // D
92
+    'date_aujourdhui' => 'aujourd’hui',
93
+    'date_avant_jc' => 'av. J.C.',
94
+    'date_dans' => 'dans @delai@',
95
+    'date_de_mois_1' => '@j@ @nommois@',
96
+    'date_de_mois_10' => '@j@ @nommois@',
97
+    'date_de_mois_11' => '@j@ @nommois@',
98
+    'date_de_mois_12' => '@j@ @nommois@',
99
+    'date_de_mois_2' => '@j@ @nommois@',
100
+    'date_de_mois_3' => '@j@ @nommois@',
101
+    'date_de_mois_4' => '@j@ @nommois@',
102
+    'date_de_mois_5' => '@j@ @nommois@',
103
+    'date_de_mois_6' => '@j@ @nommois@',
104
+    'date_de_mois_7' => '@j@ @nommois@',
105
+    'date_de_mois_8' => '@j@ @nommois@',
106
+    'date_de_mois_9' => '@j@ @nommois@',
107
+    'date_demain' => 'demain',
108
+    'date_fmt_heures_minutes' => '@h@h@m@min',
109
+    'date_fmt_heures_minutes_court' => '@h@h@m@',
110
+    'date_fmt_jour' => '@nomjour@ @jour@',
111
+    'date_fmt_jour_heure' => '@jour@ à @heure@',
112
+    'date_fmt_jour_heure_debut_fin' => 'le @jour@ de @heure_debut@ à @heure_fin@',
113
+    'date_fmt_jour_heure_debut_fin_abbr' => 'le @dtstart@@jour@ de @heure_debut@@dtabbr@ à @dtstart@@heure_fin@@dtend@',
114
+    'date_fmt_jour_mois' => '@jour@ @nommois@',
115
+    'date_fmt_jour_mois_annee' => '@jour@ @nommois@ @annee@',
116
+    'date_fmt_mois_annee' => '@nommois@ @annee@',
117
+    'date_fmt_nomjour' => '@nomjour@ @date@',
118
+    'date_fmt_nomjour_date' => 'le @nomjour@ @date@',
119
+    'date_fmt_periode' => 'Du @date_debut@ au @date_fin@',
120
+    'date_fmt_periode_abbr' => 'Du @dtart@@date_debut@@dtabbr@ au @dtend@@date_fin@@dtabbr@',
121
+    'date_fmt_periode_from' => 'Du',
122
+    'date_fmt_periode_to' => 'au',
123
+    'date_fmt_saison_annee' => '@saison@ @annee@',
124
+    'date_heures' => 'heures',
125
+    'date_hier' => 'hier',
126
+    'date_il_y_a' => 'il y a @delai@',
127
+    'date_jnum1' => '1er',
128
+    'date_jnum10' => '10',
129
+    'date_jnum11' => '11',
130
+    'date_jnum12' => '12',
131
+    'date_jnum13' => '13',
132
+    'date_jnum14' => '14',
133
+    'date_jnum15' => '15',
134
+    'date_jnum16' => '16',
135
+    'date_jnum17' => '17',
136
+    'date_jnum18' => '18',
137
+    'date_jnum19' => '19',
138
+    'date_jnum2' => '2',
139
+    'date_jnum20' => '20',
140
+    'date_jnum21' => '21',
141
+    'date_jnum22' => '22',
142
+    'date_jnum23' => '23',
143
+    'date_jnum24' => '24',
144
+    'date_jnum25' => '25',
145
+    'date_jnum26' => '26',
146
+    'date_jnum27' => '27',
147
+    'date_jnum28' => '28',
148
+    'date_jnum29' => '29',
149
+    'date_jnum3' => '3',
150
+    'date_jnum30' => '30',
151
+    'date_jnum31' => '31',
152
+    'date_jnum4' => '4',
153
+    'date_jnum5' => '5',
154
+    'date_jnum6' => '6',
155
+    'date_jnum7' => '7',
156
+    'date_jnum8' => '8',
157
+    'date_jnum9' => '9',
158
+    'date_jour_1' => 'dimanche',
159
+    'date_jour_1_abbr' => 'dim.',
160
+    'date_jour_1_initiale' => 'd.',
161
+    'date_jour_2' => 'lundi',
162
+    'date_jour_2_abbr' => 'lun.',
163
+    'date_jour_2_initiale' => 'l.',
164
+    'date_jour_3' => 'mardi',
165
+    'date_jour_3_abbr' => 'mar.',
166
+    'date_jour_3_initiale' => 'm.',
167
+    'date_jour_4' => 'mercredi',
168
+    'date_jour_4_abbr' => 'mer.',
169
+    'date_jour_4_initiale' => 'm.',
170
+    'date_jour_5' => 'jeudi',
171
+    'date_jour_5_abbr' => 'jeu.',
172
+    'date_jour_5_initiale' => 'j.',
173
+    'date_jour_6' => 'vendredi',
174
+    'date_jour_6_abbr' => 'ven.',
175
+    'date_jour_6_initiale' => 'v.',
176
+    'date_jour_7' => 'samedi',
177
+    'date_jour_7_abbr' => 'sam.',
178
+    'date_jour_7_initiale' => 's.',
179
+    'date_jours' => 'jours',
180
+    'date_minutes' => 'minutes',
181
+    'date_mois' => 'mois',
182
+    'date_mois_1' => 'janvier',
183
+    'date_mois_10' => 'octobre',
184
+    'date_mois_10_abbr' => 'oct.',
185
+    'date_mois_11' => 'novembre',
186
+    'date_mois_11_abbr' => 'nov.',
187
+    'date_mois_12' => 'décembre',
188
+    'date_mois_12_abbr' => 'déc.',
189
+    'date_mois_1_abbr' => 'janv.',
190
+    'date_mois_2' => 'février',
191
+    'date_mois_2_abbr' => 'févr.',
192
+    'date_mois_3' => 'mars',
193
+    'date_mois_3_abbr' => 'mars',
194
+    'date_mois_4' => 'avril',
195
+    'date_mois_4_abbr' => 'avr.',
196
+    'date_mois_5' => 'mai',
197
+    'date_mois_5_abbr' => 'mai',
198
+    'date_mois_6' => 'juin',
199
+    'date_mois_6_abbr' => 'juin',
200
+    'date_mois_7' => 'juillet',
201
+    'date_mois_7_abbr' => 'juil.',
202
+    'date_mois_8' => 'août',
203
+    'date_mois_8_abbr' => 'août',
204
+    'date_mois_9' => 'septembre',
205
+    'date_mois_9_abbr' => 'sept.',
206
+    'date_saison_1' => 'hiver',
207
+    'date_saison_2' => 'printemps',
208
+    'date_saison_3' => 'été',
209
+    'date_saison_4' => 'automne',
210
+    'date_secondes' => 'secondes',
211
+    'date_semaines' => 'semaines',
212
+    'date_un_mois' => 'mois',
213
+    'date_une_heure' => 'heure',
214
+    'date_une_minute' => 'minute',
215
+    'date_une_seconde' => 'seconde',
216
+    'date_une_semaine' => 'semaine',
217
+    'dirs_commencer' => ' afin de commencer réellement l’installation',
218
+    'dirs_preliminaire' => 'Préliminaire : <b>Régler les droits d’accès</b>',
219
+    'dirs_probleme_droits' => 'Problème de droits d’accès',
220
+    'dirs_repertoires_absents' => '<p><b>Les répertoires suivants n’ont pas été trouvés :</b></p><ul>@bad_dirs@.</ul>
221 221
   <p>Il est probable que cela soit dû à un problème de mauvaise mise en majuscules ou minuscules.
222 222
   Vérifie que les minuscules et majuscules de ces répertoires concordent bien avec ce qui est affiché
223 223
   ci-dessus ; si ce n’est pas le cas, renomme les répertoires avec ton logiciel FTP de façon à corriger l’erreur.</p>
224 224
   <p>Une fois cette manipulation effectuée, tu pourras ',
225
-	'dirs_repertoires_suivants' => '<p><b>Les répertoires suivants ne sont pas accessibles en écriture :</b></p> <ul>@bad_dirs@</ul>
225
+    'dirs_repertoires_suivants' => '<p><b>Les répertoires suivants ne sont pas accessibles en écriture :</b></p> <ul>@bad_dirs@</ul>
226 226
   <p>Pour y remédier, utilise ton client FTP afin de régler les droits d’accès de chacun
227 227
   de ces répertoires. La procédure est expliquée en détail dans le guide d’installation.</p>
228 228
   <p>Une fois cette manipulation effectuée, tu pourras ',
229
-	'double_occurrence' => 'Double occurrence de @balise@',
229
+    'double_occurrence' => 'Double occurrence de @balise@',
230 230
 
231
-	// E
232
-	'en_cours' => 'en cours',
233
-	'envoi_via_le_site' => 'Envoi via le site',
234
-	'erreur' => 'Erreur',
235
-	'erreur_balise_non_fermee' => 'dernière balise non refermée :',
236
-	'erreur_technique_ajaxform' => 'Ooops. Une erreur innatendue a empêché de soumettre le formulaire. Tu peux essayer à nouveau.',
237
-	'erreur_technique_enregistrement_champs' => 'Une erreur technique a empêché l’enregistrement correct du champ @champs@.',
238
-	'erreur_technique_enregistrement_impossible' => 'Une erreur technique a empêché l’enregistrement.',
239
-	'erreur_texte' => 'erreur(s)',
240
-	'etape' => 'Étape',
231
+    // E
232
+    'en_cours' => 'en cours',
233
+    'envoi_via_le_site' => 'Envoi via le site',
234
+    'erreur' => 'Erreur',
235
+    'erreur_balise_non_fermee' => 'dernière balise non refermée :',
236
+    'erreur_technique_ajaxform' => 'Ooops. Une erreur innatendue a empêché de soumettre le formulaire. Tu peux essayer à nouveau.',
237
+    'erreur_technique_enregistrement_champs' => 'Une erreur technique a empêché l’enregistrement correct du champ @champs@.',
238
+    'erreur_technique_enregistrement_impossible' => 'Une erreur technique a empêché l’enregistrement.',
239
+    'erreur_texte' => 'erreur(s)',
240
+    'etape' => 'Étape',
241 241
 
242
-	// F
243
-	'fichier_introuvable' => 'Fichier @fichier@ introuvable.',
244
-	'fonction_introuvable' => 'Fonction @fonction@() introuvable.',
245
-	'form_auteur_confirmation' => 'Confirme ton adresse email',
246
-	'form_auteur_email_modifie' => 'Ton adresse email a été modifiée.',
247
-	'form_auteur_envoi_mail_confirmation' => 'Un courrier électronique de confirmation vient d’être envoyé à @email@. Visite l’adresse Web mentionnée dans ce courrier pour valider ton adresse mail.',
248
-	'form_auteur_mail_confirmation' => 'Salut,
242
+    // F
243
+    'fichier_introuvable' => 'Fichier @fichier@ introuvable.',
244
+    'fonction_introuvable' => 'Fonction @fonction@() introuvable.',
245
+    'form_auteur_confirmation' => 'Confirme ton adresse email',
246
+    'form_auteur_email_modifie' => 'Ton adresse email a été modifiée.',
247
+    'form_auteur_envoi_mail_confirmation' => 'Un courrier électronique de confirmation vient d’être envoyé à @email@. Visite l’adresse Web mentionnée dans ce courrier pour valider ton adresse mail.',
248
+    'form_auteur_mail_confirmation' => 'Salut,
249 249
 
250 250
 Tu as demandé à changer ton adresse email.
251 251
 Pour confirmer ta nouvelle adresse, il suffit de te connecter à
@@ -254,346 +254,346 @@  discard block
 block discarded – undo
254 254
 
255 255
     @url@
256 256
 ',
257
-	'form_deja_inscrit' => 'Tu es déjà inscrit.',
258
-	'form_email_non_valide' => 'Ton adresse email n’est pas valide.',
259
-	'form_forum_access_refuse' => 'Tu n’as plus accès à ce site.',
260
-	'form_forum_bonjour' => 'Salut @nom@,',
261
-	'form_forum_confirmer_email' => 'Pour confirmer ton adresse email, va à cette adresse : @url_confirm@',
262
-	'form_forum_email_deja_enregistre' => 'Cette adresse email est déjà enregistrée, tu peux donc utiliser ton mot de passe habituel.',
263
-	'form_forum_identifiant_mail' => 'Ton nouvel identifiant vient de t’être envoyé par email.',
264
-	'form_forum_identifiants' => 'Identifiants personnels',
265
-	'form_forum_indiquer_nom_email' => 'Indique ici ton nom et ton adresse email. Ton identifiant personnel te parviendra rapidement, par courrier électronique.',
266
-	'form_forum_login' => 'login :',
267
-	'form_forum_message_auto' => '(ceci est un message automatique)',
268
-	'form_forum_pass' => 'mot de passe :',
269
-	'form_forum_probleme_mail' => 'Problème de mail : l’identifiant ne peut pas être envoyé.',
270
-	'form_forum_voici1' => 'Voici tes identifiants pour pouvoir participer à la vie du site "@nom_site_spip@" (@adresse_site@) :',
271
-	'form_forum_voici2' => 'Voici tes identifiants pour proposer des articles sur
257
+    'form_deja_inscrit' => 'Tu es déjà inscrit.',
258
+    'form_email_non_valide' => 'Ton adresse email n’est pas valide.',
259
+    'form_forum_access_refuse' => 'Tu n’as plus accès à ce site.',
260
+    'form_forum_bonjour' => 'Salut @nom@,',
261
+    'form_forum_confirmer_email' => 'Pour confirmer ton adresse email, va à cette adresse : @url_confirm@',
262
+    'form_forum_email_deja_enregistre' => 'Cette adresse email est déjà enregistrée, tu peux donc utiliser ton mot de passe habituel.',
263
+    'form_forum_identifiant_mail' => 'Ton nouvel identifiant vient de t’être envoyé par email.',
264
+    'form_forum_identifiants' => 'Identifiants personnels',
265
+    'form_forum_indiquer_nom_email' => 'Indique ici ton nom et ton adresse email. Ton identifiant personnel te parviendra rapidement, par courrier électronique.',
266
+    'form_forum_login' => 'login :',
267
+    'form_forum_message_auto' => '(ceci est un message automatique)',
268
+    'form_forum_pass' => 'mot de passe :',
269
+    'form_forum_probleme_mail' => 'Problème de mail : l’identifiant ne peut pas être envoyé.',
270
+    'form_forum_voici1' => 'Voici tes identifiants pour pouvoir participer à la vie du site "@nom_site_spip@" (@adresse_site@) :',
271
+    'form_forum_voici2' => 'Voici tes identifiants pour proposer des articles sur
272 272
 le site "@nom_site_spip@" (@adresse_login@) :',
273
-	'form_indiquer_email' => 'Indique ton adresse email.',
274
-	'form_indiquer_nom' => 'Indique ton nom.',
275
-	'form_indiquer_nom_site' => 'Indique le nom de ton site.',
276
-	'form_pet_deja_enregistre' => 'Ce site est déjà enregistré',
277
-	'form_pet_signature_pasprise' => 'Ta signature n’est pas prise en compte.',
278
-	'form_prop_confirmer_envoi' => 'Confirmer l’envoi',
279
-	'form_prop_description' => 'Description/commentaire',
280
-	'form_prop_enregistre' => 'Ta proposition est enregistrée, elle apparaîtra en ligne après validation par les responsables de ce site.',
281
-	'form_prop_envoyer' => 'Envoyer un message',
282
-	'form_prop_indiquer_email' => 'Indiquer une adresse email valide',
283
-	'form_prop_indiquer_nom_site' => 'Indiquer le nom du site.',
284
-	'form_prop_indiquer_sujet' => 'Indiquer un sujet',
285
-	'form_prop_message_envoye' => 'Message envoyé',
286
-	'form_prop_non_enregistre' => 'Ta proposition n’a pas été enregistrée.',
287
-	'form_prop_sujet' => 'Sujet',
288
-	'form_prop_url_site' => 'Adresse URL du site',
289
-	'format_date_attendu' => 'Saisir une date au format jj/mm/aaaa.',
290
-	'format_date_incorrecte' => 'La date ou son format est incorrect',
291
-	'format_heure_attendu' => 'Saisir une heure au format hh:mm.',
292
-	'format_heure_incorrecte' => 'L’heure ou son format est incorrect',
293
-	'forum_non_inscrit' => 'Tu n’es pas inscrit, ou l’adresse ou le mot de passe sont erronés.',
294
-	'forum_par_auteur' => 'par @auteur@',
295
-	'forum_titre_erreur' => 'Erreur...',
273
+    'form_indiquer_email' => 'Indique ton adresse email.',
274
+    'form_indiquer_nom' => 'Indique ton nom.',
275
+    'form_indiquer_nom_site' => 'Indique le nom de ton site.',
276
+    'form_pet_deja_enregistre' => 'Ce site est déjà enregistré',
277
+    'form_pet_signature_pasprise' => 'Ta signature n’est pas prise en compte.',
278
+    'form_prop_confirmer_envoi' => 'Confirmer l’envoi',
279
+    'form_prop_description' => 'Description/commentaire',
280
+    'form_prop_enregistre' => 'Ta proposition est enregistrée, elle apparaîtra en ligne après validation par les responsables de ce site.',
281
+    'form_prop_envoyer' => 'Envoyer un message',
282
+    'form_prop_indiquer_email' => 'Indiquer une adresse email valide',
283
+    'form_prop_indiquer_nom_site' => 'Indiquer le nom du site.',
284
+    'form_prop_indiquer_sujet' => 'Indiquer un sujet',
285
+    'form_prop_message_envoye' => 'Message envoyé',
286
+    'form_prop_non_enregistre' => 'Ta proposition n’a pas été enregistrée.',
287
+    'form_prop_sujet' => 'Sujet',
288
+    'form_prop_url_site' => 'Adresse URL du site',
289
+    'format_date_attendu' => 'Saisir une date au format jj/mm/aaaa.',
290
+    'format_date_incorrecte' => 'La date ou son format est incorrect',
291
+    'format_heure_attendu' => 'Saisir une heure au format hh:mm.',
292
+    'format_heure_incorrecte' => 'L’heure ou son format est incorrect',
293
+    'forum_non_inscrit' => 'Tu n’es pas inscrit, ou l’adresse ou le mot de passe sont erronés.',
294
+    'forum_par_auteur' => 'par @auteur@',
295
+    'forum_titre_erreur' => 'Erreur...',
296 296
 
297
-	// I
298
-	'ical_texte_rss_articles' => 'Le fichier « backend » des articles de ce site se trouve à l’adresse :',
299
-	'ical_texte_rss_articles2' => 'Tu peux également obtenir des fichiers « backend » pour les articles de chaque rubrique du site :',
300
-	'ical_texte_rss_breves' => 'Il existe de plus un fichier contenant les brèves du site. En précisant un numéro de rubrique, tu obtiendras uniquement les brèves de cette rubrique.',
301
-	'icone_a_suivre' => 'À suivre',
302
-	'icone_admin_site' => 'Administration du site',
303
-	'icone_agenda' => 'Agenda',
304
-	'icone_aide_ligne' => 'Aide',
305
-	'icone_articles' => 'Articles',
306
-	'icone_auteurs' => 'Auteurs',
307
-	'icone_brouteur' => 'Navigation rapide',
308
-	'icone_configuration_site' => 'Configuration',
309
-	'icone_configurer_site' => 'Configurer ton site',
310
-	'icone_creer_nouvel_auteur' => 'Créer un nouvel auteur',
311
-	'icone_creer_rubrique' => 'Créer une rubrique',
312
-	'icone_creer_sous_rubrique' => 'Créer une sous-rubrique',
313
-	'icone_deconnecter' => 'Se déconnecter',
314
-	'icone_discussions' => 'Discussions',
315
-	'icone_doc_rubrique' => 'Documents des rubriques',
316
-	'icone_ecrire_article' => 'Écrire un nouvel article',
317
-	'icone_edition_site' => 'Édition',
318
-	'icone_gestion_langues' => 'Gestion des langues',
319
-	'icone_informations_personnelles' => 'Informations personnelles',
320
-	'icone_interface_complet' => 'interface complète',
321
-	'icone_interface_simple' => 'Interface simplifiée',
322
-	'icone_maintenance_site' => 'Maintenance du site',
323
-	'icone_messagerie_personnelle' => 'Messagerie personnelle',
324
-	'icone_repartition_debut' => 'Afficher la répartition depuis le début',
325
-	'icone_rubriques' => 'Rubriques',
326
-	'icone_sauver_site' => 'Sauvegarde du site',
327
-	'icone_site_entier' => 'Tout le site',
328
-	'icone_sites_references' => 'Sites référencés',
329
-	'icone_statistiques' => 'Statistiques du site',
330
-	'icone_suivi_activite' => 'Suivre la vie du site',
331
-	'icone_suivi_actualite' => 'Évolution du site',
332
-	'icone_suivi_pettions' => 'Suivre/gérer les pétitions',
333
-	'icone_suivi_revisions' => 'Modifications des articles',
334
-	'icone_supprimer_document' => 'Supprimer ce document',
335
-	'icone_supprimer_image' => 'Supprimer cette image',
336
-	'icone_tous_articles' => 'Tous tes articles',
337
-	'icone_tous_auteur' => 'Tous les auteurs',
338
-	'icone_tous_visiteur' => 'Tous les visiteurs',
339
-	'icone_visiter_site' => 'Voir le site public',
340
-	'icone_voir_en_ligne' => 'Voir en ligne',
341
-	'img_indisponible' => 'image indisponible',
342
-	'impossible' => 'impossible',
343
-	'info_a_suivre' => 'À SUIVRE »',
344
-	'info_acces_interdit' => 'Accès interdit',
345
-	'info_acces_refuse' => 'Accès refusé',
346
-	'info_action' => 'Action : @action@',
347
-	'info_administrer_rubriques' => 'Tu peux administrer cette rubrique et ses sous-rubriques',
348
-	'info_adresse_non_indiquee' => 'Tu n’as pas indiqué d’adresse à tester !',
349
-	'info_aide' => 'AIDE :',
350
-	'info_ajouter_mot' => 'Ajouter ce mot',
351
-	'info_annonce' => 'ANNONCE',
352
-	'info_annonces_generales' => 'Annonces générales :',
353
-	'info_article_propose' => 'Article proposé',
354
-	'info_article_publie' => 'Article publié',
355
-	'info_article_redaction' => 'Article en cours de rédaction',
356
-	'info_article_refuse' => 'Article refusé',
357
-	'info_article_supprime' => 'Article supprimé',
358
-	'info_articles' => 'Articles',
359
-	'info_articles_a_valider' => 'Les articles à valider',
360
-	'info_articles_nb' => '@nb@ articles',
361
-	'info_articles_proposes' => 'Articles proposés',
362
-	'info_articles_un' => '1 article',
363
-	'info_auteurs_nombre' => 'auteur(s) :',
364
-	'info_authentification_ftp' => 'Authentification (par FTP).',
365
-	'info_breves_2' => 'brèves',
366
-	'info_breves_nb' => '@nb@ brèves',
367
-	'info_breves_un' => '1 brève',
368
-	'info_connexion_refusee' => 'Connexion refusée',
369
-	'info_contact_developpeur' => 'Contacte un développeur.',
370
-	'info_contenance' => 'Ce site contient :',
371
-	'info_contribution' => 'contributions',
372
-	'info_copyright' => '@spip@ est un logiciel libre distribué @lien_gpl@.',
373
-	'info_copyright_doc' => 'Pour plus d’informations, voir le site <a href="@spipnet@">@spipnet_affiche@</a>.',
374
-	'info_copyright_gpl' => 'sous licence GPL',
375
-	'info_cours_edition' => 'En cours de modification',
376
-	'info_creer_repertoire' => 'Crée un fichier ou un répertoire nommé :',
377
-	'info_creer_repertoire_2' => 'à l’intérieur du sous-répertoire <b>@repertoire@</b>, puis :',
378
-	'info_creer_vignette' => 'création automatique de la vignette',
379
-	'info_creerdansrubrique_non_autorise' => 'Tu n’as pas de droits suffisants pour créer un contenu dans cette rubrique',
380
-	'info_deplier' => 'Déplier',
381
-	'info_descriptif_nombre' => 'descriptif(s) :',
382
-	'info_description' => 'Description :',
383
-	'info_description_2' => 'Description :',
384
-	'info_dimension' => 'Dimensions :',
385
-	'info_documents_nb' => '@nb@ documents',
386
-	'info_documents_un' => '1 document',
387
-	'info_ecire_message_prive' => 'Écrire un message privé',
388
-	'info_email_invalide' => 'Adresse email invalide.',
389
-	'info_en_cours_validation' => 'Tes articles en cours de rédaction',
390
-	'info_en_ligne' => 'Actuellement en ligne :',
391
-	'info_envoyer_message_prive' => 'Envoyer un message privé à cet auteur',
392
-	'info_erreur_requete' => 'Erreur dans la requête :',
393
-	'info_erreur_squelette2' => 'Aucun squelette <b>@fichier@</b> n’est disponible...',
394
-	'info_erreur_systeme' => 'Erreur système (errno @errsys@)',
395
-	'info_erreur_systeme2' => 'Le disque dur est peut-être plein, ou la base de données endommagée.<br />
297
+    // I
298
+    'ical_texte_rss_articles' => 'Le fichier « backend » des articles de ce site se trouve à l’adresse :',
299
+    'ical_texte_rss_articles2' => 'Tu peux également obtenir des fichiers « backend » pour les articles de chaque rubrique du site :',
300
+    'ical_texte_rss_breves' => 'Il existe de plus un fichier contenant les brèves du site. En précisant un numéro de rubrique, tu obtiendras uniquement les brèves de cette rubrique.',
301
+    'icone_a_suivre' => 'À suivre',
302
+    'icone_admin_site' => 'Administration du site',
303
+    'icone_agenda' => 'Agenda',
304
+    'icone_aide_ligne' => 'Aide',
305
+    'icone_articles' => 'Articles',
306
+    'icone_auteurs' => 'Auteurs',
307
+    'icone_brouteur' => 'Navigation rapide',
308
+    'icone_configuration_site' => 'Configuration',
309
+    'icone_configurer_site' => 'Configurer ton site',
310
+    'icone_creer_nouvel_auteur' => 'Créer un nouvel auteur',
311
+    'icone_creer_rubrique' => 'Créer une rubrique',
312
+    'icone_creer_sous_rubrique' => 'Créer une sous-rubrique',
313
+    'icone_deconnecter' => 'Se déconnecter',
314
+    'icone_discussions' => 'Discussions',
315
+    'icone_doc_rubrique' => 'Documents des rubriques',
316
+    'icone_ecrire_article' => 'Écrire un nouvel article',
317
+    'icone_edition_site' => 'Édition',
318
+    'icone_gestion_langues' => 'Gestion des langues',
319
+    'icone_informations_personnelles' => 'Informations personnelles',
320
+    'icone_interface_complet' => 'interface complète',
321
+    'icone_interface_simple' => 'Interface simplifiée',
322
+    'icone_maintenance_site' => 'Maintenance du site',
323
+    'icone_messagerie_personnelle' => 'Messagerie personnelle',
324
+    'icone_repartition_debut' => 'Afficher la répartition depuis le début',
325
+    'icone_rubriques' => 'Rubriques',
326
+    'icone_sauver_site' => 'Sauvegarde du site',
327
+    'icone_site_entier' => 'Tout le site',
328
+    'icone_sites_references' => 'Sites référencés',
329
+    'icone_statistiques' => 'Statistiques du site',
330
+    'icone_suivi_activite' => 'Suivre la vie du site',
331
+    'icone_suivi_actualite' => 'Évolution du site',
332
+    'icone_suivi_pettions' => 'Suivre/gérer les pétitions',
333
+    'icone_suivi_revisions' => 'Modifications des articles',
334
+    'icone_supprimer_document' => 'Supprimer ce document',
335
+    'icone_supprimer_image' => 'Supprimer cette image',
336
+    'icone_tous_articles' => 'Tous tes articles',
337
+    'icone_tous_auteur' => 'Tous les auteurs',
338
+    'icone_tous_visiteur' => 'Tous les visiteurs',
339
+    'icone_visiter_site' => 'Voir le site public',
340
+    'icone_voir_en_ligne' => 'Voir en ligne',
341
+    'img_indisponible' => 'image indisponible',
342
+    'impossible' => 'impossible',
343
+    'info_a_suivre' => 'À SUIVRE »',
344
+    'info_acces_interdit' => 'Accès interdit',
345
+    'info_acces_refuse' => 'Accès refusé',
346
+    'info_action' => 'Action : @action@',
347
+    'info_administrer_rubriques' => 'Tu peux administrer cette rubrique et ses sous-rubriques',
348
+    'info_adresse_non_indiquee' => 'Tu n’as pas indiqué d’adresse à tester !',
349
+    'info_aide' => 'AIDE :',
350
+    'info_ajouter_mot' => 'Ajouter ce mot',
351
+    'info_annonce' => 'ANNONCE',
352
+    'info_annonces_generales' => 'Annonces générales :',
353
+    'info_article_propose' => 'Article proposé',
354
+    'info_article_publie' => 'Article publié',
355
+    'info_article_redaction' => 'Article en cours de rédaction',
356
+    'info_article_refuse' => 'Article refusé',
357
+    'info_article_supprime' => 'Article supprimé',
358
+    'info_articles' => 'Articles',
359
+    'info_articles_a_valider' => 'Les articles à valider',
360
+    'info_articles_nb' => '@nb@ articles',
361
+    'info_articles_proposes' => 'Articles proposés',
362
+    'info_articles_un' => '1 article',
363
+    'info_auteurs_nombre' => 'auteur(s) :',
364
+    'info_authentification_ftp' => 'Authentification (par FTP).',
365
+    'info_breves_2' => 'brèves',
366
+    'info_breves_nb' => '@nb@ brèves',
367
+    'info_breves_un' => '1 brève',
368
+    'info_connexion_refusee' => 'Connexion refusée',
369
+    'info_contact_developpeur' => 'Contacte un développeur.',
370
+    'info_contenance' => 'Ce site contient :',
371
+    'info_contribution' => 'contributions',
372
+    'info_copyright' => '@spip@ est un logiciel libre distribué @lien_gpl@.',
373
+    'info_copyright_doc' => 'Pour plus d’informations, voir le site <a href="@spipnet@">@spipnet_affiche@</a>.',
374
+    'info_copyright_gpl' => 'sous licence GPL',
375
+    'info_cours_edition' => 'En cours de modification',
376
+    'info_creer_repertoire' => 'Crée un fichier ou un répertoire nommé :',
377
+    'info_creer_repertoire_2' => 'à l’intérieur du sous-répertoire <b>@repertoire@</b>, puis :',
378
+    'info_creer_vignette' => 'création automatique de la vignette',
379
+    'info_creerdansrubrique_non_autorise' => 'Tu n’as pas de droits suffisants pour créer un contenu dans cette rubrique',
380
+    'info_deplier' => 'Déplier',
381
+    'info_descriptif_nombre' => 'descriptif(s) :',
382
+    'info_description' => 'Description :',
383
+    'info_description_2' => 'Description :',
384
+    'info_dimension' => 'Dimensions :',
385
+    'info_documents_nb' => '@nb@ documents',
386
+    'info_documents_un' => '1 document',
387
+    'info_ecire_message_prive' => 'Écrire un message privé',
388
+    'info_email_invalide' => 'Adresse email invalide.',
389
+    'info_en_cours_validation' => 'Tes articles en cours de rédaction',
390
+    'info_en_ligne' => 'Actuellement en ligne :',
391
+    'info_envoyer_message_prive' => 'Envoyer un message privé à cet auteur',
392
+    'info_erreur_requete' => 'Erreur dans la requête :',
393
+    'info_erreur_squelette2' => 'Aucun squelette <b>@fichier@</b> n’est disponible...',
394
+    'info_erreur_systeme' => 'Erreur système (errno @errsys@)',
395
+    'info_erreur_systeme2' => 'Le disque dur est peut-être plein, ou la base de données endommagée.<br />
396 396
 <span style="color:red;">Essaie de <a href=\'@script@\'>réparer la base</a>, ou contacte ton hébergeur.</span>',
397
-	'info_fini' => 'C’est fini !',
398
-	'info_format_image' => 'Formats d’images pouvant être utilisées pour créer des vignettes : @gd_formats@.',
399
-	'info_format_non_defini' => 'format non défini',
400
-	'info_grand_ecran' => 'Grand écran',
401
-	'info_image_aide' => 'AIDE',
402
-	'info_image_process_titre' => 'Comment faire de nouveaux signets',
403
-	'info_impossible_lire_page' => '<b>Erreur !</b> Impossible de lire la page <tt><html>@test_proxy@</html></tt> à travers le proxy ',
404
-	'info_installation_systeme_publication' => 'Installation du système de publication...',
405
-	'info_installer_documents' => 'Tu peux installer automatiquement tous les documents contenus dans le dossier @upload@.',
406
-	'info_installer_ftp' => 'En tant qu’administrateur, tu peux installer (par FTP) des fichiers dans le dossier @upload@ pour ensuite les sélectionner directement ici.',
407
-	'info_installer_images' => 'Tu peux installer des images aux formats JPEG, GIF et PNG.',
408
-	'info_installer_images_dossier' => 'Installer des images dans le dossier @upload@ pour pouvoir les sélectionner ici.',
409
-	'info_interface_complete' => 'interface complète',
410
-	'info_interface_simple' => 'Interface simplifiée',
411
-	'info_joindre_document_article' => 'Tu peux joindre à cet article des documents de type',
412
-	'info_joindre_document_rubrique' => 'Tu peux ajouter dans cette rubrique des documents de type',
413
-	'info_joindre_documents_article' => 'Tu peux joindre à ton article des documents de type :',
414
-	'info_l_article' => 'l’article',
415
-	'info_la_breve' => 'la brève',
416
-	'info_la_rubrique' => 'la rubrique',
417
-	'info_langue_principale' => 'Langue principale du site',
418
-	'info_largeur_vignette' => '@largeur_vignette@ × @hauteur_vignette@ pixels',
419
-	'info_les_auteurs_1' => 'par @les_auteurs@',
420
-	'info_logo_format_interdit' => 'Seuls les logos aux formats @formats@ sont autorisés.',
421
-	'info_logo_max_poids' => 'Les logos doivent obligatoirement faire moins de @maxi@ (ce fichier fait @actuel@).',
422
-	'info_mail_fournisseur' => '[email protected]',
423
-	'info_message_2' => 'MESSAGE',
424
-	'info_message_supprime' => 'MESSAGE SUPPRIMÉ',
425
-	'info_messages_nb' => '@nb@ messages',
426
-	'info_messages_un' => '1 message',
427
-	'info_mise_en_ligne' => 'Date de mise en ligne :',
428
-	'info_modification_parametres_securite' => 'modifications des paramètres de sécurité',
429
-	'info_mois_courant' => 'Dans le courant du mois :',
430
-	'info_mot_cle_ajoute' => 'Le mot-clé suivant a été ajouté à',
431
-	'info_multi_herit' => 'Langue par défaut',
432
-	'info_multi_langues_soulignees' => 'Les <u>langues soulignées</u> bénéficient d’une traduction totale ou partielle des textes de l’interface. Si tu sélectionnes ces langues, de nombreux éléments du site public (dates, formulaires) seront automatiquement traduits. Pour les langues non soulignées, ces éléments apparaîtront dans la langue principale du site.',
433
-	'info_multilinguisme' => 'Multilinguisme',
434
-	'info_nom_non_utilisateurs_connectes' => 'Ton nom n’apparaît pas dans la liste des utilisateurs connectés.',
435
-	'info_nom_utilisateurs_connectes' => 'Ton nom apparaît dans la liste des utilisateurs connectés.',
436
-	'info_nombre_en_ligne' => 'Actuellement en ligne :',
437
-	'info_non_resultat' => 'Aucun résultat pour "@cherche_mot@"',
438
-	'info_non_utilisation_messagerie' => 'Tu n’utilise pas la messagerie interne de ce site.',
439
-	'info_nouveau_message' => 'TU AS UN NOUVEAU MESSAGE',
440
-	'info_nouveaux_messages' => 'TU AS @total_messages@ NOUVEAUX MESSAGES',
441
-	'info_numero_abbreviation' => 'N° ',
442
-	'info_obligatoire' => 'Cette information est obligatoire',
443
-	'info_page_actuelle' => 'Page actuelle',
444
-	'info_pense_bete' => 'PENSE-BÊTE',
445
-	'info_petit_ecran' => 'Petit écran',
446
-	'info_petition_close' => 'Pétition close',
447
-	'info_pixels' => 'pixels',
448
-	'info_plusieurs_mots_trouves' => 'Plusieurs mots-clés trouvés pour "@cherche_mot@" :',
449
-	'info_portfolio_automatique' => 'Portfolio automatique :',
450
-	'info_premier_resultat' => '[@debut_limit@ premiers résultats sur @total@]',
451
-	'info_premier_resultat_sur' => '[@debut_limit@ premiers résultats sur @total@]',
452
-	'info_propose_1' => '[@nom_site_spip@] Propose : @titre@',
453
-	'info_propose_2' => 'Article proposé
397
+    'info_fini' => 'C’est fini !',
398
+    'info_format_image' => 'Formats d’images pouvant être utilisées pour créer des vignettes : @gd_formats@.',
399
+    'info_format_non_defini' => 'format non défini',
400
+    'info_grand_ecran' => 'Grand écran',
401
+    'info_image_aide' => 'AIDE',
402
+    'info_image_process_titre' => 'Comment faire de nouveaux signets',
403
+    'info_impossible_lire_page' => '<b>Erreur !</b> Impossible de lire la page <tt><html>@test_proxy@</html></tt> à travers le proxy ',
404
+    'info_installation_systeme_publication' => 'Installation du système de publication...',
405
+    'info_installer_documents' => 'Tu peux installer automatiquement tous les documents contenus dans le dossier @upload@.',
406
+    'info_installer_ftp' => 'En tant qu’administrateur, tu peux installer (par FTP) des fichiers dans le dossier @upload@ pour ensuite les sélectionner directement ici.',
407
+    'info_installer_images' => 'Tu peux installer des images aux formats JPEG, GIF et PNG.',
408
+    'info_installer_images_dossier' => 'Installer des images dans le dossier @upload@ pour pouvoir les sélectionner ici.',
409
+    'info_interface_complete' => 'interface complète',
410
+    'info_interface_simple' => 'Interface simplifiée',
411
+    'info_joindre_document_article' => 'Tu peux joindre à cet article des documents de type',
412
+    'info_joindre_document_rubrique' => 'Tu peux ajouter dans cette rubrique des documents de type',
413
+    'info_joindre_documents_article' => 'Tu peux joindre à ton article des documents de type :',
414
+    'info_l_article' => 'l’article',
415
+    'info_la_breve' => 'la brève',
416
+    'info_la_rubrique' => 'la rubrique',
417
+    'info_langue_principale' => 'Langue principale du site',
418
+    'info_largeur_vignette' => '@largeur_vignette@ × @hauteur_vignette@ pixels',
419
+    'info_les_auteurs_1' => 'par @les_auteurs@',
420
+    'info_logo_format_interdit' => 'Seuls les logos aux formats @formats@ sont autorisés.',
421
+    'info_logo_max_poids' => 'Les logos doivent obligatoirement faire moins de @maxi@ (ce fichier fait @actuel@).',
422
+    'info_mail_fournisseur' => '[email protected]',
423
+    'info_message_2' => 'MESSAGE',
424
+    'info_message_supprime' => 'MESSAGE SUPPRIMÉ',
425
+    'info_messages_nb' => '@nb@ messages',
426
+    'info_messages_un' => '1 message',
427
+    'info_mise_en_ligne' => 'Date de mise en ligne :',
428
+    'info_modification_parametres_securite' => 'modifications des paramètres de sécurité',
429
+    'info_mois_courant' => 'Dans le courant du mois :',
430
+    'info_mot_cle_ajoute' => 'Le mot-clé suivant a été ajouté à',
431
+    'info_multi_herit' => 'Langue par défaut',
432
+    'info_multi_langues_soulignees' => 'Les <u>langues soulignées</u> bénéficient d’une traduction totale ou partielle des textes de l’interface. Si tu sélectionnes ces langues, de nombreux éléments du site public (dates, formulaires) seront automatiquement traduits. Pour les langues non soulignées, ces éléments apparaîtront dans la langue principale du site.',
433
+    'info_multilinguisme' => 'Multilinguisme',
434
+    'info_nom_non_utilisateurs_connectes' => 'Ton nom n’apparaît pas dans la liste des utilisateurs connectés.',
435
+    'info_nom_utilisateurs_connectes' => 'Ton nom apparaît dans la liste des utilisateurs connectés.',
436
+    'info_nombre_en_ligne' => 'Actuellement en ligne :',
437
+    'info_non_resultat' => 'Aucun résultat pour "@cherche_mot@"',
438
+    'info_non_utilisation_messagerie' => 'Tu n’utilise pas la messagerie interne de ce site.',
439
+    'info_nouveau_message' => 'TU AS UN NOUVEAU MESSAGE',
440
+    'info_nouveaux_messages' => 'TU AS @total_messages@ NOUVEAUX MESSAGES',
441
+    'info_numero_abbreviation' => 'N° ',
442
+    'info_obligatoire' => 'Cette information est obligatoire',
443
+    'info_page_actuelle' => 'Page actuelle',
444
+    'info_pense_bete' => 'PENSE-BÊTE',
445
+    'info_petit_ecran' => 'Petit écran',
446
+    'info_petition_close' => 'Pétition close',
447
+    'info_pixels' => 'pixels',
448
+    'info_plusieurs_mots_trouves' => 'Plusieurs mots-clés trouvés pour "@cherche_mot@" :',
449
+    'info_portfolio_automatique' => 'Portfolio automatique :',
450
+    'info_premier_resultat' => '[@debut_limit@ premiers résultats sur @total@]',
451
+    'info_premier_resultat_sur' => '[@debut_limit@ premiers résultats sur @total@]',
452
+    'info_propose_1' => '[@nom_site_spip@] Propose : @titre@',
453
+    'info_propose_2' => 'Article proposé
454 454
 ---------------',
455
-	'info_propose_3' => 'L’article "@titre@" est proposé à la publication.',
456
-	'info_propose_4' => 'Tu es invité à venir le consulter et à donner ton opinion',
457
-	'info_propose_5' => 'dans le forum qui lui est attaché. Il est disponible à l’adresse :',
458
-	'info_publie_01' => 'L’article "@titre@" a été validé par @connect_nom@.',
459
-	'info_publie_1' => '[@nom_site_spip@] PUBLIE : @titre@',
460
-	'info_publie_2' => 'Article publié
455
+    'info_propose_3' => 'L’article "@titre@" est proposé à la publication.',
456
+    'info_propose_4' => 'Tu es invité à venir le consulter et à donner ton opinion',
457
+    'info_propose_5' => 'dans le forum qui lui est attaché. Il est disponible à l’adresse :',
458
+    'info_publie_01' => 'L’article "@titre@" a été validé par @connect_nom@.',
459
+    'info_publie_1' => '[@nom_site_spip@] PUBLIE : @titre@',
460
+    'info_publie_2' => 'Article publié
461 461
 --------------',
462
-	'info_rechercher' => 'Rechercher',
463
-	'info_rechercher_02' => 'Rechercher :',
464
-	'info_remplacer_vignette' => 'Remplacer la vignette par défaut par un logo personnalisé :',
465
-	'info_rubriques_nb' => '@nb@ rubriques',
466
-	'info_rubriques_un' => '1 rubrique',
467
-	'info_sans_titre_2' => 'sans titre',
468
-	'info_selectionner_fichier' => 'Tu peux sélectionner un fichier du dossier @upload@',
469
-	'info_selectionner_fichier_2' => 'Sélectionner un fichier :',
470
-	'info_sites_nb' => '@nb@ sites',
471
-	'info_sites_un' => '1 site',
472
-	'info_supprimer_vignette' => 'supprimer la vignette',
473
-	'info_symbole_bleu' => 'Le symbole <b>bleu</b> indique un <b>pense-bête</b> : c’est-à-dire un message à ton usage personnel.',
474
-	'info_symbole_jaune' => 'Le symbole <b>jaune</b> indique une <b>annonce à tous les rédacteurs</b> : modifiable par tous les administrateurs, et visible par tous les rédacteurs.',
475
-	'info_symbole_vert' => 'Le symbole <b>vert</b> indique les <b>messages échangés avec d’autres utilisateurs</b> du site.',
476
-	'info_telecharger_nouveau_logo' => 'Télécharger un nouveau logo :',
477
-	'info_telecharger_ordinateur' => 'Télécharger depuis ton ordinateur :',
478
-	'info_tous_resultats_enregistres' => '[tous les résultats sont enregistrés]',
479
-	'info_tout_afficher' => 'Tout afficher',
480
-	'info_travaux_texte' => 'Ce site n’est pas encore configuré. Reviens plus tard...',
481
-	'info_travaux_titre' => 'Site en travaux',
482
-	'info_trop_resultat' => 'Trop de résultats pour "@cherche_mot@" ; affine la recherche.',
483
-	'info_utilisation_messagerie_interne' => 'Tu utilises la messagerie interne de ce site.',
484
-	'info_valider_lien' => 'valider ce lien',
485
-	'info_verifier_image' => ', vérifie que tes images ont été transférées correctement.',
486
-	'info_vignette_defaut' => 'Vignette par défaut',
487
-	'info_vignette_personnalisee' => 'Vignette personnalisée',
488
-	'info_visite' => 'visite :',
489
-	'info_vos_rendez_vous' => 'Tes rendez-vous à venir',
490
-	'infos_vos_pense_bete' => 'Tes pense-bêtes',
462
+    'info_rechercher' => 'Rechercher',
463
+    'info_rechercher_02' => 'Rechercher :',
464
+    'info_remplacer_vignette' => 'Remplacer la vignette par défaut par un logo personnalisé :',
465
+    'info_rubriques_nb' => '@nb@ rubriques',
466
+    'info_rubriques_un' => '1 rubrique',
467
+    'info_sans_titre_2' => 'sans titre',
468
+    'info_selectionner_fichier' => 'Tu peux sélectionner un fichier du dossier @upload@',
469
+    'info_selectionner_fichier_2' => 'Sélectionner un fichier :',
470
+    'info_sites_nb' => '@nb@ sites',
471
+    'info_sites_un' => '1 site',
472
+    'info_supprimer_vignette' => 'supprimer la vignette',
473
+    'info_symbole_bleu' => 'Le symbole <b>bleu</b> indique un <b>pense-bête</b> : c’est-à-dire un message à ton usage personnel.',
474
+    'info_symbole_jaune' => 'Le symbole <b>jaune</b> indique une <b>annonce à tous les rédacteurs</b> : modifiable par tous les administrateurs, et visible par tous les rédacteurs.',
475
+    'info_symbole_vert' => 'Le symbole <b>vert</b> indique les <b>messages échangés avec d’autres utilisateurs</b> du site.',
476
+    'info_telecharger_nouveau_logo' => 'Télécharger un nouveau logo :',
477
+    'info_telecharger_ordinateur' => 'Télécharger depuis ton ordinateur :',
478
+    'info_tous_resultats_enregistres' => '[tous les résultats sont enregistrés]',
479
+    'info_tout_afficher' => 'Tout afficher',
480
+    'info_travaux_texte' => 'Ce site n’est pas encore configuré. Reviens plus tard...',
481
+    'info_travaux_titre' => 'Site en travaux',
482
+    'info_trop_resultat' => 'Trop de résultats pour "@cherche_mot@" ; affine la recherche.',
483
+    'info_utilisation_messagerie_interne' => 'Tu utilises la messagerie interne de ce site.',
484
+    'info_valider_lien' => 'valider ce lien',
485
+    'info_verifier_image' => ', vérifie que tes images ont été transférées correctement.',
486
+    'info_vignette_defaut' => 'Vignette par défaut',
487
+    'info_vignette_personnalisee' => 'Vignette personnalisée',
488
+    'info_visite' => 'visite :',
489
+    'info_vos_rendez_vous' => 'Tes rendez-vous à venir',
490
+    'infos_vos_pense_bete' => 'Tes pense-bêtes',
491 491
 
492
-	// L
493
-	'label_ajout_id_rapide' => 'Ajout rapide',
494
-	'label_poids_fichier' => 'Taille',
495
-	'label_ponctuer' => '@label@ :',
496
-	'lien_afficher_icones_seuls' => 'Afficher uniquement les icones',
497
-	'lien_afficher_texte_icones' => 'Afficher les icones et le texte',
498
-	'lien_afficher_texte_seul' => 'Afficher uniquement le texte',
499
-	'lien_aller_a_la_derniere_page' => 'Aller à la dernière page',
500
-	'lien_aller_a_la_page_nb' => 'Aller à la page @nb@',
501
-	'lien_aller_a_la_page_precedente' => 'Aller à la page précédente',
502
-	'lien_aller_a_la_page_suivante' => 'Aller à la page suivante',
503
-	'lien_aller_a_la_premiere_page' => 'Aller à la première page',
504
-	'lien_liberer' => 'libérer',
505
-	'lien_liberer_tous' => 'Tout libérer',
506
-	'lien_nouvea_pense_bete' => 'NOUVEAU PENSE-BÊTE',
507
-	'lien_nouveau_message' => 'NOUVEAU MESSAGE',
508
-	'lien_nouvelle_annonce' => 'NOUVELLE ANNONCE',
509
-	'lien_petitions' => 'PÉTITION',
510
-	'lien_popularite' => 'popularité : @popularite@%',
511
-	'lien_racine_site' => 'RACINE DU SITE',
512
-	'lien_reessayer' => 'réessayer',
513
-	'lien_repondre_message' => 'Répondre à ce message',
514
-	'lien_supprimer' => 'supprimer',
515
-	'lien_tout_afficher' => 'Tout afficher',
516
-	'lien_visite_site' => 'visiter ce site',
517
-	'lien_visites' => '@visites@ visites',
518
-	'lien_voir_auteur' => 'Voir cet auteur',
519
-	'ligne' => 'Ligne',
520
-	'login' => 'Connexion',
521
-	'login_acces_prive' => 'accès à l’espace privé',
522
-	'login_autre_identifiant' => 'se connecter sous un autre identifiant',
523
-	'login_cookie_accepte' => 'Régle ton navigateur pour qu’il les accepte (au moins pour ce site).',
524
-	'login_cookie_oblige' => 'Pour t’identifier de façon sûre sur ce site, tu dois accepter les cookies.',
525
-	'login_deconnexion_ok' => 'Déconnexion effectuée.',
526
-	'login_erreur_pass' => 'Erreur de mot de passe.',
527
-	'login_espace_prive' => 'espace privé',
528
-	'login_identifiant_inconnu' => 'L’identifiant « @login@ » est inconnu.',
529
-	'login_login' => 'Login :',
530
-	'login_login2' => 'Login ou adresse email@circ@ :',
531
-	'login_login_pass_incorrect' => '(Login ou mot de passe incorrect.)',
532
-	'login_motpasseoublie' => 'mot de passe oublié ?',
533
-	'login_non_securise' => 'Attention, ce formulaire n’est pas sécurisé.
492
+    // L
493
+    'label_ajout_id_rapide' => 'Ajout rapide',
494
+    'label_poids_fichier' => 'Taille',
495
+    'label_ponctuer' => '@label@ :',
496
+    'lien_afficher_icones_seuls' => 'Afficher uniquement les icones',
497
+    'lien_afficher_texte_icones' => 'Afficher les icones et le texte',
498
+    'lien_afficher_texte_seul' => 'Afficher uniquement le texte',
499
+    'lien_aller_a_la_derniere_page' => 'Aller à la dernière page',
500
+    'lien_aller_a_la_page_nb' => 'Aller à la page @nb@',
501
+    'lien_aller_a_la_page_precedente' => 'Aller à la page précédente',
502
+    'lien_aller_a_la_page_suivante' => 'Aller à la page suivante',
503
+    'lien_aller_a_la_premiere_page' => 'Aller à la première page',
504
+    'lien_liberer' => 'libérer',
505
+    'lien_liberer_tous' => 'Tout libérer',
506
+    'lien_nouvea_pense_bete' => 'NOUVEAU PENSE-BÊTE',
507
+    'lien_nouveau_message' => 'NOUVEAU MESSAGE',
508
+    'lien_nouvelle_annonce' => 'NOUVELLE ANNONCE',
509
+    'lien_petitions' => 'PÉTITION',
510
+    'lien_popularite' => 'popularité : @popularite@%',
511
+    'lien_racine_site' => 'RACINE DU SITE',
512
+    'lien_reessayer' => 'réessayer',
513
+    'lien_repondre_message' => 'Répondre à ce message',
514
+    'lien_supprimer' => 'supprimer',
515
+    'lien_tout_afficher' => 'Tout afficher',
516
+    'lien_visite_site' => 'visiter ce site',
517
+    'lien_visites' => '@visites@ visites',
518
+    'lien_voir_auteur' => 'Voir cet auteur',
519
+    'ligne' => 'Ligne',
520
+    'login' => 'Connexion',
521
+    'login_acces_prive' => 'accès à l’espace privé',
522
+    'login_autre_identifiant' => 'se connecter sous un autre identifiant',
523
+    'login_cookie_accepte' => 'Régle ton navigateur pour qu’il les accepte (au moins pour ce site).',
524
+    'login_cookie_oblige' => 'Pour t’identifier de façon sûre sur ce site, tu dois accepter les cookies.',
525
+    'login_deconnexion_ok' => 'Déconnexion effectuée.',
526
+    'login_erreur_pass' => 'Erreur de mot de passe.',
527
+    'login_espace_prive' => 'espace privé',
528
+    'login_identifiant_inconnu' => 'L’identifiant « @login@ » est inconnu.',
529
+    'login_login' => 'Login :',
530
+    'login_login2' => 'Login ou adresse email@circ@ :',
531
+    'login_login_pass_incorrect' => '(Login ou mot de passe incorrect.)',
532
+    'login_motpasseoublie' => 'mot de passe oublié ?',
533
+    'login_non_securise' => 'Attention, ce formulaire n’est pas sécurisé.
534 534
 			Si tu ne veux pas que ton mot de passe puisse être
535 535
 			intercepté sur le réseau, active Javascript
536 536
 			dans ton navigateur et',
537
-	'login_nouvelle_tentative' => 'Nouvelle tentative',
538
-	'login_par_ici' => 'Tu es enregistré... par ici...',
539
-	'login_pass2' => 'Mot de passe :',
540
-	'login_preferez_refuser' => '<b>Si tu préfére refuser les cookies</b>, une autre méthode de connexion (moins sécurisée) est à ta disposition :',
541
-	'login_recharger' => 'recharger cette page',
542
-	'login_rester_identifie' => 'Se souvenir de moi',
543
-	'login_retour_public' => 'Retour au site public',
544
-	'login_retour_site' => 'Retour au site public',
545
-	'login_retoursitepublic' => 'retour au site public',
546
-	'login_sans_cookie' => 'Identification sans cookie',
547
-	'login_securise' => 'Login sécurisé',
548
-	'login_sinscrire' => 'S’inscrire',
549
-	'login_test_navigateur' => 'test navigateur/reconnexion',
550
-	'login_verifiez_navigateur' => '(Vérifie toutefois que ton navigateur n’a pas mémorisé ton mot de passe...)',
537
+    'login_nouvelle_tentative' => 'Nouvelle tentative',
538
+    'login_par_ici' => 'Tu es enregistré... par ici...',
539
+    'login_pass2' => 'Mot de passe :',
540
+    'login_preferez_refuser' => '<b>Si tu préfére refuser les cookies</b>, une autre méthode de connexion (moins sécurisée) est à ta disposition :',
541
+    'login_recharger' => 'recharger cette page',
542
+    'login_rester_identifie' => 'Se souvenir de moi',
543
+    'login_retour_public' => 'Retour au site public',
544
+    'login_retour_site' => 'Retour au site public',
545
+    'login_retoursitepublic' => 'retour au site public',
546
+    'login_sans_cookie' => 'Identification sans cookie',
547
+    'login_securise' => 'Login sécurisé',
548
+    'login_sinscrire' => 'S’inscrire',
549
+    'login_test_navigateur' => 'test navigateur/reconnexion',
550
+    'login_verifiez_navigateur' => '(Vérifie toutefois que ton navigateur n’a pas mémorisé ton mot de passe...)',
551 551
 
552
-	// M
553
-	'masquer_colonne' => 'Masquer cette colonne',
554
-	'masquer_trad' => 'masquer les traductions',
555
-	'message_nouveaux_identifiants_echec' => 'Impossible de générer de nouveaux identifiants.',
556
-	'message_nouveaux_identifiants_echec_envoi' => 'Les nouveaux identifiants de connexion n’ont pas pu être envoyés.',
557
-	'message_nouveaux_identifiants_ok' => 'Les nouveaux identifiants de connexion ont été envoyés à @email@.',
558
-	'module_fichiers_langues' => 'Fichiers de langue',
552
+    // M
553
+    'masquer_colonne' => 'Masquer cette colonne',
554
+    'masquer_trad' => 'masquer les traductions',
555
+    'message_nouveaux_identifiants_echec' => 'Impossible de générer de nouveaux identifiants.',
556
+    'message_nouveaux_identifiants_echec_envoi' => 'Les nouveaux identifiants de connexion n’ont pas pu être envoyés.',
557
+    'message_nouveaux_identifiants_ok' => 'Les nouveaux identifiants de connexion ont été envoyés à @email@.',
558
+    'module_fichiers_langues' => 'Fichiers de langue',
559 559
 
560
-	// N
561
-	'navigateur_pas_redirige' => 'Si votre navigateur n’est pas redirigé, cliquez ici pour continuer.',
562
-	'numero' => 'Numéro',
560
+    // N
561
+    'navigateur_pas_redirige' => 'Si votre navigateur n’est pas redirigé, cliquez ici pour continuer.',
562
+    'numero' => 'Numéro',
563 563
 
564
-	// O
565
-	'occurence' => 'Occurence',
566
-	'onglet_affacer_base' => 'Effacer la base',
567
-	'onglet_auteur' => 'L’auteur',
568
-	'onglet_contenu_site' => 'Contenu du site',
569
-	'onglet_evolution_visite_mod' => 'Évolution',
570
-	'onglet_fonctions_avances' => 'Fonctions avancées',
571
-	'onglet_informations_personnelles' => 'Informations personnelles',
572
-	'onglet_interactivite' => 'Interactivité',
573
-	'onglet_messagerie' => 'Messagerie',
574
-	'onglet_repartition_rubrique' => 'Répartition par rubriques',
575
-	'onglet_save_restaur_base' => 'Sauvegarder/restaurer la base',
576
-	'onglet_vider_cache' => 'Vider le cache',
564
+    // O
565
+    'occurence' => 'Occurence',
566
+    'onglet_affacer_base' => 'Effacer la base',
567
+    'onglet_auteur' => 'L’auteur',
568
+    'onglet_contenu_site' => 'Contenu du site',
569
+    'onglet_evolution_visite_mod' => 'Évolution',
570
+    'onglet_fonctions_avances' => 'Fonctions avancées',
571
+    'onglet_informations_personnelles' => 'Informations personnelles',
572
+    'onglet_interactivite' => 'Interactivité',
573
+    'onglet_messagerie' => 'Messagerie',
574
+    'onglet_repartition_rubrique' => 'Répartition par rubriques',
575
+    'onglet_save_restaur_base' => 'Sauvegarder/restaurer la base',
576
+    'onglet_vider_cache' => 'Vider le cache',
577 577
 
578
-	// P
579
-	'pass_choix_pass' => 'Choisis ton nouveau mot de passe :',
580
-	'pass_erreur' => 'Erreur',
581
-	'pass_erreur_acces_refuse' => '<b>Erreur :</b> tu n’as plus accès à ce site.',
582
-	'pass_erreur_code_inconnu' => '<b>Erreur :</b> ce code ne correspond à aucun des visiteurs ayant accès à ce site.',
583
-	'pass_erreur_non_enregistre' => '<b>Erreur :</b> l’adresse <tt>@email_oubli@</tt> n’est pas enregistrée sur ce site.',
584
-	'pass_erreur_non_valide' => '<b>Erreur :</b> cet email <tt>@email_oubli@</tt> n’est pas valide !',
585
-	'pass_erreur_probleme_technique' => '<b>Erreur :</b> à cause d’un problème technique, l’email ne peut pas être envoyé.',
586
-	'pass_espace_prive_bla' => 'L’espace privé de ce site est ouvert aux
578
+    // P
579
+    'pass_choix_pass' => 'Choisis ton nouveau mot de passe :',
580
+    'pass_erreur' => 'Erreur',
581
+    'pass_erreur_acces_refuse' => '<b>Erreur :</b> tu n’as plus accès à ce site.',
582
+    'pass_erreur_code_inconnu' => '<b>Erreur :</b> ce code ne correspond à aucun des visiteurs ayant accès à ce site.',
583
+    'pass_erreur_non_enregistre' => '<b>Erreur :</b> l’adresse <tt>@email_oubli@</tt> n’est pas enregistrée sur ce site.',
584
+    'pass_erreur_non_valide' => '<b>Erreur :</b> cet email <tt>@email_oubli@</tt> n’est pas valide !',
585
+    'pass_erreur_probleme_technique' => '<b>Erreur :</b> à cause d’un problème technique, l’email ne peut pas être envoyé.',
586
+    'pass_espace_prive_bla' => 'L’espace privé de ce site est ouvert aux
587 587
 		visiteurs, après inscription. Une fois enregistré,
588 588
 		tu pourras consulter les articles en cours de rédaction,
589 589
 		proposer des articles et participer à tous les forums.',
590
-	'pass_forum_bla' => 'Tu as demandé à intervenir sur un forum
590
+    'pass_forum_bla' => 'Tu as demandé à intervenir sur un forum
591 591
 		réservé aux visiteurs enregistrés.',
592
-	'pass_indiquez_cidessous' => 'Indique ci-dessous l’adresse email sous laquelle tu
592
+    'pass_indiquez_cidessous' => 'Indique ci-dessous l’adresse email sous laquelle tu
593 593
 			t’es précédemment enregistré. Tu
594 594
 			recevras un email t’indiquant la marche à suivre pour
595 595
 			récupérer ton accès.',
596
-	'pass_mail_passcookie' => '(ceci est un message automatique)
596
+    'pass_mail_passcookie' => '(ceci est un message automatique)
597 597
 Pour retrouver ton accès au site
598 598
 @nom_site_spip@ (@adresse_site@)
599 599
 Rends toi à l’adresse suivante :
@@ -604,150 +604,150 @@  discard block
 block discarded – undo
604 604
 et te reconnecter au site.
605 605
 
606 606
 ',
607
-	'pass_mot_oublie' => 'Mot de passe oublié',
608
-	'pass_nouveau_enregistre' => 'Ton nouveau mot de passe a été enregistré.',
609
-	'pass_nouveau_pass' => 'Nouveau mot de passe',
610
-	'pass_ok' => 'OK',
611
-	'pass_oubli_mot' => 'Oubli du mot de passe',
612
-	'pass_procedure_changer' => 'Pour changer ton mot de passe, merci d’indiquer l’adresse email associée à ton compte.',
613
-	'pass_quitter_fenetre' => 'Quitter cette fenêtre',
614
-	'pass_rappel_login' => 'Rappel : ton identifiant (login) est « @login@ ».',
615
-	'pass_recevoir_mail' => 'Un lien de réinitialisation de ton mot de passe t’a été envoyé sur ton adresse email (si celle-ci est valide).',
616
-	'pass_retour_public' => 'Retour sur le site public',
617
-	'pass_rien_a_faire_ici' => 'Rien à faire ici.',
618
-	'pass_vousinscrire' => 'T’inscrire sur ce site',
619
-	'precedent' => 'précédent',
620
-	'previsualisation' => 'Prévisualisation',
621
-	'previsualiser' => 'Prévisualiser',
607
+    'pass_mot_oublie' => 'Mot de passe oublié',
608
+    'pass_nouveau_enregistre' => 'Ton nouveau mot de passe a été enregistré.',
609
+    'pass_nouveau_pass' => 'Nouveau mot de passe',
610
+    'pass_ok' => 'OK',
611
+    'pass_oubli_mot' => 'Oubli du mot de passe',
612
+    'pass_procedure_changer' => 'Pour changer ton mot de passe, merci d’indiquer l’adresse email associée à ton compte.',
613
+    'pass_quitter_fenetre' => 'Quitter cette fenêtre',
614
+    'pass_rappel_login' => 'Rappel : ton identifiant (login) est « @login@ ».',
615
+    'pass_recevoir_mail' => 'Un lien de réinitialisation de ton mot de passe t’a été envoyé sur ton adresse email (si celle-ci est valide).',
616
+    'pass_retour_public' => 'Retour sur le site public',
617
+    'pass_rien_a_faire_ici' => 'Rien à faire ici.',
618
+    'pass_vousinscrire' => 'T’inscrire sur ce site',
619
+    'precedent' => 'précédent',
620
+    'previsualisation' => 'Prévisualisation',
621
+    'previsualiser' => 'Prévisualiser',
622 622
 
623
-	// R
624
-	'retour' => 'Retour',
623
+    // R
624
+    'retour' => 'Retour',
625 625
 
626
-	// S
627
-	'spip_conforme_dtd' => 'SPIP considère ce document comme conforme à son DOCTYPE :',
628
-	'squelette' => 'squelette',
629
-	'squelette_inclus_ligne' => 'squelette inclus, ligne',
630
-	'squelette_ligne' => 'squelette, ligne',
631
-	'stats_visites_et_popularite' => '@visites@ visites ; popularité : @popularite@',
632
-	'suivant' => 'suivant',
626
+    // S
627
+    'spip_conforme_dtd' => 'SPIP considère ce document comme conforme à son DOCTYPE :',
628
+    'squelette' => 'squelette',
629
+    'squelette_inclus_ligne' => 'squelette inclus, ligne',
630
+    'squelette_ligne' => 'squelette, ligne',
631
+    'stats_visites_et_popularite' => '@visites@ visites ; popularité : @popularite@',
632
+    'suivant' => 'suivant',
633 633
 
634
-	// T
635
-	'taille_go' => '@taille@ Go',
636
-	'taille_go_bi' => '@taille@ Gio',
637
-	'taille_ko' => '@taille@ ko',
638
-	'taille_ko_bi' => '@taille@ kio',
639
-	'taille_mo' => '@taille@ Mo',
640
-	'taille_mo_bi' => '@taille@ Mio',
641
-	'taille_octets' => '@taille@ octets',
642
-	'taille_octets_bi' => '@taille@ octets',
643
-	'texte_actualite_site_1' => 'Quand tu seras familiarisé(e) avec l’interface, tu pourras cliquer sur « ',
644
-	'texte_actualite_site_2' => 'interface complète',
645
-	'texte_actualite_site_3' => ' » pour ouvrir plus de possibilités.',
646
-	'texte_creation_automatique_vignette' => 'La création automatique de vignettes de prévisualisation est activée sur ce site. Si tu installe à partir de ce formulaire des images au(x) format(s) @gd_formats@, elles seront accompagnées d’une vignette d’une taille maximale de @taille_preview@ pixels.',
647
-	'texte_documents_associes' => 'Les documents suivants sont associés à l’article,
634
+    // T
635
+    'taille_go' => '@taille@ Go',
636
+    'taille_go_bi' => '@taille@ Gio',
637
+    'taille_ko' => '@taille@ ko',
638
+    'taille_ko_bi' => '@taille@ kio',
639
+    'taille_mo' => '@taille@ Mo',
640
+    'taille_mo_bi' => '@taille@ Mio',
641
+    'taille_octets' => '@taille@ octets',
642
+    'taille_octets_bi' => '@taille@ octets',
643
+    'texte_actualite_site_1' => 'Quand tu seras familiarisé(e) avec l’interface, tu pourras cliquer sur « ',
644
+    'texte_actualite_site_2' => 'interface complète',
645
+    'texte_actualite_site_3' => ' » pour ouvrir plus de possibilités.',
646
+    'texte_creation_automatique_vignette' => 'La création automatique de vignettes de prévisualisation est activée sur ce site. Si tu installe à partir de ce formulaire des images au(x) format(s) @gd_formats@, elles seront accompagnées d’une vignette d’une taille maximale de @taille_preview@ pixels.',
647
+    'texte_documents_associes' => 'Les documents suivants sont associés à l’article,
648 648
 				mais ils n’y ont pas été directement
649 649
 				insérés. Selon la mise en page du site public,
650 650
 				ils pourront apparaître sous forme de documents joints.',
651
-	'texte_erreur_mise_niveau_base' => 'Erreur de base de données lors de la mise à niveau.
651
+    'texte_erreur_mise_niveau_base' => 'Erreur de base de données lors de la mise à niveau.
652 652
   L’image <b>@fichier@</b> n’est pas passée (article @id_article@).
653 653
   Note bien cette référence, réessaye la mise à
654 654
   niveau, et enfin vérifie que les images apparaissent
655 655
   toujours dans les articles.',
656
-	'texte_erreur_visiteur' => 'Tu as tenté d’accéder à l’espace privé avec un login qui ne le permet pas.',
657
-	'texte_inc_auth_1' => 'Tu es identifié sous le
656
+    'texte_erreur_visiteur' => 'Tu as tenté d’accéder à l’espace privé avec un login qui ne le permet pas.',
657
+    'texte_inc_auth_1' => 'Tu es identifié sous le
658 658
   login <b>@auth_login@</b>, mais celui-ci n’existe pas/plus dans la base.
659 659
   Essaye de te',
660
-	'texte_inc_auth_2' => 'reconnecter',
661
-	'texte_inc_auth_3' => ', après avoir éventuellement quitté puis
660
+    'texte_inc_auth_2' => 'reconnecter',
661
+    'texte_inc_auth_3' => ', après avoir éventuellement quitté puis
662 662
 		redémarré ton navigateur.',
663
-	'texte_inc_config' => 'Les modifications effectuées dans ces pages influent notablement sur le
663
+    'texte_inc_config' => 'Les modifications effectuées dans ces pages influent notablement sur le
664 664
  fonctionnement de ton site. Nous te recommandons de ne pas y intervenir tant que tu n’es pas
665 665
  familier du fonctionnement du système SPIP. <br /><br /><b>Plus
666 666
  généralement, il est fortement conseillé
667 667
  de laisser la charge de ces pages au webmestre principal de ton site.</b>',
668
-	'texte_inc_meta_1' => 'Le système a rencontré une erreur lors de l’écriture du fichier <code>@fichier@</code>. En tant qu’administrateur du site,',
669
-	'texte_inc_meta_2' => 'vérifie les droits d’ecriture',
670
-	'texte_inc_meta_3' => 'sur le répertoire <code>@repertoire@</code>.',
671
-	'texte_statut_en_cours_redaction' => 'en cours de rédaction',
672
-	'texte_statut_poubelle' => 'à la poubelle',
673
-	'texte_statut_propose_evaluation' => 'proposé à l’évaluation',
674
-	'texte_statut_publie' => 'publié en ligne',
675
-	'texte_statut_refuse' => 'refusé',
676
-	'titre_ajouter_mot_cle' => 'AJOUTER UN MOT-CLÉ :',
677
-	'titre_cadre_raccourcis' => 'RACCOURCIS :',
678
-	'titre_changer_couleur_interface' => 'Changer la couleur de l’interface',
679
-	'titre_image_admin_article' => 'Tu peux administrer cet article',
680
-	'titre_image_administrateur' => 'Administrateur',
681
-	'titre_image_aide' => 'De l’aide sur cet élément',
682
-	'titre_image_auteur_supprime' => 'Auteur supprimé',
683
-	'titre_image_redacteur' => 'Rédacteur sans accès',
684
-	'titre_image_redacteur_02' => 'Rédacteur',
685
-	'titre_image_selecteur' => 'Afficher la liste',
686
-	'titre_image_visiteur' => 'Visiteur',
687
-	'titre_joindre_document' => 'JOINDRE UN DOCUMENT',
688
-	'titre_mots_cles' => 'MOTS-CLÉS',
689
-	'titre_probleme_technique' => 'Attention : un problème technique (serveur SQL) empêche l’accès à cette partie du site. Merci de ta compréhension.',
690
-	'titre_publier_document' => 'PUBLIER UN DOCUMENT DANS CETTE RUBRIQUE',
691
-	'titre_signatures_attente' => 'Signatures en attente de validation',
692
-	'titre_signatures_confirmees' => 'Signatures confirmées',
693
-	'titre_statistiques' => 'Statistiques du site',
694
-	'titre_titre_document' => 'Titre du document :',
695
-	'todo' => 'à venir',
696
-	'trad_definir_reference' => 'Choisir "@titre@" comme référence des traductions',
697
-	'trad_reference' => '(référence des traductions)',
668
+    'texte_inc_meta_1' => 'Le système a rencontré une erreur lors de l’écriture du fichier <code>@fichier@</code>. En tant qu’administrateur du site,',
669
+    'texte_inc_meta_2' => 'vérifie les droits d’ecriture',
670
+    'texte_inc_meta_3' => 'sur le répertoire <code>@repertoire@</code>.',
671
+    'texte_statut_en_cours_redaction' => 'en cours de rédaction',
672
+    'texte_statut_poubelle' => 'à la poubelle',
673
+    'texte_statut_propose_evaluation' => 'proposé à l’évaluation',
674
+    'texte_statut_publie' => 'publié en ligne',
675
+    'texte_statut_refuse' => 'refusé',
676
+    'titre_ajouter_mot_cle' => 'AJOUTER UN MOT-CLÉ :',
677
+    'titre_cadre_raccourcis' => 'RACCOURCIS :',
678
+    'titre_changer_couleur_interface' => 'Changer la couleur de l’interface',
679
+    'titre_image_admin_article' => 'Tu peux administrer cet article',
680
+    'titre_image_administrateur' => 'Administrateur',
681
+    'titre_image_aide' => 'De l’aide sur cet élément',
682
+    'titre_image_auteur_supprime' => 'Auteur supprimé',
683
+    'titre_image_redacteur' => 'Rédacteur sans accès',
684
+    'titre_image_redacteur_02' => 'Rédacteur',
685
+    'titre_image_selecteur' => 'Afficher la liste',
686
+    'titre_image_visiteur' => 'Visiteur',
687
+    'titre_joindre_document' => 'JOINDRE UN DOCUMENT',
688
+    'titre_mots_cles' => 'MOTS-CLÉS',
689
+    'titre_probleme_technique' => 'Attention : un problème technique (serveur SQL) empêche l’accès à cette partie du site. Merci de ta compréhension.',
690
+    'titre_publier_document' => 'PUBLIER UN DOCUMENT DANS CETTE RUBRIQUE',
691
+    'titre_signatures_attente' => 'Signatures en attente de validation',
692
+    'titre_signatures_confirmees' => 'Signatures confirmées',
693
+    'titre_statistiques' => 'Statistiques du site',
694
+    'titre_titre_document' => 'Titre du document :',
695
+    'todo' => 'à venir',
696
+    'trad_definir_reference' => 'Choisir "@titre@" comme référence des traductions',
697
+    'trad_reference' => '(référence des traductions)',
698 698
 
699
-	// U
700
-	'upload_limit' => 'Ce fichier est trop gros pour le serveur ; la taille maximum autorisée en <i>upload</i> est de @max@.',
699
+    // U
700
+    'upload_limit' => 'Ce fichier est trop gros pour le serveur ; la taille maximum autorisée en <i>upload</i> est de @max@.',
701 701
 
702
-	// Z
703
-	'zbug_balise_b_aval' => ' : balise B en aval',
704
-	'zbug_balise_inexistante' => 'Balise @balise@ mal déclarée pour @from@',
705
-	'zbug_balise_sans_argument' => 'Argument manquant dans la balise @balise@',
706
-	'zbug_boucle' => 'boucle',
707
-	'zbug_boucle_recursive_undef' => 'boucle récursive non définie',
708
-	'zbug_calcul' => 'calcul',
709
-	'zbug_champ_hors_boucle' => 'Champ @champ@ hors boucle',
710
-	'zbug_champ_hors_critere' => 'Champ @champ@ hors critère @critere@',
711
-	'zbug_champ_hors_motif' => 'Champ @champ@ hors d’un contexte @motif@',
712
-	'zbug_code' => 'code',
713
-	'zbug_critere_inconnu' => 'critère inconnu @critere@',
714
-	'zbug_critere_sur_table_sans_cle_primaire' => '{@critere@} sur une table sans clef primaire atomique',
715
-	'zbug_distant_interdit' => 'externe interdit',
716
-	'zbug_doublon_table_sans_cle_primaire' => 'doublons sur une table sans clef primaire atomique',
717
-	'zbug_doublon_table_sans_index' => 'doublons sur une table sans index',
718
-	'zbug_erreur_boucle_double' => 'BOUCLE@id@ : double définition',
719
-	'zbug_erreur_boucle_fermant' => 'BOUCLE@id@ : tag fermant manquant',
720
-	'zbug_erreur_boucle_syntaxe' => 'Syntaxe boucle incorrecte',
721
-	'zbug_erreur_compilation' => 'Erreur de compilation',
722
-	'zbug_erreur_execution_page' => 'erreur d’exécution de la page',
723
-	'zbug_erreur_filtre' => 'Erreur : filtre <b>« @filtre@ »</b> non défini',
724
-	'zbug_erreur_filtre_nbarg_min' => 'Filtre @filtre@ : il manque @nb@ argument(s)',
725
-	'zbug_erreur_meme_parent' => '{meme_parent} ne s’applique qu’aux boucles (FORUMS) ou (RUBRIQUES)',
726
-	'zbug_erreur_squelette' => 'Erreur(s) dans le squelette',
727
-	'zbug_hors_compilation' => 'Hors Compilation',
728
-	'zbug_info_erreur_squelette' => 'Erreur sur le site',
729
-	'zbug_inversion_ordre_inexistant' => 'inversion d’un ordre inexistant',
730
-	'zbug_pagination_sans_critere' => '#PAGINATION sans critère {pagination} ou employé dans une boucle récursive',
731
-	'zbug_parametres_inclus_incorrects' => 'Paramètre d’inclusion incorrect : @param@',
732
-	'zbug_profile' => 'Temps de calcul : @time@',
733
-	'zbug_resultat' => 'résultat',
734
-	'zbug_serveur_indefini' => 'serveur SQL indéfini',
735
-	'zbug_statistiques' => 'Statistiques des requêtes SQL classées par durée',
736
-	'zbug_table_inconnue' => 'Table SQL « @table@ » inconnue',
737
-	'zxml_connus_attributs' => 'attributs connus',
738
-	'zxml_de' => 'de',
739
-	'zxml_inconnu_attribut' => 'attribut inconnu',
740
-	'zxml_inconnu_balise' => 'balise inconnue',
741
-	'zxml_inconnu_entite' => 'entité inconnue',
742
-	'zxml_inconnu_id' => 'ID inconnu',
743
-	'zxml_mais_de' => 'mais de',
744
-	'zxml_non_conforme' => 'n’est pas conforme au motif',
745
-	'zxml_non_fils' => 'n’est pas un fils de',
746
-	'zxml_nonvide_balise' => 'balise non vide',
747
-	'zxml_obligatoire_attribut' => 'attribut obligatoire mais absent dans',
748
-	'zxml_succession_fils_incorrecte' => 'succession des fils incorrecte',
749
-	'zxml_survoler' => 'survoler pour voir les corrects',
750
-	'zxml_valeur_attribut' => 'valeur de l’attribut',
751
-	'zxml_vide_balise' => 'balise vide',
752
-	'zxml_vu' => 'vu auparavant'
702
+    // Z
703
+    'zbug_balise_b_aval' => ' : balise B en aval',
704
+    'zbug_balise_inexistante' => 'Balise @balise@ mal déclarée pour @from@',
705
+    'zbug_balise_sans_argument' => 'Argument manquant dans la balise @balise@',
706
+    'zbug_boucle' => 'boucle',
707
+    'zbug_boucle_recursive_undef' => 'boucle récursive non définie',
708
+    'zbug_calcul' => 'calcul',
709
+    'zbug_champ_hors_boucle' => 'Champ @champ@ hors boucle',
710
+    'zbug_champ_hors_critere' => 'Champ @champ@ hors critère @critere@',
711
+    'zbug_champ_hors_motif' => 'Champ @champ@ hors d’un contexte @motif@',
712
+    'zbug_code' => 'code',
713
+    'zbug_critere_inconnu' => 'critère inconnu @critere@',
714
+    'zbug_critere_sur_table_sans_cle_primaire' => '{@critere@} sur une table sans clef primaire atomique',
715
+    'zbug_distant_interdit' => 'externe interdit',
716
+    'zbug_doublon_table_sans_cle_primaire' => 'doublons sur une table sans clef primaire atomique',
717
+    'zbug_doublon_table_sans_index' => 'doublons sur une table sans index',
718
+    'zbug_erreur_boucle_double' => 'BOUCLE@id@ : double définition',
719
+    'zbug_erreur_boucle_fermant' => 'BOUCLE@id@ : tag fermant manquant',
720
+    'zbug_erreur_boucle_syntaxe' => 'Syntaxe boucle incorrecte',
721
+    'zbug_erreur_compilation' => 'Erreur de compilation',
722
+    'zbug_erreur_execution_page' => 'erreur d’exécution de la page',
723
+    'zbug_erreur_filtre' => 'Erreur : filtre <b>« @filtre@ »</b> non défini',
724
+    'zbug_erreur_filtre_nbarg_min' => 'Filtre @filtre@ : il manque @nb@ argument(s)',
725
+    'zbug_erreur_meme_parent' => '{meme_parent} ne s’applique qu’aux boucles (FORUMS) ou (RUBRIQUES)',
726
+    'zbug_erreur_squelette' => 'Erreur(s) dans le squelette',
727
+    'zbug_hors_compilation' => 'Hors Compilation',
728
+    'zbug_info_erreur_squelette' => 'Erreur sur le site',
729
+    'zbug_inversion_ordre_inexistant' => 'inversion d’un ordre inexistant',
730
+    'zbug_pagination_sans_critere' => '#PAGINATION sans critère {pagination} ou employé dans une boucle récursive',
731
+    'zbug_parametres_inclus_incorrects' => 'Paramètre d’inclusion incorrect : @param@',
732
+    'zbug_profile' => 'Temps de calcul : @time@',
733
+    'zbug_resultat' => 'résultat',
734
+    'zbug_serveur_indefini' => 'serveur SQL indéfini',
735
+    'zbug_statistiques' => 'Statistiques des requêtes SQL classées par durée',
736
+    'zbug_table_inconnue' => 'Table SQL « @table@ » inconnue',
737
+    'zxml_connus_attributs' => 'attributs connus',
738
+    'zxml_de' => 'de',
739
+    'zxml_inconnu_attribut' => 'attribut inconnu',
740
+    'zxml_inconnu_balise' => 'balise inconnue',
741
+    'zxml_inconnu_entite' => 'entité inconnue',
742
+    'zxml_inconnu_id' => 'ID inconnu',
743
+    'zxml_mais_de' => 'mais de',
744
+    'zxml_non_conforme' => 'n’est pas conforme au motif',
745
+    'zxml_non_fils' => 'n’est pas un fils de',
746
+    'zxml_nonvide_balise' => 'balise non vide',
747
+    'zxml_obligatoire_attribut' => 'attribut obligatoire mais absent dans',
748
+    'zxml_succession_fils_incorrecte' => 'succession des fils incorrecte',
749
+    'zxml_survoler' => 'survoler pour voir les corrects',
750
+    'zxml_valeur_attribut' => 'valeur de l’attribut',
751
+    'zxml_vide_balise' => 'balise vide',
752
+    'zxml_vu' => 'vu auparavant'
753 753
 );
Please login to merge, or discard this patch.
ecrire/genie/optimiser.php 2 patches
Indentation   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 include_spip('base/abstract_sql');
@@ -35,26 +35,26 @@  discard block
 block discarded – undo
35 35
  **/
36 36
 function genie_optimiser_dist($t) {
37 37
 
38
-	optimiser_base_une_table();
39
-	optimiser_base();
40
-	optimiser_caches_contextes();
38
+    optimiser_base_une_table();
39
+    optimiser_base();
40
+    optimiser_caches_contextes();
41 41
 
42
-	// la date souhaitee pour le tour suivant = apres-demain a 4h du mat ;
43
-	// sachant qu'on a un delai de 48h, on renvoie aujourd'hui a 4h du mat
44
-	// avec une periode de flou entre 2h et 6h pour ne pas saturer un hebergeur
45
-	// qui aurait beaucoup de sites SPIP
46
-	return -(mktime(2, 0, 0) + random_int(0, 3600 * 4));
42
+    // la date souhaitee pour le tour suivant = apres-demain a 4h du mat ;
43
+    // sachant qu'on a un delai de 48h, on renvoie aujourd'hui a 4h du mat
44
+    // avec une periode de flou entre 2h et 6h pour ne pas saturer un hebergeur
45
+    // qui aurait beaucoup de sites SPIP
46
+    return -(mktime(2, 0, 0) + random_int(0, 3600 * 4));
47 47
 }
48 48
 
49 49
 /**
50 50
  * Vider les contextes ajax de plus de 48h
51 51
  */
52 52
 function optimiser_caches_contextes() {
53
-	sous_repertoire(_DIR_CACHE, 'contextes');
54
-	if (is_dir($d = _DIR_CACHE . 'contextes')) {
55
-		include_spip('inc/invalideur');
56
-		purger_repertoire($d, ['mtime' => time() - 48 * 3600, 'limit' => 10000]);
57
-	}
53
+    sous_repertoire(_DIR_CACHE, 'contextes');
54
+    if (is_dir($d = _DIR_CACHE . 'contextes')) {
55
+        include_spip('inc/invalideur');
56
+        purger_repertoire($d, ['mtime' => time() - 48 * 3600, 'limit' => 10000]);
57
+    }
58 58
 }
59 59
 
60 60
 /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
  * @return void
70 70
  **/
71 71
 function optimiser_base($attente = 86400) {
72
-	optimiser_base_disparus($attente);
72
+    optimiser_base_disparus($attente);
73 73
 }
74 74
 
75 75
 
@@ -86,28 +86,28 @@  discard block
 block discarded – undo
86 86
  **/
87 87
 function optimiser_base_une_table() {
88 88
 
89
-	$tables = [];
90
-	$result = sql_showbase();
91
-
92
-	// on n'optimise qu'une seule table a chaque fois,
93
-	// pour ne pas vautrer le systeme
94
-	// lire http://dev.mysql.com/doc/refman/5.0/fr/optimize-table.html
95
-	while ($row = sql_fetch($result)) {
96
-		$tables[] = array_shift($row);
97
-	}
98
-
99
-	spip_log('optimiser_base_une_table ' . json_encode($tables, JSON_THROW_ON_ERROR), 'genie' . _LOG_DEBUG);
100
-	if ($tables) {
101
-		$table_op = intval(lire_config('optimiser_table', 0) + 1) % sizeof($tables);
102
-		ecrire_config('optimiser_table', $table_op);
103
-		$q = $tables[$table_op];
104
-		spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
105
-		if (sql_optimize($q)) {
106
-			spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
107
-		} else {
108
-			spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie' . _LOG_DEBUG);
109
-		}
110
-	}
89
+    $tables = [];
90
+    $result = sql_showbase();
91
+
92
+    // on n'optimise qu'une seule table a chaque fois,
93
+    // pour ne pas vautrer le systeme
94
+    // lire http://dev.mysql.com/doc/refman/5.0/fr/optimize-table.html
95
+    while ($row = sql_fetch($result)) {
96
+        $tables[] = array_shift($row);
97
+    }
98
+
99
+    spip_log('optimiser_base_une_table ' . json_encode($tables, JSON_THROW_ON_ERROR), 'genie' . _LOG_DEBUG);
100
+    if ($tables) {
101
+        $table_op = intval(lire_config('optimiser_table', 0) + 1) % sizeof($tables);
102
+        ecrire_config('optimiser_table', $table_op);
103
+        $q = $tables[$table_op];
104
+        spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
105
+        if (sql_optimize($q)) {
106
+            spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
107
+        } else {
108
+            spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie' . _LOG_DEBUG);
109
+        }
110
+    }
111 111
 }
112 112
 
113 113
 
@@ -133,18 +133,18 @@  discard block
 block discarded – undo
133 133
  *     Nombre de suppressions
134 134
  **/
135 135
 function optimiser_sansref($table, $id, $sel, $and = '') {
136
-	$in = [];
137
-	while ($row = sql_fetch($sel)) {
138
-		$in[$row['id']] = true;
139
-	}
140
-	sql_free($sel);
141
-
142
-	if ($in) {
143
-		sql_delete($table, sql_in($id, array_keys($in)) . ($and ? " AND $and" : ''));
144
-		spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: " . implode(', ', array_keys($in)), 'genie' . _LOG_DEBUG);
145
-	}
146
-
147
-	return count($in);
136
+    $in = [];
137
+    while ($row = sql_fetch($sel)) {
138
+        $in[$row['id']] = true;
139
+    }
140
+    sql_free($sel);
141
+
142
+    if ($in) {
143
+        sql_delete($table, sql_in($id, array_keys($in)) . ($and ? " AND $and" : ''));
144
+        spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: " . implode(', ', array_keys($in)), 'genie' . _LOG_DEBUG);
145
+    }
146
+
147
+    return count($in);
148 148
 }
149 149
 
150 150
 
@@ -166,81 +166,81 @@  discard block
 block discarded – undo
166 166
  **/
167 167
 function optimiser_base_disparus($attente = 86400) {
168 168
 
169
-	# format = 20060610110141, si on veut forcer une optimisation tout de suite
170
-	$mydate = date('Y-m-d H:i:s', time() - $attente);
171
-	$mydate_quote = sql_quote($mydate);
169
+    # format = 20060610110141, si on veut forcer une optimisation tout de suite
170
+    $mydate = date('Y-m-d H:i:s', time() - $attente);
171
+    $mydate_quote = sql_quote($mydate);
172 172
 
173
-	$n = 0;
173
+    $n = 0;
174 174
 
175
-	//
176
-	// Rubriques
177
-	//
175
+    //
176
+    // Rubriques
177
+    //
178 178
 
179
-	# les articles qui sont dans une id_rubrique inexistante
180
-	# attention on controle id_rubrique>0 pour ne pas tuer les articles
181
-	# specialement affectes a une rubrique non-existante (plugin,
182
-	# cf. https://core.spip.net/issues/1549 )
183
-	$res = sql_select(
184
-		'A.id_article AS id',
185
-		'spip_articles AS A
179
+    # les articles qui sont dans une id_rubrique inexistante
180
+    # attention on controle id_rubrique>0 pour ne pas tuer les articles
181
+    # specialement affectes a une rubrique non-existante (plugin,
182
+    # cf. https://core.spip.net/issues/1549 )
183
+    $res = sql_select(
184
+        'A.id_article AS id',
185
+        'spip_articles AS A
186 186
 		        LEFT JOIN spip_rubriques AS R
187 187
 		          ON A.id_rubrique=R.id_rubrique',
188
-		"A.id_rubrique > 0
188
+        "A.id_rubrique > 0
189 189
 			 AND R.id_rubrique IS NULL
190 190
 		         AND A.maj < $mydate_quote"
191
-	);
191
+    );
192 192
 
193
-	$n += optimiser_sansref('spip_articles', 'id_article', $res);
193
+    $n += optimiser_sansref('spip_articles', 'id_article', $res);
194 194
 
195
-	// les articles a la poubelle
196
-	sql_delete('spip_articles', "statut='poubelle' AND maj < $mydate_quote");
195
+    // les articles a la poubelle
196
+    sql_delete('spip_articles', "statut='poubelle' AND maj < $mydate_quote");
197 197
 
198
-	//
199
-	// Auteurs
200
-	//
198
+    //
199
+    // Auteurs
200
+    //
201 201
 
202
-	include_spip('action/editer_liens');
203
-	// optimiser les liens de tous les auteurs vers des objets effaces
204
-	// et depuis des auteurs effaces
205
-	$n += objet_optimiser_liens(['auteur' => '*'], '*');
202
+    include_spip('action/editer_liens');
203
+    // optimiser les liens de tous les auteurs vers des objets effaces
204
+    // et depuis des auteurs effaces
205
+    $n += objet_optimiser_liens(['auteur' => '*'], '*');
206 206
 
207
-	# effacer les auteurs poubelle qui ne sont lies a rien
208
-	$res = sql_select(
209
-		'A.id_auteur AS id',
210
-		'spip_auteurs AS A
207
+    # effacer les auteurs poubelle qui ne sont lies a rien
208
+    $res = sql_select(
209
+        'A.id_auteur AS id',
210
+        'spip_auteurs AS A
211 211
 		      	LEFT JOIN spip_auteurs_liens AS L
212 212
 		          ON L.id_auteur=A.id_auteur',
213
-		"L.id_auteur IS NULL
213
+        "L.id_auteur IS NULL
214 214
 		       	AND A.statut='5poubelle' AND A.maj < $mydate_quote"
215
-	);
216
-
217
-	$n += optimiser_sansref('spip_auteurs', 'id_auteur', $res);
218
-
219
-	# supprimer les auteurs 'nouveau' qui n'ont jamais donne suite
220
-	# au mail de confirmation (45 jours pour repondre, ca devrait suffire)
221
-	if (!defined('_AUTEURS_DELAI_REJET_NOUVEAU')) {
222
-		define('_AUTEURS_DELAI_REJET_NOUVEAU', 45 * 24 * 3600);
223
-	}
224
-	sql_delete('spip_auteurs', "statut='nouveau' AND maj < " . sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU))));
225
-
226
-	/**
227
-	 * Permet aux plugins de compléter l'optimisation suite aux éléments disparus
228
-	 *
229
-	 * L'index 'data' est un entier indiquant le nombre d'optimisations
230
-	 * qui ont été réalisées (par exemple le nombre de suppressions faites)
231
-	 * et qui doit être incrémenté par les fonctions
232
-	 * utilisant ce pipeline si elles suppriment des éléments.
233
-	 *
234
-	 * @pipeline_appel optimiser_base_disparus
235
-	 */
236
-	$n = pipeline('optimiser_base_disparus', [
237
-		'args' => [
238
-			'attente' => $attente,
239
-			'date' => $mydate
240
-		],
241
-		'data' => $n
242
-	]);
243
-
244
-
245
-	spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie' . _LOG_DEBUG);
215
+    );
216
+
217
+    $n += optimiser_sansref('spip_auteurs', 'id_auteur', $res);
218
+
219
+    # supprimer les auteurs 'nouveau' qui n'ont jamais donne suite
220
+    # au mail de confirmation (45 jours pour repondre, ca devrait suffire)
221
+    if (!defined('_AUTEURS_DELAI_REJET_NOUVEAU')) {
222
+        define('_AUTEURS_DELAI_REJET_NOUVEAU', 45 * 24 * 3600);
223
+    }
224
+    sql_delete('spip_auteurs', "statut='nouveau' AND maj < " . sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU))));
225
+
226
+    /**
227
+     * Permet aux plugins de compléter l'optimisation suite aux éléments disparus
228
+     *
229
+     * L'index 'data' est un entier indiquant le nombre d'optimisations
230
+     * qui ont été réalisées (par exemple le nombre de suppressions faites)
231
+     * et qui doit être incrémenté par les fonctions
232
+     * utilisant ce pipeline si elles suppriment des éléments.
233
+     *
234
+     * @pipeline_appel optimiser_base_disparus
235
+     */
236
+    $n = pipeline('optimiser_base_disparus', [
237
+        'args' => [
238
+            'attente' => $attente,
239
+            'date' => $mydate
240
+        ],
241
+        'data' => $n
242
+    ]);
243
+
244
+
245
+    spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie' . _LOG_DEBUG);
246 246
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
  */
52 52
 function optimiser_caches_contextes() {
53 53
 	sous_repertoire(_DIR_CACHE, 'contextes');
54
-	if (is_dir($d = _DIR_CACHE . 'contextes')) {
54
+	if (is_dir($d = _DIR_CACHE.'contextes')) {
55 55
 		include_spip('inc/invalideur');
56 56
 		purger_repertoire($d, ['mtime' => time() - 48 * 3600, 'limit' => 10000]);
57 57
 	}
@@ -96,16 +96,16 @@  discard block
 block discarded – undo
96 96
 		$tables[] = array_shift($row);
97 97
 	}
98 98
 
99
-	spip_log('optimiser_base_une_table ' . json_encode($tables, JSON_THROW_ON_ERROR), 'genie' . _LOG_DEBUG);
99
+	spip_log('optimiser_base_une_table '.json_encode($tables, JSON_THROW_ON_ERROR), 'genie'._LOG_DEBUG);
100 100
 	if ($tables) {
101 101
 		$table_op = intval(lire_config('optimiser_table', 0) + 1) % sizeof($tables);
102 102
 		ecrire_config('optimiser_table', $table_op);
103 103
 		$q = $tables[$table_op];
104
-		spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
104
+		spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie'._LOG_DEBUG);
105 105
 		if (sql_optimize($q)) {
106
-			spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie' . _LOG_DEBUG);
106
+			spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie'._LOG_DEBUG);
107 107
 		} else {
108
-			spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie' . _LOG_DEBUG);
108
+			spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie'._LOG_DEBUG);
109 109
 		}
110 110
 	}
111 111
 }
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 	sql_free($sel);
141 141
 
142 142
 	if ($in) {
143
-		sql_delete($table, sql_in($id, array_keys($in)) . ($and ? " AND $and" : ''));
144
-		spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: " . implode(', ', array_keys($in)), 'genie' . _LOG_DEBUG);
143
+		sql_delete($table, sql_in($id, array_keys($in)).($and ? " AND $and" : ''));
144
+		spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: ".implode(', ', array_keys($in)), 'genie'._LOG_DEBUG);
145 145
 	}
146 146
 
147 147
 	return count($in);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	if (!defined('_AUTEURS_DELAI_REJET_NOUVEAU')) {
222 222
 		define('_AUTEURS_DELAI_REJET_NOUVEAU', 45 * 24 * 3600);
223 223
 	}
224
-	sql_delete('spip_auteurs', "statut='nouveau' AND maj < " . sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU))));
224
+	sql_delete('spip_auteurs', "statut='nouveau' AND maj < ".sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU))));
225 225
 
226 226
 	/**
227 227
 	 * Permet aux plugins de compléter l'optimisation suite aux éléments disparus
@@ -242,5 +242,5 @@  discard block
 block discarded – undo
242 242
 	]);
243 243
 
244 244
 
245
-	spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie' . _LOG_DEBUG);
245
+	spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie'._LOG_DEBUG);
246 246
 }
Please login to merge, or discard this patch.
prive/formulaires/editer_logo.php 2 patches
Indentation   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  **/
31 31
 
32 32
 if (!defined('_ECRIRE_INC_VERSION')) {
33
-	return;
33
+    return;
34 34
 }
35 35
 
36 36
 // utilise pour le logo du site, donc doit rester ici
@@ -48,92 +48,92 @@  discard block
 block discarded – undo
48 48
  * @return array|false Variables d'environnement pour le fond
49 49
  */
50 50
 function formulaires_editer_logo_charger_dist($objet, $id_objet, $retour = '', $options = []) {
51
-	// pas dans une boucle ? formulaire pour le logo du site
52
-	// dans ce cas, il faut chercher un 'siteon0.ext'
53
-	if (!$objet) {
54
-		$objet = 'site';
55
-	}
51
+    // pas dans une boucle ? formulaire pour le logo du site
52
+    // dans ce cas, il faut chercher un 'siteon0.ext'
53
+    if (!$objet) {
54
+        $objet = 'site';
55
+    }
56 56
 
57
-	$objet = objet_type($objet);
58
-	$_id_objet = id_table_objet($objet);
57
+    $objet = objet_type($objet);
58
+    $_id_objet = id_table_objet($objet);
59 59
 
60
-	if (!is_array($options)) {
61
-		$options = unserialize($options);
62
-	}
63
-	$options = spip_sanitize_from_request($options, '*');
60
+    if (!is_array($options)) {
61
+        $options = unserialize($options);
62
+    }
63
+    $options = spip_sanitize_from_request($options, '*');
64 64
 
65
-	if (!isset($options['titre'])) {
66
-		$balise_img = chercher_filtre('balise_img');
67
-		$img = $balise_img(chemin_image('image-24.png'), '', 'cadre-icone');
68
-		$libelles = pipeline('libeller_logo', $GLOBALS['logo_libelles']);
69
-		$libelle = (($id_objet or $objet != 'rubrique') ? $objet : 'racine');
70
-		if (isset($libelles[$libelle])) {
71
-			$libelle = $libelles[$libelle];
72
-		} elseif ($libelle = objet_info($objet, 'texte_logo_objet')) {
73
-			$libelle = _T($libelle);
74
-		} else {
75
-			$libelle = _L('Logo');
76
-		}
77
-		switch ($objet) {
78
-			case 'article':
79
-				$libelle .= ' ' . aider('logoart');
80
-				break;
81
-			case 'breve':
82
-				$libelle .= ' ' . aider('breveslogo');
83
-				break;
84
-			case 'rubrique':
85
-				$libelle .= ' ' . aider('rublogo');
86
-				break;
87
-			default:
88
-				break;
89
-		}
65
+    if (!isset($options['titre'])) {
66
+        $balise_img = chercher_filtre('balise_img');
67
+        $img = $balise_img(chemin_image('image-24.png'), '', 'cadre-icone');
68
+        $libelles = pipeline('libeller_logo', $GLOBALS['logo_libelles']);
69
+        $libelle = (($id_objet or $objet != 'rubrique') ? $objet : 'racine');
70
+        if (isset($libelles[$libelle])) {
71
+            $libelle = $libelles[$libelle];
72
+        } elseif ($libelle = objet_info($objet, 'texte_logo_objet')) {
73
+            $libelle = _T($libelle);
74
+        } else {
75
+            $libelle = _L('Logo');
76
+        }
77
+        switch ($objet) {
78
+            case 'article':
79
+                $libelle .= ' ' . aider('logoart');
80
+                break;
81
+            case 'breve':
82
+                $libelle .= ' ' . aider('breveslogo');
83
+                break;
84
+            case 'rubrique':
85
+                $libelle .= ' ' . aider('rublogo');
86
+                break;
87
+            default:
88
+                break;
89
+        }
90 90
 
91
-		$options['titre'] = $img . $libelle;
92
-	}
93
-	if (!isset($options['editable'])) {
94
-		include_spip('inc/autoriser');
95
-		$options['editable'] = autoriser('iconifier', $objet, $id_objet);
96
-	}
91
+        $options['titre'] = $img . $libelle;
92
+    }
93
+    if (!isset($options['editable'])) {
94
+        include_spip('inc/autoriser');
95
+        $options['editable'] = autoriser('iconifier', $objet, $id_objet);
96
+    }
97 97
 
98
-	$res = [
99
-		'editable' => ($GLOBALS['meta']['activer_logos'] == 'oui' ? ' ' : '') && (!isset($options['editable']) or $options['editable']),
100
-		'logo_survol' => ($GLOBALS['meta']['activer_logos_survol'] == 'oui' ? ' ' : ''),
101
-		'objet' => $objet,
102
-		'id_objet' => $id_objet,
103
-		'_options' => $options,
104
-		'_show_upload_off' => '',
105
-	];
98
+    $res = [
99
+        'editable' => ($GLOBALS['meta']['activer_logos'] == 'oui' ? ' ' : '') && (!isset($options['editable']) or $options['editable']),
100
+        'logo_survol' => ($GLOBALS['meta']['activer_logos_survol'] == 'oui' ? ' ' : ''),
101
+        'objet' => $objet,
102
+        'id_objet' => $id_objet,
103
+        '_options' => $options,
104
+        '_show_upload_off' => '',
105
+    ];
106 106
 
107
-	// rechercher le logo de l'objet
108
-	// la fonction prend un parametre '_id_objet' etrange :
109
-	// le nom de la cle primaire (et non le nom de la table)
110
-	// ou directement le nom du raccourcis a chercher
111
-	$chercher_logo = charger_fonction('chercher_logo', 'inc');
112
-	$etats = $res['logo_survol'] ? ['on', 'off'] : ['on'];
113
-	foreach ($etats as $etat) {
114
-		$logo = $chercher_logo($id_objet, $_id_objet, $etat);
115
-		if ($logo) {
116
-			$res['logo_' . $etat] = $logo[0];
117
-			$res['logo_id_' . $etat] = $logo[5]['id_document'] ?? '';
118
-		}
119
-	}
120
-	// pas de logo_on -> pas de formulaire pour le survol
121
-	if (!isset($res['logo_on'])) {
122
-		$res['logo_survol'] = '';
123
-	} elseif (!isset($res['logo_off']) and _request('logo_up')) {
124
-		$res['_show_upload_off'] = ' ';
125
-	}
107
+    // rechercher le logo de l'objet
108
+    // la fonction prend un parametre '_id_objet' etrange :
109
+    // le nom de la cle primaire (et non le nom de la table)
110
+    // ou directement le nom du raccourcis a chercher
111
+    $chercher_logo = charger_fonction('chercher_logo', 'inc');
112
+    $etats = $res['logo_survol'] ? ['on', 'off'] : ['on'];
113
+    foreach ($etats as $etat) {
114
+        $logo = $chercher_logo($id_objet, $_id_objet, $etat);
115
+        if ($logo) {
116
+            $res['logo_' . $etat] = $logo[0];
117
+            $res['logo_id_' . $etat] = $logo[5]['id_document'] ?? '';
118
+        }
119
+    }
120
+    // pas de logo_on -> pas de formulaire pour le survol
121
+    if (!isset($res['logo_on'])) {
122
+        $res['logo_survol'] = '';
123
+    } elseif (!isset($res['logo_off']) and _request('logo_up')) {
124
+        $res['_show_upload_off'] = ' ';
125
+    }
126 126
 
127
-	// si le logo n'est pas editable et qu'il n'y en a pas, on affiche pas du tout le formulaire
128
-	if (
129
-		!$res['editable']
130
-		and !isset($res['logo_off'])
131
-		and !isset($res['logo_on'])
132
-	) {
133
-		return false;
134
-	}
127
+    // si le logo n'est pas editable et qu'il n'y en a pas, on affiche pas du tout le formulaire
128
+    if (
129
+        !$res['editable']
130
+        and !isset($res['logo_off'])
131
+        and !isset($res['logo_on'])
132
+    ) {
133
+        return false;
134
+    }
135 135
 
136
-	return $res;
136
+    return $res;
137 137
 }
138 138
 
139 139
 /**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
  * @return string              Hash du formulaire
148 148
  */
149 149
 function formulaires_editer_logo_identifier_dist($objet, $id_objet, $retour = '', $options = []) {
150
-	return serialize([$objet, $id_objet]);
150
+    return serialize([$objet, $id_objet]);
151 151
 }
152 152
 
153 153
 /**
@@ -163,31 +163,31 @@  discard block
 block discarded – undo
163 163
  * @return array               Erreurs du formulaire
164 164
  */
165 165
 function formulaires_editer_logo_verifier_dist($objet, $id_objet, $retour = '', $options = []) {
166
-	$erreurs = [];
167
-	// verifier les extensions
168
-	$sources = formulaire_editer_logo_get_sources();
169
-	include_spip('action/editer_logo');
170
-	$extensions_possibles = $GLOBALS['formats_logos'];
171
-	if (in_array('jpg', $extensions_possibles)) {
172
-		$extensions_possibles[] = 'jpeg';
173
-	}
174
-	foreach ($sources as $etat => $file) {
175
-		// seulement si une reception correcte a eu lieu
176
-		if ($file and $file['error'] == 0) {
177
-			if (
178
-				!in_array(
179
-					strtolower(pathinfo($file['name'], PATHINFO_EXTENSION)),
180
-					$extensions_possibles
181
-				)
182
-			) {
183
-				$erreurs['logo_' . $etat] = _L('Extension non reconnue');
184
-			}
185
-		} elseif ($file and $file['error'] != 0 and isset($file['msg'])) {
186
-			$erreurs['message_erreur'] = $file['msg'];
187
-		}
188
-	}
166
+    $erreurs = [];
167
+    // verifier les extensions
168
+    $sources = formulaire_editer_logo_get_sources();
169
+    include_spip('action/editer_logo');
170
+    $extensions_possibles = $GLOBALS['formats_logos'];
171
+    if (in_array('jpg', $extensions_possibles)) {
172
+        $extensions_possibles[] = 'jpeg';
173
+    }
174
+    foreach ($sources as $etat => $file) {
175
+        // seulement si une reception correcte a eu lieu
176
+        if ($file and $file['error'] == 0) {
177
+            if (
178
+                !in_array(
179
+                    strtolower(pathinfo($file['name'], PATHINFO_EXTENSION)),
180
+                    $extensions_possibles
181
+                )
182
+            ) {
183
+                $erreurs['logo_' . $etat] = _L('Extension non reconnue');
184
+            }
185
+        } elseif ($file and $file['error'] != 0 and isset($file['msg'])) {
186
+            $erreurs['message_erreur'] = $file['msg'];
187
+        }
188
+    }
189 189
 
190
-	return $erreurs;
190
+    return $erreurs;
191 191
 }
192 192
 
193 193
 /**
@@ -203,47 +203,47 @@  discard block
 block discarded – undo
203 203
  * @return array               Retour des traitements
204 204
  */
205 205
 function formulaires_editer_logo_traiter_dist($objet, $id_objet, $retour = '', $options = []) {
206
-	$res = ['editable' => ' '];
206
+    $res = ['editable' => ' '];
207 207
 
208
-	// pas dans une boucle ? formulaire pour le logo du site
209
-	// dans ce cas, il faut chercher un 'siteon0.ext'
210
-	if (!$objet) {
211
-		$objet = 'site';
212
-	}
208
+    // pas dans une boucle ? formulaire pour le logo du site
209
+    // dans ce cas, il faut chercher un 'siteon0.ext'
210
+    if (!$objet) {
211
+        $objet = 'site';
212
+    }
213 213
 
214
-	include_spip('action/editer_logo');
214
+    include_spip('action/editer_logo');
215 215
 
216
-	// effectuer la suppression si demandee d'un logo
217
-	$on = _request('supprimer_logo_on');
218
-	if ($on or _request('supprimer_logo_off')) {
219
-		logo_supprimer($objet, $id_objet, $on ? 'on' : 'off');
220
-		$res['message_ok'] = ''; // pas besoin de message : la validation est visuelle
221
-		set_request('logo_up', ' ');
222
-	} // sinon supprimer ancien logo puis copier le nouveau
223
-	else {
224
-		$sources = formulaire_editer_logo_get_sources();
225
-		foreach ($sources as $etat => $file) {
226
-			if ($file and $file['error'] == 0) {
227
-				if ($err = logo_modifier($objet, $id_objet, $etat, $file)) {
228
-					$res['message_erreur'] = $err;
229
-				} else {
230
-					$res['message_ok'] = '';
231
-				} // pas besoin de message : la validation est visuelle
232
-				set_request('logo_up', ' ');
233
-			}
234
-		}
235
-	}
216
+    // effectuer la suppression si demandee d'un logo
217
+    $on = _request('supprimer_logo_on');
218
+    if ($on or _request('supprimer_logo_off')) {
219
+        logo_supprimer($objet, $id_objet, $on ? 'on' : 'off');
220
+        $res['message_ok'] = ''; // pas besoin de message : la validation est visuelle
221
+        set_request('logo_up', ' ');
222
+    } // sinon supprimer ancien logo puis copier le nouveau
223
+    else {
224
+        $sources = formulaire_editer_logo_get_sources();
225
+        foreach ($sources as $etat => $file) {
226
+            if ($file and $file['error'] == 0) {
227
+                if ($err = logo_modifier($objet, $id_objet, $etat, $file)) {
228
+                    $res['message_erreur'] = $err;
229
+                } else {
230
+                    $res['message_ok'] = '';
231
+                } // pas besoin de message : la validation est visuelle
232
+                set_request('logo_up', ' ');
233
+            }
234
+        }
235
+    }
236 236
 
237
-	// Invalider les caches de l'objet
238
-	include_spip('inc/invalideur');
239
-	suivre_invalideur("id='$objet/$id_objet'");
237
+    // Invalider les caches de l'objet
238
+    include_spip('inc/invalideur');
239
+    suivre_invalideur("id='$objet/$id_objet'");
240 240
 
241 241
 
242
-	if ($retour) {
243
-		$res['redirect'] = $retour;
244
-	}
242
+    if ($retour) {
243
+        $res['redirect'] = $retour;
244
+    }
245 245
 
246
-	return $res;
246
+    return $res;
247 247
 }
248 248
 
249 249
 
@@ -255,29 +255,29 @@  discard block
 block discarded – undo
255 255
  *     Sources des fichiers dans les clés `on` ou `off`
256 256
  */
257 257
 function formulaire_editer_logo_get_sources() {
258
-	if (!$_FILES) {
259
-		$_FILES = $GLOBALS['HTTP_POST_FILES'] ?? [];
260
-	}
261
-	if (!is_array($_FILES)) {
262
-		return [];
263
-	}
258
+    if (!$_FILES) {
259
+        $_FILES = $GLOBALS['HTTP_POST_FILES'] ?? [];
260
+    }
261
+    if (!is_array($_FILES)) {
262
+        return [];
263
+    }
264 264
 
265
-	include_spip('inc/documents');
266
-	$sources = [];
267
-	foreach (['on', 'off'] as $etat) {
268
-		$logo = 'logo_' . $etat;
269
-		if (isset($_FILES[$logo])) {
270
-			if ($_FILES[$logo]['error'] == 0) {
271
-				$sources[$etat] = $_FILES[$logo];
272
-			} elseif ($_FILES[$logo]['error'] != 0) {
273
-				$msg = check_upload_error($_FILES[$logo]['error'], false, true);
274
-				if ($msg and is_string($msg)) {
275
-					$sources[$etat] = $_FILES[$logo];
276
-					$sources[$etat]['msg'] = $msg;
277
-				}
278
-			}
279
-		}
280
-	}
265
+    include_spip('inc/documents');
266
+    $sources = [];
267
+    foreach (['on', 'off'] as $etat) {
268
+        $logo = 'logo_' . $etat;
269
+        if (isset($_FILES[$logo])) {
270
+            if ($_FILES[$logo]['error'] == 0) {
271
+                $sources[$etat] = $_FILES[$logo];
272
+            } elseif ($_FILES[$logo]['error'] != 0) {
273
+                $msg = check_upload_error($_FILES[$logo]['error'], false, true);
274
+                if ($msg and is_string($msg)) {
275
+                    $sources[$etat] = $_FILES[$logo];
276
+                    $sources[$etat]['msg'] = $msg;
277
+                }
278
+            }
279
+        }
280
+    }
281 281
 
282
-	return $sources;
282
+    return $sources;
283 283
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,19 +76,19 @@  discard block
 block discarded – undo
76 76
 		}
77 77
 		switch ($objet) {
78 78
 			case 'article':
79
-				$libelle .= ' ' . aider('logoart');
79
+				$libelle .= ' '.aider('logoart');
80 80
 				break;
81 81
 			case 'breve':
82
-				$libelle .= ' ' . aider('breveslogo');
82
+				$libelle .= ' '.aider('breveslogo');
83 83
 				break;
84 84
 			case 'rubrique':
85
-				$libelle .= ' ' . aider('rublogo');
85
+				$libelle .= ' '.aider('rublogo');
86 86
 				break;
87 87
 			default:
88 88
 				break;
89 89
 		}
90 90
 
91
-		$options['titre'] = $img . $libelle;
91
+		$options['titre'] = $img.$libelle;
92 92
 	}
93 93
 	if (!isset($options['editable'])) {
94 94
 		include_spip('inc/autoriser');
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 	foreach ($etats as $etat) {
114 114
 		$logo = $chercher_logo($id_objet, $_id_objet, $etat);
115 115
 		if ($logo) {
116
-			$res['logo_' . $etat] = $logo[0];
117
-			$res['logo_id_' . $etat] = $logo[5]['id_document'] ?? '';
116
+			$res['logo_'.$etat] = $logo[0];
117
+			$res['logo_id_'.$etat] = $logo[5]['id_document'] ?? '';
118 118
 		}
119 119
 	}
120 120
 	// pas de logo_on -> pas de formulaire pour le survol
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 					$extensions_possibles
181 181
 				)
182 182
 			) {
183
-				$erreurs['logo_' . $etat] = _L('Extension non reconnue');
183
+				$erreurs['logo_'.$etat] = _L('Extension non reconnue');
184 184
 			}
185 185
 		} elseif ($file and $file['error'] != 0 and isset($file['msg'])) {
186 186
 			$erreurs['message_erreur'] = $file['msg'];
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	include_spip('inc/documents');
266 266
 	$sources = [];
267 267
 	foreach (['on', 'off'] as $etat) {
268
-		$logo = 'logo_' . $etat;
268
+		$logo = 'logo_'.$etat;
269 269
 		if (isset($_FILES[$logo])) {
270 270
 			if ($_FILES[$logo]['error'] == 0) {
271 271
 				$sources[$etat] = $_FILES[$logo];
Please login to merge, or discard this patch.
ecrire/public/quete.php 2 patches
Indentation   +431 added lines, -431 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
 
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
  * @return array|bool|null
34 34
  */
35 35
 function quete_virtuel($id_article, $connect) {
36
-	return sql_getfetsel(
37
-		'virtuel',
38
-		'spip_articles',
39
-		['id_article=' . intval($id_article), "statut='publie'"],
40
-		'',
41
-		'',
42
-		'',
43
-		'',
44
-		$connect
45
-	);
36
+    return sql_getfetsel(
37
+        'virtuel',
38
+        'spip_articles',
39
+        ['id_article=' . intval($id_article), "statut='publie'"],
40
+        '',
41
+        '',
42
+        '',
43
+        '',
44
+        $connect
45
+    );
46 46
 }
47 47
 
48 48
 /**
@@ -57,41 +57,41 @@  discard block
 block discarded – undo
57 57
  * @return array
58 58
  */
59 59
 function quete_parent_lang($table, $id, string $connect = '') {
60
-	static $cache_quete = [];
61
-
62
-	if (!isset($cache_quete[$connect][$table][$id])) {
63
-		if (!isset($cache_quete[$connect][$table]['_select'])) {
64
-			$trouver_table = charger_fonction('trouver_table', 'base');
65
-			if (
66
-				!$desc = $trouver_table(
67
-					$table,
68
-					$connect
69
-				) or !isset($desc['field']['id_rubrique'])
70
-			) {
71
-				// pas de parent rubrique, on passe
72
-				$cache_quete[$connect][$table]['_select'] = false;
73
-			} else {
74
-				$select = ($table == 'spip_rubriques' ? 'id_parent' : 'id_rubrique');
75
-				$select .= isset($desc['field']['lang']) ? ', lang' : '';
76
-				$cache_quete[$connect][$table]['_select'] = $select;
77
-				$cache_quete[$connect][$table]['_id'] = id_table_objet(objet_type($table));
78
-			}
79
-		}
80
-		if ($cache_quete[$connect][$table]['_select']) {
81
-			$cache_quete[$connect][$table][$id] = sql_fetsel(
82
-				$cache_quete[$connect][$table]['_select'],
83
-				$table,
84
-				$cache_quete[$connect][$table]['_id'] . '=' . intval($id),
85
-				'',
86
-				'',
87
-				'',
88
-				'',
89
-				$connect
90
-			);
91
-		}
92
-	}
93
-
94
-	return $cache_quete[$connect][$table][$id] ?? null;
60
+    static $cache_quete = [];
61
+
62
+    if (!isset($cache_quete[$connect][$table][$id])) {
63
+        if (!isset($cache_quete[$connect][$table]['_select'])) {
64
+            $trouver_table = charger_fonction('trouver_table', 'base');
65
+            if (
66
+                !$desc = $trouver_table(
67
+                    $table,
68
+                    $connect
69
+                ) or !isset($desc['field']['id_rubrique'])
70
+            ) {
71
+                // pas de parent rubrique, on passe
72
+                $cache_quete[$connect][$table]['_select'] = false;
73
+            } else {
74
+                $select = ($table == 'spip_rubriques' ? 'id_parent' : 'id_rubrique');
75
+                $select .= isset($desc['field']['lang']) ? ', lang' : '';
76
+                $cache_quete[$connect][$table]['_select'] = $select;
77
+                $cache_quete[$connect][$table]['_id'] = id_table_objet(objet_type($table));
78
+            }
79
+        }
80
+        if ($cache_quete[$connect][$table]['_select']) {
81
+            $cache_quete[$connect][$table][$id] = sql_fetsel(
82
+                $cache_quete[$connect][$table]['_select'],
83
+                $table,
84
+                $cache_quete[$connect][$table]['_id'] . '=' . intval($id),
85
+                '',
86
+                '',
87
+                '',
88
+                '',
89
+                $connect
90
+            );
91
+        }
92
+    }
93
+
94
+    return $cache_quete[$connect][$table][$id] ?? null;
95 95
 }
96 96
 
97 97
 
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
  * @return int
109 109
  */
110 110
 function quete_parent($id_rubrique, string $connect = '') {
111
-	if (!$id_rubrique = intval($id_rubrique)) {
112
-		return 0;
113
-	}
114
-	$id_parent = quete_parent_lang('spip_rubriques', $id_rubrique, $connect);
115
-	return $id_parent ? $id_parent['id_parent'] : 0;
111
+    if (!$id_rubrique = intval($id_rubrique)) {
112
+        return 0;
113
+    }
114
+    $id_parent = quete_parent_lang('spip_rubriques', $id_rubrique, $connect);
115
+    return $id_parent ? $id_parent['id_parent'] : 0;
116 116
 }
117 117
 
118 118
 /**
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
  * @return int
129 129
  */
130 130
 function quete_rubrique($id_article, $serveur) {
131
-	$id_parent = quete_parent_lang('spip_articles', $id_article, $serveur);
131
+    $id_parent = quete_parent_lang('spip_articles', $id_article, $serveur);
132 132
 
133
-	return $id_parent['id_rubrique'];
133
+    return $id_parent['id_rubrique'];
134 134
 }
135 135
 
136 136
 
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
  * @return int
145 145
  */
146 146
 function quete_profondeur($id, string $connect = '') {
147
-	$n = 0;
148
-	while ($id) {
149
-		$n++;
150
-		$id = quete_parent($id, $connect);
151
-	}
147
+    $n = 0;
148
+    while ($id) {
149
+        $n++;
150
+        $id = quete_parent($id, $connect);
151
+    }
152 152
 
153
-	return $n;
153
+    return $n;
154 154
 }
155 155
 
156 156
 
@@ -166,15 +166,15 @@  discard block
 block discarded – undo
166 166
  *     Morceau de la requête SQL testant la date
167 167
  */
168 168
 function quete_condition_postdates($champ_date, $serveur = '', $ignore_previsu = false) {
169
-	if (defined('_VAR_PREVIEW') and _VAR_PREVIEW and !$ignore_previsu) {
170
-		return '1=1';
171
-	}
172
-
173
-	return
174
-		(isset($GLOBALS['meta']['date_prochain_postdate'])
175
-			and $GLOBALS['meta']['date_prochain_postdate'] > time())
176
-			? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur)
177
-			: '1=1';
169
+    if (defined('_VAR_PREVIEW') and _VAR_PREVIEW and !$ignore_previsu) {
170
+        return '1=1';
171
+    }
172
+
173
+    return
174
+        (isset($GLOBALS['meta']['date_prochain_postdate'])
175
+            and $GLOBALS['meta']['date_prochain_postdate'] > time())
176
+            ? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur)
177
+            : '1=1';
178 178
 }
179 179
 
180 180
 
@@ -194,101 +194,101 @@  discard block
 block discarded – undo
194 194
  * @return array|string
195 195
  */
196 196
 function quete_condition_statut($mstatut, $previsu, $publie, $serveur = '', $ignore_previsu = false) {
197
-	static $cond = [];
198
-	$key = func_get_args();
199
-	$key = implode('-', $key);
200
-	if (isset($cond[$key])) {
201
-		return $cond[$key];
202
-	}
203
-
204
-	$liste_statuts = $publie;
205
-	if (defined('_VAR_PREVIEW') and _VAR_PREVIEW and !$ignore_previsu) {
206
-		$liste_statuts = $previsu;
207
-	}
208
-	$not = false;
209
-	if (strncmp($liste_statuts, '!', 1) == 0) {
210
-		$not = true;
211
-		$liste_statuts = substr($liste_statuts, 1);
212
-	}
213
-	// '' => ne rien afficher, '!'=> ne rien filtrer
214
-	if (!strlen($liste_statuts)) {
215
-		return $cond[$key] = ($not ? '1=1' : '0=1');
216
-	}
217
-
218
-	$liste_statuts = explode(',', $liste_statuts);
219
-	$where = [];
220
-	foreach ($liste_statuts as $k => $v) {
221
-		// filtrage /auteur pour limiter les objets d'un statut (prepa en general)
222
-		// a ceux de l'auteur identifie
223
-		if (strpos($v, '/') !== false) {
224
-			$v = explode('/', $v);
225
-			$filtre = end($v);
226
-			$v = reset($v);
227
-			$v = preg_replace(',\W,', '', $v);
228
-			if (
229
-				$filtre == 'auteur'
230
-				and (strpos($mstatut, '.') !== false)
231
-				and $objet = explode('.', $mstatut)
232
-				and $id_table = reset($objet)
233
-				and $objet = objet_type($id_table)
234
-			) {
235
-				$w = "$mstatut<>" . sql_quote($v);
236
-
237
-				// retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
238
-				// sinon l’auteur en session
239
-				include_spip('inc/securiser_action');
240
-				if ($desc = decrire_token_previsu()) {
241
-					$id_auteur = $desc['id_auteur'];
242
-				} elseif (isset($GLOBALS['visiteur_session']['id_auteur'])) {
243
-					$id_auteur = intval($GLOBALS['visiteur_session']['id_auteur']);
244
-				} else {
245
-					$id_auteur = null;
246
-				}
247
-
248
-				// dans ce cas (admin en general), pas de filtrage sur ce statut
249
-				if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) {
250
-					// si pas d'auteur identifie pas de sous-requete car pas d'article qui matche
251
-					if (!$id_auteur) {
252
-						$where[] = $w;
253
-					} else {
254
-						$primary = id_table_objet($objet);
255
-						$where[] = "($w OR $id_table.$primary IN (" . sql_get_select(
256
-							'ssss.id_objet',
257
-							'spip_auteurs_liens AS ssss',
258
-							'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . intval($id_auteur),
259
-							'',
260
-							'',
261
-							'',
262
-							'',
263
-							$serveur
264
-						) . '))';
265
-					}
266
-				}
267
-			} // ignorer ce statut si on ne sait pas comment le filtrer
268
-			else {
269
-				$v = '';
270
-			}
271
-		}
272
-		// securite
273
-		$liste_statuts[$k] = preg_replace(',\W,', '', $v);
274
-	}
275
-	$liste_statuts = array_filter($liste_statuts);
276
-	if (count($liste_statuts) == 1) {
277
-		$where[] = ['=', $mstatut, sql_quote(reset($liste_statuts), $serveur)];
278
-	} else {
279
-		$where[] = sql_in($mstatut, $liste_statuts, $not, $serveur);
280
-	}
281
-
282
-	while (count($where) > 1) {
283
-		$and = ['AND', array_pop($where), array_pop($where)];
284
-		$where[] = $and;
285
-	}
286
-	$cond[$key] = reset($where);
287
-	if ($not) {
288
-		$cond[$key] = ['NOT', $cond[$key]];
289
-	}
290
-
291
-	return $cond[$key];
197
+    static $cond = [];
198
+    $key = func_get_args();
199
+    $key = implode('-', $key);
200
+    if (isset($cond[$key])) {
201
+        return $cond[$key];
202
+    }
203
+
204
+    $liste_statuts = $publie;
205
+    if (defined('_VAR_PREVIEW') and _VAR_PREVIEW and !$ignore_previsu) {
206
+        $liste_statuts = $previsu;
207
+    }
208
+    $not = false;
209
+    if (strncmp($liste_statuts, '!', 1) == 0) {
210
+        $not = true;
211
+        $liste_statuts = substr($liste_statuts, 1);
212
+    }
213
+    // '' => ne rien afficher, '!'=> ne rien filtrer
214
+    if (!strlen($liste_statuts)) {
215
+        return $cond[$key] = ($not ? '1=1' : '0=1');
216
+    }
217
+
218
+    $liste_statuts = explode(',', $liste_statuts);
219
+    $where = [];
220
+    foreach ($liste_statuts as $k => $v) {
221
+        // filtrage /auteur pour limiter les objets d'un statut (prepa en general)
222
+        // a ceux de l'auteur identifie
223
+        if (strpos($v, '/') !== false) {
224
+            $v = explode('/', $v);
225
+            $filtre = end($v);
226
+            $v = reset($v);
227
+            $v = preg_replace(',\W,', '', $v);
228
+            if (
229
+                $filtre == 'auteur'
230
+                and (strpos($mstatut, '.') !== false)
231
+                and $objet = explode('.', $mstatut)
232
+                and $id_table = reset($objet)
233
+                and $objet = objet_type($id_table)
234
+            ) {
235
+                $w = "$mstatut<>" . sql_quote($v);
236
+
237
+                // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
238
+                // sinon l’auteur en session
239
+                include_spip('inc/securiser_action');
240
+                if ($desc = decrire_token_previsu()) {
241
+                    $id_auteur = $desc['id_auteur'];
242
+                } elseif (isset($GLOBALS['visiteur_session']['id_auteur'])) {
243
+                    $id_auteur = intval($GLOBALS['visiteur_session']['id_auteur']);
244
+                } else {
245
+                    $id_auteur = null;
246
+                }
247
+
248
+                // dans ce cas (admin en general), pas de filtrage sur ce statut
249
+                if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) {
250
+                    // si pas d'auteur identifie pas de sous-requete car pas d'article qui matche
251
+                    if (!$id_auteur) {
252
+                        $where[] = $w;
253
+                    } else {
254
+                        $primary = id_table_objet($objet);
255
+                        $where[] = "($w OR $id_table.$primary IN (" . sql_get_select(
256
+                            'ssss.id_objet',
257
+                            'spip_auteurs_liens AS ssss',
258
+                            'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . intval($id_auteur),
259
+                            '',
260
+                            '',
261
+                            '',
262
+                            '',
263
+                            $serveur
264
+                        ) . '))';
265
+                    }
266
+                }
267
+            } // ignorer ce statut si on ne sait pas comment le filtrer
268
+            else {
269
+                $v = '';
270
+            }
271
+        }
272
+        // securite
273
+        $liste_statuts[$k] = preg_replace(',\W,', '', $v);
274
+    }
275
+    $liste_statuts = array_filter($liste_statuts);
276
+    if (count($liste_statuts) == 1) {
277
+        $where[] = ['=', $mstatut, sql_quote(reset($liste_statuts), $serveur)];
278
+    } else {
279
+        $where[] = sql_in($mstatut, $liste_statuts, $not, $serveur);
280
+    }
281
+
282
+    while (count($where) > 1) {
283
+        $and = ['AND', array_pop($where), array_pop($where)];
284
+        $where[] = $and;
285
+    }
286
+    $cond[$key] = reset($where);
287
+    if ($not) {
288
+        $cond[$key] = ['NOT', $cond[$key]];
289
+    }
290
+
291
+    return $cond[$key];
292 292
 }
293 293
 
294 294
 /**
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
  * @return array|bool|null
300 300
  */
301 301
 function quete_fichier($id_document, $serveur = '') {
302
-	return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
302
+    return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
303 303
 }
304 304
 
305 305
 /**
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
  * @return array|bool
311 311
  */
312 312
 function quete_document($id_document, $serveur = '') {
313
-	return sql_fetsel('*', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
313
+    return sql_fetsel('*', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
314 314
 }
315 315
 
316 316
 /**
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
  * @return array|bool|null
322 322
  */
323 323
 function quete_meta($nom, $serveur) {
324
-	return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur);
324
+    return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur);
325 325
 }
326 326
 
327 327
 /**
@@ -347,72 +347,72 @@  discard block
 block discarded – undo
347 347
  *     Retourne soit un tableau, soit le chemin du fichier.
348 348
  */
349 349
 function quete_logo($cle_objet, $onoff, $id, $id_rubrique, $flag = false) {
350
-	include_spip('base/objets');
351
-	$nom = strtolower($onoff);
352
-
353
-	$cle_objet = id_table_objet($cle_objet);
354
-
355
-	while (1) {
356
-		$objet = objet_type($cle_objet);
357
-
358
-		$on = quete_logo_objet($id, $objet, $nom);
359
-
360
-		if ($on) {
361
-			if ($flag) {
362
-				return $on['fichier'];
363
-			} else {
364
-				$taille = @spip_getimagesize($on['chemin']);
365
-
366
-				// Si on a déjà demandé un survol directement ($onoff = off)
367
-				// ou qu'on a demandé uniquement le normal ($onoff = on)
368
-				// alors on ne cherche pas du tout le survol ici
369
-				if ($onoff != 'ON') {
370
-					$off = '';
371
-				} else {
372
-					// Sinon, c'est qu'on demande normal ET survol à la fois, donc on cherche maintenant le survol
373
-					$off = quete_logo_objet($id, $objet, 'off');
374
-				}
375
-
376
-				// on retourne une url du type IMG/artonXX?timestamp
377
-				// qui permet de distinguer le changement de logo
378
-				// et placer un expire sur le dossier IMG/
379
-				$res = [
380
-					$on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''),
381
-					($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''),
382
-					(!$taille ? '' : (' ' . $taille[3]))
383
-				];
384
-				$res['src'] = $res[0];
385
-				$res['logo_on'] = $res[0];
386
-				$res['logo_off'] = $res[1];
387
-				$res['width'] = ($taille ? $taille[0] : '');
388
-				$res['height'] = ($taille ? $taille[1] : '');
389
-				$res['fichier'] = $on['fichier'];
390
-				$res['titre'] = ($on['titre'] ?? '');
391
-				$res['descriptif'] = ($on['descriptif'] ?? '');
392
-				$res['credits'] = ($on['credits'] ?? '');
393
-				$res['alt'] = ($on['alt'] ?? '');
394
-				$res['id'] = ($on['id_document'] ?? 0);
395
-
396
-				return $res;
397
-			}
398
-		} else {
399
-			if (defined('_LOGO_RUBRIQUE_DESACTIVER_HERITAGE')) {
400
-				return '';
401
-			} else {
402
-				if ($id_rubrique) {
403
-					$cle_objet = 'id_rubrique';
404
-					$id = $id_rubrique;
405
-					$id_rubrique = 0;
406
-				} else {
407
-					if ($id and $cle_objet == 'id_rubrique') {
408
-						$id = quete_parent($id);
409
-					} else {
410
-						return '';
411
-					}
412
-				}
413
-			}
414
-		}
415
-	}
350
+    include_spip('base/objets');
351
+    $nom = strtolower($onoff);
352
+
353
+    $cle_objet = id_table_objet($cle_objet);
354
+
355
+    while (1) {
356
+        $objet = objet_type($cle_objet);
357
+
358
+        $on = quete_logo_objet($id, $objet, $nom);
359
+
360
+        if ($on) {
361
+            if ($flag) {
362
+                return $on['fichier'];
363
+            } else {
364
+                $taille = @spip_getimagesize($on['chemin']);
365
+
366
+                // Si on a déjà demandé un survol directement ($onoff = off)
367
+                // ou qu'on a demandé uniquement le normal ($onoff = on)
368
+                // alors on ne cherche pas du tout le survol ici
369
+                if ($onoff != 'ON') {
370
+                    $off = '';
371
+                } else {
372
+                    // Sinon, c'est qu'on demande normal ET survol à la fois, donc on cherche maintenant le survol
373
+                    $off = quete_logo_objet($id, $objet, 'off');
374
+                }
375
+
376
+                // on retourne une url du type IMG/artonXX?timestamp
377
+                // qui permet de distinguer le changement de logo
378
+                // et placer un expire sur le dossier IMG/
379
+                $res = [
380
+                    $on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''),
381
+                    ($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''),
382
+                    (!$taille ? '' : (' ' . $taille[3]))
383
+                ];
384
+                $res['src'] = $res[0];
385
+                $res['logo_on'] = $res[0];
386
+                $res['logo_off'] = $res[1];
387
+                $res['width'] = ($taille ? $taille[0] : '');
388
+                $res['height'] = ($taille ? $taille[1] : '');
389
+                $res['fichier'] = $on['fichier'];
390
+                $res['titre'] = ($on['titre'] ?? '');
391
+                $res['descriptif'] = ($on['descriptif'] ?? '');
392
+                $res['credits'] = ($on['credits'] ?? '');
393
+                $res['alt'] = ($on['alt'] ?? '');
394
+                $res['id'] = ($on['id_document'] ?? 0);
395
+
396
+                return $res;
397
+            }
398
+        } else {
399
+            if (defined('_LOGO_RUBRIQUE_DESACTIVER_HERITAGE')) {
400
+                return '';
401
+            } else {
402
+                if ($id_rubrique) {
403
+                    $cle_objet = 'id_rubrique';
404
+                    $id = $id_rubrique;
405
+                    $id_rubrique = 0;
406
+                } else {
407
+                    if ($id and $cle_objet == 'id_rubrique') {
408
+                        $id = quete_parent($id);
409
+                    } else {
410
+                        return '';
411
+                    }
412
+                }
413
+            }
414
+        }
415
+    }
416 416
 }
417 417
 
418 418
 /**
@@ -427,43 +427,43 @@  discard block
 block discarded – undo
427 427
  * @return bool|array
428 428
  **/
429 429
 function quete_logo_objet($id_objet, $objet, $mode) {
430
-	static $chercher_logo;
431
-	if (is_null($chercher_logo)) {
432
-		$chercher_logo = charger_fonction('chercher_logo', 'inc');
433
-	}
434
-	$cle_objet = id_table_objet($objet);
435
-
436
-	// On cherche pas la méthode classique
437
-	$infos_logo = $chercher_logo($id_objet, $cle_objet, $mode);
438
-
439
-	// Si la méthode classique a trouvé quelque chose, on utilise le nouveau format
440
-	if (!empty($infos_logo)) {
441
-		$infos = [
442
-			'chemin' => $infos_logo[0],
443
-			'timestamp' => $infos_logo[4],
444
-			'id_document' => ($infos_logo[5]['id_document'] ?? ''),
445
-		];
446
-		foreach (['fichier', 'titre', 'descriptif', 'credits', 'alt'] as $champ) {
447
-			$infos[$champ] = ($infos_logo[5][$champ] ?? '');
448
-		}
449
-		$infos_logo = $infos;
450
-	}
451
-
452
-	// On passe cette recherche de logo dans un pipeline
453
-	$infos_logo = pipeline(
454
-		'quete_logo_objet',
455
-		[
456
-			'args' => [
457
-				'id_objet' => $id_objet,
458
-				'objet' => $objet,
459
-				'cle_objet' => $cle_objet,
460
-				'mode' => $mode,
461
-			],
462
-			'data' => $infos_logo,
463
-		]
464
-	);
465
-
466
-	return $infos_logo;
430
+    static $chercher_logo;
431
+    if (is_null($chercher_logo)) {
432
+        $chercher_logo = charger_fonction('chercher_logo', 'inc');
433
+    }
434
+    $cle_objet = id_table_objet($objet);
435
+
436
+    // On cherche pas la méthode classique
437
+    $infos_logo = $chercher_logo($id_objet, $cle_objet, $mode);
438
+
439
+    // Si la méthode classique a trouvé quelque chose, on utilise le nouveau format
440
+    if (!empty($infos_logo)) {
441
+        $infos = [
442
+            'chemin' => $infos_logo[0],
443
+            'timestamp' => $infos_logo[4],
444
+            'id_document' => ($infos_logo[5]['id_document'] ?? ''),
445
+        ];
446
+        foreach (['fichier', 'titre', 'descriptif', 'credits', 'alt'] as $champ) {
447
+            $infos[$champ] = ($infos_logo[5][$champ] ?? '');
448
+        }
449
+        $infos_logo = $infos;
450
+    }
451
+
452
+    // On passe cette recherche de logo dans un pipeline
453
+    $infos_logo = pipeline(
454
+        'quete_logo_objet',
455
+        [
456
+            'args' => [
457
+                'id_objet' => $id_objet,
458
+                'objet' => $objet,
459
+                'cle_objet' => $cle_objet,
460
+                'mode' => $mode,
461
+            ],
462
+            'data' => $infos_logo,
463
+        ]
464
+    );
465
+
466
+    return $infos_logo;
467 467
 }
468 468
 
469 469
 /**
@@ -476,25 +476,25 @@  discard block
 block discarded – undo
476 476
  * @return bool|string
477 477
  */
478 478
 function quete_logo_file($row, $connect = null) {
479
-	include_spip('inc/documents');
480
-	$logo = vignette_logo_document($row, $connect);
481
-	if (!$logo) {
482
-		$logo = image_du_document($row, $connect);
483
-	}
484
-	if (!$logo) {
485
-		$f = charger_fonction('vignette', 'inc');
486
-		$logo = $f($row['extension'], false);
487
-	}
488
-	// si c'est une vignette type doc, la renvoyer direct
489
-	if (
490
-		strcmp($logo, _DIR_PLUGINS) == 0
491
-		or strcmp($logo, _DIR_PLUGINS_DIST) == 0
492
-		or strcmp($logo, _DIR_RACINE . 'prive/') == 0
493
-	) {
494
-		return $logo;
495
-	}
496
-
497
-	return get_spip_doc($logo);
479
+    include_spip('inc/documents');
480
+    $logo = vignette_logo_document($row, $connect);
481
+    if (!$logo) {
482
+        $logo = image_du_document($row, $connect);
483
+    }
484
+    if (!$logo) {
485
+        $f = charger_fonction('vignette', 'inc');
486
+        $logo = $f($row['extension'], false);
487
+    }
488
+    // si c'est une vignette type doc, la renvoyer direct
489
+    if (
490
+        strcmp($logo, _DIR_PLUGINS) == 0
491
+        or strcmp($logo, _DIR_PLUGINS_DIST) == 0
492
+        or strcmp($logo, _DIR_RACINE . 'prive/') == 0
493
+    ) {
494
+        return $logo;
495
+    }
496
+
497
+    return get_spip_doc($logo);
498 498
 }
499 499
 
500 500
 /**
@@ -522,20 +522,20 @@  discard block
 block discarded – undo
522 522
  */
523 523
 function quete_logo_document($row, $lien, $align, $mode_logo, $x, $y, string $connect = '') {
524 524
 
525
-	include_spip('inc/documents');
526
-	$logo = '';
527
-	if (!in_array($mode_logo, ['icone', 'apercu'])) {
528
-		$logo = vignette_logo_document($row, $connect);
529
-	}
530
-	// si on veut explicitement la vignette, ne rien renvoyer si il n'y en a pas
531
-	if ($mode_logo == 'vignette' and !$logo) {
532
-		return '';
533
-	}
534
-	if ($mode_logo == 'icone') {
535
-		$row['fichier'] = '';
536
-	}
537
-
538
-	return vignette_automatique($logo, $row, $lien, $x, $y, $align, null, $connect);
525
+    include_spip('inc/documents');
526
+    $logo = '';
527
+    if (!in_array($mode_logo, ['icone', 'apercu'])) {
528
+        $logo = vignette_logo_document($row, $connect);
529
+    }
530
+    // si on veut explicitement la vignette, ne rien renvoyer si il n'y en a pas
531
+    if ($mode_logo == 'vignette' and !$logo) {
532
+        return '';
533
+    }
534
+    if ($mode_logo == 'icone') {
535
+        $row['fichier'] = '';
536
+    }
537
+
538
+    return vignette_automatique($logo, $row, $lien, $x, $y, $align, null, $connect);
539 539
 }
540 540
 
541 541
 /**
@@ -547,26 +547,26 @@  discard block
 block discarded – undo
547 547
  */
548 548
 function quete_html_logo($logo, $align, $lien) {
549 549
 
550
-	if (!is_array($logo)) {
551
-		return '';
552
-	}
553
-
554
-	$contexte = [];
555
-	foreach ($logo as $k => $v) {
556
-		if (!is_numeric($k)) {
557
-			$contexte[$k] = $v;
558
-		}
559
-	}
560
-
561
-	foreach (['titre', 'descriptif', 'credits', 'alt'] as $champ) {
562
-		if (!empty($contexte[$champ])) {
563
-			$contexte[$champ] = appliquer_traitement_champ($contexte[$champ] , $champ, 'document');
564
-		}
565
-	}
566
-
567
-	$contexte['align'] = $align;
568
-	$contexte['lien'] = $lien;
569
-	return recuperer_fond('modeles/logo', $contexte);
550
+    if (!is_array($logo)) {
551
+        return '';
552
+    }
553
+
554
+    $contexte = [];
555
+    foreach ($logo as $k => $v) {
556
+        if (!is_numeric($k)) {
557
+            $contexte[$k] = $v;
558
+        }
559
+    }
560
+
561
+    foreach (['titre', 'descriptif', 'credits', 'alt'] as $champ) {
562
+        if (!empty($contexte[$champ])) {
563
+            $contexte[$champ] = appliquer_traitement_champ($contexte[$champ] , $champ, 'document');
564
+        }
565
+    }
566
+
567
+    $contexte['align'] = $align;
568
+    $contexte['lien'] = $lien;
569
+    return recuperer_fond('modeles/logo', $contexte);
570 570
 }
571 571
 
572 572
 /**
@@ -580,14 +580,14 @@  discard block
 block discarded – undo
580 580
  * @return string|false
581 581
  */
582 582
 function document_spip_externe($fichier, $connect) {
583
-	if ($connect) {
584
-		$site = quete_meta('adresse_site', $connect);
585
-		if ($site) {
586
-			$dir = quete_meta('dir_img', $connect);
587
-			return "$site/$dir$fichier";
588
-		}
589
-	}
590
-	return false;
583
+    if ($connect) {
584
+        $site = quete_meta('adresse_site', $connect);
585
+        if ($site) {
586
+            $dir = quete_meta('dir_img', $connect);
587
+            return "$site/$dir$fichier";
588
+        }
589
+    }
590
+    return false;
591 591
 }
592 592
 
593 593
 /**
@@ -601,23 +601,23 @@  discard block
 block discarded – undo
601 601
  */
602 602
 function vignette_logo_document($row, string $connect = '') {
603 603
 
604
-	if (!$row or empty($row['id_vignette'])) {
605
-		return '';
606
-	}
607
-	$fichier = quete_fichier($row['id_vignette'], $connect);
608
-	if ($url = document_spip_externe($fichier, $connect)) {
609
-		return $url;
610
-	}
611
-
612
-	$f = get_spip_doc($fichier);
613
-	if ($f and @file_exists($f)) {
614
-		return $f;
615
-	}
616
-	if ($row['mode'] !== 'vignette') {
617
-		return '';
618
-	}
619
-
620
-	return generer_objet_url($row['id_document'], 'document', '', '', null, '', $connect);
604
+    if (!$row or empty($row['id_vignette'])) {
605
+        return '';
606
+    }
607
+    $fichier = quete_fichier($row['id_vignette'], $connect);
608
+    if ($url = document_spip_externe($fichier, $connect)) {
609
+        return $url;
610
+    }
611
+
612
+    $f = get_spip_doc($fichier);
613
+    if ($f and @file_exists($f)) {
614
+        return $f;
615
+    }
616
+    if ($row['mode'] !== 'vignette') {
617
+        return '';
618
+    }
619
+
620
+    return generer_objet_url($row['id_document'], 'document', '', '', null, '', $connect);
621 621
 }
622 622
 
623 623
 /**
@@ -633,66 +633,66 @@  discard block
 block discarded – undo
633 633
  * @return bool|string
634 634
  */
635 635
 function calcul_exposer($id, $prim, $reference, $parent, $type, string $connect = '') {
636
-	static $exposer = [];
637
-
638
-	// Que faut-il exposer ? Tous les elements de $reference
639
-	// ainsi que leur hierarchie ; on ne fait donc ce calcul
640
-	// qu'une fois (par squelette) et on conserve le resultat
641
-	// en static.
642
-	if (!isset($exposer[$m = md5(serialize($reference))][$prim])) {
643
-		$principal = $reference[$type] ?? $reference["@$type"] ?? '';
644
-		// le parent fournit en argument est le parent de $id, pas celui de $principal
645
-		// il n'est donc pas utile
646
-		$parent = 0;
647
-		if (!$principal) { // regarder si un enfant est dans le contexte, auquel cas il expose peut etre le parent courant
648
-			$enfants = ['id_rubrique' => ['id_article'], 'id_groupe' => ['id_mot']];
649
-			if (isset($enfants[$type])) {
650
-				foreach ($enfants[$type] as $t) {
651
-					if (
652
-						isset($reference[$t])
653
-						// cas de la reference donnee dynamiquement par la pagination
654
-						or isset($reference["@$t"])
655
-					) {
656
-						$type = $t;
657
-						$principal = $reference[$type] ?? $reference["@$type"];
658
-						continue;
659
-					}
660
-				}
661
-			}
662
-		}
663
-		$exposer[$m][$type] = [];
664
-		if ($principal) {
665
-			$principaux = is_array($principal) ? $principal : [$principal];
666
-			foreach ($principaux as $principal) {
667
-				$exposer[$m][$type][$principal] = true;
668
-				if ($type == 'id_mot') {
669
-					if (!$parent) {
670
-						$parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . intval($principal), '', '', '', '', $connect);
671
-					}
672
-					if ($parent) {
673
-						$exposer[$m]['id_groupe'][$parent] = true;
674
-					}
675
-				} else {
676
-					if ($type != 'id_groupe') {
677
-						if (!$parent) {
678
-							if ($type == 'id_rubrique') {
679
-								$parent = $principal;
680
-							}
681
-							if ($type == 'id_article') {
682
-								$parent = quete_rubrique($principal, $connect);
683
-							}
684
-						}
685
-						do {
686
-							$exposer[$m]['id_rubrique'][$parent] = true;
687
-						} while ($parent = quete_parent($parent, $connect));
688
-					}
689
-				}
690
-			}
691
-		}
692
-	}
693
-
694
-	// And the winner is...
695
-	return isset($exposer[$m][$prim]) ? isset($exposer[$m][$prim][$id]) : '';
636
+    static $exposer = [];
637
+
638
+    // Que faut-il exposer ? Tous les elements de $reference
639
+    // ainsi que leur hierarchie ; on ne fait donc ce calcul
640
+    // qu'une fois (par squelette) et on conserve le resultat
641
+    // en static.
642
+    if (!isset($exposer[$m = md5(serialize($reference))][$prim])) {
643
+        $principal = $reference[$type] ?? $reference["@$type"] ?? '';
644
+        // le parent fournit en argument est le parent de $id, pas celui de $principal
645
+        // il n'est donc pas utile
646
+        $parent = 0;
647
+        if (!$principal) { // regarder si un enfant est dans le contexte, auquel cas il expose peut etre le parent courant
648
+            $enfants = ['id_rubrique' => ['id_article'], 'id_groupe' => ['id_mot']];
649
+            if (isset($enfants[$type])) {
650
+                foreach ($enfants[$type] as $t) {
651
+                    if (
652
+                        isset($reference[$t])
653
+                        // cas de la reference donnee dynamiquement par la pagination
654
+                        or isset($reference["@$t"])
655
+                    ) {
656
+                        $type = $t;
657
+                        $principal = $reference[$type] ?? $reference["@$type"];
658
+                        continue;
659
+                    }
660
+                }
661
+            }
662
+        }
663
+        $exposer[$m][$type] = [];
664
+        if ($principal) {
665
+            $principaux = is_array($principal) ? $principal : [$principal];
666
+            foreach ($principaux as $principal) {
667
+                $exposer[$m][$type][$principal] = true;
668
+                if ($type == 'id_mot') {
669
+                    if (!$parent) {
670
+                        $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . intval($principal), '', '', '', '', $connect);
671
+                    }
672
+                    if ($parent) {
673
+                        $exposer[$m]['id_groupe'][$parent] = true;
674
+                    }
675
+                } else {
676
+                    if ($type != 'id_groupe') {
677
+                        if (!$parent) {
678
+                            if ($type == 'id_rubrique') {
679
+                                $parent = $principal;
680
+                            }
681
+                            if ($type == 'id_article') {
682
+                                $parent = quete_rubrique($principal, $connect);
683
+                            }
684
+                        }
685
+                        do {
686
+                            $exposer[$m]['id_rubrique'][$parent] = true;
687
+                        } while ($parent = quete_parent($parent, $connect));
688
+                    }
689
+                }
690
+            }
691
+        }
692
+    }
693
+
694
+    // And the winner is...
695
+    return isset($exposer[$m][$prim]) ? isset($exposer[$m][$prim][$id]) : '';
696 696
 }
697 697
 
698 698
 /**
@@ -707,23 +707,23 @@  discard block
 block discarded – undo
707 707
  * @return int
708 708
  */
709 709
 function quete_debut_pagination($primary, $valeur, $pas, $iter) {
710
-	// on ne devrait pas arriver ici si la cle primaire est inexistante
711
-	// ou composee, mais verifions
712
-	if (!$primary or preg_match('/[,\s]/', $primary)) {
713
-		return 0;
714
-	}
715
-
716
-	$pos = 0;
717
-	while ($row = $iter->fetch() and $row[$primary] != $valeur) {
718
-		$pos++;
719
-	}
720
-	// si on a pas trouve
721
-	if (!$row or $row[$primary] != $valeur) {
722
-		return 0;
723
-	}
724
-
725
-	// sinon, calculer le bon numero de page
726
-	return floor($pos / $pas) * $pas;
710
+    // on ne devrait pas arriver ici si la cle primaire est inexistante
711
+    // ou composee, mais verifions
712
+    if (!$primary or preg_match('/[,\s]/', $primary)) {
713
+        return 0;
714
+    }
715
+
716
+    $pos = 0;
717
+    while ($row = $iter->fetch() and $row[$primary] != $valeur) {
718
+        $pos++;
719
+    }
720
+    // si on a pas trouve
721
+    if (!$row or $row[$primary] != $valeur) {
722
+        return 0;
723
+    }
724
+
725
+    // sinon, calculer le bon numero de page
726
+    return floor($pos / $pas) * $pas;
727 727
 }
728 728
 
729 729
 /**
@@ -734,11 +734,11 @@  discard block
 block discarded – undo
734 734
  * @return boolean
735 735
  */
736 736
 function is_whereable($value): bool {
737
-	if (is_array($value) && count($value)) {
738
-		return true;
739
-	}
740
-	if (is_scalar($value) && strlen($value)) {
741
-		return true;
742
-	}
743
-	return false;
737
+    if (is_array($value) && count($value)) {
738
+        return true;
739
+    }
740
+    if (is_scalar($value) && strlen($value)) {
741
+        return true;
742
+    }
743
+    return false;
744 744
 }
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	return sql_getfetsel(
37 37
 		'virtuel',
38 38
 		'spip_articles',
39
-		['id_article=' . intval($id_article), "statut='publie'"],
39
+		['id_article='.intval($id_article), "statut='publie'"],
40 40
 		'',
41 41
 		'',
42 42
 		'',
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			$cache_quete[$connect][$table][$id] = sql_fetsel(
82 82
 				$cache_quete[$connect][$table]['_select'],
83 83
 				$table,
84
-				$cache_quete[$connect][$table]['_id'] . '=' . intval($id),
84
+				$cache_quete[$connect][$table]['_id'].'='.intval($id),
85 85
 				'',
86 86
 				'',
87 87
 				'',
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	return
174 174
 		(isset($GLOBALS['meta']['date_prochain_postdate'])
175 175
 			and $GLOBALS['meta']['date_prochain_postdate'] > time())
176
-			? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur)
176
+			? "$champ_date<".sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur)
177 177
 			: '1=1';
178 178
 }
179 179
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 				and $id_table = reset($objet)
233 233
 				and $objet = objet_type($id_table)
234 234
 			) {
235
-				$w = "$mstatut<>" . sql_quote($v);
235
+				$w = "$mstatut<>".sql_quote($v);
236 236
 
237 237
 				// retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
238 238
 				// sinon l’auteur en session
@@ -246,22 +246,22 @@  discard block
 block discarded – undo
246 246
 				}
247 247
 
248 248
 				// dans ce cas (admin en general), pas de filtrage sur ce statut
249
-				if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) {
249
+				if (!autoriser('previsualiser'.$v, $objet, '', $id_auteur)) {
250 250
 					// si pas d'auteur identifie pas de sous-requete car pas d'article qui matche
251 251
 					if (!$id_auteur) {
252 252
 						$where[] = $w;
253 253
 					} else {
254 254
 						$primary = id_table_objet($objet);
255
-						$where[] = "($w OR $id_table.$primary IN (" . sql_get_select(
255
+						$where[] = "($w OR $id_table.$primary IN (".sql_get_select(
256 256
 							'ssss.id_objet',
257 257
 							'spip_auteurs_liens AS ssss',
258
-							'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . intval($id_auteur),
258
+							'ssss.objet='.sql_quote($objet).' AND ssss.id_auteur='.intval($id_auteur),
259 259
 							'',
260 260
 							'',
261 261
 							'',
262 262
 							'',
263 263
 							$serveur
264
-						) . '))';
264
+						).'))';
265 265
 					}
266 266
 				}
267 267
 			} // ignorer ce statut si on ne sait pas comment le filtrer
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
  * @return array|bool|null
300 300
  */
301 301
 function quete_fichier($id_document, $serveur = '') {
302
-	return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
302
+	return sql_getfetsel('fichier', 'spip_documents', ('id_document='.intval($id_document)), '', [], '', '', $serveur);
303 303
 }
304 304
 
305 305
 /**
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
  * @return array|bool
311 311
  */
312 312
 function quete_document($id_document, $serveur = '') {
313
-	return sql_fetsel('*', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
313
+	return sql_fetsel('*', 'spip_documents', ('id_document='.intval($id_document)), '', [], '', '', $serveur);
314 314
 }
315 315
 
316 316
 /**
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
  * @return array|bool|null
322 322
  */
323 323
 function quete_meta($nom, $serveur) {
324
-	return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur);
324
+	return sql_getfetsel('valeur', 'spip_meta', 'nom='.sql_quote($nom), '', '', '', '', $serveur);
325 325
 }
326 326
 
327 327
 /**
@@ -377,9 +377,9 @@  discard block
 block discarded – undo
377 377
 				// qui permet de distinguer le changement de logo
378 378
 				// et placer un expire sur le dossier IMG/
379 379
 				$res = [
380
-					$on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''),
381
-					($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''),
382
-					(!$taille ? '' : (' ' . $taille[3]))
380
+					$on['chemin'].($on['timestamp'] ? "?{$on['timestamp']}" : ''),
381
+					($off ? $off['chemin'].($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''),
382
+					(!$taille ? '' : (' '.$taille[3]))
383 383
 				];
384 384
 				$res['src'] = $res[0];
385 385
 				$res['logo_on'] = $res[0];
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 	if (
490 490
 		strcmp($logo, _DIR_PLUGINS) == 0
491 491
 		or strcmp($logo, _DIR_PLUGINS_DIST) == 0
492
-		or strcmp($logo, _DIR_RACINE . 'prive/') == 0
492
+		or strcmp($logo, _DIR_RACINE.'prive/') == 0
493 493
 	) {
494 494
 		return $logo;
495 495
 	}
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
 
561 561
 	foreach (['titre', 'descriptif', 'credits', 'alt'] as $champ) {
562 562
 		if (!empty($contexte[$champ])) {
563
-			$contexte[$champ] = appliquer_traitement_champ($contexte[$champ] , $champ, 'document');
563
+			$contexte[$champ] = appliquer_traitement_champ($contexte[$champ], $champ, 'document');
564 564
 		}
565 565
 	}
566 566
 
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 				$exposer[$m][$type][$principal] = true;
668 668
 				if ($type == 'id_mot') {
669 669
 					if (!$parent) {
670
-						$parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . intval($principal), '', '', '', '', $connect);
670
+						$parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot='.intval($principal), '', '', '', '', $connect);
671 671
 					}
672 672
 					if ($parent) {
673 673
 						$exposer[$m]['id_groupe'][$parent] = true;
Please login to merge, or discard this patch.
ecrire/balise/id_logo_.php 2 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 
@@ -49,38 +49,38 @@  discard block
 block discarded – undo
49 49
  */
50 50
 function balise_ID_LOGO__dist($p) {
51 51
 
52
-	preg_match(',^ID_LOGO_([A-Z_]+?)(|_NORMAL|_SURVOL|_RUBRIQUE)$,i', $p->nom_champ, $regs);
53
-	$type = strtolower($regs[1]);
54
-	$suite_logo = $regs[2];
55
-
56
-	// cas de #ID_LOGO_SITE_SPIP
57
-	if ($type == 'site_spip') {
58
-		$type = 'site';
59
-		$_id_objet = "\"'0'\"";
60
-	}
61
-
62
-	$id_objet = id_table_objet($type);
63
-	if (!isset($_id_objet)) {
64
-		$_id_objet = champ_sql($id_objet, $p);
65
-	}
66
-
67
-	$connect = $p->id_boucle ? $p->boucles[$p->id_boucle]->sql_serveur : '';
68
-	if ($type == 'document') {
69
-		$qconnect = _q($connect);
70
-		$doc = "quete_document($_id_objet, $qconnect)";
71
-		$code = "table_valeur($doc, 'id_vignette')";
72
-	} elseif ($connect) {
73
-		$code = "''";
74
-		spip_log('Les logos distants ne sont pas prevus');
75
-	} else {
76
-		$champ_logo = 'id';
77
-		$code = generer_code_logo($id_objet, $_id_objet, $type, '', "''", $p, $suite_logo, $champ_logo);
78
-	}
79
-
80
-	$p->code = $code;
81
-	$p->interdire_scripts = false;
82
-
83
-	return $p;
52
+    preg_match(',^ID_LOGO_([A-Z_]+?)(|_NORMAL|_SURVOL|_RUBRIQUE)$,i', $p->nom_champ, $regs);
53
+    $type = strtolower($regs[1]);
54
+    $suite_logo = $regs[2];
55
+
56
+    // cas de #ID_LOGO_SITE_SPIP
57
+    if ($type == 'site_spip') {
58
+        $type = 'site';
59
+        $_id_objet = "\"'0'\"";
60
+    }
61
+
62
+    $id_objet = id_table_objet($type);
63
+    if (!isset($_id_objet)) {
64
+        $_id_objet = champ_sql($id_objet, $p);
65
+    }
66
+
67
+    $connect = $p->id_boucle ? $p->boucles[$p->id_boucle]->sql_serveur : '';
68
+    if ($type == 'document') {
69
+        $qconnect = _q($connect);
70
+        $doc = "quete_document($_id_objet, $qconnect)";
71
+        $code = "table_valeur($doc, 'id_vignette')";
72
+    } elseif ($connect) {
73
+        $code = "''";
74
+        spip_log('Les logos distants ne sont pas prevus');
75
+    } else {
76
+        $champ_logo = 'id';
77
+        $code = generer_code_logo($id_objet, $_id_objet, $type, '', "''", $p, $suite_logo, $champ_logo);
78
+    }
79
+
80
+    $p->code = $code;
81
+    $p->interdire_scripts = false;
82
+
83
+    return $p;
84 84
 }
85 85
 
86 86
 /**
@@ -109,28 +109,28 @@  discard block
 block discarded – undo
109 109
  *     Code compilé retournant le chemin du logo ou le code HTML du logo.
110 110
  **/
111 111
 function generer_code_logo($id_objet, $_id_objet, $type, $align, $_lien, $p, $suite, string $champ = ''): string {
112
-	$onoff = 'ON';
113
-	$_id_rubrique = "''";
112
+    $onoff = 'ON';
113
+    $_id_rubrique = "''";
114 114
 
115
-	if ($type === 'rubrique') {
116
-		$_id_rubrique = "quete_parent($_id_objet)";
117
-	}
115
+    if ($type === 'rubrique') {
116
+        $_id_rubrique = "quete_parent($_id_objet)";
117
+    }
118 118
 
119
-	if ($suite === '_SURVOL') {
120
-		$onoff = 'off';
121
-	} elseif ($suite === '_NORMAL') {
122
-		$onoff = 'on';
123
-	} elseif ($suite === '_RUBRIQUE') {
124
-		$_id_rubrique = champ_sql('id_rubrique', $p);
125
-	}
119
+    if ($suite === '_SURVOL') {
120
+        $onoff = 'off';
121
+    } elseif ($suite === '_NORMAL') {
122
+        $onoff = 'on';
123
+    } elseif ($suite === '_RUBRIQUE') {
124
+        $_id_rubrique = champ_sql('id_rubrique', $p);
125
+    }
126 126
 
127
-	$code = "quete_logo('$id_objet', '$onoff', $_id_objet, $_id_rubrique)";
127
+    $code = "quete_logo('$id_objet', '$onoff', $_id_objet, $_id_rubrique)";
128 128
 
129
-	if ($champ) {
130
-		return "table_valeur($code, '".addslashes($champ)."')";
131
-	}
129
+    if ($champ) {
130
+        return "table_valeur($code, '".addslashes($champ)."')";
131
+    }
132 132
 
133
-	$align = preg_replace(',\W,', '', $align);
133
+    $align = preg_replace(',\W,', '', $align);
134 134
 
135
-	return "quete_html_logo($code, '$align', " . ($_lien ?: "''") . ')';
135
+    return "quete_html_logo($code, '$align', " . ($_lien ?: "''") . ')';
136 136
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,5 +132,5 @@
 block discarded – undo
132 132
 
133 133
 	$align = preg_replace(',\W,', '', $align);
134 134
 
135
-	return "quete_html_logo($code, '$align', " . ($_lien ?: "''") . ')';
135
+	return "quete_html_logo($code, '$align', ".($_lien ?: "''").')';
136 136
 }
Please login to merge, or discard this patch.
ecrire/balise/logo_.php 2 patches
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 
@@ -56,88 +56,88 @@  discard block
 block discarded – undo
56 56
  */
57 57
 function balise_LOGO__dist($p) {
58 58
 
59
-	preg_match(',^LOGO_([A-Z_]+?)(|_NORMAL|_SURVOL|_RUBRIQUE)$,i', $p->nom_champ, $regs);
60
-	$type = strtolower($regs[1]);
61
-	$suite_logo = $regs[2];
62
-
63
-	// cas de #LOGO_SITE_SPIP
64
-	if ($type == 'site_spip') {
65
-		$type = 'site';
66
-		$_id_objet = "\"'0'\"";
67
-	}
68
-
69
-	$id_objet = id_table_objet($type);
70
-	if (!isset($_id_objet)) {
71
-		$_id_objet = champ_sql($id_objet, $p);
72
-	}
73
-
74
-	$fichier = ($p->etoile === '**') ? -1 : 0;
75
-	$coord = [];
76
-	$align = $lien = '';
77
-	$mode_logo = '';
78
-
79
-	if ($p->param and !$p->param[0][0]) {
80
-		$params = $p->param[0];
81
-		array_shift($params);
82
-		foreach ($params as $a) {
83
-			if ($a[0]->type === 'texte') {
84
-				$n = $a[0]->texte;
85
-				if (is_numeric($n)) {
86
-					$coord[] = $n;
87
-				} elseif (in_array($n, ['top', 'left', 'right', 'center', 'bottom'])) {
88
-					$align = $n;
89
-				} elseif (in_array($n, ['auto', 'icone', 'apercu', 'vignette'])) {
90
-					$mode_logo = $n;
91
-				}
92
-			} else {
93
-				$lien = calculer_liste($a, $p->descr, $p->boucles, $p->id_boucle);
94
-			}
95
-		}
96
-	}
97
-
98
-	$coord_x = !$coord ? 0 : intval(array_shift($coord));
99
-	$coord_y = !$coord ? 0 : intval(array_shift($coord));
100
-
101
-	if ($p->etoile === '*') {
102
-		include_spip('balise/url_');
103
-		$lien = generer_generer_url_arg($type, $p, $_id_objet);
104
-	}
105
-
106
-	$connect = $p->id_boucle ? $p->boucles[$p->id_boucle]->sql_serveur : '';
107
-	if ($type == 'document') {
108
-		$qconnect = _q($connect);
109
-		$doc = "quete_document($_id_objet, $qconnect)";
110
-		if ($fichier) {
111
-			$code = "quete_logo_file($doc, $qconnect)";
112
-		} else {
113
-			$code = "quete_logo_document($doc, " . ($lien ?: "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
114
-		}
115
-		// (x=non-faux ? y : '') pour affecter x en retournant y
116
-		if ($p->descr['documents']) {
117
-			$code = '(($doublons["documents"] .= ",". '
118
-				. $_id_objet
119
-				. ") ? $code : '')";
120
-		}
121
-	} elseif ($connect) {
122
-		$code = "''";
123
-		spip_log('Les logos distants ne sont pas prevus');
124
-	} else {
125
-		// pour generer_code_logo
126
-		include_spip('balise/id_logo_');
127
-		$champ_logo = '';
128
-		if ($fichier) {
129
-			$champ_logo = 'fichier';
130
-		}
131
-		$code = generer_code_logo($id_objet, $_id_objet, $type, $align, $lien, $p, $suite_logo, $champ_logo);
132
-	}
133
-
134
-	// demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0}
135
-	if ($coord_x or $coord_y) {
136
-		$code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))";
137
-	}
138
-
139
-	$p->code = $code;
140
-	$p->interdire_scripts = false;
141
-
142
-	return $p;
59
+    preg_match(',^LOGO_([A-Z_]+?)(|_NORMAL|_SURVOL|_RUBRIQUE)$,i', $p->nom_champ, $regs);
60
+    $type = strtolower($regs[1]);
61
+    $suite_logo = $regs[2];
62
+
63
+    // cas de #LOGO_SITE_SPIP
64
+    if ($type == 'site_spip') {
65
+        $type = 'site';
66
+        $_id_objet = "\"'0'\"";
67
+    }
68
+
69
+    $id_objet = id_table_objet($type);
70
+    if (!isset($_id_objet)) {
71
+        $_id_objet = champ_sql($id_objet, $p);
72
+    }
73
+
74
+    $fichier = ($p->etoile === '**') ? -1 : 0;
75
+    $coord = [];
76
+    $align = $lien = '';
77
+    $mode_logo = '';
78
+
79
+    if ($p->param and !$p->param[0][0]) {
80
+        $params = $p->param[0];
81
+        array_shift($params);
82
+        foreach ($params as $a) {
83
+            if ($a[0]->type === 'texte') {
84
+                $n = $a[0]->texte;
85
+                if (is_numeric($n)) {
86
+                    $coord[] = $n;
87
+                } elseif (in_array($n, ['top', 'left', 'right', 'center', 'bottom'])) {
88
+                    $align = $n;
89
+                } elseif (in_array($n, ['auto', 'icone', 'apercu', 'vignette'])) {
90
+                    $mode_logo = $n;
91
+                }
92
+            } else {
93
+                $lien = calculer_liste($a, $p->descr, $p->boucles, $p->id_boucle);
94
+            }
95
+        }
96
+    }
97
+
98
+    $coord_x = !$coord ? 0 : intval(array_shift($coord));
99
+    $coord_y = !$coord ? 0 : intval(array_shift($coord));
100
+
101
+    if ($p->etoile === '*') {
102
+        include_spip('balise/url_');
103
+        $lien = generer_generer_url_arg($type, $p, $_id_objet);
104
+    }
105
+
106
+    $connect = $p->id_boucle ? $p->boucles[$p->id_boucle]->sql_serveur : '';
107
+    if ($type == 'document') {
108
+        $qconnect = _q($connect);
109
+        $doc = "quete_document($_id_objet, $qconnect)";
110
+        if ($fichier) {
111
+            $code = "quete_logo_file($doc, $qconnect)";
112
+        } else {
113
+            $code = "quete_logo_document($doc, " . ($lien ?: "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
114
+        }
115
+        // (x=non-faux ? y : '') pour affecter x en retournant y
116
+        if ($p->descr['documents']) {
117
+            $code = '(($doublons["documents"] .= ",". '
118
+                . $_id_objet
119
+                . ") ? $code : '')";
120
+        }
121
+    } elseif ($connect) {
122
+        $code = "''";
123
+        spip_log('Les logos distants ne sont pas prevus');
124
+    } else {
125
+        // pour generer_code_logo
126
+        include_spip('balise/id_logo_');
127
+        $champ_logo = '';
128
+        if ($fichier) {
129
+            $champ_logo = 'fichier';
130
+        }
131
+        $code = generer_code_logo($id_objet, $_id_objet, $type, $align, $lien, $p, $suite_logo, $champ_logo);
132
+    }
133
+
134
+    // demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0}
135
+    if ($coord_x or $coord_y) {
136
+        $code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))";
137
+    }
138
+
139
+    $p->code = $code;
140
+    $p->interdire_scripts = false;
141
+
142
+    return $p;
143 143
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		if ($fichier) {
111 111
 			$code = "quete_logo_file($doc, $qconnect)";
112 112
 		} else {
113
-			$code = "quete_logo_document($doc, " . ($lien ?: "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
113
+			$code = "quete_logo_document($doc, ".($lien ?: "''").", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
114 114
 		}
115 115
 		// (x=non-faux ? y : '') pour affecter x en retournant y
116 116
 		if ($p->descr['documents']) {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
 	// demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0}
135 135
 	if ($coord_x or $coord_y) {
136
-		$code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))";
136
+		$code = "filtrer('image_graver',filtrer('image_reduire',".$code.", '$coord_x', '$coord_y'))";
137 137
 	}
138 138
 
139 139
 	$p->code = $code;
Please login to merge, or discard this patch.
ecrire/inc/filtres_images_lib_mini.php 3 patches
Indentation   +1329 added lines, -1329 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 if (!defined('_ECRIRE_INC_VERSION')) {
21
-	return;
21
+    return;
22 22
 }
23 23
 include_spip('inc/filtres'); // par precaution
24 24
 include_spip('inc/filtres_images_mini'); // par precaution
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
  *     Le code de la couleur en hexadécimal.
39 39
  */
40 40
 function _couleur_dec_to_hex($red, $green, $blue) {
41
-	$red = dechex($red);
42
-	$green = dechex($green);
43
-	$blue = dechex($blue);
44
-
45
-	if (strlen($red) == 1) {
46
-		$red = '0' . $red;
47
-	}
48
-	if (strlen($green) == 1) {
49
-		$green = '0' . $green;
50
-	}
51
-	if (strlen($blue) == 1) {
52
-		$blue = '0' . $blue;
53
-	}
54
-
55
-	return "$red$green$blue";
41
+    $red = dechex($red);
42
+    $green = dechex($green);
43
+    $blue = dechex($blue);
44
+
45
+    if (strlen($red) == 1) {
46
+        $red = '0' . $red;
47
+    }
48
+    if (strlen($green) == 1) {
49
+        $green = '0' . $green;
50
+    }
51
+    if (strlen($blue) == 1) {
52
+        $blue = '0' . $blue;
53
+    }
54
+
55
+    return "$red$green$blue";
56 56
 }
57 57
 
58 58
 /**
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
  *     Un tableau des 3 éléments : rouge, vert, bleu.
65 65
  */
66 66
 function _couleur_hex_to_dec($couleur) {
67
-	$couleur ??= '';
68
-	$couleur = couleur_html_to_hex($couleur);
69
-	$couleur = ltrim($couleur, '#');
70
-	if (strlen($couleur) === 3) {
71
-		$couleur = $couleur[0] . $couleur[0] . $couleur[1] . $couleur[1] . $couleur[2] . $couleur[2];
72
-	}
73
-	$retour = [];
74
-	$retour['red'] = hexdec(substr($couleur, 0, 2));
75
-	$retour['green'] = hexdec(substr($couleur, 2, 2));
76
-	$retour['blue'] = hexdec(substr($couleur, 4, 2));
77
-
78
-	return $retour;
67
+    $couleur ??= '';
68
+    $couleur = couleur_html_to_hex($couleur);
69
+    $couleur = ltrim($couleur, '#');
70
+    if (strlen($couleur) === 3) {
71
+        $couleur = $couleur[0] . $couleur[0] . $couleur[1] . $couleur[1] . $couleur[2] . $couleur[2];
72
+    }
73
+    $retour = [];
74
+    $retour['red'] = hexdec(substr($couleur, 0, 2));
75
+    $retour['green'] = hexdec(substr($couleur, 2, 2));
76
+    $retour['blue'] = hexdec(substr($couleur, 4, 2));
77
+
78
+    return $retour;
79 79
 }
80 80
 
81 81
 
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
  *     Le code de la couleur en hexadécimal.
93 93
  */
94 94
 function _couleur_hsl_to_hex($hue, $saturation, $lightness) {
95
-	$rgb = _couleur_hsl_to_rgb($hue, $saturation, $lightness);
96
-	return _couleur_dec_to_hex($rgb['r'], $rgb['g'], $rgb['b']);
95
+    $rgb = _couleur_hsl_to_rgb($hue, $saturation, $lightness);
96
+    return _couleur_dec_to_hex($rgb['r'], $rgb['g'], $rgb['b']);
97 97
 }
98 98
 
99 99
 /**
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
  *     Un tableau des 3 éléments : teinte, saturation, luminosité.
106 106
  */
107 107
 function _couleur_hex_to_hsl($couleur) {
108
-	$rgb = _couleur_hex_to_dec($couleur);
109
-	return _couleur_rgb_to_hsl($rgb['red'], $rgb['green'], $rgb['blue']);
108
+    $rgb = _couleur_hex_to_dec($couleur);
109
+    return _couleur_rgb_to_hsl($rgb['red'], $rgb['green'], $rgb['blue']);
110 110
 }
111 111
 
112 112
 /**
@@ -121,59 +121,59 @@  discard block
 block discarded – undo
121 121
  * @return array
122 122
  */
123 123
 function _couleur_rgb_to_hsl($R, $G, $B) {
124
-	$H = null;
125
-	$var_R = ($R / 255); // Where RGB values = 0 ÷ 255
126
-	$var_G = ($G / 255);
127
-	$var_B = ($B / 255);
128
-
129
-	$var_Min = min($var_R, $var_G, $var_B);   //Min. value of RGB
130
-	$var_Max = max($var_R, $var_G, $var_B);   //Max. value of RGB
131
-	$del_Max = $var_Max - $var_Min;           //Delta RGB value
132
-
133
-	$L = ($var_Max + $var_Min) / 2;
134
-
135
-	if ($del_Max == 0) {
136
-		//This is a gray, no chroma...
137
-		$H = 0; //HSL results = 0 ÷ 1
138
-		$S = 0;
139
-	} else {
140
-		// Chromatic data...
141
-		if ($L < 0.5) {
142
-			$S = $del_Max / ($var_Max + $var_Min);
143
-		} else {
144
-			$S = $del_Max / (2 - $var_Max - $var_Min);
145
-		}
146
-
147
-		$del_R = ((($var_Max - $var_R) / 6) + ($del_Max / 2)) / $del_Max;
148
-		$del_G = ((($var_Max - $var_G) / 6) + ($del_Max / 2)) / $del_Max;
149
-		$del_B = ((($var_Max - $var_B) / 6) + ($del_Max / 2)) / $del_Max;
150
-
151
-		if ($var_R == $var_Max) {
152
-			$H = $del_B - $del_G;
153
-		} else {
154
-			if ($var_G == $var_Max) {
155
-				$H = (1 / 3) + $del_R - $del_B;
156
-			} else {
157
-				if ($var_B == $var_Max) {
158
-					$H = (2 / 3) + $del_G - $del_R;
159
-				}
160
-			}
161
-		}
162
-
163
-		if ($H < 0) {
164
-			$H += 1;
165
-		}
166
-		if ($H > 1) {
167
-			$H -= 1;
168
-		}
169
-	}
170
-
171
-	$ret = [];
172
-	$ret['h'] = $H;
173
-	$ret['s'] = $S;
174
-	$ret['l'] = $L;
175
-
176
-	return $ret;
124
+    $H = null;
125
+    $var_R = ($R / 255); // Where RGB values = 0 ÷ 255
126
+    $var_G = ($G / 255);
127
+    $var_B = ($B / 255);
128
+
129
+    $var_Min = min($var_R, $var_G, $var_B);   //Min. value of RGB
130
+    $var_Max = max($var_R, $var_G, $var_B);   //Max. value of RGB
131
+    $del_Max = $var_Max - $var_Min;           //Delta RGB value
132
+
133
+    $L = ($var_Max + $var_Min) / 2;
134
+
135
+    if ($del_Max == 0) {
136
+        //This is a gray, no chroma...
137
+        $H = 0; //HSL results = 0 ÷ 1
138
+        $S = 0;
139
+    } else {
140
+        // Chromatic data...
141
+        if ($L < 0.5) {
142
+            $S = $del_Max / ($var_Max + $var_Min);
143
+        } else {
144
+            $S = $del_Max / (2 - $var_Max - $var_Min);
145
+        }
146
+
147
+        $del_R = ((($var_Max - $var_R) / 6) + ($del_Max / 2)) / $del_Max;
148
+        $del_G = ((($var_Max - $var_G) / 6) + ($del_Max / 2)) / $del_Max;
149
+        $del_B = ((($var_Max - $var_B) / 6) + ($del_Max / 2)) / $del_Max;
150
+
151
+        if ($var_R == $var_Max) {
152
+            $H = $del_B - $del_G;
153
+        } else {
154
+            if ($var_G == $var_Max) {
155
+                $H = (1 / 3) + $del_R - $del_B;
156
+            } else {
157
+                if ($var_B == $var_Max) {
158
+                    $H = (2 / 3) + $del_G - $del_R;
159
+                }
160
+            }
161
+        }
162
+
163
+        if ($H < 0) {
164
+            $H += 1;
165
+        }
166
+        if ($H > 1) {
167
+            $H -= 1;
168
+        }
169
+    }
170
+
171
+    $ret = [];
172
+    $ret['h'] = $H;
173
+    $ret['s'] = $S;
174
+    $ret['l'] = $L;
175
+
176
+    return $ret;
177 177
 }
178 178
 
179 179
 
@@ -189,52 +189,52 @@  discard block
 block discarded – undo
189 189
  * @return array
190 190
  */
191 191
 function _couleur_hsl_to_rgb($H, $S, $L) {
192
-	// helper
193
-	$hue_2_rgb = function ($v1, $v2, $vH) {
194
-		if ($vH < 0) {
195
-			$vH += 1;
196
-		}
197
-		if ($vH > 1) {
198
-			$vH -= 1;
199
-		}
200
-		if ((6 * $vH) < 1) {
201
-			return ($v1 + ($v2 - $v1) * 6 * $vH);
202
-		}
203
-		if ((2 * $vH) < 1) {
204
-			return ($v2);
205
-		}
206
-		if ((3 * $vH) < 2) {
207
-			return ($v1 + ($v2 - $v1) * ((2 / 3) - $vH) * 6);
208
-		}
209
-
210
-		return ($v1);
211
-	};
212
-
213
-	if ($S == 0) {
214
-		// HSV values = 0 -> 1
215
-		$R = $L * 255;
216
-		$G = $L * 255;
217
-		$B = $L * 255;
218
-	} else {
219
-		if ($L < 0.5) {
220
-			$var_2 = $L * (1 + $S);
221
-		} else {
222
-			$var_2 = ($L + $S) - ($S * $L);
223
-		}
224
-
225
-		$var_1 = 2 * $L - $var_2;
226
-
227
-		$R = 255 * $hue_2_rgb($var_1, $var_2, $H + (1 / 3));
228
-		$G = 255 * $hue_2_rgb($var_1, $var_2, $H);
229
-		$B = 255 * $hue_2_rgb($var_1, $var_2, $H - (1 / 3));
230
-	}
231
-
232
-	$ret = [];
233
-	$ret['r'] = floor($R);
234
-	$ret['g'] = floor($G);
235
-	$ret['b'] = floor($B);
236
-
237
-	return $ret;
192
+    // helper
193
+    $hue_2_rgb = function ($v1, $v2, $vH) {
194
+        if ($vH < 0) {
195
+            $vH += 1;
196
+        }
197
+        if ($vH > 1) {
198
+            $vH -= 1;
199
+        }
200
+        if ((6 * $vH) < 1) {
201
+            return ($v1 + ($v2 - $v1) * 6 * $vH);
202
+        }
203
+        if ((2 * $vH) < 1) {
204
+            return ($v2);
205
+        }
206
+        if ((3 * $vH) < 2) {
207
+            return ($v1 + ($v2 - $v1) * ((2 / 3) - $vH) * 6);
208
+        }
209
+
210
+        return ($v1);
211
+    };
212
+
213
+    if ($S == 0) {
214
+        // HSV values = 0 -> 1
215
+        $R = $L * 255;
216
+        $G = $L * 255;
217
+        $B = $L * 255;
218
+    } else {
219
+        if ($L < 0.5) {
220
+            $var_2 = $L * (1 + $S);
221
+        } else {
222
+            $var_2 = ($L + $S) - ($S * $L);
223
+        }
224
+
225
+        $var_1 = 2 * $L - $var_2;
226
+
227
+        $R = 255 * $hue_2_rgb($var_1, $var_2, $H + (1 / 3));
228
+        $G = 255 * $hue_2_rgb($var_1, $var_2, $H);
229
+        $B = 255 * $hue_2_rgb($var_1, $var_2, $H - (1 / 3));
230
+    }
231
+
232
+    $ret = [];
233
+    $ret['r'] = floor($R);
234
+    $ret['g'] = floor($G);
235
+    $ret['b'] = floor($B);
236
+
237
+    return $ret;
238 238
 }
239 239
 
240 240
 /**
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
  *     true si il faut supprimer le fichier temporaire ; false sinon.
253 253
  */
254 254
 function statut_effacer_images_temporaires($stat) {
255
-	static $statut = false; // par defaut on grave toute les images
256
-	if ($stat === 'get') {
257
-		return $statut;
258
-	}
259
-	$statut = $stat ? true : false;
255
+    static $statut = false; // par defaut on grave toute les images
256
+    if ($stat === 'get') {
257
+        return $statut;
258
+    }
259
+    $statut = $stat ? true : false;
260 260
 }
261 261
 
262 262
 
@@ -309,247 +309,247 @@  discard block
 block discarded – undo
309 309
  *     - array : tableau décrivant de l'image
310 310
  */
311 311
 function _image_valeurs_trans($img, $effet, $forcer_format = false, $fonction_creation = null, $find_in_path = false, $support_svg = false) {
312
-	$ret = [];
313
-	$f = null;
314
-	static $images_recalcul = [];
315
-	if (strlen($img) == 0) {
316
-		return false;
317
-	}
318
-
319
-	$source = trim(extraire_attribut($img, 'src') ?? '');
320
-	if (strlen($source) < 1) {
321
-		$source = $img;
322
-		$img = "<img src='$source' />";
323
-	} elseif (
324
-		preg_match('@^data:image/([^;]*);base64,(.*)$@isS', $source, $regs)
325
-		and $extension = _image_trouver_extension_depuis_mime('image/' . $regs[1])
326
-		and in_array($extension, _image_extensions_acceptees_en_entree())
327
-	) {
328
-		# gerer img src="data:....base64"
329
-		$local = sous_repertoire(_DIR_VAR, 'image-data') . md5($regs[2]) . '.' . _image_extension_normalisee($extension);
330
-		if (!file_exists($local)) {
331
-			ecrire_fichier($local, base64_decode($regs[2]));
332
-		}
333
-		if ($sanitizer = charger_fonction($extension, 'sanitizer', true)) {
334
-			$sanitizer($local);
335
-		}
336
-		$source = $local;
337
-		$img = inserer_attribut($img, 'src', $source);
338
-		# eviter les mauvaises surprises lors de conversions de format
339
-		$img = inserer_attribut($img, 'width', '');
340
-		$img = inserer_attribut($img, 'height', '');
341
-	}
342
-
343
-	// les protocoles web prennent au moins 3 lettres
344
-	if (tester_url_absolue($source)) {
345
-		include_spip('inc/distant');
346
-		$fichier = _DIR_RACINE . copie_locale($source);
347
-		if (!$fichier) {
348
-			return '';
349
-		}
350
-		if (
351
-			$extension = _image_trouver_extension($fichier)
352
-			and $sanitizer = charger_fonction($extension, 'sanitizer', true)
353
-		) {
354
-			$sanitizer($fichier);
355
-		}
356
-	} else {
357
-		// enlever le timestamp eventuel
358
-		if (strpos($source, '?') !== false) {
359
-			$source = preg_replace(',[?][0-9]+$,', '', $source);
360
-		}
361
-		if (
362
-			strpos($source, '?') !== false
363
-			and strncmp($source, _DIR_IMG, strlen(_DIR_IMG)) == 0
364
-			and file_exists($f = preg_replace(',[?].*$,', '', $source))
365
-		) {
366
-			$source = $f;
367
-		}
368
-		$fichier = $source;
369
-	}
370
-
371
-	$terminaison_dest = '';
372
-	if ($terminaison = _image_trouver_extension($fichier)) {
373
-		$terminaison_dest = ($terminaison == 'gif') ? 'png' : $terminaison;
374
-	}
375
-
376
-	if (
377
-		$forcer_format !== false
378
-		// ignorer forcer_format si on a une image svg, que le filtre appelant ne supporte pas SVG, et que le forcage est un autre format image
379
-		and ($terminaison_dest !== 'svg' or $support_svg or !in_array($forcer_format, _image_extensions_acceptees_en_sortie()))
380
-	) {
381
-		$terminaison_dest = $forcer_format;
382
-	}
383
-
384
-	if (!$terminaison_dest) {
385
-		return false;
386
-	}
387
-
388
-	$nom_fichier = substr($fichier, 0, strlen($fichier) - (strlen($terminaison) + 1));
389
-	$fichier_dest = $nom_fichier;
390
-	if (
391
-		($find_in_path and $f = find_in_path($fichier) and $fichier = $f)
392
-		or @file_exists($f = $fichier)
393
-	) {
394
-		// on passe la balise img a taille image qui exraira les attributs si possible
395
-		// au lieu de faire un acces disque sur le fichier
396
-		[$ret['hauteur'], $ret['largeur']] = taille_image($find_in_path ? $f : $img);
397
-		$date_src = @filemtime($f);
398
-	} elseif (
399
-		@file_exists($f = "$fichier.src")
400
-		and lire_fichier($f, $valeurs)
401
-		and $valeurs = unserialize($valeurs)
402
-		and isset($valeurs['hauteur_dest'])
403
-		and isset($valeurs['largeur_dest'])
404
-	) {
405
-		$ret['hauteur'] = $valeurs['hauteur_dest'];
406
-		$ret['largeur'] = $valeurs['largeur_dest'];
407
-		$date_src = $valeurs['date'];
408
-	} // pas de fichier source par la
409
-	else {
410
-		return false;
411
-	}
412
-
413
-	// pas de taille mesurable ?
414
-	if (!$ret['hauteur']
415
-		or !($ret['hauteur'] = intval(round($ret['hauteur'])))
416
-		or !$ret['largeur']
417
-		or !($ret['largeur'] = intval(round($ret['largeur'])))
418
-	) {
419
-		return false;
420
-	}
421
-
422
-	// les images calculees dependent du chemin du fichier source
423
-	// pour une meme image source et un meme filtre on aboutira a 2 fichiers selon si l'appel est dans le public ou dans le prive
424
-	// ce n'est pas totalement optimal en terme de stockage, mais chaque image est associee a un fichier .src
425
-	// qui contient la methode de reconstrucion (le filtre + les arguments d'appel) et les arguments different entre prive et public
426
-	// la mise en commun du fichier image cree donc un bug et des problemes qui necessiteraient beaucoup de complexite de code
427
-	// alors que ca concerne peu de site au final
428
-	// la release de r23632+r23633+r23634 a provoque peu de remontee de bug attestant du peu de sites impactes
429
-	$identifiant = $fichier;
430
-
431
-	// cas general :
432
-	// on a un dossier cache commun et un nom de fichier qui varie avec l'effet
433
-	// cas particulier de reduire :
434
-	// un cache par dimension, et le nom de fichier est conserve, suffixe par la dimension aussi
435
-	$cache = 'cache-gd2';
436
-	if (substr($effet, 0, 7) == 'reduire') {
437
-		[, $maxWidth, $maxHeight] = explode('-', $effet);
438
-		[$destWidth, $destHeight] = _image_ratio($ret['largeur'], $ret['hauteur'], $maxWidth, $maxHeight);
439
-		$ret['largeur_dest'] = $destWidth;
440
-		$ret['hauteur_dest'] = $destHeight;
441
-		$effet = "L{$destWidth}xH$destHeight";
442
-		$cache = 'cache-vignettes';
443
-		$fichier_dest = basename($fichier_dest);
444
-		if (($ret['largeur'] <= $maxWidth) && ($ret['hauteur'] <= $maxHeight)) {
445
-			// on garde la terminaison initiale car image simplement copiee
446
-			// et on postfixe son nom avec un md5 du path
447
-			$terminaison_dest = $terminaison;
448
-			$fichier_dest .= '-' . substr(md5("$identifiant"), 0, 5);
449
-		} else {
450
-			$fichier_dest .= '-' . substr(md5("$identifiant-$effet"), 0, 5);
451
-		}
452
-		$cache = sous_repertoire(_DIR_VAR, $cache);
453
-		$cache = sous_repertoire($cache, $effet);
454
-	} else {
455
-		$fichier_dest = md5("$identifiant-$effet");
456
-		$cache = sous_repertoire(_DIR_VAR, $cache);
457
-		$cache = sous_repertoire($cache, substr($fichier_dest, 0, 2));
458
-		$fichier_dest = substr($fichier_dest, 2);
459
-	}
460
-
461
-	$fichier_dest = $cache . $fichier_dest . '.' . $terminaison_dest;
462
-
463
-	$GLOBALS['images_calculees'][] = $fichier_dest;
464
-
465
-	$creer = true;
466
-	// si recalcul des images demande, recalculer chaque image une fois
467
-	if (defined('_VAR_IMAGES') and _VAR_IMAGES and !isset($images_recalcul[$fichier_dest])) {
468
-		$images_recalcul[$fichier_dest] = true;
469
-	} else {
470
-		if (@file_exists($f = $fichier_dest)) {
471
-			if (filemtime($f) >= $date_src) {
472
-				$creer = false;
473
-			}
474
-		} else {
475
-			if (
476
-				@file_exists($f = "$fichier_dest.src")
477
-				and lire_fichier($f, $valeurs)
478
-				and $valeurs = unserialize($valeurs)
479
-				and $valeurs['date'] >= $date_src
480
-			) {
481
-				$creer = false;
482
-			}
483
-		}
484
-	}
485
-	if ($creer) {
486
-		if (!@file_exists($fichier)) {
487
-			if (!@file_exists("$fichier.src")) {
488
-				spip_log("Image absente : $fichier");
489
-
490
-				return false;
491
-			}
492
-			# on reconstruit l'image source absente a partir de la chaine des .src
493
-			reconstruire_image_intermediaire($fichier);
494
-		}
495
-	}
496
-
497
-	if ($creer) {
498
-		spip_log(
499
-			'filtre image ' . ($fonction_creation ? reset($fonction_creation) : '') . "[$effet] sur $fichier",
500
-			'images' . _LOG_DEBUG
501
-		);
502
-	}
503
-
504
-	$term_fonction = _image_trouver_extension_pertinente($fichier);
505
-	$ret['fonction_imagecreatefrom'] = '_imagecreatefrom' . $term_fonction;
506
-	$ret['fichier'] = $fichier;
507
-	$ret['fonction_image'] = '_image_image' . $terminaison_dest;
508
-	$ret['fichier_dest'] = $fichier_dest;
509
-	$ret['format_source'] = _image_extension_normalisee($terminaison);
510
-	$ret['format_dest'] = $terminaison_dest;
511
-	$ret['date_src'] = $date_src;
512
-	$ret['creer'] = $creer;
513
-	$ret['class'] = extraire_attribut($img, 'class');
514
-	$ret['alt'] = extraire_attribut($img, 'alt');
515
-	$ret['style'] = extraire_attribut($img, 'style');
516
-	$ret['tag'] = $img;
517
-	if ($fonction_creation) {
518
-		$ret['reconstruction'] = $fonction_creation;
519
-		# ecrire ici comment creer le fichier, car il est pas sur qu'on l'ecrira reelement
520
-		# cas de image_reduire qui finalement ne reduit pas l'image source
521
-		# ca evite d'essayer de le creer au prochain hit si il n'est pas la
522
-		#ecrire_fichier($ret['fichier_dest'].'.src',serialize($ret),true);
523
-	}
524
-
525
-	$ret = pipeline('image_preparer_filtre', [
526
-			'args' => [
527
-				'img' => $img,
528
-				'effet' => $effet,
529
-				'forcer_format' => $forcer_format,
530
-				'fonction_creation' => $fonction_creation,
531
-				'find_in_path' => $find_in_path,
532
-			],
533
-			'data' => $ret
534
-		]);
535
-
536
-	// une globale pour le debug en cas de crash memoire
537
-	$GLOBALS['derniere_image_calculee'] = $ret;
538
-
539
-	// traiter le cas particulier des SVG : si le filtre n'a pas annonce explicitement qu'il savait faire, on delegue
540
-	if ($term_fonction === 'svg') {
541
-		if ($creer and !$support_svg) {
542
-			process_image_svg_identite($ret);
543
-			$ret['creer'] = false;
544
-		}
545
-	}
546
-	else {
547
-		if (!function_exists($ret['fonction_imagecreatefrom'])) {
548
-			return false;
549
-		}
550
-	}
551
-
552
-	return $ret;
312
+    $ret = [];
313
+    $f = null;
314
+    static $images_recalcul = [];
315
+    if (strlen($img) == 0) {
316
+        return false;
317
+    }
318
+
319
+    $source = trim(extraire_attribut($img, 'src') ?? '');
320
+    if (strlen($source) < 1) {
321
+        $source = $img;
322
+        $img = "<img src='$source' />";
323
+    } elseif (
324
+        preg_match('@^data:image/([^;]*);base64,(.*)$@isS', $source, $regs)
325
+        and $extension = _image_trouver_extension_depuis_mime('image/' . $regs[1])
326
+        and in_array($extension, _image_extensions_acceptees_en_entree())
327
+    ) {
328
+        # gerer img src="data:....base64"
329
+        $local = sous_repertoire(_DIR_VAR, 'image-data') . md5($regs[2]) . '.' . _image_extension_normalisee($extension);
330
+        if (!file_exists($local)) {
331
+            ecrire_fichier($local, base64_decode($regs[2]));
332
+        }
333
+        if ($sanitizer = charger_fonction($extension, 'sanitizer', true)) {
334
+            $sanitizer($local);
335
+        }
336
+        $source = $local;
337
+        $img = inserer_attribut($img, 'src', $source);
338
+        # eviter les mauvaises surprises lors de conversions de format
339
+        $img = inserer_attribut($img, 'width', '');
340
+        $img = inserer_attribut($img, 'height', '');
341
+    }
342
+
343
+    // les protocoles web prennent au moins 3 lettres
344
+    if (tester_url_absolue($source)) {
345
+        include_spip('inc/distant');
346
+        $fichier = _DIR_RACINE . copie_locale($source);
347
+        if (!$fichier) {
348
+            return '';
349
+        }
350
+        if (
351
+            $extension = _image_trouver_extension($fichier)
352
+            and $sanitizer = charger_fonction($extension, 'sanitizer', true)
353
+        ) {
354
+            $sanitizer($fichier);
355
+        }
356
+    } else {
357
+        // enlever le timestamp eventuel
358
+        if (strpos($source, '?') !== false) {
359
+            $source = preg_replace(',[?][0-9]+$,', '', $source);
360
+        }
361
+        if (
362
+            strpos($source, '?') !== false
363
+            and strncmp($source, _DIR_IMG, strlen(_DIR_IMG)) == 0
364
+            and file_exists($f = preg_replace(',[?].*$,', '', $source))
365
+        ) {
366
+            $source = $f;
367
+        }
368
+        $fichier = $source;
369
+    }
370
+
371
+    $terminaison_dest = '';
372
+    if ($terminaison = _image_trouver_extension($fichier)) {
373
+        $terminaison_dest = ($terminaison == 'gif') ? 'png' : $terminaison;
374
+    }
375
+
376
+    if (
377
+        $forcer_format !== false
378
+        // ignorer forcer_format si on a une image svg, que le filtre appelant ne supporte pas SVG, et que le forcage est un autre format image
379
+        and ($terminaison_dest !== 'svg' or $support_svg or !in_array($forcer_format, _image_extensions_acceptees_en_sortie()))
380
+    ) {
381
+        $terminaison_dest = $forcer_format;
382
+    }
383
+
384
+    if (!$terminaison_dest) {
385
+        return false;
386
+    }
387
+
388
+    $nom_fichier = substr($fichier, 0, strlen($fichier) - (strlen($terminaison) + 1));
389
+    $fichier_dest = $nom_fichier;
390
+    if (
391
+        ($find_in_path and $f = find_in_path($fichier) and $fichier = $f)
392
+        or @file_exists($f = $fichier)
393
+    ) {
394
+        // on passe la balise img a taille image qui exraira les attributs si possible
395
+        // au lieu de faire un acces disque sur le fichier
396
+        [$ret['hauteur'], $ret['largeur']] = taille_image($find_in_path ? $f : $img);
397
+        $date_src = @filemtime($f);
398
+    } elseif (
399
+        @file_exists($f = "$fichier.src")
400
+        and lire_fichier($f, $valeurs)
401
+        and $valeurs = unserialize($valeurs)
402
+        and isset($valeurs['hauteur_dest'])
403
+        and isset($valeurs['largeur_dest'])
404
+    ) {
405
+        $ret['hauteur'] = $valeurs['hauteur_dest'];
406
+        $ret['largeur'] = $valeurs['largeur_dest'];
407
+        $date_src = $valeurs['date'];
408
+    } // pas de fichier source par la
409
+    else {
410
+        return false;
411
+    }
412
+
413
+    // pas de taille mesurable ?
414
+    if (!$ret['hauteur']
415
+        or !($ret['hauteur'] = intval(round($ret['hauteur'])))
416
+        or !$ret['largeur']
417
+        or !($ret['largeur'] = intval(round($ret['largeur'])))
418
+    ) {
419
+        return false;
420
+    }
421
+
422
+    // les images calculees dependent du chemin du fichier source
423
+    // pour une meme image source et un meme filtre on aboutira a 2 fichiers selon si l'appel est dans le public ou dans le prive
424
+    // ce n'est pas totalement optimal en terme de stockage, mais chaque image est associee a un fichier .src
425
+    // qui contient la methode de reconstrucion (le filtre + les arguments d'appel) et les arguments different entre prive et public
426
+    // la mise en commun du fichier image cree donc un bug et des problemes qui necessiteraient beaucoup de complexite de code
427
+    // alors que ca concerne peu de site au final
428
+    // la release de r23632+r23633+r23634 a provoque peu de remontee de bug attestant du peu de sites impactes
429
+    $identifiant = $fichier;
430
+
431
+    // cas general :
432
+    // on a un dossier cache commun et un nom de fichier qui varie avec l'effet
433
+    // cas particulier de reduire :
434
+    // un cache par dimension, et le nom de fichier est conserve, suffixe par la dimension aussi
435
+    $cache = 'cache-gd2';
436
+    if (substr($effet, 0, 7) == 'reduire') {
437
+        [, $maxWidth, $maxHeight] = explode('-', $effet);
438
+        [$destWidth, $destHeight] = _image_ratio($ret['largeur'], $ret['hauteur'], $maxWidth, $maxHeight);
439
+        $ret['largeur_dest'] = $destWidth;
440
+        $ret['hauteur_dest'] = $destHeight;
441
+        $effet = "L{$destWidth}xH$destHeight";
442
+        $cache = 'cache-vignettes';
443
+        $fichier_dest = basename($fichier_dest);
444
+        if (($ret['largeur'] <= $maxWidth) && ($ret['hauteur'] <= $maxHeight)) {
445
+            // on garde la terminaison initiale car image simplement copiee
446
+            // et on postfixe son nom avec un md5 du path
447
+            $terminaison_dest = $terminaison;
448
+            $fichier_dest .= '-' . substr(md5("$identifiant"), 0, 5);
449
+        } else {
450
+            $fichier_dest .= '-' . substr(md5("$identifiant-$effet"), 0, 5);
451
+        }
452
+        $cache = sous_repertoire(_DIR_VAR, $cache);
453
+        $cache = sous_repertoire($cache, $effet);
454
+    } else {
455
+        $fichier_dest = md5("$identifiant-$effet");
456
+        $cache = sous_repertoire(_DIR_VAR, $cache);
457
+        $cache = sous_repertoire($cache, substr($fichier_dest, 0, 2));
458
+        $fichier_dest = substr($fichier_dest, 2);
459
+    }
460
+
461
+    $fichier_dest = $cache . $fichier_dest . '.' . $terminaison_dest;
462
+
463
+    $GLOBALS['images_calculees'][] = $fichier_dest;
464
+
465
+    $creer = true;
466
+    // si recalcul des images demande, recalculer chaque image une fois
467
+    if (defined('_VAR_IMAGES') and _VAR_IMAGES and !isset($images_recalcul[$fichier_dest])) {
468
+        $images_recalcul[$fichier_dest] = true;
469
+    } else {
470
+        if (@file_exists($f = $fichier_dest)) {
471
+            if (filemtime($f) >= $date_src) {
472
+                $creer = false;
473
+            }
474
+        } else {
475
+            if (
476
+                @file_exists($f = "$fichier_dest.src")
477
+                and lire_fichier($f, $valeurs)
478
+                and $valeurs = unserialize($valeurs)
479
+                and $valeurs['date'] >= $date_src
480
+            ) {
481
+                $creer = false;
482
+            }
483
+        }
484
+    }
485
+    if ($creer) {
486
+        if (!@file_exists($fichier)) {
487
+            if (!@file_exists("$fichier.src")) {
488
+                spip_log("Image absente : $fichier");
489
+
490
+                return false;
491
+            }
492
+            # on reconstruit l'image source absente a partir de la chaine des .src
493
+            reconstruire_image_intermediaire($fichier);
494
+        }
495
+    }
496
+
497
+    if ($creer) {
498
+        spip_log(
499
+            'filtre image ' . ($fonction_creation ? reset($fonction_creation) : '') . "[$effet] sur $fichier",
500
+            'images' . _LOG_DEBUG
501
+        );
502
+    }
503
+
504
+    $term_fonction = _image_trouver_extension_pertinente($fichier);
505
+    $ret['fonction_imagecreatefrom'] = '_imagecreatefrom' . $term_fonction;
506
+    $ret['fichier'] = $fichier;
507
+    $ret['fonction_image'] = '_image_image' . $terminaison_dest;
508
+    $ret['fichier_dest'] = $fichier_dest;
509
+    $ret['format_source'] = _image_extension_normalisee($terminaison);
510
+    $ret['format_dest'] = $terminaison_dest;
511
+    $ret['date_src'] = $date_src;
512
+    $ret['creer'] = $creer;
513
+    $ret['class'] = extraire_attribut($img, 'class');
514
+    $ret['alt'] = extraire_attribut($img, 'alt');
515
+    $ret['style'] = extraire_attribut($img, 'style');
516
+    $ret['tag'] = $img;
517
+    if ($fonction_creation) {
518
+        $ret['reconstruction'] = $fonction_creation;
519
+        # ecrire ici comment creer le fichier, car il est pas sur qu'on l'ecrira reelement
520
+        # cas de image_reduire qui finalement ne reduit pas l'image source
521
+        # ca evite d'essayer de le creer au prochain hit si il n'est pas la
522
+        #ecrire_fichier($ret['fichier_dest'].'.src',serialize($ret),true);
523
+    }
524
+
525
+    $ret = pipeline('image_preparer_filtre', [
526
+            'args' => [
527
+                'img' => $img,
528
+                'effet' => $effet,
529
+                'forcer_format' => $forcer_format,
530
+                'fonction_creation' => $fonction_creation,
531
+                'find_in_path' => $find_in_path,
532
+            ],
533
+            'data' => $ret
534
+        ]);
535
+
536
+    // une globale pour le debug en cas de crash memoire
537
+    $GLOBALS['derniere_image_calculee'] = $ret;
538
+
539
+    // traiter le cas particulier des SVG : si le filtre n'a pas annonce explicitement qu'il savait faire, on delegue
540
+    if ($term_fonction === 'svg') {
541
+        if ($creer and !$support_svg) {
542
+            process_image_svg_identite($ret);
543
+            $ret['creer'] = false;
544
+        }
545
+    }
546
+    else {
547
+        if (!function_exists($ret['fonction_imagecreatefrom'])) {
548
+            return false;
549
+        }
550
+    }
551
+
552
+    return $ret;
553 553
 }
554 554
 
555 555
 
@@ -558,54 +558,54 @@  discard block
 block discarded – undo
558 558
  * @return array
559 559
  */
560 560
 function _image_extensions_acceptees_en_entree() {
561
-	static $extensions = null;
562
-	if (empty($extensions)) {
563
-		$extensions = ['png', 'gif', 'jpg', 'jpeg'];
564
-		if (!empty($GLOBALS['meta']['gd_formats'])) {
565
-			// action=tester renseigne gd_formats et detecte le support de webp
566
-			$extensions = array_merge(explode(',', $GLOBALS['meta']['gd_formats']));
567
-			$extensions = array_map('trim', $extensions);
568
-			$extensions = array_filter($extensions);
569
-			if (in_array('jpg', $extensions)) {
570
-				$extensions[] = 'jpeg';
571
-			}
572
-			$extensions = array_unique($extensions);
573
-		}
574
-		$extensions[] = 'svg'; // on le supporte toujours avec des fonctions specifiques
575
-	}
576
-
577
-	return $extensions;
561
+    static $extensions = null;
562
+    if (empty($extensions)) {
563
+        $extensions = ['png', 'gif', 'jpg', 'jpeg'];
564
+        if (!empty($GLOBALS['meta']['gd_formats'])) {
565
+            // action=tester renseigne gd_formats et detecte le support de webp
566
+            $extensions = array_merge(explode(',', $GLOBALS['meta']['gd_formats']));
567
+            $extensions = array_map('trim', $extensions);
568
+            $extensions = array_filter($extensions);
569
+            if (in_array('jpg', $extensions)) {
570
+                $extensions[] = 'jpeg';
571
+            }
572
+            $extensions = array_unique($extensions);
573
+        }
574
+        $extensions[] = 'svg'; // on le supporte toujours avec des fonctions specifiques
575
+    }
576
+
577
+    return $extensions;
578 578
 }
579 579
 
580 580
 /**
581 581
  * @return array|string[]|null
582 582
  */
583 583
 function _image_extensions_acceptees_en_sortie() {
584
-	static $extensions = null;
585
-	if (empty($extensions)) {
586
-		$extensions = _image_extensions_acceptees_en_entree();
587
-		$extensions = array_diff($extensions, ['jpeg']);
588
-		if (in_array('gif', $extensions) and !function_exists('imagegif')) {
589
-			$extensions = array_diff($extensions, ['gif']);
590
-		}
591
-		if (in_array('webp', $extensions) and !function_exists('imagewebp')) {
592
-			$extensions = array_diff($extensions, ['webp']);
593
-		}
594
-	}
595
-
596
-	return $extensions;
584
+    static $extensions = null;
585
+    if (empty($extensions)) {
586
+        $extensions = _image_extensions_acceptees_en_entree();
587
+        $extensions = array_diff($extensions, ['jpeg']);
588
+        if (in_array('gif', $extensions) and !function_exists('imagegif')) {
589
+            $extensions = array_diff($extensions, ['gif']);
590
+        }
591
+        if (in_array('webp', $extensions) and !function_exists('imagewebp')) {
592
+            $extensions = array_diff($extensions, ['webp']);
593
+        }
594
+    }
595
+
596
+    return $extensions;
597 597
 }
598 598
 
599 599
 function _image_extension_normalisee($extension) {
600
-	$extension = strtolower($extension);
601
-	if ($extension === 'jpeg') {
602
-		$extension = 'jpg';
603
-	}
604
-	return $extension;
600
+    $extension = strtolower($extension);
601
+    if ($extension === 'jpeg') {
602
+        $extension = 'jpg';
603
+    }
604
+    return $extension;
605 605
 }
606 606
 
607 607
 function _image_extensions_conservent_transparence() {
608
-	return ['png', 'webp'];
608
+    return ['png', 'webp'];
609 609
 }
610 610
 
611 611
 
@@ -615,12 +615,12 @@  discard block
 block discarded – undo
615 615
  * @return string
616 616
  */
617 617
 function _image_trouver_extension($path) {
618
-	$preg_extensions = implode('|', _image_extensions_acceptees_en_entree());
619
-	if (preg_match(",\.($preg_extensions)($|[?]),i", $path, $regs)) {
620
-		$terminaison = strtolower($regs[1]);
621
-		return $terminaison;
622
-	}
623
-	return '';
618
+    $preg_extensions = implode('|', _image_extensions_acceptees_en_entree());
619
+    if (preg_match(",\.($preg_extensions)($|[?]),i", $path, $regs)) {
620
+        $terminaison = strtolower($regs[1]);
621
+        return $terminaison;
622
+    }
623
+    return '';
624 624
 }
625 625
 
626 626
 /**
@@ -631,33 +631,33 @@  discard block
 block discarded – undo
631 631
  * @return string Extension, dans le format attendu par les fonctions 'gd' ('jpeg' pour les .jpg par exemple)
632 632
  */
633 633
 function _image_trouver_extension_pertinente($path) {
634
-	$path = supprimer_timestamp($path);
635
-	$terminaison = _image_trouver_extension($path);
636
-	if ($terminaison == 'jpg') {
637
-		$terminaison = 'jpeg';
638
-	}
639
-
640
-	if (!file_exists($path)) {
641
-		return $terminaison;
642
-	}
643
-
644
-	if (!$info = @spip_getimagesize($path)) {
645
-		return $terminaison;
646
-	}
647
-
648
-	if (isset($info['mime'])) {
649
-		$mime = $info['mime'];
650
-	}
651
-	else {
652
-		$mime = image_type_to_mime_type($info[2]);
653
-	}
654
-
655
-	$_terminaison = _image_trouver_extension_depuis_mime($mime);
656
-	if ($_terminaison and $_terminaison !== $terminaison) {
657
-		spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.' . _LOG_INFO_IMPORTANTE);
658
-		$terminaison = $_terminaison;
659
-	}
660
-	return $terminaison;
634
+    $path = supprimer_timestamp($path);
635
+    $terminaison = _image_trouver_extension($path);
636
+    if ($terminaison == 'jpg') {
637
+        $terminaison = 'jpeg';
638
+    }
639
+
640
+    if (!file_exists($path)) {
641
+        return $terminaison;
642
+    }
643
+
644
+    if (!$info = @spip_getimagesize($path)) {
645
+        return $terminaison;
646
+    }
647
+
648
+    if (isset($info['mime'])) {
649
+        $mime = $info['mime'];
650
+    }
651
+    else {
652
+        $mime = image_type_to_mime_type($info[2]);
653
+    }
654
+
655
+    $_terminaison = _image_trouver_extension_depuis_mime($mime);
656
+    if ($_terminaison and $_terminaison !== $terminaison) {
657
+        spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.' . _LOG_INFO_IMPORTANTE);
658
+        $terminaison = $_terminaison;
659
+    }
660
+    return $terminaison;
661 661
 }
662 662
 
663 663
 /**
@@ -665,36 +665,36 @@  discard block
 block discarded – undo
665 665
  * @return string
666 666
  */
667 667
 function _image_trouver_extension_depuis_mime($mime) {
668
-	switch (strtolower($mime)) {
669
-		case 'image/png':
670
-		case 'image/x-png':
671
-			$terminaison = 'png';
672
-			break;
673
-
674
-		case 'image/jpg':
675
-		case 'image/jpeg':
676
-		case 'image/pjpeg':
677
-			$terminaison = 'jpeg';
678
-			break;
679
-
680
-		case 'image/gif':
681
-			$terminaison = 'gif';
682
-			break;
683
-
684
-		case 'image/webp':
685
-		case 'image/x-webp':
686
-			$terminaison = 'webp';
687
-			break;
688
-
689
-		case 'image/svg+xml':
690
-			$terminaison = 'svg';
691
-			break;
692
-
693
-		default:
694
-			$terminaison = '';
695
-	}
696
-
697
-	return $terminaison;
668
+    switch (strtolower($mime)) {
669
+        case 'image/png':
670
+        case 'image/x-png':
671
+            $terminaison = 'png';
672
+            break;
673
+
674
+        case 'image/jpg':
675
+        case 'image/jpeg':
676
+        case 'image/pjpeg':
677
+            $terminaison = 'jpeg';
678
+            break;
679
+
680
+        case 'image/gif':
681
+            $terminaison = 'gif';
682
+            break;
683
+
684
+        case 'image/webp':
685
+        case 'image/x-webp':
686
+            $terminaison = 'webp';
687
+            break;
688
+
689
+        case 'image/svg+xml':
690
+            $terminaison = 'svg';
691
+            break;
692
+
693
+        default:
694
+            $terminaison = '';
695
+    }
696
+
697
+    return $terminaison;
698 698
 }
699 699
 
700 700
 
@@ -714,18 +714,18 @@  discard block
 block discarded – undo
714 714
  *     Une ressource de type Image GD.
715 715
  */
716 716
 function _imagecreatefrom_func(string $func, string $filename) {
717
-	if (!function_exists($func)) {
718
-		spip_log("GD indisponible : $func inexistante. Traitement $filename impossible.", _LOG_CRITIQUE);
719
-		erreur_squelette("GD indisponible : $func inexistante. Traitement $filename impossible.");
720
-		return null;
721
-	}
722
-	$img = @$func($filename);
723
-	if (!$img) {
724
-		spip_log("Erreur lecture imagecreatefromjpeg $filename", _LOG_CRITIQUE);
725
-		erreur_squelette("Erreur lecture imagecreatefromjpeg $filename");
726
-		$img = imagecreate(10, 10);
727
-	}
728
-	return $img;
717
+    if (!function_exists($func)) {
718
+        spip_log("GD indisponible : $func inexistante. Traitement $filename impossible.", _LOG_CRITIQUE);
719
+        erreur_squelette("GD indisponible : $func inexistante. Traitement $filename impossible.");
720
+        return null;
721
+    }
722
+    $img = @$func($filename);
723
+    if (!$img) {
724
+        spip_log("Erreur lecture imagecreatefromjpeg $filename", _LOG_CRITIQUE);
725
+        erreur_squelette("Erreur lecture imagecreatefromjpeg $filename");
726
+        $img = imagecreate(10, 10);
727
+    }
728
+    return $img;
729 729
 }
730 730
 
731 731
 /**
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
  *     Une ressource de type Image GD.
742 742
  */
743 743
 function _imagecreatefromjpeg($filename) {
744
-	return _imagecreatefrom_func('imagecreatefromjpeg', $filename);
744
+    return _imagecreatefrom_func('imagecreatefromjpeg', $filename);
745 745
 }
746 746
 
747 747
 /**
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
  *     Une ressource de type Image GD.
758 758
  */
759 759
 function _imagecreatefrompng($filename) {
760
-	return _imagecreatefrom_func('imagecreatefrompng', $filename);
760
+    return _imagecreatefrom_func('imagecreatefrompng', $filename);
761 761
 }
762 762
 
763 763
 /**
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
  *     Une ressource de type Image GD.
774 774
  */
775 775
 function _imagecreatefromgif($filename) {
776
-	return _imagecreatefrom_func('imagecreatefromgif', $filename);
776
+    return _imagecreatefrom_func('imagecreatefromgif', $filename);
777 777
 }
778 778
 
779 779
 
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
  *     Une ressource de type Image GD.
791 791
  */
792 792
 function _imagecreatefromwebp($filename) {
793
-	return _imagecreatefrom_func('imagecreatefromwebp', $filename);
793
+    return _imagecreatefrom_func('imagecreatefromwebp', $filename);
794 794
 }
795 795
 
796 796
 /**
@@ -808,24 +808,24 @@  discard block
 block discarded – undo
808 808
  *     - true si une image est bien retournée.
809 809
  */
810 810
 function _image_imagepng($img, $fichier) {
811
-	if (!function_exists('imagepng')) {
812
-		return false;
813
-	}
814
-	$tmp = $fichier . '.tmp';
815
-	$ret = imagepng($img, $tmp);
816
-	if (file_exists($tmp)) {
817
-		$taille_test = @getimagesize($tmp);
818
-		if (empty($taille_test[0])) {
819
-			return false;
820
-		}
821
-
822
-		spip_unlink($fichier); // le fichier peut deja exister
823
-		@rename($tmp, $fichier);
824
-
825
-		return $ret;
826
-	}
827
-
828
-	return false;
811
+    if (!function_exists('imagepng')) {
812
+        return false;
813
+    }
814
+    $tmp = $fichier . '.tmp';
815
+    $ret = imagepng($img, $tmp);
816
+    if (file_exists($tmp)) {
817
+        $taille_test = @getimagesize($tmp);
818
+        if (empty($taille_test[0])) {
819
+            return false;
820
+        }
821
+
822
+        spip_unlink($fichier); // le fichier peut deja exister
823
+        @rename($tmp, $fichier);
824
+
825
+        return $ret;
826
+    }
827
+
828
+    return false;
829 829
 }
830 830
 
831 831
 /**
@@ -843,24 +843,24 @@  discard block
 block discarded – undo
843 843
  *     - true si une image est bien retournée.
844 844
  */
845 845
 function _image_imagegif($img, $fichier) {
846
-	if (!function_exists('imagegif')) {
847
-		return false;
848
-	}
849
-	$tmp = $fichier . '.tmp';
850
-	$ret = imagegif($img, $tmp);
851
-	if (file_exists($tmp)) {
852
-		$taille_test = @getimagesize($tmp);
853
-		if (empty($taille_test[0])) {
854
-			return false;
855
-		}
856
-
857
-		spip_unlink($fichier); // le fichier peut deja exister
858
-		@rename($tmp, $fichier);
859
-
860
-		return $ret;
861
-	}
862
-
863
-	return false;
846
+    if (!function_exists('imagegif')) {
847
+        return false;
848
+    }
849
+    $tmp = $fichier . '.tmp';
850
+    $ret = imagegif($img, $tmp);
851
+    if (file_exists($tmp)) {
852
+        $taille_test = @getimagesize($tmp);
853
+        if (empty($taille_test[0])) {
854
+            return false;
855
+        }
856
+
857
+        spip_unlink($fichier); // le fichier peut deja exister
858
+        @rename($tmp, $fichier);
859
+
860
+        return $ret;
861
+    }
862
+
863
+    return false;
864 864
 }
865 865
 
866 866
 /**
@@ -883,29 +883,29 @@  discard block
 block discarded – undo
883 883
  *     - true si une image est bien retournée.
884 884
  */
885 885
 function _image_imagejpg($img, $fichier, $qualite = _IMG_GD_QUALITE) {
886
-	if (!function_exists('imagejpeg')) {
887
-		return false;
888
-	}
889
-	$tmp = $fichier . '.tmp';
886
+    if (!function_exists('imagejpeg')) {
887
+        return false;
888
+    }
889
+    $tmp = $fichier . '.tmp';
890 890
 
891
-	// Enable interlancing
892
-	imageinterlace($img, true);
891
+    // Enable interlancing
892
+    imageinterlace($img, true);
893 893
 
894
-	$ret = imagejpeg($img, $tmp, $qualite);
894
+    $ret = imagejpeg($img, $tmp, $qualite);
895 895
 
896
-	if (file_exists($tmp)) {
897
-		$taille_test = @getimagesize($tmp);
898
-		if (empty($taille_test[0])) {
899
-			return false;
900
-		}
896
+    if (file_exists($tmp)) {
897
+        $taille_test = @getimagesize($tmp);
898
+        if (empty($taille_test[0])) {
899
+            return false;
900
+        }
901 901
 
902
-		spip_unlink($fichier); // le fichier peut deja exister
903
-		@rename($tmp, $fichier);
902
+        spip_unlink($fichier); // le fichier peut deja exister
903
+        @rename($tmp, $fichier);
904 904
 
905
-		return $ret;
906
-	}
905
+        return $ret;
906
+    }
907 907
 
908
-	return false;
908
+    return false;
909 909
 }
910 910
 
911 911
 /**
@@ -923,9 +923,9 @@  discard block
 block discarded – undo
923 923
  *     true si le fichier a bien été créé ; false sinon.
924 924
  */
925 925
 function _image_imageico($img, $fichier) {
926
-	$gd_image_array = [$img];
926
+    $gd_image_array = [$img];
927 927
 
928
-	return ecrire_fichier($fichier, phpthumb_functions::GD2ICOstring($gd_image_array));
928
+    return ecrire_fichier($fichier, phpthumb_functions::GD2ICOstring($gd_image_array));
929 929
 }
930 930
 
931 931
 
@@ -944,24 +944,24 @@  discard block
 block discarded – undo
944 944
  *     - true si une image est bien retournée.
945 945
  */
946 946
 function _image_imagewebp($img, $fichier, $qualite = _IMG_GD_QUALITE) {
947
-	if (!function_exists('imagewebp')) {
948
-		return false;
949
-	}
950
-	$tmp = $fichier . '.tmp';
951
-	$ret = imagewebp($img, $tmp, $qualite);
952
-	if (file_exists($tmp)) {
953
-		$taille_test = @getimagesize($tmp);
954
-		if (empty($taille_test[0])) {
955
-			return false;
956
-		}
957
-
958
-		spip_unlink($fichier); // le fichier peut deja exister
959
-		@rename($tmp, $fichier);
960
-
961
-		return $ret;
962
-	}
963
-
964
-	return false;
947
+    if (!function_exists('imagewebp')) {
948
+        return false;
949
+    }
950
+    $tmp = $fichier . '.tmp';
951
+    $ret = imagewebp($img, $tmp, $qualite);
952
+    if (file_exists($tmp)) {
953
+        $taille_test = @getimagesize($tmp);
954
+        if (empty($taille_test[0])) {
955
+            return false;
956
+        }
957
+
958
+        spip_unlink($fichier); // le fichier peut deja exister
959
+        @rename($tmp, $fichier);
960
+
961
+        return $ret;
962
+    }
963
+
964
+    return false;
965 965
 }
966 966
 
967 967
 /**
@@ -981,35 +981,35 @@  discard block
 block discarded – undo
981 981
  */
982 982
 function _image_imagesvg($img, $fichier) {
983 983
 
984
-	$tmp = $fichier . '.tmp';
985
-	if (strpos($img, '<') === false) {
986
-		$img = supprimer_timestamp($img);
987
-		if (!file_exists($img)) {
988
-			return false;
989
-		}
990
-		@copy($img, $tmp);
991
-		if (filesize($tmp) == filesize($img)) {
992
-			spip_unlink($fichier); // le fichier peut deja exister
993
-			@rename($tmp, $fichier);
994
-			return true;
995
-		}
996
-		return false;
997
-	}
998
-
999
-	file_put_contents($tmp, $img);
1000
-	if (file_exists($tmp)) {
1001
-		$taille_test = spip_getimagesize($tmp);
1002
-		if (empty($taille_test[0])) {
1003
-			return false;
1004
-		}
1005
-
1006
-		spip_unlink($fichier); // le fichier peut deja exister
1007
-		@rename($tmp, $fichier);
1008
-
1009
-		return true;
1010
-	}
1011
-
1012
-	return false;
984
+    $tmp = $fichier . '.tmp';
985
+    if (strpos($img, '<') === false) {
986
+        $img = supprimer_timestamp($img);
987
+        if (!file_exists($img)) {
988
+            return false;
989
+        }
990
+        @copy($img, $tmp);
991
+        if (filesize($tmp) == filesize($img)) {
992
+            spip_unlink($fichier); // le fichier peut deja exister
993
+            @rename($tmp, $fichier);
994
+            return true;
995
+        }
996
+        return false;
997
+    }
998
+
999
+    file_put_contents($tmp, $img);
1000
+    if (file_exists($tmp)) {
1001
+        $taille_test = spip_getimagesize($tmp);
1002
+        if (empty($taille_test[0])) {
1003
+            return false;
1004
+        }
1005
+
1006
+        spip_unlink($fichier); // le fichier peut deja exister
1007
+        @rename($tmp, $fichier);
1008
+
1009
+        return true;
1010
+    }
1011
+
1012
+    return false;
1013 1013
 }
1014 1014
 
1015 1015
 
@@ -1037,30 +1037,30 @@  discard block
 block discarded – undo
1037 1037
  *     - false sinon.
1038 1038
  */
1039 1039
 function _image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE, $fonction = null) {
1040
-	if (is_null($fonction)) {
1041
-		$fonction = '_image_image' . $valeurs['format_dest'];
1042
-	}
1043
-	$ret = false;
1044
-	#un flag pour reperer les images gravees
1045
-	$lock = (
1046
-		!statut_effacer_images_temporaires('get') // si la fonction n'a pas ete activee, on grave tout
1047
-		or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'] . '.src'))
1048
-	);
1049
-	if (
1050
-		function_exists($fonction)
1051
-		&& ($ret = $fonction($img, $valeurs['fichier_dest'], $qualite)) # on a reussi a creer l'image
1052
-		&& isset($valeurs['reconstruction']) # et on sait comment la resonctruire le cas echeant
1053
-		&& !$lock
1054
-	) {
1055
-		if (@file_exists($valeurs['fichier_dest'])) {
1056
-			// dans tous les cas mettre a jour la taille de l'image finale
1057
-			[$valeurs['hauteur_dest'], $valeurs['largeur_dest']] = taille_image($valeurs['fichier_dest']);
1058
-			$valeurs['date'] = @filemtime($valeurs['fichier_dest']); // pour la retrouver apres disparition
1059
-			ecrire_fichier($valeurs['fichier_dest'] . '.src', serialize($valeurs), true);
1060
-		}
1061
-	}
1062
-
1063
-	return $ret;
1040
+    if (is_null($fonction)) {
1041
+        $fonction = '_image_image' . $valeurs['format_dest'];
1042
+    }
1043
+    $ret = false;
1044
+    #un flag pour reperer les images gravees
1045
+    $lock = (
1046
+        !statut_effacer_images_temporaires('get') // si la fonction n'a pas ete activee, on grave tout
1047
+        or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'] . '.src'))
1048
+    );
1049
+    if (
1050
+        function_exists($fonction)
1051
+        && ($ret = $fonction($img, $valeurs['fichier_dest'], $qualite)) # on a reussi a creer l'image
1052
+        && isset($valeurs['reconstruction']) # et on sait comment la resonctruire le cas echeant
1053
+        && !$lock
1054
+    ) {
1055
+        if (@file_exists($valeurs['fichier_dest'])) {
1056
+            // dans tous les cas mettre a jour la taille de l'image finale
1057
+            [$valeurs['hauteur_dest'], $valeurs['largeur_dest']] = taille_image($valeurs['fichier_dest']);
1058
+            $valeurs['date'] = @filemtime($valeurs['fichier_dest']); // pour la retrouver apres disparition
1059
+            ecrire_fichier($valeurs['fichier_dest'] . '.src', serialize($valeurs), true);
1060
+        }
1061
+    }
1062
+
1063
+    return $ret;
1064 1064
 }
1065 1065
 
1066 1066
 /**
@@ -1073,27 +1073,27 @@  discard block
 block discarded – undo
1073 1073
  *     Chemin vers le fichier manquant
1074 1074
  **/
1075 1075
 function reconstruire_image_intermediaire($fichier_manquant) {
1076
-	$reconstruire = [];
1077
-	$fichier = $fichier_manquant;
1078
-	while (
1079
-		strpos($fichier, '://') === false
1080
-		and !@file_exists($fichier)
1081
-		and lire_fichier($src = "$fichier.src", $source)
1082
-		and $valeurs = unserialize($source)
1083
-		and ($fichier = $valeurs['fichier']) # l'origine est connue (on ne verifie pas son existence, qu'importe ...)
1084
-	) {
1085
-		spip_unlink($src); // si jamais on a un timeout pendant la reconstruction, elle se fera naturellement au hit suivant
1086
-		$reconstruire[] = $valeurs['reconstruction'];
1087
-	}
1088
-	while (count($reconstruire)) {
1089
-		$r = array_pop($reconstruire);
1090
-		$fonction = $r[0];
1091
-		$args = $r[1];
1092
-		$fonction(...$args);
1093
-	}
1094
-	// cette image intermediaire est commune a plusieurs series de filtre, il faut la conserver
1095
-	// mais l'on peut nettoyer les miettes de sa creation
1096
-	ramasse_miettes($fichier_manquant);
1076
+    $reconstruire = [];
1077
+    $fichier = $fichier_manquant;
1078
+    while (
1079
+        strpos($fichier, '://') === false
1080
+        and !@file_exists($fichier)
1081
+        and lire_fichier($src = "$fichier.src", $source)
1082
+        and $valeurs = unserialize($source)
1083
+        and ($fichier = $valeurs['fichier']) # l'origine est connue (on ne verifie pas son existence, qu'importe ...)
1084
+    ) {
1085
+        spip_unlink($src); // si jamais on a un timeout pendant la reconstruction, elle se fera naturellement au hit suivant
1086
+        $reconstruire[] = $valeurs['reconstruction'];
1087
+    }
1088
+    while (count($reconstruire)) {
1089
+        $r = array_pop($reconstruire);
1090
+        $fonction = $r[0];
1091
+        $args = $r[1];
1092
+        $fonction(...$args);
1093
+    }
1094
+    // cette image intermediaire est commune a plusieurs series de filtre, il faut la conserver
1095
+    // mais l'on peut nettoyer les miettes de sa creation
1096
+    ramasse_miettes($fichier_manquant);
1097 1097
 }
1098 1098
 
1099 1099
 /**
@@ -1113,28 +1113,28 @@  discard block
 block discarded – undo
1113 1113
  *     Chemin du fichier d'image calculé
1114 1114
  **/
1115 1115
 function ramasse_miettes($fichier) {
1116
-	if (
1117
-		strpos($fichier, '://') !== false
1118
-		or !lire_fichier($src = "$fichier.src", $source)
1119
-		or !$valeurs = unserialize($source)
1120
-	) {
1121
-		return;
1122
-	}
1123
-	spip_unlink($src); # on supprime la reference a sa source pour marquer cette image comme non intermediaire
1124
-	while (
1125
-		($fichier = $valeurs['fichier']) # l'origine est connue (on ne verifie pas son existence, qu'importe ...)
1126
-		and (substr($fichier, 0, strlen(_DIR_VAR)) == _DIR_VAR) # et est dans local
1127
-		and (lire_fichier(
1128
-			$src = "$fichier.src",
1129
-			$source
1130
-		)) # le fichier a une source connue (c'est donc une image calculee intermediaire)
1131
-		and ($valeurs = unserialize($source))  # et valide
1132
-	) {
1133
-		# on efface le fichier
1134
-		spip_unlink($fichier);
1135
-		# mais laisse le .src qui permet de savoir comment reconstruire l'image si besoin
1136
-		#spip_unlink($src);
1137
-	}
1116
+    if (
1117
+        strpos($fichier, '://') !== false
1118
+        or !lire_fichier($src = "$fichier.src", $source)
1119
+        or !$valeurs = unserialize($source)
1120
+    ) {
1121
+        return;
1122
+    }
1123
+    spip_unlink($src); # on supprime la reference a sa source pour marquer cette image comme non intermediaire
1124
+    while (
1125
+        ($fichier = $valeurs['fichier']) # l'origine est connue (on ne verifie pas son existence, qu'importe ...)
1126
+        and (substr($fichier, 0, strlen(_DIR_VAR)) == _DIR_VAR) # et est dans local
1127
+        and (lire_fichier(
1128
+            $src = "$fichier.src",
1129
+            $source
1130
+        )) # le fichier a une source connue (c'est donc une image calculee intermediaire)
1131
+        and ($valeurs = unserialize($source))  # et valide
1132
+    ) {
1133
+        # on efface le fichier
1134
+        spip_unlink($fichier);
1135
+        # mais laisse le .src qui permet de savoir comment reconstruire l'image si besoin
1136
+        #spip_unlink($src);
1137
+    }
1138 1138
 }
1139 1139
 
1140 1140
 
@@ -1159,31 +1159,31 @@  discard block
 block discarded – undo
1159 1159
  *     Code HTML de l'image
1160 1160
  **/
1161 1161
 function image_graver($img) {
1162
-	// appeler le filtre post_image_filtrer qui permet de faire
1163
-	// des traitements auto a la fin d'une serie de filtres
1164
-	$img = pipeline('post_image_filtrer', $img);
1165
-
1166
-	$fichier_ori = $fichier = extraire_attribut($img, 'src');
1167
-	if (($p = strpos($fichier, '?')) !== false) {
1168
-		$fichier = substr($fichier, 0, $p);
1169
-	}
1170
-	if (strlen($fichier) < 1) {
1171
-		$fichier = $img;
1172
-	}
1173
-	# si jamais le fichier final n'a pas ete calcule car suppose temporaire
1174
-	# et qu'il ne s'agit pas d'une URL
1175
-	if (strpos($fichier, '://') === false and !@file_exists($fichier)) {
1176
-		reconstruire_image_intermediaire($fichier);
1177
-	}
1178
-	ramasse_miettes($fichier);
1179
-
1180
-	// ajouter le timestamp si besoin
1181
-	if (strpos($fichier_ori, '?') === false) {
1182
-		// on utilise str_replace pour attraper le onmouseover des logo si besoin
1183
-		$img = str_replace($fichier_ori, timestamp($fichier_ori), $img);
1184
-	}
1185
-
1186
-	return $img;
1162
+    // appeler le filtre post_image_filtrer qui permet de faire
1163
+    // des traitements auto a la fin d'une serie de filtres
1164
+    $img = pipeline('post_image_filtrer', $img);
1165
+
1166
+    $fichier_ori = $fichier = extraire_attribut($img, 'src');
1167
+    if (($p = strpos($fichier, '?')) !== false) {
1168
+        $fichier = substr($fichier, 0, $p);
1169
+    }
1170
+    if (strlen($fichier) < 1) {
1171
+        $fichier = $img;
1172
+    }
1173
+    # si jamais le fichier final n'a pas ete calcule car suppose temporaire
1174
+    # et qu'il ne s'agit pas d'une URL
1175
+    if (strpos($fichier, '://') === false and !@file_exists($fichier)) {
1176
+        reconstruire_image_intermediaire($fichier);
1177
+    }
1178
+    ramasse_miettes($fichier);
1179
+
1180
+    // ajouter le timestamp si besoin
1181
+    if (strpos($fichier_ori, '?') === false) {
1182
+        // on utilise str_replace pour attraper le onmouseover des logo si besoin
1183
+        $img = str_replace($fichier_ori, timestamp($fichier_ori), $img);
1184
+    }
1185
+
1186
+    return $img;
1187 1187
 }
1188 1188
 
1189 1189
 /**
@@ -1210,34 +1210,34 @@  discard block
 block discarded – undo
1210 1210
  *     Code html modifié de la balise.
1211 1211
  **/
1212 1212
 function _image_tag_changer_taille($tag, $width, $height, $style = false) {
1213
-	if ($style === false) {
1214
-		$style = extraire_attribut($tag, 'style');
1215
-	}
1216
-
1217
-	// enlever le width et height du style
1218
-	if ($style) {
1219
-		$style = preg_replace(',(^|;)\s*(width|height)\s*:\s*[^;]+,ims', '', $style);
1220
-	}
1221
-	if ($style and $style[0] === ';') {
1222
-		$style = substr($style, 1);
1223
-	}
1224
-
1225
-	// mettre des attributs de width et height sur les images,
1226
-	// ca accelere le rendu du navigateur
1227
-	// ca permet aux navigateurs de reserver la bonne taille
1228
-	// quand on a desactive l'affichage des images.
1229
-	$tag = inserer_attribut($tag, 'width', round($width));
1230
-	$tag = inserer_attribut($tag, 'height', round($height));
1231
-
1232
-	// attributs deprecies. Transformer en CSS
1233
-	if ($espace = extraire_attribut($tag, 'hspace')) {
1234
-		$style = "margin:{$espace}px;" . $style;
1235
-		$tag = inserer_attribut($tag, 'hspace', '');
1236
-	}
1237
-
1238
-	$tag = inserer_attribut($tag, 'style', (string) $style, true, $style ? false : true);
1239
-
1240
-	return $tag;
1213
+    if ($style === false) {
1214
+        $style = extraire_attribut($tag, 'style');
1215
+    }
1216
+
1217
+    // enlever le width et height du style
1218
+    if ($style) {
1219
+        $style = preg_replace(',(^|;)\s*(width|height)\s*:\s*[^;]+,ims', '', $style);
1220
+    }
1221
+    if ($style and $style[0] === ';') {
1222
+        $style = substr($style, 1);
1223
+    }
1224
+
1225
+    // mettre des attributs de width et height sur les images,
1226
+    // ca accelere le rendu du navigateur
1227
+    // ca permet aux navigateurs de reserver la bonne taille
1228
+    // quand on a desactive l'affichage des images.
1229
+    $tag = inserer_attribut($tag, 'width', round($width));
1230
+    $tag = inserer_attribut($tag, 'height', round($height));
1231
+
1232
+    // attributs deprecies. Transformer en CSS
1233
+    if ($espace = extraire_attribut($tag, 'hspace')) {
1234
+        $style = "margin:{$espace}px;" . $style;
1235
+        $tag = inserer_attribut($tag, 'hspace', '');
1236
+    }
1237
+
1238
+    $tag = inserer_attribut($tag, 'style', (string) $style, true, $style ? false : true);
1239
+
1240
+    return $tag;
1241 1241
 }
1242 1242
 
1243 1243
 
@@ -1263,72 +1263,72 @@  discard block
 block discarded – undo
1263 1263
  *     Retourne le code HTML de l'image
1264 1264
  **/
1265 1265
 function _image_ecrire_tag($valeurs, $surcharge = []) {
1266
-	$valeurs = pipeline('image_ecrire_tag_preparer', $valeurs);
1267
-
1268
-	// fermer les tags img pas bien fermes;
1269
-	$tag = str_replace('>', '/>', str_replace('/>', '>', $valeurs['tag']));
1270
-
1271
-	// le style
1272
-	$style = $valeurs['style'];
1273
-	if (isset($surcharge['style'])) {
1274
-		$style = $surcharge['style'];
1275
-		unset($surcharge['style']);
1276
-	}
1277
-
1278
-	// traiter specifiquement la largeur et la hauteur
1279
-	$width = $valeurs['largeur'];
1280
-	if (isset($surcharge['width'])) {
1281
-		$width = $surcharge['width'];
1282
-		unset($surcharge['width']);
1283
-	}
1284
-	$height = $valeurs['hauteur'];
1285
-	if (isset($surcharge['height'])) {
1286
-		$height = $surcharge['height'];
1287
-		unset($surcharge['height']);
1288
-	}
1289
-
1290
-	$tag = _image_tag_changer_taille($tag, $width, $height, $style);
1291
-	// traiter specifiquement le src qui peut etre repris dans un onmouseout
1292
-	// on remplace toute les ref a src dans le tag
1293
-	$src = extraire_attribut($tag, 'src');
1294
-	if (isset($surcharge['src'])) {
1295
-		$tag = str_replace($src, $surcharge['src'], $tag);
1296
-		// si il y a des & dans src, alors ils peuvent provenir d'un &amp
1297
-		// pas garanti comme methode, mais mieux que rien
1298
-		if (strpos($src, '&') !== false) {
1299
-			$tag = str_replace(str_replace('&', '&amp;', $src), $surcharge['src'], $tag);
1300
-		}
1301
-		$src = $surcharge['src'];
1302
-		unset($surcharge['src']);
1303
-	}
1304
-
1305
-	$class = $valeurs['class'];
1306
-	if (isset($surcharge['class'])) {
1307
-		$class = $surcharge['class'];
1308
-		unset($surcharge['class']);
1309
-	}
1310
-	if (is_scalar($class) && strlen($class)) {
1311
-		$tag = inserer_attribut($tag, 'class', $class);
1312
-	}
1313
-
1314
-	if (count($surcharge)) {
1315
-		foreach ($surcharge as $attribut => $valeur) {
1316
-			$tag = inserer_attribut($tag, $attribut, $valeur);
1317
-		}
1318
-	}
1319
-
1320
-	$tag = pipeline(
1321
-		'image_ecrire_tag_finir',
1322
-		[
1323
-			'args' => [
1324
-				'valeurs' => $valeurs,
1325
-				'surcharge' => $surcharge,
1326
-			],
1327
-			'data' => $tag
1328
-		]
1329
-	);
1330
-
1331
-	return $tag;
1266
+    $valeurs = pipeline('image_ecrire_tag_preparer', $valeurs);
1267
+
1268
+    // fermer les tags img pas bien fermes;
1269
+    $tag = str_replace('>', '/>', str_replace('/>', '>', $valeurs['tag']));
1270
+
1271
+    // le style
1272
+    $style = $valeurs['style'];
1273
+    if (isset($surcharge['style'])) {
1274
+        $style = $surcharge['style'];
1275
+        unset($surcharge['style']);
1276
+    }
1277
+
1278
+    // traiter specifiquement la largeur et la hauteur
1279
+    $width = $valeurs['largeur'];
1280
+    if (isset($surcharge['width'])) {
1281
+        $width = $surcharge['width'];
1282
+        unset($surcharge['width']);
1283
+    }
1284
+    $height = $valeurs['hauteur'];
1285
+    if (isset($surcharge['height'])) {
1286
+        $height = $surcharge['height'];
1287
+        unset($surcharge['height']);
1288
+    }
1289
+
1290
+    $tag = _image_tag_changer_taille($tag, $width, $height, $style);
1291
+    // traiter specifiquement le src qui peut etre repris dans un onmouseout
1292
+    // on remplace toute les ref a src dans le tag
1293
+    $src = extraire_attribut($tag, 'src');
1294
+    if (isset($surcharge['src'])) {
1295
+        $tag = str_replace($src, $surcharge['src'], $tag);
1296
+        // si il y a des & dans src, alors ils peuvent provenir d'un &amp
1297
+        // pas garanti comme methode, mais mieux que rien
1298
+        if (strpos($src, '&') !== false) {
1299
+            $tag = str_replace(str_replace('&', '&amp;', $src), $surcharge['src'], $tag);
1300
+        }
1301
+        $src = $surcharge['src'];
1302
+        unset($surcharge['src']);
1303
+    }
1304
+
1305
+    $class = $valeurs['class'];
1306
+    if (isset($surcharge['class'])) {
1307
+        $class = $surcharge['class'];
1308
+        unset($surcharge['class']);
1309
+    }
1310
+    if (is_scalar($class) && strlen($class)) {
1311
+        $tag = inserer_attribut($tag, 'class', $class);
1312
+    }
1313
+
1314
+    if (count($surcharge)) {
1315
+        foreach ($surcharge as $attribut => $valeur) {
1316
+            $tag = inserer_attribut($tag, $attribut, $valeur);
1317
+        }
1318
+    }
1319
+
1320
+    $tag = pipeline(
1321
+        'image_ecrire_tag_finir',
1322
+        [
1323
+            'args' => [
1324
+                'valeurs' => $valeurs,
1325
+                'surcharge' => $surcharge,
1326
+            ],
1327
+            'data' => $tag
1328
+        ]
1329
+    );
1330
+
1331
+    return $tag;
1332 1332
 }
1333 1333
 
1334 1334
 /**
@@ -1351,268 +1351,268 @@  discard block
 block discarded – undo
1351 1351
  *     Description de l'image, sinon null.
1352 1352
  **/
1353 1353
 function _image_creer_vignette($valeurs, $maxWidth, $maxHeight, $process = 'AUTO', $force = false) {
1354
-	$srcHeight = null;
1355
-	$retour = [];
1356
-	// ordre de preference des formats graphiques pour creer les vignettes
1357
-	// le premier format disponible, selon la methode demandee, est utilise
1358
-	$image = $valeurs['fichier'];
1359
-	$format = $valeurs['format_source'];
1360
-	$destdir = dirname($valeurs['fichier_dest']);
1361
-	$destfile = basename($valeurs['fichier_dest'], '.' . $valeurs['format_dest']);
1362
-
1363
-	$format_sortie = $valeurs['format_dest'];
1364
-
1365
-	if (($process == 'AUTO') and isset($GLOBALS['meta']['image_process'])) {
1366
-		$process = $GLOBALS['meta']['image_process'];
1367
-	}
1368
-
1369
-	// si le doc n'est pas une image dans un format accetpable, refuser
1370
-	if (!$force and !in_array($format, formats_image_acceptables(in_array($process, ['gd1', 'gd2'])))) {
1371
-		return;
1372
-	}
1373
-	$destination = "$destdir/$destfile";
1374
-
1375
-	// calculer la taille
1376
-	if (($srcWidth = $valeurs['largeur']) && ($srcHeight = $valeurs['hauteur'])) {
1377
-		if (!($destWidth = $valeurs['largeur_dest']) || !($destHeight = $valeurs['hauteur_dest'])) {
1378
-			[$destWidth, $destHeight] = _image_ratio($srcWidth, $srcHeight, $maxWidth, $maxHeight);
1379
-		}
1380
-	} elseif ($process == 'convert' or $process == 'imagick') {
1381
-		$destWidth = $maxWidth;
1382
-		$destHeight = $maxHeight;
1383
-	} else {
1384
-		spip_log("echec $process sur $image");
1385
-
1386
-		return;
1387
-	}
1388
-
1389
-	$vignette = '';
1390
-
1391
-	// Si l'image est de la taille demandee (ou plus petite), simplement la retourner
1392
-	if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1393
-		$vignette = $destination . '.' . $format;
1394
-		@copy($image, $vignette);
1395
-	}
1396
-
1397
-	elseif ($valeurs['format_source'] === 'svg') {
1398
-		include_spip('inc/svg');
1399
-		if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) {
1400
-			$format_sortie = 'svg';
1401
-			$vignette = $destination . '.' . $format_sortie;
1402
-			$valeurs['fichier_dest'] = $vignette;
1403
-			_image_gd_output($svg, $valeurs);
1404
-		}
1405
-	}
1406
-
1407
-	// imagemagick en ligne de commande
1408
-	elseif ($process == 'convert') {
1409
-		if (!defined('_CONVERT_COMMAND')) {
1410
-			define('_CONVERT_COMMAND', 'convert');
1411
-		} // Securite : mes_options.php peut preciser le chemin absolu
1412
-		if (!defined('_RESIZE_COMMAND')) {
1413
-			define('_RESIZE_COMMAND', _CONVERT_COMMAND . ' -quality ' . _IMG_CONVERT_QUALITE . ' -resize %xx%y! %src %dest');
1414
-		}
1415
-		$vignette = $destination . '.' . $format_sortie;
1416
-		$commande = str_replace(
1417
-			['%x', '%y', '%src', '%dest'],
1418
-			[
1419
-				$destWidth,
1420
-				$destHeight,
1421
-				escapeshellcmd($image),
1422
-				escapeshellcmd($vignette)
1423
-			],
1424
-			_RESIZE_COMMAND
1425
-		);
1426
-		spip_log($commande);
1427
-		exec($commande);
1428
-		if (!@file_exists($vignette)) {
1429
-			spip_log("echec convert sur $vignette");
1430
-
1431
-			return;  // echec commande
1432
-		}
1433
-	}
1434
-
1435
-	// php5 imagemagick
1436
-	elseif ($process == 'imagick') {
1437
-		if (!class_exists(\Imagick::class)) {
1438
-			spip_log('Classe Imagick absente !', _LOG_ERREUR);
1439
-
1440
-			return;
1441
-		}
1442
-
1443
-		// chemin compatible Windows
1444
-		$output = realpath(dirname($destination));
1445
-		if (!$output) {
1446
-			return;
1447
-		}
1448
-		$vignette = $output . DIRECTORY_SEPARATOR . basename($destination) . '.' . $format_sortie;
1449
-
1450
-		$imagick = new Imagick();
1451
-		$imagick->readImage(realpath($image));
1452
-		$imagick->resizeImage(
1453
-			$destWidth,
1454
-			$destHeight,
1455
-			Imagick::FILTER_LANCZOS,
1456
-			1
1457
-		);//, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1458
-		$imagick->writeImage($vignette);
1459
-
1460
-		if (!@file_exists($vignette)) {
1461
-			spip_log("echec imagick sur $vignette");
1462
-
1463
-			return;
1464
-		}
1465
-		// remettre le chemin relatif car c'est ce qu'attend SPIP pour la suite (en particlier action/tester)
1466
-		$vignette = $destination . '.' . $format_sortie;
1467
-	}
1468
-
1469
-	// netpbm
1470
-	elseif ($process == 'netpbm') {
1471
-		if (!defined('_PNMSCALE_COMMAND')) {
1472
-			define('_PNMSCALE_COMMAND', 'pnmscale');
1473
-		} // Securite : mes_options.php peut preciser le chemin absolu
1474
-		if (_PNMSCALE_COMMAND == '') {
1475
-			return;
1476
-		}
1477
-		$vignette = $destination . '.' . $format_sortie;
1478
-		$pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', _PNMSCALE_COMMAND);
1479
-		if ($format == 'jpg') {
1480
-			$jpegtopnm_command = str_replace('pnmscale', 'jpegtopnm', _PNMSCALE_COMMAND);
1481
-			exec("$jpegtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1482
-			if (!($s = @filesize($vignette))) {
1483
-				spip_unlink($vignette);
1484
-			}
1485
-			if (!@file_exists($vignette)) {
1486
-				spip_log("echec netpbm-jpg sur $vignette");
1487
-
1488
-				return;
1489
-			}
1490
-		} else {
1491
-			if ($format == 'gif') {
1492
-				$giftopnm_command = str_replace('pnmscale', 'giftopnm', _PNMSCALE_COMMAND);
1493
-				exec("$giftopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1494
-				if (!($s = @filesize($vignette))) {
1495
-					spip_unlink($vignette);
1496
-				}
1497
-				if (!@file_exists($vignette)) {
1498
-					spip_log("echec netpbm-gif sur $vignette");
1499
-
1500
-					return;
1501
-				}
1502
-			} else {
1503
-				if ($format == 'png') {
1504
-					$pngtopnm_command = str_replace('pnmscale', 'pngtopnm', _PNMSCALE_COMMAND);
1505
-					exec("$pngtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1506
-					if (!($s = @filesize($vignette))) {
1507
-						spip_unlink($vignette);
1508
-					}
1509
-					if (!@file_exists($vignette)) {
1510
-						spip_log("echec netpbm-png sur $vignette");
1511
-
1512
-						return;
1513
-					}
1514
-				}
1515
-			}
1516
-		}
1517
-	}
1518
-
1519
-	// gd ou gd2
1520
-	elseif ($process == 'gd1' or $process == 'gd2') {
1521
-		if (!function_exists('gd_info')) {
1522
-			spip_log('Librairie GD absente !', _LOG_ERREUR);
1523
-
1524
-			return;
1525
-		}
1526
-		if (_IMG_GD_MAX_PIXELS && $srcWidth * $srcHeight > _IMG_GD_MAX_PIXELS) {
1527
-			spip_log('vignette gd1/gd2 impossible : ' . $srcWidth * $srcHeight . 'pixels');
1528
-
1529
-			return;
1530
-		}
1531
-		$destFormat = $format_sortie;
1532
-		if (!$destFormat) {
1533
-			spip_log("pas de format pour $image");
1534
-
1535
-			return;
1536
-		}
1537
-
1538
-		$fonction_imagecreatefrom = $valeurs['fonction_imagecreatefrom'];
1539
-		if (!function_exists($fonction_imagecreatefrom)) {
1540
-			return;
1541
-		}
1542
-		$srcImage = @$fonction_imagecreatefrom($image);
1543
-		if (!$srcImage) {
1544
-			spip_log('echec gd1/gd2');
1545
-
1546
-			return;
1547
-		}
1548
-
1549
-		// Initialisation de l'image destination
1550
-		$destImage = null;
1551
-		if ($process == 'gd2' and $destFormat != 'gif') {
1552
-			$destImage = ImageCreateTrueColor($destWidth, $destHeight);
1553
-		}
1554
-		if (!$destImage) {
1555
-			$destImage = ImageCreate($destWidth, $destHeight);
1556
-		}
1557
-
1558
-		// Recopie de l'image d'origine avec adaptation de la taille
1559
-		$ok = false;
1560
-		if (($process == 'gd2') and function_exists('ImageCopyResampled')) {
1561
-			if ($format == 'gif') {
1562
-				// Si un GIF est transparent,
1563
-				// fabriquer un PNG transparent
1564
-				$transp = imagecolortransparent($srcImage);
1565
-				if ($transp > 0) {
1566
-					$destFormat = 'png';
1567
-				}
1568
-			}
1569
-			if (in_array($destFormat, _image_extensions_conservent_transparence())) {
1570
-				// Conserver la transparence
1571
-				if (function_exists('imageAntiAlias')) {
1572
-					imageAntiAlias($destImage, true);
1573
-				}
1574
-				@imagealphablending($destImage, false);
1575
-				@imagesavealpha($destImage, true);
1576
-			}
1577
-			$ok = @ImageCopyResampled($destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight);
1578
-		}
1579
-		if (!$ok) {
1580
-			$ok = ImageCopyResized($destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight);
1581
-		}
1582
-
1583
-		// Sauvegarde de l'image destination
1584
-		$valeurs['fichier_dest'] = $vignette = "$destination.$destFormat";
1585
-		$valeurs['format_dest'] = $format = $destFormat;
1586
-		_image_gd_output($destImage, $valeurs);
1587
-
1588
-		if ($srcImage) {
1589
-			ImageDestroy($srcImage);
1590
-		}
1591
-		ImageDestroy($destImage);
1592
-	}
1593
-
1594
-	if (!$vignette or !$size = @spip_getimagesize($vignette)) {
1595
-		$size = [$destWidth, $destHeight];
1596
-	}
1597
-
1598
-	// Gaffe: en safe mode, pas d'acces a la vignette,
1599
-	// donc risque de balancer "width='0'", ce qui masque l'image sous MSIE
1600
-	if ($size[0] < 1) {
1601
-		$size[0] = $destWidth;
1602
-	}
1603
-	if ($size[1] < 1) {
1604
-		$size[1] = $destHeight;
1605
-	}
1606
-
1607
-	$retour['width'] = $largeur = $size[0];
1608
-	$retour['height'] = $hauteur = $size[1];
1609
-
1610
-	$retour['fichier'] = $vignette;
1611
-	$retour['format'] = $format;
1612
-	$retour['date'] = @filemtime($vignette);
1613
-
1614
-	// renvoyer l'image
1615
-	return $retour;
1354
+    $srcHeight = null;
1355
+    $retour = [];
1356
+    // ordre de preference des formats graphiques pour creer les vignettes
1357
+    // le premier format disponible, selon la methode demandee, est utilise
1358
+    $image = $valeurs['fichier'];
1359
+    $format = $valeurs['format_source'];
1360
+    $destdir = dirname($valeurs['fichier_dest']);
1361
+    $destfile = basename($valeurs['fichier_dest'], '.' . $valeurs['format_dest']);
1362
+
1363
+    $format_sortie = $valeurs['format_dest'];
1364
+
1365
+    if (($process == 'AUTO') and isset($GLOBALS['meta']['image_process'])) {
1366
+        $process = $GLOBALS['meta']['image_process'];
1367
+    }
1368
+
1369
+    // si le doc n'est pas une image dans un format accetpable, refuser
1370
+    if (!$force and !in_array($format, formats_image_acceptables(in_array($process, ['gd1', 'gd2'])))) {
1371
+        return;
1372
+    }
1373
+    $destination = "$destdir/$destfile";
1374
+
1375
+    // calculer la taille
1376
+    if (($srcWidth = $valeurs['largeur']) && ($srcHeight = $valeurs['hauteur'])) {
1377
+        if (!($destWidth = $valeurs['largeur_dest']) || !($destHeight = $valeurs['hauteur_dest'])) {
1378
+            [$destWidth, $destHeight] = _image_ratio($srcWidth, $srcHeight, $maxWidth, $maxHeight);
1379
+        }
1380
+    } elseif ($process == 'convert' or $process == 'imagick') {
1381
+        $destWidth = $maxWidth;
1382
+        $destHeight = $maxHeight;
1383
+    } else {
1384
+        spip_log("echec $process sur $image");
1385
+
1386
+        return;
1387
+    }
1388
+
1389
+    $vignette = '';
1390
+
1391
+    // Si l'image est de la taille demandee (ou plus petite), simplement la retourner
1392
+    if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1393
+        $vignette = $destination . '.' . $format;
1394
+        @copy($image, $vignette);
1395
+    }
1396
+
1397
+    elseif ($valeurs['format_source'] === 'svg') {
1398
+        include_spip('inc/svg');
1399
+        if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) {
1400
+            $format_sortie = 'svg';
1401
+            $vignette = $destination . '.' . $format_sortie;
1402
+            $valeurs['fichier_dest'] = $vignette;
1403
+            _image_gd_output($svg, $valeurs);
1404
+        }
1405
+    }
1406
+
1407
+    // imagemagick en ligne de commande
1408
+    elseif ($process == 'convert') {
1409
+        if (!defined('_CONVERT_COMMAND')) {
1410
+            define('_CONVERT_COMMAND', 'convert');
1411
+        } // Securite : mes_options.php peut preciser le chemin absolu
1412
+        if (!defined('_RESIZE_COMMAND')) {
1413
+            define('_RESIZE_COMMAND', _CONVERT_COMMAND . ' -quality ' . _IMG_CONVERT_QUALITE . ' -resize %xx%y! %src %dest');
1414
+        }
1415
+        $vignette = $destination . '.' . $format_sortie;
1416
+        $commande = str_replace(
1417
+            ['%x', '%y', '%src', '%dest'],
1418
+            [
1419
+                $destWidth,
1420
+                $destHeight,
1421
+                escapeshellcmd($image),
1422
+                escapeshellcmd($vignette)
1423
+            ],
1424
+            _RESIZE_COMMAND
1425
+        );
1426
+        spip_log($commande);
1427
+        exec($commande);
1428
+        if (!@file_exists($vignette)) {
1429
+            spip_log("echec convert sur $vignette");
1430
+
1431
+            return;  // echec commande
1432
+        }
1433
+    }
1434
+
1435
+    // php5 imagemagick
1436
+    elseif ($process == 'imagick') {
1437
+        if (!class_exists(\Imagick::class)) {
1438
+            spip_log('Classe Imagick absente !', _LOG_ERREUR);
1439
+
1440
+            return;
1441
+        }
1442
+
1443
+        // chemin compatible Windows
1444
+        $output = realpath(dirname($destination));
1445
+        if (!$output) {
1446
+            return;
1447
+        }
1448
+        $vignette = $output . DIRECTORY_SEPARATOR . basename($destination) . '.' . $format_sortie;
1449
+
1450
+        $imagick = new Imagick();
1451
+        $imagick->readImage(realpath($image));
1452
+        $imagick->resizeImage(
1453
+            $destWidth,
1454
+            $destHeight,
1455
+            Imagick::FILTER_LANCZOS,
1456
+            1
1457
+        );//, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1458
+        $imagick->writeImage($vignette);
1459
+
1460
+        if (!@file_exists($vignette)) {
1461
+            spip_log("echec imagick sur $vignette");
1462
+
1463
+            return;
1464
+        }
1465
+        // remettre le chemin relatif car c'est ce qu'attend SPIP pour la suite (en particlier action/tester)
1466
+        $vignette = $destination . '.' . $format_sortie;
1467
+    }
1468
+
1469
+    // netpbm
1470
+    elseif ($process == 'netpbm') {
1471
+        if (!defined('_PNMSCALE_COMMAND')) {
1472
+            define('_PNMSCALE_COMMAND', 'pnmscale');
1473
+        } // Securite : mes_options.php peut preciser le chemin absolu
1474
+        if (_PNMSCALE_COMMAND == '') {
1475
+            return;
1476
+        }
1477
+        $vignette = $destination . '.' . $format_sortie;
1478
+        $pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', _PNMSCALE_COMMAND);
1479
+        if ($format == 'jpg') {
1480
+            $jpegtopnm_command = str_replace('pnmscale', 'jpegtopnm', _PNMSCALE_COMMAND);
1481
+            exec("$jpegtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1482
+            if (!($s = @filesize($vignette))) {
1483
+                spip_unlink($vignette);
1484
+            }
1485
+            if (!@file_exists($vignette)) {
1486
+                spip_log("echec netpbm-jpg sur $vignette");
1487
+
1488
+                return;
1489
+            }
1490
+        } else {
1491
+            if ($format == 'gif') {
1492
+                $giftopnm_command = str_replace('pnmscale', 'giftopnm', _PNMSCALE_COMMAND);
1493
+                exec("$giftopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1494
+                if (!($s = @filesize($vignette))) {
1495
+                    spip_unlink($vignette);
1496
+                }
1497
+                if (!@file_exists($vignette)) {
1498
+                    spip_log("echec netpbm-gif sur $vignette");
1499
+
1500
+                    return;
1501
+                }
1502
+            } else {
1503
+                if ($format == 'png') {
1504
+                    $pngtopnm_command = str_replace('pnmscale', 'pngtopnm', _PNMSCALE_COMMAND);
1505
+                    exec("$pngtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1506
+                    if (!($s = @filesize($vignette))) {
1507
+                        spip_unlink($vignette);
1508
+                    }
1509
+                    if (!@file_exists($vignette)) {
1510
+                        spip_log("echec netpbm-png sur $vignette");
1511
+
1512
+                        return;
1513
+                    }
1514
+                }
1515
+            }
1516
+        }
1517
+    }
1518
+
1519
+    // gd ou gd2
1520
+    elseif ($process == 'gd1' or $process == 'gd2') {
1521
+        if (!function_exists('gd_info')) {
1522
+            spip_log('Librairie GD absente !', _LOG_ERREUR);
1523
+
1524
+            return;
1525
+        }
1526
+        if (_IMG_GD_MAX_PIXELS && $srcWidth * $srcHeight > _IMG_GD_MAX_PIXELS) {
1527
+            spip_log('vignette gd1/gd2 impossible : ' . $srcWidth * $srcHeight . 'pixels');
1528
+
1529
+            return;
1530
+        }
1531
+        $destFormat = $format_sortie;
1532
+        if (!$destFormat) {
1533
+            spip_log("pas de format pour $image");
1534
+
1535
+            return;
1536
+        }
1537
+
1538
+        $fonction_imagecreatefrom = $valeurs['fonction_imagecreatefrom'];
1539
+        if (!function_exists($fonction_imagecreatefrom)) {
1540
+            return;
1541
+        }
1542
+        $srcImage = @$fonction_imagecreatefrom($image);
1543
+        if (!$srcImage) {
1544
+            spip_log('echec gd1/gd2');
1545
+
1546
+            return;
1547
+        }
1548
+
1549
+        // Initialisation de l'image destination
1550
+        $destImage = null;
1551
+        if ($process == 'gd2' and $destFormat != 'gif') {
1552
+            $destImage = ImageCreateTrueColor($destWidth, $destHeight);
1553
+        }
1554
+        if (!$destImage) {
1555
+            $destImage = ImageCreate($destWidth, $destHeight);
1556
+        }
1557
+
1558
+        // Recopie de l'image d'origine avec adaptation de la taille
1559
+        $ok = false;
1560
+        if (($process == 'gd2') and function_exists('ImageCopyResampled')) {
1561
+            if ($format == 'gif') {
1562
+                // Si un GIF est transparent,
1563
+                // fabriquer un PNG transparent
1564
+                $transp = imagecolortransparent($srcImage);
1565
+                if ($transp > 0) {
1566
+                    $destFormat = 'png';
1567
+                }
1568
+            }
1569
+            if (in_array($destFormat, _image_extensions_conservent_transparence())) {
1570
+                // Conserver la transparence
1571
+                if (function_exists('imageAntiAlias')) {
1572
+                    imageAntiAlias($destImage, true);
1573
+                }
1574
+                @imagealphablending($destImage, false);
1575
+                @imagesavealpha($destImage, true);
1576
+            }
1577
+            $ok = @ImageCopyResampled($destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight);
1578
+        }
1579
+        if (!$ok) {
1580
+            $ok = ImageCopyResized($destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight);
1581
+        }
1582
+
1583
+        // Sauvegarde de l'image destination
1584
+        $valeurs['fichier_dest'] = $vignette = "$destination.$destFormat";
1585
+        $valeurs['format_dest'] = $format = $destFormat;
1586
+        _image_gd_output($destImage, $valeurs);
1587
+
1588
+        if ($srcImage) {
1589
+            ImageDestroy($srcImage);
1590
+        }
1591
+        ImageDestroy($destImage);
1592
+    }
1593
+
1594
+    if (!$vignette or !$size = @spip_getimagesize($vignette)) {
1595
+        $size = [$destWidth, $destHeight];
1596
+    }
1597
+
1598
+    // Gaffe: en safe mode, pas d'acces a la vignette,
1599
+    // donc risque de balancer "width='0'", ce qui masque l'image sous MSIE
1600
+    if ($size[0] < 1) {
1601
+        $size[0] = $destWidth;
1602
+    }
1603
+    if ($size[1] < 1) {
1604
+        $size[1] = $destHeight;
1605
+    }
1606
+
1607
+    $retour['width'] = $largeur = $size[0];
1608
+    $retour['height'] = $hauteur = $size[1];
1609
+
1610
+    $retour['fichier'] = $vignette;
1611
+    $retour['format'] = $format;
1612
+    $retour['date'] = @filemtime($vignette);
1613
+
1614
+    // renvoyer l'image
1615
+    return $retour;
1616 1616
 }
1617 1617
 
1618 1618
 /**
@@ -1632,25 +1632,25 @@  discard block
 block discarded – undo
1632 1632
  * @return array Liste [ largeur, hauteur, ratio de réduction ]
1633 1633
  **/
1634 1634
 function _image_ratio(int $srcWidth, int $srcHeight, int $maxWidth, int $maxHeight): array {
1635
-	$ratioWidth = $srcWidth / $maxWidth;
1636
-	$ratioHeight = $srcHeight / $maxHeight;
1637
-
1638
-	if ($srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1639
-		$destWidth = $srcWidth;
1640
-		$destHeight = $srcHeight;
1641
-	} elseif ($ratioWidth < $ratioHeight) {
1642
-		$destWidth = $srcWidth / $ratioHeight;
1643
-		$destHeight = $maxHeight;
1644
-	} else {
1645
-		$destWidth = $maxWidth;
1646
-		$destHeight = $srcHeight / $ratioWidth;
1647
-	}
1648
-
1649
-	return [
1650
-		intval(round($destWidth)),
1651
-		intval(round($destHeight)),
1652
-		max($ratioWidth, $ratioHeight)
1653
-	];
1635
+    $ratioWidth = $srcWidth / $maxWidth;
1636
+    $ratioHeight = $srcHeight / $maxHeight;
1637
+
1638
+    if ($srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1639
+        $destWidth = $srcWidth;
1640
+        $destHeight = $srcHeight;
1641
+    } elseif ($ratioWidth < $ratioHeight) {
1642
+        $destWidth = $srcWidth / $ratioHeight;
1643
+        $destHeight = $maxHeight;
1644
+    } else {
1645
+        $destWidth = $maxWidth;
1646
+        $destHeight = $srcHeight / $ratioWidth;
1647
+    }
1648
+
1649
+    return [
1650
+        intval(round($destWidth)),
1651
+        intval(round($destHeight)),
1652
+        max($ratioWidth, $ratioHeight)
1653
+    ];
1654 1654
 }
1655 1655
 
1656 1656
 /**
@@ -1670,25 +1670,25 @@  discard block
 block discarded – undo
1670 1670
  * @return array Liste [ largeur, hauteur, ratio de réduction ]
1671 1671
  **/
1672 1672
 function ratio_passe_partout(int $srcWidth, int $srcHeight, int $maxWidth, int $maxHeight): array {
1673
-	$ratioWidth = $srcWidth / $maxWidth;
1674
-	$ratioHeight = $srcHeight / $maxHeight;
1675
-
1676
-	if ($srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1677
-		$destWidth = $srcWidth;
1678
-		$destHeight = $srcHeight;
1679
-	} elseif ($ratioWidth > $ratioHeight) {
1680
-		$destWidth = $srcWidth / $ratioHeight;
1681
-		$destHeight = $maxHeight;
1682
-	} else {
1683
-		$destWidth = $maxWidth;
1684
-		$destHeight = $srcHeight / $ratioWidth;
1685
-	}
1686
-
1687
-	return [
1688
-		intval(round($destWidth)),
1689
-		intval(round($destHeight)),
1690
-		min($ratioWidth, $ratioHeight)
1691
-	];
1673
+    $ratioWidth = $srcWidth / $maxWidth;
1674
+    $ratioHeight = $srcHeight / $maxHeight;
1675
+
1676
+    if ($srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1677
+        $destWidth = $srcWidth;
1678
+        $destHeight = $srcHeight;
1679
+    } elseif ($ratioWidth > $ratioHeight) {
1680
+        $destWidth = $srcWidth / $ratioHeight;
1681
+        $destHeight = $maxHeight;
1682
+    } else {
1683
+        $destWidth = $maxWidth;
1684
+        $destHeight = $srcHeight / $ratioWidth;
1685
+    }
1686
+
1687
+    return [
1688
+        intval(round($destWidth)),
1689
+        intval(round($destHeight)),
1690
+        min($ratioWidth, $ratioHeight)
1691
+    ];
1692 1692
 }
1693 1693
 
1694 1694
 
@@ -1701,12 +1701,12 @@  discard block
 block discarded – undo
1701 1701
  * @return string
1702 1702
  */
1703 1703
 function process_image_svg_identite($image) {
1704
-	if ($image['creer']) {
1705
-		$source = $image['fichier'];
1706
-		_image_gd_output($source, $image);
1707
-	}
1704
+    if ($image['creer']) {
1705
+        $source = $image['fichier'];
1706
+        _image_gd_output($source, $image);
1707
+    }
1708 1708
 
1709
-	return _image_ecrire_tag($image, ['src' => $image['fichier_dest']]);
1709
+    return _image_ecrire_tag($image, ['src' => $image['fichier_dest']]);
1710 1710
 }
1711 1711
 
1712 1712
 
@@ -1739,109 +1739,109 @@  discard block
 block discarded – undo
1739 1739
  *     Code HTML de la balise img produite
1740 1740
  **/
1741 1741
 function process_image_reduire($fonction, $img, $taille, $taille_y, $force, $process = 'AUTO') {
1742
-	$image = false;
1743
-	if (($process == 'AUTO') and isset($GLOBALS['meta']['image_process'])) {
1744
-		$process = $GLOBALS['meta']['image_process'];
1745
-	}
1746
-	# determiner le format de sortie
1747
-	$format_sortie = false; // le choix par defaut sera bon
1748
-	if ($process == 'netpbm') {
1749
-		$format_sortie = 'jpg';
1750
-	} elseif ($process == 'gd1' or $process == 'gd2') {
1751
-		$image = _image_valeurs_trans($img, "reduire-{$taille}-{$taille_y}", $format_sortie, $fonction, false, _SVG_SUPPORTED);
1752
-		// on verifie que l'extension choisie est bonne (en principe oui)
1753
-		$gd_formats = formats_image_acceptables(true);
1754
-		if (
1755
-			is_array($image)
1756
-			and (!in_array($image['format_dest'], $gd_formats)
1757
-				or (!in_array($image['format_dest'], _image_extensions_acceptees_en_sortie()))
1758
-			)
1759
-		) {
1760
-			if ($image['format_source'] == 'jpg') {
1761
-				$formats_sortie = ['jpg', 'png', 'gif'];
1762
-			} else // les gif sont passes en png preferentiellement pour etre homogene aux autres filtres images
1763
-			{
1764
-				$formats_sortie = ['png', 'jpg', 'gif'];
1765
-			}
1766
-			// Choisir le format destination
1767
-			// - on sauve de preference en JPEG (meilleure compression)
1768
-			// - pour le GIF : les GD recentes peuvent le lire mais pas l'ecrire
1769
-			# bug : gd_formats contient la liste des fichiers qu'on sait *lire*,
1770
-			# pas *ecrire*
1771
-			$format_sortie = '';
1772
-			foreach ($formats_sortie as $fmt) {
1773
-				if (in_array($fmt, $gd_formats) and in_array($fmt, _image_extensions_acceptees_en_sortie())) {
1774
-					$format_sortie = $fmt;
1775
-					break;
1776
-				}
1777
-			}
1778
-			$image = false;
1779
-		}
1780
-	}
1781
-
1782
-	if (!is_array($image)) {
1783
-		$image = _image_valeurs_trans($img, "reduire-{$taille}-{$taille_y}", $format_sortie, $fonction, false, _SVG_SUPPORTED);
1784
-	}
1785
-
1786
-	if (!is_array($image) or !$image['largeur'] or !$image['hauteur']) {
1787
-		spip_log("image_reduire_src:pas de version locale de $img ou extension non prise en charge");
1788
-		// on peut resizer en mode html si on dispose des elements
1789
-		[$srcw, $srch] = taille_image($img);
1790
-		if ($srcw and $srch) {
1791
-			[$w, $h] = _image_ratio($srcw, $srch, $taille, $taille_y);
1792
-
1793
-			return _image_tag_changer_taille($img, $w, $h);
1794
-		}
1795
-		// la on n'a pas d'infos sur l'image source... on refile le truc a css
1796
-		// sous la forme style='max-width: NNpx;'
1797
-		return inserer_attribut(
1798
-			$img,
1799
-			'style',
1800
-			"max-width: {$taille}px;max-width: min(100%,{$taille}px); max-height: {$taille_y}px"
1801
-		);
1802
-	}
1803
-
1804
-	// si l'image est plus petite que la cible retourner une copie cachee de l'image
1805
-	if (($image['largeur'] <= $taille) && ($image['hauteur'] <= $taille_y)) {
1806
-		if ($image['creer']) {
1807
-			@copy($image['fichier'], $image['fichier_dest']);
1808
-		}
1809
-
1810
-		return _image_ecrire_tag($image, ['src' => $image['fichier_dest']]);
1811
-	}
1812
-
1813
-	if ($image['creer'] == false && !$force) {
1814
-		return _image_ecrire_tag(
1815
-			$image,
1816
-			['src' => $image['fichier_dest'], 'width' => $image['largeur_dest'], 'height' => $image['hauteur_dest']]
1817
-		);
1818
-	}
1819
-
1820
-	if (in_array($image['format_source'], _image_extensions_acceptees_en_entree())) {
1821
-		$destWidth = $image['largeur_dest'];
1822
-		$destHeight = $image['hauteur_dest'];
1823
-		$logo = $image['fichier'];
1824
-		$date = $image['date_src'];
1825
-		$preview = _image_creer_vignette($image, $taille, $taille_y, $process, $force);
1826
-
1827
-		if ($preview && $preview['fichier']) {
1828
-			$logo = $preview['fichier'];
1829
-			$destWidth = $preview['width'];
1830
-			$destHeight = $preview['height'];
1831
-			$date = $preview['date'];
1832
-		}
1833
-		// dans l'espace prive mettre un timestamp sur l'adresse
1834
-		// de l'image, de facon a tromper le cache du navigateur
1835
-		// quand on fait supprimer/reuploader un logo
1836
-		// (pas de filemtime si SAFE MODE)
1837
-		$date = test_espace_prive() ? ('?' . $date) : '';
1838
-
1839
-		return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]);
1840
-	}
1841
-	else {
1842
-		# BMP, tiff ... les redacteurs osent tout!
1843
-		return $img;
1844
-	}
1742
+    $image = false;
1743
+    if (($process == 'AUTO') and isset($GLOBALS['meta']['image_process'])) {
1744
+        $process = $GLOBALS['meta']['image_process'];
1745
+    }
1746
+    # determiner le format de sortie
1747
+    $format_sortie = false; // le choix par defaut sera bon
1748
+    if ($process == 'netpbm') {
1749
+        $format_sortie = 'jpg';
1750
+    } elseif ($process == 'gd1' or $process == 'gd2') {
1751
+        $image = _image_valeurs_trans($img, "reduire-{$taille}-{$taille_y}", $format_sortie, $fonction, false, _SVG_SUPPORTED);
1752
+        // on verifie que l'extension choisie est bonne (en principe oui)
1753
+        $gd_formats = formats_image_acceptables(true);
1754
+        if (
1755
+            is_array($image)
1756
+            and (!in_array($image['format_dest'], $gd_formats)
1757
+                or (!in_array($image['format_dest'], _image_extensions_acceptees_en_sortie()))
1758
+            )
1759
+        ) {
1760
+            if ($image['format_source'] == 'jpg') {
1761
+                $formats_sortie = ['jpg', 'png', 'gif'];
1762
+            } else // les gif sont passes en png preferentiellement pour etre homogene aux autres filtres images
1763
+            {
1764
+                $formats_sortie = ['png', 'jpg', 'gif'];
1765
+            }
1766
+            // Choisir le format destination
1767
+            // - on sauve de preference en JPEG (meilleure compression)
1768
+            // - pour le GIF : les GD recentes peuvent le lire mais pas l'ecrire
1769
+            # bug : gd_formats contient la liste des fichiers qu'on sait *lire*,
1770
+            # pas *ecrire*
1771
+            $format_sortie = '';
1772
+            foreach ($formats_sortie as $fmt) {
1773
+                if (in_array($fmt, $gd_formats) and in_array($fmt, _image_extensions_acceptees_en_sortie())) {
1774
+                    $format_sortie = $fmt;
1775
+                    break;
1776
+                }
1777
+            }
1778
+            $image = false;
1779
+        }
1780
+    }
1781
+
1782
+    if (!is_array($image)) {
1783
+        $image = _image_valeurs_trans($img, "reduire-{$taille}-{$taille_y}", $format_sortie, $fonction, false, _SVG_SUPPORTED);
1784
+    }
1785
+
1786
+    if (!is_array($image) or !$image['largeur'] or !$image['hauteur']) {
1787
+        spip_log("image_reduire_src:pas de version locale de $img ou extension non prise en charge");
1788
+        // on peut resizer en mode html si on dispose des elements
1789
+        [$srcw, $srch] = taille_image($img);
1790
+        if ($srcw and $srch) {
1791
+            [$w, $h] = _image_ratio($srcw, $srch, $taille, $taille_y);
1792
+
1793
+            return _image_tag_changer_taille($img, $w, $h);
1794
+        }
1795
+        // la on n'a pas d'infos sur l'image source... on refile le truc a css
1796
+        // sous la forme style='max-width: NNpx;'
1797
+        return inserer_attribut(
1798
+            $img,
1799
+            'style',
1800
+            "max-width: {$taille}px;max-width: min(100%,{$taille}px); max-height: {$taille_y}px"
1801
+        );
1802
+    }
1803
+
1804
+    // si l'image est plus petite que la cible retourner une copie cachee de l'image
1805
+    if (($image['largeur'] <= $taille) && ($image['hauteur'] <= $taille_y)) {
1806
+        if ($image['creer']) {
1807
+            @copy($image['fichier'], $image['fichier_dest']);
1808
+        }
1809
+
1810
+        return _image_ecrire_tag($image, ['src' => $image['fichier_dest']]);
1811
+    }
1812
+
1813
+    if ($image['creer'] == false && !$force) {
1814
+        return _image_ecrire_tag(
1815
+            $image,
1816
+            ['src' => $image['fichier_dest'], 'width' => $image['largeur_dest'], 'height' => $image['hauteur_dest']]
1817
+        );
1818
+    }
1819
+
1820
+    if (in_array($image['format_source'], _image_extensions_acceptees_en_entree())) {
1821
+        $destWidth = $image['largeur_dest'];
1822
+        $destHeight = $image['hauteur_dest'];
1823
+        $logo = $image['fichier'];
1824
+        $date = $image['date_src'];
1825
+        $preview = _image_creer_vignette($image, $taille, $taille_y, $process, $force);
1826
+
1827
+        if ($preview && $preview['fichier']) {
1828
+            $logo = $preview['fichier'];
1829
+            $destWidth = $preview['width'];
1830
+            $destHeight = $preview['height'];
1831
+            $date = $preview['date'];
1832
+        }
1833
+        // dans l'espace prive mettre un timestamp sur l'adresse
1834
+        // de l'image, de facon a tromper le cache du navigateur
1835
+        // quand on fait supprimer/reuploader un logo
1836
+        // (pas de filemtime si SAFE MODE)
1837
+        $date = test_espace_prive() ? ('?' . $date) : '';
1838
+
1839
+        return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]);
1840
+    }
1841
+    else {
1842
+        # BMP, tiff ... les redacteurs osent tout!
1843
+        return $img;
1844
+    }
1845 1845
 }
1846 1846
 
1847 1847
 /**
@@ -1855,145 +1855,145 @@  discard block
 block discarded – undo
1855 1855
  * Class phpthumb_functions
1856 1856
  */
1857 1857
 class phpthumb_functions {
1858
-	/**
1859
-	 * Retourne la couleur d'un pixel dans une image
1860
-	 *
1861
-	 * @param resource|GdImage $img
1862
-	 * @param int $x
1863
-	 * @param int $y
1864
-	 * @return array|bool
1865
-	 */
1866
-	public static function GetPixelColor(&$img, $x, $y) {
1867
-		if (is_resource($img) || (is_object($img) && $img instanceof \GdImage)) {
1868
-			return @ImageColorsForIndex($img, @ImageColorAt($img, $x, $y));
1869
-		}
1870
-		return false;
1871
-	}
1872
-
1873
-	/**
1874
-	 * Retourne un nombre dans une représentation en Little Endian
1875
-	 *
1876
-	 * @param int $number
1877
-	 * @param int $minbytes
1878
-	 * @return string
1879
-	 */
1880
-	public static function LittleEndian2String($number, $minbytes = 1) {
1881
-		$intstring = '';
1882
-		while ($number > 0) {
1883
-			$intstring = $intstring . chr($number & 255);
1884
-			$number >>= 8;
1885
-		}
1886
-
1887
-		return str_pad($intstring, $minbytes, "\x00", STR_PAD_RIGHT);
1888
-	}
1889
-
1890
-	/**
1891
-	 * Transforme une ressource GD en image au format ICO
1892
-	 *
1893
-	 * @param array $gd_image_array
1894
-	 *     Tableau de ressources d'images GD
1895
-	 * @return string
1896
-	 *     Image au format ICO
1897
-	 */
1898
-	public static function GD2ICOstring(&$gd_image_array) {
1899
-		foreach ($gd_image_array as $key => $gd_image) {
1900
-			$ImageWidths[$key] = ImageSX($gd_image);
1901
-			$ImageHeights[$key] = ImageSY($gd_image);
1902
-			$bpp[$key] = ImageIsTrueColor($gd_image) ? 32 : 24;
1903
-			$totalcolors[$key] = ImageColorsTotal($gd_image);
1904
-
1905
-			$icXOR[$key] = '';
1906
-			for ($y = $ImageHeights[$key] - 1; $y >= 0; $y--) {
1907
-				for ($x = 0; $x < $ImageWidths[$key]; $x++) {
1908
-					$argb = phpthumb_functions::GetPixelColor($gd_image, $x, $y);
1909
-					$a = round(255 * ((127 - $argb['alpha']) / 127));
1910
-					$r = $argb['red'];
1911
-					$g = $argb['green'];
1912
-					$b = $argb['blue'];
1913
-
1914
-					if ($bpp[$key] == 32) {
1915
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r) . chr($a);
1916
-					} elseif ($bpp[$key] == 24) {
1917
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r);
1918
-					}
1919
-
1920
-					if ($a < 128) {
1921
-						@$icANDmask[$key][$y] .= '1';
1922
-					} else {
1923
-						@$icANDmask[$key][$y] .= '0';
1924
-					}
1925
-				}
1926
-				// mask bits are 32-bit aligned per scanline
1927
-				while (strlen($icANDmask[$key][$y]) % 32) {
1928
-					$icANDmask[$key][$y] .= '0';
1929
-				}
1930
-			}
1931
-			$icAND[$key] = '';
1932
-			foreach ($icANDmask[$key] as $y => $scanlinemaskbits) {
1933
-				for ($i = 0; $i < strlen($scanlinemaskbits); $i += 8) {
1934
-					$icAND[$key] .= chr(bindec(str_pad(substr($scanlinemaskbits, $i, 8), 8, '0', STR_PAD_LEFT)));
1935
-				}
1936
-			}
1937
-		}
1938
-
1939
-		foreach ($gd_image_array as $key => $gd_image) {
1940
-			$biSizeImage = $ImageWidths[$key] * $ImageHeights[$key] * ($bpp[$key] / 8);
1941
-
1942
-			// BITMAPINFOHEADER - 40 bytes
1943
-			$BitmapInfoHeader[$key] = '';
1944
-			$BitmapInfoHeader[$key] .= "\x28\x00\x00\x00";                // DWORD  biSize;
1945
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4);    // LONG   biWidth;
1946
-			// The biHeight member specifies the combined
1947
-			// height of the XOR and AND masks.
1948
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); // LONG   biHeight;
1949
-			$BitmapInfoHeader[$key] .= "\x01\x00";                    // WORD   biPlanes;
1950
-			$BitmapInfoHeader[$key] .= chr($bpp[$key]) . "\x00";              // wBitCount;
1951
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biCompression;
1952
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4);      // DWORD  biSizeImage;
1953
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biXPelsPerMeter;
1954
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biYPelsPerMeter;
1955
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrUsed;
1956
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrImportant;
1957
-		}
1958
-
1959
-
1960
-		$icondata = "\x00\x00";                    // idReserved;   // Reserved (must be 0)
1961
-		$icondata .= "\x01\x00";                    // idType;	   // Resource Type (1 for icons)
1962
-		$icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2);  // idCount;	  // How many images?
1963
-
1964
-		$dwImageOffset = 6 + (count($gd_image_array) * 16);
1965
-		foreach ($gd_image_array as $key => $gd_image) {
1966
-			// ICONDIRENTRY   idEntries[1]; // An entry for each image (idCount of 'em)
1967
-
1968
-			$icondata .= chr($ImageWidths[$key]);           // bWidth;		  // Width, in pixels, of the image
1969
-			$icondata .= chr($ImageHeights[$key]);          // bHeight;		 // Height, in pixels, of the image
1970
-			$icondata .= chr($totalcolors[$key]);           // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1971
-			$icondata .= "\x00";                    // bReserved;	   // Reserved ( must be 0)
1972
-
1973
-			$icondata .= "\x01\x00";                  // wPlanes;		 // Color Planes
1974
-			$icondata .= chr($bpp[$key]) . "\x00";            // wBitCount;	   // Bits per pixel
1975
-
1976
-			$dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]);
1977
-			$icondata .= phpthumb_functions::LittleEndian2String(
1978
-				$dwBytesInRes,
1979
-				4
1980
-			);     // dwBytesInRes;	// How many bytes in this resource?
1981
-
1982
-			$icondata .= phpthumb_functions::LittleEndian2String(
1983
-				$dwImageOffset,
1984
-				4
1985
-			);    // dwImageOffset;   // Where in the file is this image?
1986
-			$dwImageOffset += strlen($BitmapInfoHeader[$key]);
1987
-			$dwImageOffset += strlen($icXOR[$key]);
1988
-			$dwImageOffset += strlen($icAND[$key]);
1989
-		}
1990
-
1991
-		foreach ($gd_image_array as $key => $gd_image) {
1992
-			$icondata .= $BitmapInfoHeader[$key];
1993
-			$icondata .= $icXOR[$key];
1994
-			$icondata .= $icAND[$key];
1995
-		}
1996
-
1997
-		return $icondata;
1998
-	}
1858
+    /**
1859
+     * Retourne la couleur d'un pixel dans une image
1860
+     *
1861
+     * @param resource|GdImage $img
1862
+     * @param int $x
1863
+     * @param int $y
1864
+     * @return array|bool
1865
+     */
1866
+    public static function GetPixelColor(&$img, $x, $y) {
1867
+        if (is_resource($img) || (is_object($img) && $img instanceof \GdImage)) {
1868
+            return @ImageColorsForIndex($img, @ImageColorAt($img, $x, $y));
1869
+        }
1870
+        return false;
1871
+    }
1872
+
1873
+    /**
1874
+     * Retourne un nombre dans une représentation en Little Endian
1875
+     *
1876
+     * @param int $number
1877
+     * @param int $minbytes
1878
+     * @return string
1879
+     */
1880
+    public static function LittleEndian2String($number, $minbytes = 1) {
1881
+        $intstring = '';
1882
+        while ($number > 0) {
1883
+            $intstring = $intstring . chr($number & 255);
1884
+            $number >>= 8;
1885
+        }
1886
+
1887
+        return str_pad($intstring, $minbytes, "\x00", STR_PAD_RIGHT);
1888
+    }
1889
+
1890
+    /**
1891
+     * Transforme une ressource GD en image au format ICO
1892
+     *
1893
+     * @param array $gd_image_array
1894
+     *     Tableau de ressources d'images GD
1895
+     * @return string
1896
+     *     Image au format ICO
1897
+     */
1898
+    public static function GD2ICOstring(&$gd_image_array) {
1899
+        foreach ($gd_image_array as $key => $gd_image) {
1900
+            $ImageWidths[$key] = ImageSX($gd_image);
1901
+            $ImageHeights[$key] = ImageSY($gd_image);
1902
+            $bpp[$key] = ImageIsTrueColor($gd_image) ? 32 : 24;
1903
+            $totalcolors[$key] = ImageColorsTotal($gd_image);
1904
+
1905
+            $icXOR[$key] = '';
1906
+            for ($y = $ImageHeights[$key] - 1; $y >= 0; $y--) {
1907
+                for ($x = 0; $x < $ImageWidths[$key]; $x++) {
1908
+                    $argb = phpthumb_functions::GetPixelColor($gd_image, $x, $y);
1909
+                    $a = round(255 * ((127 - $argb['alpha']) / 127));
1910
+                    $r = $argb['red'];
1911
+                    $g = $argb['green'];
1912
+                    $b = $argb['blue'];
1913
+
1914
+                    if ($bpp[$key] == 32) {
1915
+                        $icXOR[$key] .= chr($b) . chr($g) . chr($r) . chr($a);
1916
+                    } elseif ($bpp[$key] == 24) {
1917
+                        $icXOR[$key] .= chr($b) . chr($g) . chr($r);
1918
+                    }
1919
+
1920
+                    if ($a < 128) {
1921
+                        @$icANDmask[$key][$y] .= '1';
1922
+                    } else {
1923
+                        @$icANDmask[$key][$y] .= '0';
1924
+                    }
1925
+                }
1926
+                // mask bits are 32-bit aligned per scanline
1927
+                while (strlen($icANDmask[$key][$y]) % 32) {
1928
+                    $icANDmask[$key][$y] .= '0';
1929
+                }
1930
+            }
1931
+            $icAND[$key] = '';
1932
+            foreach ($icANDmask[$key] as $y => $scanlinemaskbits) {
1933
+                for ($i = 0; $i < strlen($scanlinemaskbits); $i += 8) {
1934
+                    $icAND[$key] .= chr(bindec(str_pad(substr($scanlinemaskbits, $i, 8), 8, '0', STR_PAD_LEFT)));
1935
+                }
1936
+            }
1937
+        }
1938
+
1939
+        foreach ($gd_image_array as $key => $gd_image) {
1940
+            $biSizeImage = $ImageWidths[$key] * $ImageHeights[$key] * ($bpp[$key] / 8);
1941
+
1942
+            // BITMAPINFOHEADER - 40 bytes
1943
+            $BitmapInfoHeader[$key] = '';
1944
+            $BitmapInfoHeader[$key] .= "\x28\x00\x00\x00";                // DWORD  biSize;
1945
+            $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4);    // LONG   biWidth;
1946
+            // The biHeight member specifies the combined
1947
+            // height of the XOR and AND masks.
1948
+            $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); // LONG   biHeight;
1949
+            $BitmapInfoHeader[$key] .= "\x01\x00";                    // WORD   biPlanes;
1950
+            $BitmapInfoHeader[$key] .= chr($bpp[$key]) . "\x00";              // wBitCount;
1951
+            $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biCompression;
1952
+            $BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4);      // DWORD  biSizeImage;
1953
+            $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biXPelsPerMeter;
1954
+            $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biYPelsPerMeter;
1955
+            $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrUsed;
1956
+            $BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrImportant;
1957
+        }
1958
+
1959
+
1960
+        $icondata = "\x00\x00";                    // idReserved;   // Reserved (must be 0)
1961
+        $icondata .= "\x01\x00";                    // idType;	   // Resource Type (1 for icons)
1962
+        $icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2);  // idCount;	  // How many images?
1963
+
1964
+        $dwImageOffset = 6 + (count($gd_image_array) * 16);
1965
+        foreach ($gd_image_array as $key => $gd_image) {
1966
+            // ICONDIRENTRY   idEntries[1]; // An entry for each image (idCount of 'em)
1967
+
1968
+            $icondata .= chr($ImageWidths[$key]);           // bWidth;		  // Width, in pixels, of the image
1969
+            $icondata .= chr($ImageHeights[$key]);          // bHeight;		 // Height, in pixels, of the image
1970
+            $icondata .= chr($totalcolors[$key]);           // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1971
+            $icondata .= "\x00";                    // bReserved;	   // Reserved ( must be 0)
1972
+
1973
+            $icondata .= "\x01\x00";                  // wPlanes;		 // Color Planes
1974
+            $icondata .= chr($bpp[$key]) . "\x00";            // wBitCount;	   // Bits per pixel
1975
+
1976
+            $dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]);
1977
+            $icondata .= phpthumb_functions::LittleEndian2String(
1978
+                $dwBytesInRes,
1979
+                4
1980
+            );     // dwBytesInRes;	// How many bytes in this resource?
1981
+
1982
+            $icondata .= phpthumb_functions::LittleEndian2String(
1983
+                $dwImageOffset,
1984
+                4
1985
+            );    // dwImageOffset;   // Where in the file is this image?
1986
+            $dwImageOffset += strlen($BitmapInfoHeader[$key]);
1987
+            $dwImageOffset += strlen($icXOR[$key]);
1988
+            $dwImageOffset += strlen($icAND[$key]);
1989
+        }
1990
+
1991
+        foreach ($gd_image_array as $key => $gd_image) {
1992
+            $icondata .= $BitmapInfoHeader[$key];
1993
+            $icondata .= $icXOR[$key];
1994
+            $icondata .= $icAND[$key];
1995
+        }
1996
+
1997
+        return $icondata;
1998
+    }
1999 1999
 }
Please login to merge, or discard this patch.
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	$blue = dechex($blue);
44 44
 
45 45
 	if (strlen($red) == 1) {
46
-		$red = '0' . $red;
46
+		$red = '0'.$red;
47 47
 	}
48 48
 	if (strlen($green) == 1) {
49
-		$green = '0' . $green;
49
+		$green = '0'.$green;
50 50
 	}
51 51
 	if (strlen($blue) == 1) {
52
-		$blue = '0' . $blue;
52
+		$blue = '0'.$blue;
53 53
 	}
54 54
 
55 55
 	return "$red$green$blue";
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	$couleur = couleur_html_to_hex($couleur);
69 69
 	$couleur = ltrim($couleur, '#');
70 70
 	if (strlen($couleur) === 3) {
71
-		$couleur = $couleur[0] . $couleur[0] . $couleur[1] . $couleur[1] . $couleur[2] . $couleur[2];
71
+		$couleur = $couleur[0].$couleur[0].$couleur[1].$couleur[1].$couleur[2].$couleur[2];
72 72
 	}
73 73
 	$retour = [];
74 74
 	$retour['red'] = hexdec(substr($couleur, 0, 2));
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
 	$var_G = ($G / 255);
127 127
 	$var_B = ($B / 255);
128 128
 
129
-	$var_Min = min($var_R, $var_G, $var_B);   //Min. value of RGB
130
-	$var_Max = max($var_R, $var_G, $var_B);   //Max. value of RGB
131
-	$del_Max = $var_Max - $var_Min;           //Delta RGB value
129
+	$var_Min = min($var_R, $var_G, $var_B); //Min. value of RGB
130
+	$var_Max = max($var_R, $var_G, $var_B); //Max. value of RGB
131
+	$del_Max = $var_Max - $var_Min; //Delta RGB value
132 132
 
133 133
 	$L = ($var_Max + $var_Min) / 2;
134 134
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
  */
191 191
 function _couleur_hsl_to_rgb($H, $S, $L) {
192 192
 	// helper
193
-	$hue_2_rgb = function ($v1, $v2, $vH) {
193
+	$hue_2_rgb = function($v1, $v2, $vH) {
194 194
 		if ($vH < 0) {
195 195
 			$vH += 1;
196 196
 		}
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
 		$img = "<img src='$source' />";
323 323
 	} elseif (
324 324
 		preg_match('@^data:image/([^;]*);base64,(.*)$@isS', $source, $regs)
325
-		and $extension = _image_trouver_extension_depuis_mime('image/' . $regs[1])
325
+		and $extension = _image_trouver_extension_depuis_mime('image/'.$regs[1])
326 326
 		and in_array($extension, _image_extensions_acceptees_en_entree())
327 327
 	) {
328 328
 		# gerer img src="data:....base64"
329
-		$local = sous_repertoire(_DIR_VAR, 'image-data') . md5($regs[2]) . '.' . _image_extension_normalisee($extension);
329
+		$local = sous_repertoire(_DIR_VAR, 'image-data').md5($regs[2]).'.'._image_extension_normalisee($extension);
330 330
 		if (!file_exists($local)) {
331 331
 			ecrire_fichier($local, base64_decode($regs[2]));
332 332
 		}
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	// les protocoles web prennent au moins 3 lettres
344 344
 	if (tester_url_absolue($source)) {
345 345
 		include_spip('inc/distant');
346
-		$fichier = _DIR_RACINE . copie_locale($source);
346
+		$fichier = _DIR_RACINE.copie_locale($source);
347 347
 		if (!$fichier) {
348 348
 			return '';
349 349
 		}
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
 			// on garde la terminaison initiale car image simplement copiee
446 446
 			// et on postfixe son nom avec un md5 du path
447 447
 			$terminaison_dest = $terminaison;
448
-			$fichier_dest .= '-' . substr(md5("$identifiant"), 0, 5);
448
+			$fichier_dest .= '-'.substr(md5("$identifiant"), 0, 5);
449 449
 		} else {
450
-			$fichier_dest .= '-' . substr(md5("$identifiant-$effet"), 0, 5);
450
+			$fichier_dest .= '-'.substr(md5("$identifiant-$effet"), 0, 5);
451 451
 		}
452 452
 		$cache = sous_repertoire(_DIR_VAR, $cache);
453 453
 		$cache = sous_repertoire($cache, $effet);
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 		$fichier_dest = substr($fichier_dest, 2);
459 459
 	}
460 460
 
461
-	$fichier_dest = $cache . $fichier_dest . '.' . $terminaison_dest;
461
+	$fichier_dest = $cache.$fichier_dest.'.'.$terminaison_dest;
462 462
 
463 463
 	$GLOBALS['images_calculees'][] = $fichier_dest;
464 464
 
@@ -496,15 +496,15 @@  discard block
 block discarded – undo
496 496
 
497 497
 	if ($creer) {
498 498
 		spip_log(
499
-			'filtre image ' . ($fonction_creation ? reset($fonction_creation) : '') . "[$effet] sur $fichier",
500
-			'images' . _LOG_DEBUG
499
+			'filtre image '.($fonction_creation ? reset($fonction_creation) : '')."[$effet] sur $fichier",
500
+			'images'._LOG_DEBUG
501 501
 		);
502 502
 	}
503 503
 
504 504
 	$term_fonction = _image_trouver_extension_pertinente($fichier);
505
-	$ret['fonction_imagecreatefrom'] = '_imagecreatefrom' . $term_fonction;
505
+	$ret['fonction_imagecreatefrom'] = '_imagecreatefrom'.$term_fonction;
506 506
 	$ret['fichier'] = $fichier;
507
-	$ret['fonction_image'] = '_image_image' . $terminaison_dest;
507
+	$ret['fonction_image'] = '_image_image'.$terminaison_dest;
508 508
 	$ret['fichier_dest'] = $fichier_dest;
509 509
 	$ret['format_source'] = _image_extension_normalisee($terminaison);
510 510
 	$ret['format_dest'] = $terminaison_dest;
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 
655 655
 	$_terminaison = _image_trouver_extension_depuis_mime($mime);
656 656
 	if ($_terminaison and $_terminaison !== $terminaison) {
657
-		spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.' . _LOG_INFO_IMPORTANTE);
657
+		spip_log("Mauvaise extension du fichier : $path . Son type mime est : $mime", 'images.'._LOG_INFO_IMPORTANTE);
658 658
 		$terminaison = $_terminaison;
659 659
 	}
660 660
 	return $terminaison;
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 	if (!function_exists('imagepng')) {
812 812
 		return false;
813 813
 	}
814
-	$tmp = $fichier . '.tmp';
814
+	$tmp = $fichier.'.tmp';
815 815
 	$ret = imagepng($img, $tmp);
816 816
 	if (file_exists($tmp)) {
817 817
 		$taille_test = @getimagesize($tmp);
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	if (!function_exists('imagegif')) {
847 847
 		return false;
848 848
 	}
849
-	$tmp = $fichier . '.tmp';
849
+	$tmp = $fichier.'.tmp';
850 850
 	$ret = imagegif($img, $tmp);
851 851
 	if (file_exists($tmp)) {
852 852
 		$taille_test = @getimagesize($tmp);
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 	if (!function_exists('imagejpeg')) {
887 887
 		return false;
888 888
 	}
889
-	$tmp = $fichier . '.tmp';
889
+	$tmp = $fichier.'.tmp';
890 890
 
891 891
 	// Enable interlancing
892 892
 	imageinterlace($img, true);
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
 	if (!function_exists('imagewebp')) {
948 948
 		return false;
949 949
 	}
950
-	$tmp = $fichier . '.tmp';
950
+	$tmp = $fichier.'.tmp';
951 951
 	$ret = imagewebp($img, $tmp, $qualite);
952 952
 	if (file_exists($tmp)) {
953 953
 		$taille_test = @getimagesize($tmp);
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
  */
982 982
 function _image_imagesvg($img, $fichier) {
983 983
 
984
-	$tmp = $fichier . '.tmp';
984
+	$tmp = $fichier.'.tmp';
985 985
 	if (strpos($img, '<') === false) {
986 986
 		$img = supprimer_timestamp($img);
987 987
 		if (!file_exists($img)) {
@@ -1038,13 +1038,13 @@  discard block
 block discarded – undo
1038 1038
  */
1039 1039
 function _image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE, $fonction = null) {
1040 1040
 	if (is_null($fonction)) {
1041
-		$fonction = '_image_image' . $valeurs['format_dest'];
1041
+		$fonction = '_image_image'.$valeurs['format_dest'];
1042 1042
 	}
1043 1043
 	$ret = false;
1044 1044
 	#un flag pour reperer les images gravees
1045 1045
 	$lock = (
1046 1046
 		!statut_effacer_images_temporaires('get') // si la fonction n'a pas ete activee, on grave tout
1047
-		or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'] . '.src'))
1047
+		or (@file_exists($valeurs['fichier_dest']) and !@file_exists($valeurs['fichier_dest'].'.src'))
1048 1048
 	);
1049 1049
 	if (
1050 1050
 		function_exists($fonction)
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
 			// dans tous les cas mettre a jour la taille de l'image finale
1057 1057
 			[$valeurs['hauteur_dest'], $valeurs['largeur_dest']] = taille_image($valeurs['fichier_dest']);
1058 1058
 			$valeurs['date'] = @filemtime($valeurs['fichier_dest']); // pour la retrouver apres disparition
1059
-			ecrire_fichier($valeurs['fichier_dest'] . '.src', serialize($valeurs), true);
1059
+			ecrire_fichier($valeurs['fichier_dest'].'.src', serialize($valeurs), true);
1060 1060
 		}
1061 1061
 	}
1062 1062
 
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
 
1232 1232
 	// attributs deprecies. Transformer en CSS
1233 1233
 	if ($espace = extraire_attribut($tag, 'hspace')) {
1234
-		$style = "margin:{$espace}px;" . $style;
1234
+		$style = "margin:{$espace}px;".$style;
1235 1235
 		$tag = inserer_attribut($tag, 'hspace', '');
1236 1236
 	}
1237 1237
 
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
 	$image = $valeurs['fichier'];
1359 1359
 	$format = $valeurs['format_source'];
1360 1360
 	$destdir = dirname($valeurs['fichier_dest']);
1361
-	$destfile = basename($valeurs['fichier_dest'], '.' . $valeurs['format_dest']);
1361
+	$destfile = basename($valeurs['fichier_dest'], '.'.$valeurs['format_dest']);
1362 1362
 
1363 1363
 	$format_sortie = $valeurs['format_dest'];
1364 1364
 
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
 
1391 1391
 	// Si l'image est de la taille demandee (ou plus petite), simplement la retourner
1392 1392
 	if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1393
-		$vignette = $destination . '.' . $format;
1393
+		$vignette = $destination.'.'.$format;
1394 1394
 		@copy($image, $vignette);
1395 1395
 	}
1396 1396
 
@@ -1398,7 +1398,7 @@  discard block
 block discarded – undo
1398 1398
 		include_spip('inc/svg');
1399 1399
 		if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) {
1400 1400
 			$format_sortie = 'svg';
1401
-			$vignette = $destination . '.' . $format_sortie;
1401
+			$vignette = $destination.'.'.$format_sortie;
1402 1402
 			$valeurs['fichier_dest'] = $vignette;
1403 1403
 			_image_gd_output($svg, $valeurs);
1404 1404
 		}
@@ -1410,9 +1410,9 @@  discard block
 block discarded – undo
1410 1410
 			define('_CONVERT_COMMAND', 'convert');
1411 1411
 		} // Securite : mes_options.php peut preciser le chemin absolu
1412 1412
 		if (!defined('_RESIZE_COMMAND')) {
1413
-			define('_RESIZE_COMMAND', _CONVERT_COMMAND . ' -quality ' . _IMG_CONVERT_QUALITE . ' -resize %xx%y! %src %dest');
1413
+			define('_RESIZE_COMMAND', _CONVERT_COMMAND.' -quality '._IMG_CONVERT_QUALITE.' -resize %xx%y! %src %dest');
1414 1414
 		}
1415
-		$vignette = $destination . '.' . $format_sortie;
1415
+		$vignette = $destination.'.'.$format_sortie;
1416 1416
 		$commande = str_replace(
1417 1417
 			['%x', '%y', '%src', '%dest'],
1418 1418
 			[
@@ -1428,7 +1428,7 @@  discard block
 block discarded – undo
1428 1428
 		if (!@file_exists($vignette)) {
1429 1429
 			spip_log("echec convert sur $vignette");
1430 1430
 
1431
-			return;  // echec commande
1431
+			return; // echec commande
1432 1432
 		}
1433 1433
 	}
1434 1434
 
@@ -1445,7 +1445,7 @@  discard block
 block discarded – undo
1445 1445
 		if (!$output) {
1446 1446
 			return;
1447 1447
 		}
1448
-		$vignette = $output . DIRECTORY_SEPARATOR . basename($destination) . '.' . $format_sortie;
1448
+		$vignette = $output.DIRECTORY_SEPARATOR.basename($destination).'.'.$format_sortie;
1449 1449
 
1450 1450
 		$imagick = new Imagick();
1451 1451
 		$imagick->readImage(realpath($image));
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
 			$destHeight,
1455 1455
 			Imagick::FILTER_LANCZOS,
1456 1456
 			1
1457
-		);//, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1457
+		); //, IMAGICK_FILTER_LANCZOS, _IMG_IMAGICK_QUALITE / 100);
1458 1458
 		$imagick->writeImage($vignette);
1459 1459
 
1460 1460
 		if (!@file_exists($vignette)) {
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 			return;
1464 1464
 		}
1465 1465
 		// remettre le chemin relatif car c'est ce qu'attend SPIP pour la suite (en particlier action/tester)
1466
-		$vignette = $destination . '.' . $format_sortie;
1466
+		$vignette = $destination.'.'.$format_sortie;
1467 1467
 	}
1468 1468
 
1469 1469
 	// netpbm
@@ -1474,11 +1474,11 @@  discard block
 block discarded – undo
1474 1474
 		if (_PNMSCALE_COMMAND == '') {
1475 1475
 			return;
1476 1476
 		}
1477
-		$vignette = $destination . '.' . $format_sortie;
1477
+		$vignette = $destination.'.'.$format_sortie;
1478 1478
 		$pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', _PNMSCALE_COMMAND);
1479 1479
 		if ($format == 'jpg') {
1480 1480
 			$jpegtopnm_command = str_replace('pnmscale', 'jpegtopnm', _PNMSCALE_COMMAND);
1481
-			exec("$jpegtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1481
+			exec("$jpegtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1482 1482
 			if (!($s = @filesize($vignette))) {
1483 1483
 				spip_unlink($vignette);
1484 1484
 			}
@@ -1490,7 +1490,7 @@  discard block
 block discarded – undo
1490 1490
 		} else {
1491 1491
 			if ($format == 'gif') {
1492 1492
 				$giftopnm_command = str_replace('pnmscale', 'giftopnm', _PNMSCALE_COMMAND);
1493
-				exec("$giftopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1493
+				exec("$giftopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1494 1494
 				if (!($s = @filesize($vignette))) {
1495 1495
 					spip_unlink($vignette);
1496 1496
 				}
@@ -1502,7 +1502,7 @@  discard block
 block discarded – undo
1502 1502
 			} else {
1503 1503
 				if ($format == 'png') {
1504 1504
 					$pngtopnm_command = str_replace('pnmscale', 'pngtopnm', _PNMSCALE_COMMAND);
1505
-					exec("$pngtopnm_command $image | " . _PNMSCALE_COMMAND . " -width $destWidth | $pnmtojpeg_command > $vignette");
1505
+					exec("$pngtopnm_command $image | "._PNMSCALE_COMMAND." -width $destWidth | $pnmtojpeg_command > $vignette");
1506 1506
 					if (!($s = @filesize($vignette))) {
1507 1507
 						spip_unlink($vignette);
1508 1508
 					}
@@ -1524,7 +1524,7 @@  discard block
 block discarded – undo
1524 1524
 			return;
1525 1525
 		}
1526 1526
 		if (_IMG_GD_MAX_PIXELS && $srcWidth * $srcHeight > _IMG_GD_MAX_PIXELS) {
1527
-			spip_log('vignette gd1/gd2 impossible : ' . $srcWidth * $srcHeight . 'pixels');
1527
+			spip_log('vignette gd1/gd2 impossible : '.$srcWidth * $srcHeight.'pixels');
1528 1528
 
1529 1529
 			return;
1530 1530
 		}
@@ -1834,7 +1834,7 @@  discard block
 block discarded – undo
1834 1834
 		// de l'image, de facon a tromper le cache du navigateur
1835 1835
 		// quand on fait supprimer/reuploader un logo
1836 1836
 		// (pas de filemtime si SAFE MODE)
1837
-		$date = test_espace_prive() ? ('?' . $date) : '';
1837
+		$date = test_espace_prive() ? ('?'.$date) : '';
1838 1838
 
1839 1839
 		return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]);
1840 1840
 	}
@@ -1880,7 +1880,7 @@  discard block
 block discarded – undo
1880 1880
 	public static function LittleEndian2String($number, $minbytes = 1) {
1881 1881
 		$intstring = '';
1882 1882
 		while ($number > 0) {
1883
-			$intstring = $intstring . chr($number & 255);
1883
+			$intstring = $intstring.chr($number & 255);
1884 1884
 			$number >>= 8;
1885 1885
 		}
1886 1886
 
@@ -1912,9 +1912,9 @@  discard block
 block discarded – undo
1912 1912
 					$b = $argb['blue'];
1913 1913
 
1914 1914
 					if ($bpp[$key] == 32) {
1915
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r) . chr($a);
1915
+						$icXOR[$key] .= chr($b).chr($g).chr($r).chr($a);
1916 1916
 					} elseif ($bpp[$key] == 24) {
1917
-						$icXOR[$key] .= chr($b) . chr($g) . chr($r);
1917
+						$icXOR[$key] .= chr($b).chr($g).chr($r);
1918 1918
 					}
1919 1919
 
1920 1920
 					if ($a < 128) {
@@ -1941,48 +1941,48 @@  discard block
 block discarded – undo
1941 1941
 
1942 1942
 			// BITMAPINFOHEADER - 40 bytes
1943 1943
 			$BitmapInfoHeader[$key] = '';
1944
-			$BitmapInfoHeader[$key] .= "\x28\x00\x00\x00";                // DWORD  biSize;
1945
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4);    // LONG   biWidth;
1944
+			$BitmapInfoHeader[$key] .= "\x28\x00\x00\x00"; // DWORD  biSize;
1945
+			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageWidths[$key], 4); // LONG   biWidth;
1946 1946
 			// The biHeight member specifies the combined
1947 1947
 			// height of the XOR and AND masks.
1948 1948
 			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($ImageHeights[$key] * 2, 4); // LONG   biHeight;
1949
-			$BitmapInfoHeader[$key] .= "\x01\x00";                    // WORD   biPlanes;
1950
-			$BitmapInfoHeader[$key] .= chr($bpp[$key]) . "\x00";              // wBitCount;
1951
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biCompression;
1952
-			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4);      // DWORD  biSizeImage;
1953
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biXPelsPerMeter;
1954
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // LONG   biYPelsPerMeter;
1955
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrUsed;
1956
-			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00";                // DWORD  biClrImportant;
1949
+			$BitmapInfoHeader[$key] .= "\x01\x00"; // WORD   biPlanes;
1950
+			$BitmapInfoHeader[$key] .= chr($bpp[$key])."\x00"; // wBitCount;
1951
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biCompression;
1952
+			$BitmapInfoHeader[$key] .= phpthumb_functions::LittleEndian2String($biSizeImage, 4); // DWORD  biSizeImage;
1953
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG   biXPelsPerMeter;
1954
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // LONG   biYPelsPerMeter;
1955
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biClrUsed;
1956
+			$BitmapInfoHeader[$key] .= "\x00\x00\x00\x00"; // DWORD  biClrImportant;
1957 1957
 		}
1958 1958
 
1959 1959
 
1960
-		$icondata = "\x00\x00";                    // idReserved;   // Reserved (must be 0)
1961
-		$icondata .= "\x01\x00";                    // idType;	   // Resource Type (1 for icons)
1962
-		$icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2);  // idCount;	  // How many images?
1960
+		$icondata = "\x00\x00"; // idReserved;   // Reserved (must be 0)
1961
+		$icondata .= "\x01\x00"; // idType;	   // Resource Type (1 for icons)
1962
+		$icondata .= phpthumb_functions::LittleEndian2String(count($gd_image_array), 2); // idCount;	  // How many images?
1963 1963
 
1964 1964
 		$dwImageOffset = 6 + (count($gd_image_array) * 16);
1965 1965
 		foreach ($gd_image_array as $key => $gd_image) {
1966 1966
 			// ICONDIRENTRY   idEntries[1]; // An entry for each image (idCount of 'em)
1967 1967
 
1968
-			$icondata .= chr($ImageWidths[$key]);           // bWidth;		  // Width, in pixels, of the image
1969
-			$icondata .= chr($ImageHeights[$key]);          // bHeight;		 // Height, in pixels, of the image
1970
-			$icondata .= chr($totalcolors[$key]);           // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1971
-			$icondata .= "\x00";                    // bReserved;	   // Reserved ( must be 0)
1968
+			$icondata .= chr($ImageWidths[$key]); // bWidth;		  // Width, in pixels, of the image
1969
+			$icondata .= chr($ImageHeights[$key]); // bHeight;		 // Height, in pixels, of the image
1970
+			$icondata .= chr($totalcolors[$key]); // bColorCount;	 // Number of colors in image (0 if >=8bpp)
1971
+			$icondata .= "\x00"; // bReserved;	   // Reserved ( must be 0)
1972 1972
 
1973
-			$icondata .= "\x01\x00";                  // wPlanes;		 // Color Planes
1974
-			$icondata .= chr($bpp[$key]) . "\x00";            // wBitCount;	   // Bits per pixel
1973
+			$icondata .= "\x01\x00"; // wPlanes;		 // Color Planes
1974
+			$icondata .= chr($bpp[$key])."\x00"; // wBitCount;	   // Bits per pixel
1975 1975
 
1976 1976
 			$dwBytesInRes = 40 + strlen($icXOR[$key]) + strlen($icAND[$key]);
1977 1977
 			$icondata .= phpthumb_functions::LittleEndian2String(
1978 1978
 				$dwBytesInRes,
1979 1979
 				4
1980
-			);     // dwBytesInRes;	// How many bytes in this resource?
1980
+			); // dwBytesInRes;	// How many bytes in this resource?
1981 1981
 
1982 1982
 			$icondata .= phpthumb_functions::LittleEndian2String(
1983 1983
 				$dwImageOffset,
1984 1984
 				4
1985
-			);    // dwImageOffset;   // Where in the file is this image?
1985
+			); // dwImageOffset;   // Where in the file is this image?
1986 1986
 			$dwImageOffset += strlen($BitmapInfoHeader[$key]);
1987 1987
 			$dwImageOffset += strlen($icXOR[$key]);
1988 1988
 			$dwImageOffset += strlen($icAND[$key]);
Please login to merge, or discard this patch.
Braces   +4 added lines, -9 removed lines patch added patch discarded remove patch
@@ -542,8 +542,7 @@  discard block
 block discarded – undo
542 542
 			process_image_svg_identite($ret);
543 543
 			$ret['creer'] = false;
544 544
 		}
545
-	}
546
-	else {
545
+	} else {
547 546
 		if (!function_exists($ret['fonction_imagecreatefrom'])) {
548 547
 			return false;
549 548
 		}
@@ -647,8 +646,7 @@  discard block
 block discarded – undo
647 646
 
648 647
 	if (isset($info['mime'])) {
649 648
 		$mime = $info['mime'];
650
-	}
651
-	else {
649
+	} else {
652 650
 		$mime = image_type_to_mime_type($info[2]);
653 651
 	}
654 652
 
@@ -1392,9 +1390,7 @@  discard block
 block discarded – undo
1392 1390
 	if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1393 1391
 		$vignette = $destination . '.' . $format;
1394 1392
 		@copy($image, $vignette);
1395
-	}
1396
-
1397
-	elseif ($valeurs['format_source'] === 'svg') {
1393
+	} elseif ($valeurs['format_source'] === 'svg') {
1398 1394
 		include_spip('inc/svg');
1399 1395
 		if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) {
1400 1396
 			$format_sortie = 'svg';
@@ -1837,8 +1833,7 @@  discard block
 block discarded – undo
1837 1833
 		$date = test_espace_prive() ? ('?' . $date) : '';
1838 1834
 
1839 1835
 		return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]);
1840
-	}
1841
-	else {
1836
+	} else {
1842 1837
 		# BMP, tiff ... les redacteurs osent tout!
1843 1838
 		return $img;
1844 1839
 	}
Please login to merge, or discard this patch.