Completed
Push — master ( eb91e6...90b640 )
by cam
01:14
created
ecrire/lang/ecrire_en.php 1 patch
Indentation   +839 added lines, -839 removed lines patch added patch discarded remove patch
@@ -4,431 +4,431 @@  discard block
 block discarded – undo
4 4
 // ** ne pas modifier le fichier **
5 5
 
6 6
 if (!defined('_ECRIRE_INC_VERSION')) {
7
-	return;
7
+    return;
8 8
 }
9 9
 
10 10
 $GLOBALS[$GLOBALS['idx_lang']] = array(
11 11
 
12
-	// A
13
-	'activer_plugin' => 'Enable plugin',
14
-	'affichage' => 'Display',
15
-	'aide_non_disponible' => 'This part of the online help is not yet available in this language.',
16
-	'annuler_recherche' => 'Cancel the search',
17
-	'auteur' => 'Author:',
18
-	'avis_acces_interdit' => 'Access forbidden.',
19
-	'avis_acces_interdit_prive' => 'You are not allowed to access the page <b>@exec@</b>.',
20
-	'avis_article_modifie' => 'Warning: @nom_auteur_modif@ modified this article @date_diff@ minutes ago',
21
-	'avis_aucun_resultat' => 'No results found.',
22
-	'avis_base_inaccessible' => 'Impossible to connect to the database @base@.',
23
-	'avis_chemin_invalide_1' => 'The path you selected',
24
-	'avis_chemin_invalide_2' => 'does not seem to be valid. Please go back to previous page and check the information you provided.',
25
-	'avis_connexion_echec_1' => 'Connection to the SQL server failed.',
26
-	'avis_connexion_echec_2' => 'Go back to the previous page, and check the information you provided.',
27
-	'avis_connexion_echec_3' => '<b>N.B.</b> On many servers, you must <b>request</b> activation of your access to the SQL database before you can use it. If you cannot connect to your database, check that activation has been done.',
28
-	'avis_connexion_erreur_creer_base' => 'The database could not be created.',
29
-	'avis_connexion_erreur_fichier_cle_manquant_1' => 'Installation must be performed by a webmaster with a backup of the keys and their password',
30
-	'avis_connexion_erreur_fichier_cle_manquant_2' => 'Installation must be performed by a webmaster with a backup of the keys',
31
-	'avis_connexion_erreur_nom_base' => 'The database’s name should only contain letters, digits and hyphens.',
32
-	'avis_connexion_ldap_echec_1' => 'Connection to the LDAP server failed.',
33
-	'avis_connexion_ldap_echec_2' => 'Go back to the previous page, and check the information you provided.',
34
-	'avis_connexion_ldap_echec_3' => 'Alternatively, do not use LDAP support to import users.',
35
-	'avis_deplacement_rubrique' => 'Warning! This section contains @contient_breves@ news item@scb@: if you move it, please check this box to confirm.',
36
-	'avis_erreur_connexion_mysql' => 'SQL connection error',
37
-	'avis_erreur_creation_compte' => 'Failure during account initialisation',
38
-	'avis_espace_interdit' => '<b>Forbidden area</b> <div>SPIP is already installed.</div>',
39
-	'avis_lecture_noms_bases_1' => 'The installer could not read the names of any databases already installed.',
40
-	'avis_lecture_noms_bases_2' => 'Either no database is available, or the option listing databases was disabled for security reasons (which is the case with various hosting services).',
41
-	'avis_lecture_noms_bases_3' => 'In the second case, a database named after your login might already be available:',
42
-	'avis_non_acces_page' => 'You do not have access to this page.',
43
-	'avis_operation_echec' => 'The operation failed.',
44
-	'avis_operation_impossible' => 'Operation impossible',
45
-	'avis_suppression_base' => 'WARNING: data deletion is irreversible',
12
+    // A
13
+    'activer_plugin' => 'Enable plugin',
14
+    'affichage' => 'Display',
15
+    'aide_non_disponible' => 'This part of the online help is not yet available in this language.',
16
+    'annuler_recherche' => 'Cancel the search',
17
+    'auteur' => 'Author:',
18
+    'avis_acces_interdit' => 'Access forbidden.',
19
+    'avis_acces_interdit_prive' => 'You are not allowed to access the page <b>@exec@</b>.',
20
+    'avis_article_modifie' => 'Warning: @nom_auteur_modif@ modified this article @date_diff@ minutes ago',
21
+    'avis_aucun_resultat' => 'No results found.',
22
+    'avis_base_inaccessible' => 'Impossible to connect to the database @base@.',
23
+    'avis_chemin_invalide_1' => 'The path you selected',
24
+    'avis_chemin_invalide_2' => 'does not seem to be valid. Please go back to previous page and check the information you provided.',
25
+    'avis_connexion_echec_1' => 'Connection to the SQL server failed.',
26
+    'avis_connexion_echec_2' => 'Go back to the previous page, and check the information you provided.',
27
+    'avis_connexion_echec_3' => '<b>N.B.</b> On many servers, you must <b>request</b> activation of your access to the SQL database before you can use it. If you cannot connect to your database, check that activation has been done.',
28
+    'avis_connexion_erreur_creer_base' => 'The database could not be created.',
29
+    'avis_connexion_erreur_fichier_cle_manquant_1' => 'Installation must be performed by a webmaster with a backup of the keys and their password',
30
+    'avis_connexion_erreur_fichier_cle_manquant_2' => 'Installation must be performed by a webmaster with a backup of the keys',
31
+    'avis_connexion_erreur_nom_base' => 'The database’s name should only contain letters, digits and hyphens.',
32
+    'avis_connexion_ldap_echec_1' => 'Connection to the LDAP server failed.',
33
+    'avis_connexion_ldap_echec_2' => 'Go back to the previous page, and check the information you provided.',
34
+    'avis_connexion_ldap_echec_3' => 'Alternatively, do not use LDAP support to import users.',
35
+    'avis_deplacement_rubrique' => 'Warning! This section contains @contient_breves@ news item@scb@: if you move it, please check this box to confirm.',
36
+    'avis_erreur_connexion_mysql' => 'SQL connection error',
37
+    'avis_erreur_creation_compte' => 'Failure during account initialisation',
38
+    'avis_espace_interdit' => '<b>Forbidden area</b> <div>SPIP is already installed.</div>',
39
+    'avis_lecture_noms_bases_1' => 'The installer could not read the names of any databases already installed.',
40
+    'avis_lecture_noms_bases_2' => 'Either no database is available, or the option listing databases was disabled for security reasons (which is the case with various hosting services).',
41
+    'avis_lecture_noms_bases_3' => 'In the second case, a database named after your login might already be available:',
42
+    'avis_non_acces_page' => 'You do not have access to this page.',
43
+    'avis_operation_echec' => 'The operation failed.',
44
+    'avis_operation_impossible' => 'Operation impossible',
45
+    'avis_suppression_base' => 'WARNING: data deletion is irreversible',
46 46
 
47
-	// B
48
-	'bouton_acces_ldap' => 'Add LDAP access',
49
-	'bouton_ajouter' => 'Add',
50
-	'bouton_annuler' => 'Cancel',
51
-	'bouton_cache_activer' => 'Re-activate the cache',
52
-	'bouton_cache_desactiver' => 'Disable the cache momentarily',
53
-	'bouton_demande_publication' => 'Request publication of this article',
54
-	'bouton_desactive_tout' => 'Disable all',
55
-	'bouton_desinstaller' => 'Uninstall',
56
-	'bouton_effacer_tout' => 'Delete ALL',
57
-	'bouton_envoyer_message' => 'Message complete: send',
58
-	'bouton_fermer' => 'Close',
59
-	'bouton_mettre_a_jour_base' => 'Update the database',
60
-	'bouton_modifier' => 'Modify',
61
-	'bouton_radio_afficher' => 'Show',
62
-	'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Appear in the list of editors online',
63
-	'bouton_radio_envoi_annonces_adresse' => 'Send announcements to:',
64
-	'bouton_radio_envoi_liste_nouveautes' => 'Send news update list',
65
-	'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Do not appear in the list of editors online',
66
-	'bouton_radio_non_envoi_annonces_editoriales' => 'Do not send any editorial announcements',
67
-	'bouton_redirection' => 'REDIRECT',
68
-	'bouton_reinitialiser_aux_valeurs_par_defaut' => 'Reset to default values',
69
-	'bouton_relancer_inscription' => 'Re-launch registration',
70
-	'bouton_relancer_inscriptions' => 'Re-launch registrations',
71
-	'bouton_relancer_installation' => 'Recommence installation',
72
-	'bouton_reset_password' => 'Create a new password and send by e-mail',
73
-	'bouton_suivant' => 'Next',
74
-	'bouton_tenter_recuperation' => 'Attempt to repair',
75
-	'bouton_test_proxy' => 'Test the proxy',
76
-	'bouton_vider_cache' => 'Empty the cache',
47
+    // B
48
+    'bouton_acces_ldap' => 'Add LDAP access',
49
+    'bouton_ajouter' => 'Add',
50
+    'bouton_annuler' => 'Cancel',
51
+    'bouton_cache_activer' => 'Re-activate the cache',
52
+    'bouton_cache_desactiver' => 'Disable the cache momentarily',
53
+    'bouton_demande_publication' => 'Request publication of this article',
54
+    'bouton_desactive_tout' => 'Disable all',
55
+    'bouton_desinstaller' => 'Uninstall',
56
+    'bouton_effacer_tout' => 'Delete ALL',
57
+    'bouton_envoyer_message' => 'Message complete: send',
58
+    'bouton_fermer' => 'Close',
59
+    'bouton_mettre_a_jour_base' => 'Update the database',
60
+    'bouton_modifier' => 'Modify',
61
+    'bouton_radio_afficher' => 'Show',
62
+    'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Appear in the list of editors online',
63
+    'bouton_radio_envoi_annonces_adresse' => 'Send announcements to:',
64
+    'bouton_radio_envoi_liste_nouveautes' => 'Send news update list',
65
+    'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Do not appear in the list of editors online',
66
+    'bouton_radio_non_envoi_annonces_editoriales' => 'Do not send any editorial announcements',
67
+    'bouton_redirection' => 'REDIRECT',
68
+    'bouton_reinitialiser_aux_valeurs_par_defaut' => 'Reset to default values',
69
+    'bouton_relancer_inscription' => 'Re-launch registration',
70
+    'bouton_relancer_inscriptions' => 'Re-launch registrations',
71
+    'bouton_relancer_installation' => 'Recommence installation',
72
+    'bouton_reset_password' => 'Create a new password and send by e-mail',
73
+    'bouton_suivant' => 'Next',
74
+    'bouton_tenter_recuperation' => 'Attempt to repair',
75
+    'bouton_test_proxy' => 'Test the proxy',
76
+    'bouton_vider_cache' => 'Empty the cache',
77 77
 
78
-	// C
79
-	'cache_modifiable_webmestre' => 'This parameter can be modified by the webmaster.',
80
-	'calendrier_synchro' => 'If you use a calendar application compatible with <b>iCal</b>, you can synchronise it with information from this site.',
81
-	'config_activer_champs' => 'Activate the following fields',
82
-	'config_choix_base_sup' => 'Choose a database on this server',
83
-	'config_erreur_base_sup' => 'SPIP does not have access to the list of databases available',
84
-	'config_info_base_sup' => 'If you need to query other databases using SPIP, whether on this SQL server or elsewhere, use this form to declare them. If you leave any fields empty, connection details to the main database will be used.',
85
-	'config_info_base_sup_disponibles' => 'Additional databases to which queries may be sent:',
86
-	'config_info_enregistree' => 'The new configuration has been saved',
87
-	'config_info_logos' => 'Each element of the site can have its own logo as well as a "mouseover" logo',
88
-	'config_info_logos_utiliser' => 'Use logos',
89
-	'config_info_logos_utiliser_non' => 'Do not use logos',
90
-	'config_info_logos_utiliser_survol' => 'Use "mouseover" logos',
91
-	'config_info_logos_utiliser_survol_non' => 'Do not use "mouseover" logos',
92
-	'config_info_redirection' => 'By activating this option you can create virtual articles, which are simply links to articles published on other sites, not necessarily using SPIP.',
93
-	'config_redirection' => 'Virtual articles',
94
-	'config_titre_base_sup' => 'Declaration of an additional database',
95
-	'config_titre_base_sup_choix' => 'Choose an additional database',
96
-	'connexion_ldap' => 'Connection:',
97
-	'creer_et_associer_un_auteur' => 'Create and associate an author',
78
+    // C
79
+    'cache_modifiable_webmestre' => 'This parameter can be modified by the webmaster.',
80
+    'calendrier_synchro' => 'If you use a calendar application compatible with <b>iCal</b>, you can synchronise it with information from this site.',
81
+    'config_activer_champs' => 'Activate the following fields',
82
+    'config_choix_base_sup' => 'Choose a database on this server',
83
+    'config_erreur_base_sup' => 'SPIP does not have access to the list of databases available',
84
+    'config_info_base_sup' => 'If you need to query other databases using SPIP, whether on this SQL server or elsewhere, use this form to declare them. If you leave any fields empty, connection details to the main database will be used.',
85
+    'config_info_base_sup_disponibles' => 'Additional databases to which queries may be sent:',
86
+    'config_info_enregistree' => 'The new configuration has been saved',
87
+    'config_info_logos' => 'Each element of the site can have its own logo as well as a "mouseover" logo',
88
+    'config_info_logos_utiliser' => 'Use logos',
89
+    'config_info_logos_utiliser_non' => 'Do not use logos',
90
+    'config_info_logos_utiliser_survol' => 'Use "mouseover" logos',
91
+    'config_info_logos_utiliser_survol_non' => 'Do not use "mouseover" logos',
92
+    'config_info_redirection' => 'By activating this option you can create virtual articles, which are simply links to articles published on other sites, not necessarily using SPIP.',
93
+    'config_redirection' => 'Virtual articles',
94
+    'config_titre_base_sup' => 'Declaration of an additional database',
95
+    'config_titre_base_sup_choix' => 'Choose an additional database',
96
+    'connexion_ldap' => 'Connection:',
97
+    'creer_et_associer_un_auteur' => 'Create and associate an author',
98 98
 
99
-	// D
100
-	'date_mot_heures' => 'H',
99
+    // D
100
+    'date_mot_heures' => 'H',
101 101
 
102
-	// E
103
-	'ecran_connexion_couleur_principale' => 'Main colour',
104
-	'ecran_connexion_image_fond' => 'Background image',
105
-	'ecran_connexion_image_fond_explication' => 'Use an image (JPEG format, 1920x1080 pixels)',
106
-	'ecran_connexion_image_revenir_couleur_defaut' => 'Back to the default colour',
107
-	'ecran_connexion_titre' => 'Connection screen',
108
-	'ecran_securite' => '+ safety screen @version@',
109
-	'email' => 'email',
110
-	'email_2' => 'email:',
111
-	'en_savoir_plus' => 'Learn more',
112
-	'entree_adresse_annuaire' => 'Directory address',
113
-	'entree_adresse_email' => 'Your email address',
114
-	'entree_adresse_email_2' => 'E-mail address',
115
-	'entree_base_donnee_1' => 'Database address',
116
-	'entree_base_donnee_2' => '(This address is often your site’s URL, although sometimes it will be "localhost", and sometimes it should be left blank.)',
117
-	'entree_biographie' => 'Brief biography',
118
-	'entree_chemin_acces' => '<b>Enter</b> the path:',
119
-	'entree_cle_pgp' => 'Your PGP key',
120
-	'entree_cle_pgp_2' => 'PGP key',
121
-	'entree_contenu_rubrique' => '(Brief description of the content of this section.)',
122
-	'entree_identifiants_connexion' => 'Your connection identifiers...',
123
-	'entree_identifiants_connexion_2' => 'Connection identifiers',
124
-	'entree_informations_connexion_ldap' => 'Please fill this form with the LDAP connection information provided by your system or network administrator.',
125
-	'entree_infos_perso' => 'Who are you?',
126
-	'entree_infos_perso_2' => 'Who is the author?',
127
-	'entree_interieur_rubrique' => 'In the section:',
128
-	'entree_liens_sites' => '<b>Hyperlink</b> (reference, site to visit etc.)',
129
-	'entree_login' => 'Your login',
130
-	'entree_login_connexion_1' => 'Connection login',
131
-	'entree_login_connexion_2' => '(Sometimes matches your FTP account login and sometimes left empty)',
132
-	'entree_mot_passe' => 'Your password',
133
-	'entree_mot_passe_1' => 'Password',
134
-	'entree_mot_passe_2' => '(Sometimes matches your FTP access password and sometimes left empty)',
135
-	'entree_nom_fichier' => 'Please enter the filename @texte_compresse@:',
136
-	'entree_nom_pseudo' => 'Your name or alias',
137
-	'entree_nom_pseudo_1' => '(Your name or alias)',
138
-	'entree_nom_pseudo_2' => 'Name or alias',
139
-	'entree_nom_site' => 'Website’s name',
140
-	'entree_nom_site_2' => 'Author’s website’s name',
141
-	'entree_nouveau_passe' => 'New password',
142
-	'entree_passe_ldap' => 'Password',
143
-	'entree_port_annuaire' => 'Port number of the directory',
144
-	'entree_signature' => 'Signature',
145
-	'entree_titre_obligatoire' => '<b>Title</b> [Required]<br />',
146
-	'entree_url' => 'Website’s URL',
147
-	'entree_url_2' => 'Website’s URL',
148
-	'erreur_connect_deja_existant' => 'A server by that name already exists',
149
-	'erreur_contenu_suspect' => 'Text escaped',
150
-	'erreur_email_deja_existant' => 'This email address has already been registered.',
151
-	'erreur_nom_connect_incorrect' => 'Server name not allowed',
152
-	'erreur_plugin_attribut_balise_manquant' => 'Missing attribute @attribut@ in tag @balise@',
153
-	'erreur_plugin_desinstalation_echouee' => 'Uninstallation of the plugin failed. However, you may deactivate it.',
154
-	'erreur_plugin_fichier_absent' => 'File missing',
155
-	'erreur_plugin_fichier_def_absent' => 'Definition file missing',
156
-	'erreur_plugin_nom_fonction_interdit' => 'Prohibited function name',
157
-	'erreur_plugin_nom_manquant' => 'Missing plugin name',
158
-	'erreur_plugin_prefix_manquant' => 'Namespace undefined for this plugin',
159
-	'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; missing in the definition file',
160
-	'erreur_plugin_version_manquant' => 'Plugin version missing',
161
-	'erreur_type_fichier' => 'Wrong file type',
102
+    // E
103
+    'ecran_connexion_couleur_principale' => 'Main colour',
104
+    'ecran_connexion_image_fond' => 'Background image',
105
+    'ecran_connexion_image_fond_explication' => 'Use an image (JPEG format, 1920x1080 pixels)',
106
+    'ecran_connexion_image_revenir_couleur_defaut' => 'Back to the default colour',
107
+    'ecran_connexion_titre' => 'Connection screen',
108
+    'ecran_securite' => '+ safety screen @version@',
109
+    'email' => 'email',
110
+    'email_2' => 'email:',
111
+    'en_savoir_plus' => 'Learn more',
112
+    'entree_adresse_annuaire' => 'Directory address',
113
+    'entree_adresse_email' => 'Your email address',
114
+    'entree_adresse_email_2' => 'E-mail address',
115
+    'entree_base_donnee_1' => 'Database address',
116
+    'entree_base_donnee_2' => '(This address is often your site’s URL, although sometimes it will be "localhost", and sometimes it should be left blank.)',
117
+    'entree_biographie' => 'Brief biography',
118
+    'entree_chemin_acces' => '<b>Enter</b> the path:',
119
+    'entree_cle_pgp' => 'Your PGP key',
120
+    'entree_cle_pgp_2' => 'PGP key',
121
+    'entree_contenu_rubrique' => '(Brief description of the content of this section.)',
122
+    'entree_identifiants_connexion' => 'Your connection identifiers...',
123
+    'entree_identifiants_connexion_2' => 'Connection identifiers',
124
+    'entree_informations_connexion_ldap' => 'Please fill this form with the LDAP connection information provided by your system or network administrator.',
125
+    'entree_infos_perso' => 'Who are you?',
126
+    'entree_infos_perso_2' => 'Who is the author?',
127
+    'entree_interieur_rubrique' => 'In the section:',
128
+    'entree_liens_sites' => '<b>Hyperlink</b> (reference, site to visit etc.)',
129
+    'entree_login' => 'Your login',
130
+    'entree_login_connexion_1' => 'Connection login',
131
+    'entree_login_connexion_2' => '(Sometimes matches your FTP account login and sometimes left empty)',
132
+    'entree_mot_passe' => 'Your password',
133
+    'entree_mot_passe_1' => 'Password',
134
+    'entree_mot_passe_2' => '(Sometimes matches your FTP access password and sometimes left empty)',
135
+    'entree_nom_fichier' => 'Please enter the filename @texte_compresse@:',
136
+    'entree_nom_pseudo' => 'Your name or alias',
137
+    'entree_nom_pseudo_1' => '(Your name or alias)',
138
+    'entree_nom_pseudo_2' => 'Name or alias',
139
+    'entree_nom_site' => 'Website’s name',
140
+    'entree_nom_site_2' => 'Author’s website’s name',
141
+    'entree_nouveau_passe' => 'New password',
142
+    'entree_passe_ldap' => 'Password',
143
+    'entree_port_annuaire' => 'Port number of the directory',
144
+    'entree_signature' => 'Signature',
145
+    'entree_titre_obligatoire' => '<b>Title</b> [Required]<br />',
146
+    'entree_url' => 'Website’s URL',
147
+    'entree_url_2' => 'Website’s URL',
148
+    'erreur_connect_deja_existant' => 'A server by that name already exists',
149
+    'erreur_contenu_suspect' => 'Text escaped',
150
+    'erreur_email_deja_existant' => 'This email address has already been registered.',
151
+    'erreur_nom_connect_incorrect' => 'Server name not allowed',
152
+    'erreur_plugin_attribut_balise_manquant' => 'Missing attribute @attribut@ in tag @balise@',
153
+    'erreur_plugin_desinstalation_echouee' => 'Uninstallation of the plugin failed. However, you may deactivate it.',
154
+    'erreur_plugin_fichier_absent' => 'File missing',
155
+    'erreur_plugin_fichier_def_absent' => 'Definition file missing',
156
+    'erreur_plugin_nom_fonction_interdit' => 'Prohibited function name',
157
+    'erreur_plugin_nom_manquant' => 'Missing plugin name',
158
+    'erreur_plugin_prefix_manquant' => 'Namespace undefined for this plugin',
159
+    'erreur_plugin_tag_plugin_absent' => '&lt;plugin&gt; missing in the definition file',
160
+    'erreur_plugin_version_manquant' => 'Plugin version missing',
161
+    'erreur_type_fichier' => 'Wrong file type',
162 162
 
163
-	// H
164
-	'htaccess_a_simuler' => 'Warning: your HTTP server configuration ignores @htaccess@ files. To ensure good security, you should change the configuration for this. Alternatively, you should make sure that the constants @constantes@ (definable in the file mes_options.php) have as values directories outside @document_root@.',
165
-	'htaccess_inoperant' => 'inoperative htaccess',
163
+    // H
164
+    'htaccess_a_simuler' => 'Warning: your HTTP server configuration ignores @htaccess@ files. To ensure good security, you should change the configuration for this. Alternatively, you should make sure that the constants @constantes@ (definable in the file mes_options.php) have as values directories outside @document_root@.',
165
+    'htaccess_inoperant' => 'inoperative htaccess',
166 166
 
167
-	// I
168
-	'ical_info1' => 'This page offers several tools to be kept  up-to-date with website’s activity.',
169
-	'ical_info2' => 'For more information, do not hesitate to visit <a href="@spipnet@">SPIP’s documentation</a>.',
170
-	'ical_info_calendrier' => 'Two calendars are available. The first is a general, public calendar showing  articles as they are published. The second is personal and contains editorial announcements as well as your latest private messages: it is reserved for you via a personal key that you can modify at any time by renewing your password.',
171
-	'ical_methode_http' => 'Downloading',
172
-	'ical_methode_webcal' => 'Synchronisation (webcal://)',
173
-	'ical_texte_prive' => 'This calendar, which is strictly personal, informs you of the private editorial activity of this site (tasks, personal appointments, articles and news items submitted etc.).',
174
-	'ical_texte_public' => 'This calendar allows you to follow the public activity of this site (newly-published articles and news items).',
175
-	'ical_texte_rss' => 'You can syndicate the latest news from this site in any XML/RSS (Rich Site Summary) reader. This is also the format that allows SPIP to read the latest news published by other sites using a compatible exchange format (syndicated sites).',
176
-	'ical_titre_js' => 'Javascript',
177
-	'ical_titre_mailing' => 'Mailing-list',
178
-	'ical_titre_rss' => 'Syndication files',
179
-	'icone_accueil' => 'Home',
180
-	'icone_activer_cookie' => 'Place a cookie',
181
-	'icone_activite' => 'Feedback',
182
-	'icone_admin_plugin' => 'Manage plugins',
183
-	'icone_administration' => 'Maintenance',
184
-	'icone_afficher_auteurs' => 'Show authors',
185
-	'icone_afficher_visiteurs' => 'Show visitors',
186
-	'icone_arret_discussion' => 'Stop participating in this discussion',
187
-	'icone_calendrier' => 'Calendar',
188
-	'icone_configuration' => 'Configuration',
189
-	'icone_creer_auteur' => 'Create a new author and link him/her to this article',
190
-	'icone_creer_mot_cle' => 'Create a new keyword and link it to this article',
191
-	'icone_creer_rubrique_2' => 'Create a new section',
192
-	'icone_developpement' => 'Development',
193
-	'icone_edition' => 'Edit',
194
-	'icone_ma_langue' => 'My language',
195
-	'icone_mes_infos' => 'My details',
196
-	'icone_mes_preferences' => 'Preferences',
197
-	'icone_modifier_article' => 'Edit this article',
198
-	'icone_modifier_rubrique' => 'Edit this section',
199
-	'icone_publication' => 'Publish',
200
-	'icone_relancer_signataire' => 'Contact the signatory again',
201
-	'icone_retour' => 'Back',
202
-	'icone_retour_article' => 'Back to the article',
203
-	'icone_squelette' => 'Templates',
204
-	'icone_suivi_publication' => 'Publication follow up ',
205
-	'icone_supprimer_cookie' => 'Delete cookie',
206
-	'icone_supprimer_rubrique' => 'Delete this section',
207
-	'icone_supprimer_signature' => 'Delete this signature',
208
-	'icone_valider_signature' => 'Validate this signature',
209
-	'image_administrer_rubrique' => 'You can manage this section',
210
-	'impossible_modifier_login_auteur' => 'Login cannot be changed.',
211
-	'impossible_modifier_pass_auteur' => 'Password cannot be changed.',
212
-	'info_1_article' => '1 article',
213
-	'info_1_auteur' => '1 author',
214
-	'info_1_message' => '1 message',
215
-	'info_1_mot_cle' => '1 keyword',
216
-	'info_1_rubrique' => '1 section',
217
-	'info_1_visiteur' => '1 visitor',
218
-	'info_activer_cookie' => 'You can activate an <b>administration cookie</b>, which lets you switch easily between the public website and the admin area.',
219
-	'info_activer_menu_developpement' => 'Show the Development menu',
220
-	'info_admin_etre_webmestre' => 'Give me web administrator rights',
221
-	'info_admin_je_suis_webmestre' => 'I am a <b>webmaster</b>',
222
-	'info_admin_statuer_webmestre' => 'Give webmaster rights to this administrator ',
223
-	'info_admin_webmestre' => 'This administrator is <b>webmaster</b>',
224
-	'info_administrateur' => 'Administrator',
225
-	'info_administrateur_1' => 'Administrator',
226
-	'info_administrateur_2' => 'of the site (<i>use with caution</i>)',
227
-	'info_administrateur_site_01' => 'If you are a site administrator, please',
228
-	'info_administrateur_site_02' => 'click on this link',
229
-	'info_administrateurs' => 'Administrators',
230
-	'info_administrer_rubrique' => 'You can manage this section',
231
-	'info_adresse' => 'to this address:',
232
-	'info_adresse_desinscription' => 'Unsubscription address:',
233
-	'info_adresse_url' => 'URL of the public site',
234
-	'info_afficher_par_nb' => 'Show ',
235
-	'info_aide_en_ligne' => 'SPIP Online Help',
236
-	'info_ajout_image' => 'When you add images as attached documents to an article,
167
+    // I
168
+    'ical_info1' => 'This page offers several tools to be kept  up-to-date with website’s activity.',
169
+    'ical_info2' => 'For more information, do not hesitate to visit <a href="@spipnet@">SPIP’s documentation</a>.',
170
+    'ical_info_calendrier' => 'Two calendars are available. The first is a general, public calendar showing  articles as they are published. The second is personal and contains editorial announcements as well as your latest private messages: it is reserved for you via a personal key that you can modify at any time by renewing your password.',
171
+    'ical_methode_http' => 'Downloading',
172
+    'ical_methode_webcal' => 'Synchronisation (webcal://)',
173
+    'ical_texte_prive' => 'This calendar, which is strictly personal, informs you of the private editorial activity of this site (tasks, personal appointments, articles and news items submitted etc.).',
174
+    'ical_texte_public' => 'This calendar allows you to follow the public activity of this site (newly-published articles and news items).',
175
+    'ical_texte_rss' => 'You can syndicate the latest news from this site in any XML/RSS (Rich Site Summary) reader. This is also the format that allows SPIP to read the latest news published by other sites using a compatible exchange format (syndicated sites).',
176
+    'ical_titre_js' => 'Javascript',
177
+    'ical_titre_mailing' => 'Mailing-list',
178
+    'ical_titre_rss' => 'Syndication files',
179
+    'icone_accueil' => 'Home',
180
+    'icone_activer_cookie' => 'Place a cookie',
181
+    'icone_activite' => 'Feedback',
182
+    'icone_admin_plugin' => 'Manage plugins',
183
+    'icone_administration' => 'Maintenance',
184
+    'icone_afficher_auteurs' => 'Show authors',
185
+    'icone_afficher_visiteurs' => 'Show visitors',
186
+    'icone_arret_discussion' => 'Stop participating in this discussion',
187
+    'icone_calendrier' => 'Calendar',
188
+    'icone_configuration' => 'Configuration',
189
+    'icone_creer_auteur' => 'Create a new author and link him/her to this article',
190
+    'icone_creer_mot_cle' => 'Create a new keyword and link it to this article',
191
+    'icone_creer_rubrique_2' => 'Create a new section',
192
+    'icone_developpement' => 'Development',
193
+    'icone_edition' => 'Edit',
194
+    'icone_ma_langue' => 'My language',
195
+    'icone_mes_infos' => 'My details',
196
+    'icone_mes_preferences' => 'Preferences',
197
+    'icone_modifier_article' => 'Edit this article',
198
+    'icone_modifier_rubrique' => 'Edit this section',
199
+    'icone_publication' => 'Publish',
200
+    'icone_relancer_signataire' => 'Contact the signatory again',
201
+    'icone_retour' => 'Back',
202
+    'icone_retour_article' => 'Back to the article',
203
+    'icone_squelette' => 'Templates',
204
+    'icone_suivi_publication' => 'Publication follow up ',
205
+    'icone_supprimer_cookie' => 'Delete cookie',
206
+    'icone_supprimer_rubrique' => 'Delete this section',
207
+    'icone_supprimer_signature' => 'Delete this signature',
208
+    'icone_valider_signature' => 'Validate this signature',
209
+    'image_administrer_rubrique' => 'You can manage this section',
210
+    'impossible_modifier_login_auteur' => 'Login cannot be changed.',
211
+    'impossible_modifier_pass_auteur' => 'Password cannot be changed.',
212
+    'info_1_article' => '1 article',
213
+    'info_1_auteur' => '1 author',
214
+    'info_1_message' => '1 message',
215
+    'info_1_mot_cle' => '1 keyword',
216
+    'info_1_rubrique' => '1 section',
217
+    'info_1_visiteur' => '1 visitor',
218
+    'info_activer_cookie' => 'You can activate an <b>administration cookie</b>, which lets you switch easily between the public website and the admin area.',
219
+    'info_activer_menu_developpement' => 'Show the Development menu',
220
+    'info_admin_etre_webmestre' => 'Give me web administrator rights',
221
+    'info_admin_je_suis_webmestre' => 'I am a <b>webmaster</b>',
222
+    'info_admin_statuer_webmestre' => 'Give webmaster rights to this administrator ',
223
+    'info_admin_webmestre' => 'This administrator is <b>webmaster</b>',
224
+    'info_administrateur' => 'Administrator',
225
+    'info_administrateur_1' => 'Administrator',
226
+    'info_administrateur_2' => 'of the site (<i>use with caution</i>)',
227
+    'info_administrateur_site_01' => 'If you are a site administrator, please',
228
+    'info_administrateur_site_02' => 'click on this link',
229
+    'info_administrateurs' => 'Administrators',
230
+    'info_administrer_rubrique' => 'You can manage this section',
231
+    'info_adresse' => 'to this address:',
232
+    'info_adresse_desinscription' => 'Unsubscription address:',
233
+    'info_adresse_url' => 'URL of the public site',
234
+    'info_afficher_par_nb' => 'Show ',
235
+    'info_aide_en_ligne' => 'SPIP Online Help',
236
+    'info_ajout_image' => 'When you add images as attached documents to an article,
237 237
   SPIP can automatically create thumbnails from
238 238
   inserted images. This will allow, for instance, the automated
239 239
   creation of a gallery or portfolio.',
240
-	'info_ajouter_rubrique' => 'Add another section to manage:',
241
-	'info_annonce_nouveautes' => 'Latest news announcements',
242
-	'info_article' => 'article',
243
-	'info_article_2' => 'articles',
244
-	'info_article_a_paraitre' => 'Post-dated articles set for publication',
245
-	'info_articles_02' => 'articles',
246
-	'info_articles_2' => 'Articles',
247
-	'info_articles_auteur' => 'Articles by this author',
248
-	'info_articles_miens' => 'My articles',
249
-	'info_articles_tous' => 'All the articles',
250
-	'info_articles_trouves' => 'Articles found',
251
-	'info_attente_validation' => 'Your articles awaiting validation',
252
-	'info_aucun_article' => 'No articles',
253
-	'info_aucun_auteur' => 'No authors',
254
-	'info_aucun_message' => 'No messages',
255
-	'info_aucun_rubrique' => 'No sections',
256
-	'info_aujourdhui' => 'today:',
257
-	'info_auteur_gere_rubriques' => 'This author manages the following sections:',
258
-	'info_auteur_gere_toutes_rubriques' => 'This author manage <b>all the sections</b>',
259
-	'info_auteur_gere_toutes_rubriques_2' => 'I manage <b>all the sections</b>',
260
-	'info_auteurs' => 'Authors',
261
-	'info_auteurs_par_tri' => 'Authors@partri@',
262
-	'info_auteurs_trouves' => 'Authors found',
263
-	'info_authentification_externe' => 'External authentication',
264
-	'info_avertissement' => 'Warning',
265
-	'info_barre_outils' => 'with its toolbar?',
266
-	'info_base_installee' => 'Your database structure has been installed.',
267
-	'info_bio' => 'Biography',
268
-	'info_cache_desactive' => 'The cache is temporarily disabled',
269
-	'info_chapeau' => 'Introduction',
270
-	'info_chapeau_2' => 'Introduction:',
271
-	'info_chemin_acces_1' => 'Options: <b>Access path in directory</b>',
272
-	'info_chemin_acces_2' => 'You must now configure the access path to the directory information. This information is essential to read the user profiles stored in the directory.',
273
-	'info_chemin_acces_annuaire' => 'Options: <b>Access path in directory</b>',
274
-	'info_choix_base' => 'Third step:',
275
-	'info_classement_1' => ' out of @liste@',
276
-	'info_classement_2' => ' out of @liste@',
277
-	'info_code_acces' => 'Do not forget your own access codes!',
278
-	'info_config_suivi' => 'If this address corresponds to a mailing list, you can indicate the subscription address for this list. This may be a URL (e.g. a webpage enabling subscription online), or an email address with a specific subject (for instance: <tt>@adresse_suivi@?subject=subscribe</tt>):',
279
-	'info_config_suivi_explication' => 'You can subscribe to the mailing-list for this site. You will then receive email announcements concerning articles and news items submitted for publication.',
280
-	'info_confirmer_passe' => 'Confirm new password:',
281
-	'info_conflit_edition_avis_non_sauvegarde' => 'Caution: the following fields have been modified elsewhere. Your changes to these fields have therefore not been saved.',
282
-	'info_conflit_edition_differences' => 'Differences:',
283
-	'info_conflit_edition_version_enregistree' => 'Saved version:',
284
-	'info_conflit_edition_votre_version' => 'Your version:',
285
-	'info_connexion_base' => 'Trying to connect to database',
286
-	'info_connexion_base_donnee' => 'Connection to your database',
287
-	'info_connexion_ldap_ok' => '<b>LDAP connection succeeded.</b><p> You can go to the next step.</p>',
288
-	'info_connexion_mysql' => 'Your SQL connection',
289
-	'info_connexion_ok' => 'Connection succeeded.',
290
-	'info_contact' => 'Contact',
291
-	'info_contenu_articles' => 'Article content',
292
-	'info_contributions' => 'Contributions',
293
-	'info_creation_paragraphe' => 'To create paragraphs, just leave blank lines.',
294
-	'info_creation_rubrique' => 'Before writing any articles,<br /> you must create at least one section.<br />',
295
-	'info_creation_tables' => 'Creating the database tables',
296
-	'info_creer_base' => '<b>Create</b> a new database:',
297
-	'info_dans_rubrique' => 'In section:',
298
-	'info_date_publication_anterieure' => 'Previously published on:',
299
-	'info_date_referencement' => 'THIS SITE REFERENCED ON:',
300
-	'info_derniere_etape' => 'Done!',
301
-	'info_descriptif' => 'Description:',
302
-	'info_desinstaller_plugin' => ' deactivates the plugin and deletes the data',
303
-	'info_discussion_cours' => 'Current discussions',
304
-	'info_ecrire_article' => 'Before writing any articles, you must create at least one section.',
305
-	'info_email_envoi' => 'Sender’s email address (optional)',
306
-	'info_email_envoi_txt' => 'Enter the sender’s email address used for sending emails (by default, the recipient’s address is used as the sender’s address) :',
307
-	'info_email_webmestre' => 'Webmaster’s email address',
308
-	'info_envoi_email_automatique' => 'Automated mailing',
309
-	'info_envoyer_maintenant' => 'Send now',
310
-	'info_etape_suivante' => 'Go to the next step',
311
-	'info_etape_suivante_1' => 'You can move on to the next step.',
312
-	'info_etape_suivante_2' => 'You can move on to the next step.',
313
-	'info_exceptions_proxy' => 'Exceptions for the proxy',
314
-	'info_exportation_base' => 'export database to @archive@',
315
-	'info_facilite_suivi_activite' => 'To simplify monitoring of the site’s editorial;
240
+    'info_ajouter_rubrique' => 'Add another section to manage:',
241
+    'info_annonce_nouveautes' => 'Latest news announcements',
242
+    'info_article' => 'article',
243
+    'info_article_2' => 'articles',
244
+    'info_article_a_paraitre' => 'Post-dated articles set for publication',
245
+    'info_articles_02' => 'articles',
246
+    'info_articles_2' => 'Articles',
247
+    'info_articles_auteur' => 'Articles by this author',
248
+    'info_articles_miens' => 'My articles',
249
+    'info_articles_tous' => 'All the articles',
250
+    'info_articles_trouves' => 'Articles found',
251
+    'info_attente_validation' => 'Your articles awaiting validation',
252
+    'info_aucun_article' => 'No articles',
253
+    'info_aucun_auteur' => 'No authors',
254
+    'info_aucun_message' => 'No messages',
255
+    'info_aucun_rubrique' => 'No sections',
256
+    'info_aujourdhui' => 'today:',
257
+    'info_auteur_gere_rubriques' => 'This author manages the following sections:',
258
+    'info_auteur_gere_toutes_rubriques' => 'This author manage <b>all the sections</b>',
259
+    'info_auteur_gere_toutes_rubriques_2' => 'I manage <b>all the sections</b>',
260
+    'info_auteurs' => 'Authors',
261
+    'info_auteurs_par_tri' => 'Authors@partri@',
262
+    'info_auteurs_trouves' => 'Authors found',
263
+    'info_authentification_externe' => 'External authentication',
264
+    'info_avertissement' => 'Warning',
265
+    'info_barre_outils' => 'with its toolbar?',
266
+    'info_base_installee' => 'Your database structure has been installed.',
267
+    'info_bio' => 'Biography',
268
+    'info_cache_desactive' => 'The cache is temporarily disabled',
269
+    'info_chapeau' => 'Introduction',
270
+    'info_chapeau_2' => 'Introduction:',
271
+    'info_chemin_acces_1' => 'Options: <b>Access path in directory</b>',
272
+    'info_chemin_acces_2' => 'You must now configure the access path to the directory information. This information is essential to read the user profiles stored in the directory.',
273
+    'info_chemin_acces_annuaire' => 'Options: <b>Access path in directory</b>',
274
+    'info_choix_base' => 'Third step:',
275
+    'info_classement_1' => ' out of @liste@',
276
+    'info_classement_2' => ' out of @liste@',
277
+    'info_code_acces' => 'Do not forget your own access codes!',
278
+    'info_config_suivi' => 'If this address corresponds to a mailing list, you can indicate the subscription address for this list. This may be a URL (e.g. a webpage enabling subscription online), or an email address with a specific subject (for instance: <tt>@adresse_suivi@?subject=subscribe</tt>):',
279
+    'info_config_suivi_explication' => 'You can subscribe to the mailing-list for this site. You will then receive email announcements concerning articles and news items submitted for publication.',
280
+    'info_confirmer_passe' => 'Confirm new password:',
281
+    'info_conflit_edition_avis_non_sauvegarde' => 'Caution: the following fields have been modified elsewhere. Your changes to these fields have therefore not been saved.',
282
+    'info_conflit_edition_differences' => 'Differences:',
283
+    'info_conflit_edition_version_enregistree' => 'Saved version:',
284
+    'info_conflit_edition_votre_version' => 'Your version:',
285
+    'info_connexion_base' => 'Trying to connect to database',
286
+    'info_connexion_base_donnee' => 'Connection to your database',
287
+    'info_connexion_ldap_ok' => '<b>LDAP connection succeeded.</b><p> You can go to the next step.</p>',
288
+    'info_connexion_mysql' => 'Your SQL connection',
289
+    'info_connexion_ok' => 'Connection succeeded.',
290
+    'info_contact' => 'Contact',
291
+    'info_contenu_articles' => 'Article content',
292
+    'info_contributions' => 'Contributions',
293
+    'info_creation_paragraphe' => 'To create paragraphs, just leave blank lines.',
294
+    'info_creation_rubrique' => 'Before writing any articles,<br /> you must create at least one section.<br />',
295
+    'info_creation_tables' => 'Creating the database tables',
296
+    'info_creer_base' => '<b>Create</b> a new database:',
297
+    'info_dans_rubrique' => 'In section:',
298
+    'info_date_publication_anterieure' => 'Previously published on:',
299
+    'info_date_referencement' => 'THIS SITE REFERENCED ON:',
300
+    'info_derniere_etape' => 'Done!',
301
+    'info_descriptif' => 'Description:',
302
+    'info_desinstaller_plugin' => ' deactivates the plugin and deletes the data',
303
+    'info_discussion_cours' => 'Current discussions',
304
+    'info_ecrire_article' => 'Before writing any articles, you must create at least one section.',
305
+    'info_email_envoi' => 'Sender’s email address (optional)',
306
+    'info_email_envoi_txt' => 'Enter the sender’s email address used for sending emails (by default, the recipient’s address is used as the sender’s address) :',
307
+    'info_email_webmestre' => 'Webmaster’s email address',
308
+    'info_envoi_email_automatique' => 'Automated mailing',
309
+    'info_envoyer_maintenant' => 'Send now',
310
+    'info_etape_suivante' => 'Go to the next step',
311
+    'info_etape_suivante_1' => 'You can move on to the next step.',
312
+    'info_etape_suivante_2' => 'You can move on to the next step.',
313
+    'info_exceptions_proxy' => 'Exceptions for the proxy',
314
+    'info_exportation_base' => 'export database to @archive@',
315
+    'info_facilite_suivi_activite' => 'To simplify monitoring of the site’s editorial;
316 316
   activities, SPIP can send rmail notifications, e.g. to an editors’ mailing list,
317 317
   of publication requests and article validations. Enter one or more adresses separated by commas.',
318
-	'info_fichiers_authent' => 'Authentication file ".htpasswd"',
319
-	'info_forums_abo_invites' => 'Your site contains forums by subscription; visitors may register for them on the public site.',
320
-	'info_gauche_admin_tech' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
318
+    'info_fichiers_authent' => 'Authentication file ".htpasswd"',
319
+    'info_forums_abo_invites' => 'Your site contains forums by subscription; visitors may register for them on the public site.',
320
+    'info_gauche_admin_tech' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
321 321
 maintenance tasks. Some of them require a specific authentication process
322 322
 via FTP.</p>',
323
-	'info_gauche_admin_vider' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
323
+    'info_gauche_admin_vider' => '<b>Only webmasters have access to this page.</b><p> It provides access to various
324 324
 maintenance tasks. Some of them require a specific authentication process
325 325
 via FTP.</p>',
326
-	'info_gauche_auteurs' => 'All the site authors are listed here.
326
+    'info_gauche_auteurs' => 'All the site authors are listed here.
327 327
  The status of each is indicated by the colour of their icon (administrator = green; editor = yellow).',
328
-	'info_gauche_auteurs_exterieurs' => 'Visiting authors, without any access to the site, are indicated by a blue icon; deleted authors by a grey icon.',
329
-	'info_gauche_messagerie' => 'Internal messaging lets you exchange messages between editors, keep memos (for personal use) or, display announcements on the admin area’s homepage (if you are an administrator).',
330
-	'info_gauche_statistiques_referers' => 'This page displays the list of <i>referrers</i>, i.e. websites containing links to your own site, for yesterday and today. The list is reset every 24 hours.',
331
-	'info_gauche_visiteurs_enregistres' => 'You will find here the visitors registered
328
+    'info_gauche_auteurs_exterieurs' => 'Visiting authors, without any access to the site, are indicated by a blue icon; deleted authors by a grey icon.',
329
+    'info_gauche_messagerie' => 'Internal messaging lets you exchange messages between editors, keep memos (for personal use) or, display announcements on the admin area’s homepage (if you are an administrator).',
330
+    'info_gauche_statistiques_referers' => 'This page displays the list of <i>referrers</i>, i.e. websites containing links to your own site, for yesterday and today. The list is reset every 24 hours.',
331
+    'info_gauche_visiteurs_enregistres' => 'You will find here the visitors registered
332 332
  for the public area of the site (subscription-only forums).',
333
-	'info_generation_miniatures_images' => 'Generation of thumbnail images',
334
-	'info_gerer_trad_objets' => '@objets@: manage translation links',
335
-	'info_hebergeur_desactiver_envoi_email' => 'Some hosts disable automated mail sending
333
+    'info_generation_miniatures_images' => 'Generation of thumbnail images',
334
+    'info_gerer_trad_objets' => '@objets@: manage translation links',
335
+    'info_hebergeur_desactiver_envoi_email' => 'Some hosts disable automated mail sending
336 336
 		on their servers. In this case the following features
337 337
 		of SPIP cannot be implemented.',
338
-	'info_hier' => 'yesterday:',
339
-	'info_identification_publique' => 'Your public identity...',
340
-	'info_image_process' => 'Select the best method to create thumbnails by clicking on the corresponding picture.',
341
-	'info_image_process2' => 'If you can’t see any images, then your server is not configured to use such tools. If you want to use these features, contact your provider’s technical support and ask for the «GD» or «Imagick» extensions to be installed.',
342
-	'info_images_auto' => 'Images calculated automatically',
343
-	'info_informations_personnelles' => 'Personal information',
344
-	'info_inscription' => 'Registered on',
345
-	'info_inscription_automatique' => 'Automatic registration for new editors',
346
-	'info_jeu_caractere' => 'Character set for the site',
347
-	'info_jours' => 'days',
348
-	'info_laisser_champs_vides' => 'leave these fields empty)',
349
-	'info_langues' => 'Site languages',
350
-	'info_ldap_ok' => 'LDAP authentication is installed.',
351
-	'info_lien_hypertexte' => 'Hyperlink:',
352
-	'info_liste_nouveautes_envoyee' => 'The news update list has been sent',
353
-	'info_liste_redacteurs_connectes' => 'List of editors online',
354
-	'info_login_existant' => 'This login already exists.',
355
-	'info_login_trop_court' => 'Login too short.',
356
-	'info_login_trop_court_car_pluriel' => 'Your login must contain at least @nb@ characters.',
357
-	'info_logos' => 'Logos',
358
-	'info_maximum' => 'maximum:',
359
-	'info_meme_rubrique' => 'In this section',
360
-	'info_message_en_redaction' => 'Your draft messages',
361
-	'info_message_technique' => 'Technical message:',
362
-	'info_messagerie_interne' => 'Internal messaging',
363
-	'info_mise_a_niveau_base' => 'SQL database upgrade',
364
-	'info_mise_a_niveau_base_2' => '{{Warning!}} You have installed an {older} SPIP version, prior to the one
338
+    'info_hier' => 'yesterday:',
339
+    'info_identification_publique' => 'Your public identity...',
340
+    'info_image_process' => 'Select the best method to create thumbnails by clicking on the corresponding picture.',
341
+    'info_image_process2' => 'If you can’t see any images, then your server is not configured to use such tools. If you want to use these features, contact your provider’s technical support and ask for the «GD» or «Imagick» extensions to be installed.',
342
+    'info_images_auto' => 'Images calculated automatically',
343
+    'info_informations_personnelles' => 'Personal information',
344
+    'info_inscription' => 'Registered on',
345
+    'info_inscription_automatique' => 'Automatic registration for new editors',
346
+    'info_jeu_caractere' => 'Character set for the site',
347
+    'info_jours' => 'days',
348
+    'info_laisser_champs_vides' => 'leave these fields empty)',
349
+    'info_langues' => 'Site languages',
350
+    'info_ldap_ok' => 'LDAP authentication is installed.',
351
+    'info_lien_hypertexte' => 'Hyperlink:',
352
+    'info_liste_nouveautes_envoyee' => 'The news update list has been sent',
353
+    'info_liste_redacteurs_connectes' => 'List of editors online',
354
+    'info_login_existant' => 'This login already exists.',
355
+    'info_login_trop_court' => 'Login too short.',
356
+    'info_login_trop_court_car_pluriel' => 'Your login must contain at least @nb@ characters.',
357
+    'info_logos' => 'Logos',
358
+    'info_maximum' => 'maximum:',
359
+    'info_meme_rubrique' => 'In this section',
360
+    'info_message_en_redaction' => 'Your draft messages',
361
+    'info_message_technique' => 'Technical message:',
362
+    'info_messagerie_interne' => 'Internal messaging',
363
+    'info_mise_a_niveau_base' => 'SQL database upgrade',
364
+    'info_mise_a_niveau_base_2' => '{{Warning!}} You have installed an {older} SPIP version, prior to the one
365 365
   originally installed on this website: your database is at risk of being corrupted
366 366
   and your site might not work properly anymore.<br />{{Please, re-install
367 367
   SPIP files.}}',
368
-	'info_modification_enregistree' => 'Your changes have been saved',
369
-	'info_modifier_auteur' => 'Edit author details:',
370
-	'info_modifier_rubrique' => 'Edit the section:',
371
-	'info_modifier_titre' => 'Edit: @titre@',
372
-	'info_mon_site_spip' => 'My SPIP site',
373
-	'info_moyenne' => 'average:',
374
-	'info_multi_cet_article' => 'Language for this article:',
375
-	'info_multi_langues_choisies' => 'Please select the languages to be made available to the editors of your site.
368
+    'info_modification_enregistree' => 'Your changes have been saved',
369
+    'info_modifier_auteur' => 'Edit author details:',
370
+    'info_modifier_rubrique' => 'Edit the section:',
371
+    'info_modifier_titre' => 'Edit: @titre@',
372
+    'info_mon_site_spip' => 'My SPIP site',
373
+    'info_moyenne' => 'average:',
374
+    'info_multi_cet_article' => 'Language for this article:',
375
+    'info_multi_langues_choisies' => 'Please select the languages to be made available to the editors of your site.
376 376
   Languages already used on your site (at the top of the list) cannot be disabled.',
377
-	'info_multi_objets' => '@objets@: activate the language menu',
378
-	'info_multi_secteurs' => '... only for root-level sections?',
379
-	'info_nb_articles' => '@nb@ articles',
380
-	'info_nb_auteurs' => '@nb@ authors',
381
-	'info_nb_messages' => '@nb@ messages',
382
-	'info_nb_mots_cles' => '@nb@ keywords',
383
-	'info_nb_rubriques' => '@nb@ sections',
384
-	'info_nb_visiteurs' => '@nb@ visitors',
385
-	'info_nom' => 'Name',
386
-	'info_nom_destinataire' => 'Name of recipient',
387
-	'info_nom_pas_conforme' => 'html tags are not allowed',
388
-	'info_nom_site' => 'Name of your site',
389
-	'info_nombre_articles' => '@nb_articles@ articles,',
390
-	'info_nombre_rubriques' => '@nb_rubriques@ sections,',
391
-	'info_nombre_sites' => '@nb_sites@ sites,',
392
-	'info_non_deplacer' => 'Do not move...',
393
-	'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP can send a site newsletter (list of newly-published articles and news items).
377
+    'info_multi_objets' => '@objets@: activate the language menu',
378
+    'info_multi_secteurs' => '... only for root-level sections?',
379
+    'info_nb_articles' => '@nb@ articles',
380
+    'info_nb_auteurs' => '@nb@ authors',
381
+    'info_nb_messages' => '@nb@ messages',
382
+    'info_nb_mots_cles' => '@nb@ keywords',
383
+    'info_nb_rubriques' => '@nb@ sections',
384
+    'info_nb_visiteurs' => '@nb@ visitors',
385
+    'info_nom' => 'Name',
386
+    'info_nom_destinataire' => 'Name of recipient',
387
+    'info_nom_pas_conforme' => 'html tags are not allowed',
388
+    'info_nom_site' => 'Name of your site',
389
+    'info_nombre_articles' => '@nb_articles@ articles,',
390
+    'info_nombre_rubriques' => '@nb_rubriques@ sections,',
391
+    'info_nombre_sites' => '@nb_sites@ sites,',
392
+    'info_non_deplacer' => 'Do not move...',
393
+    'info_non_envoi_annonce_dernieres_nouveautes' => 'SPIP can send a site newsletter (list of newly-published articles and news items).
394 394
   .',
395
-	'info_non_envoi_liste_nouveautes' => 'Do not send newsletter',
396
-	'info_non_modifiable' => 'cannot be modified',
397
-	'info_non_suppression_mot_cle' => 'I do not want to delete this keyword.',
398
-	'info_notes' => 'Footnotes',
399
-	'info_nouvel_article' => 'New article',
400
-	'info_nouvelle_traduction' => 'New translation:',
401
-	'info_numero_article' => 'ARTICLE NUMBER:',
402
-	'info_obligatoire_02' => '(Required)',
403
-	'info_option_accepter_visiteurs' => 'Allow visitor registration via the public site',
404
-	'info_option_ne_pas_accepter_visiteurs' => 'Disable visitor registration',
405
-	'info_options_avancees' => 'ADVANCED OPTIONS',
406
-	'info_ou' => 'or...',
407
-	'info_page_interdite' => 'Forbidden page',
408
-	'info_par_nom' => 'by name',
409
-	'info_par_nombre_article' => 'by number of articles',
410
-	'info_par_statut' => 'by status',
411
-	'info_par_tri' => '’(by @tri@)’',
412
-	'info_passe_trop_court' => 'Password too short.',
413
-	'info_passe_trop_court_car_pluriel' => 'Your password must contain at least @nb@ characters.',
414
-	'info_passes_identiques' => 'The two passwords are not identical.',
415
-	'info_plus_cinq_car' => 'more than 5 characters',
416
-	'info_plus_cinq_car_2' => '(More than 5 characters)',
417
-	'info_plus_trois_car' => '(More than 3 characters)',
418
-	'info_popularite' => 'popularity: @popularite@; visits: @visites@',
419
-	'info_post_scriptum' => 'Postscript',
420
-	'info_post_scriptum_2' => 'Postscript:',
421
-	'info_pour' => 'for',
422
-	'info_preview_texte' => 'It is possible to preview the site’s  various editorial elements with at least the "submitted" status, as well as the"editing in progress" elements of which you are the author. Should this preview mode be restricted to administrators, open to all authors, or disabled completely?',
423
-	'info_procedez_par_etape' => 'please proceed step by step',
424
-	'info_procedure_maj_version' => 'the upgrade procedure must be run to adapt
395
+    'info_non_envoi_liste_nouveautes' => 'Do not send newsletter',
396
+    'info_non_modifiable' => 'cannot be modified',
397
+    'info_non_suppression_mot_cle' => 'I do not want to delete this keyword.',
398
+    'info_notes' => 'Footnotes',
399
+    'info_nouvel_article' => 'New article',
400
+    'info_nouvelle_traduction' => 'New translation:',
401
+    'info_numero_article' => 'ARTICLE NUMBER:',
402
+    'info_obligatoire_02' => '(Required)',
403
+    'info_option_accepter_visiteurs' => 'Allow visitor registration via the public site',
404
+    'info_option_ne_pas_accepter_visiteurs' => 'Disable visitor registration',
405
+    'info_options_avancees' => 'ADVANCED OPTIONS',
406
+    'info_ou' => 'or...',
407
+    'info_page_interdite' => 'Forbidden page',
408
+    'info_par_nom' => 'by name',
409
+    'info_par_nombre_article' => 'by number of articles',
410
+    'info_par_statut' => 'by status',
411
+    'info_par_tri' => '’(by @tri@)’',
412
+    'info_passe_trop_court' => 'Password too short.',
413
+    'info_passe_trop_court_car_pluriel' => 'Your password must contain at least @nb@ characters.',
414
+    'info_passes_identiques' => 'The two passwords are not identical.',
415
+    'info_plus_cinq_car' => 'more than 5 characters',
416
+    'info_plus_cinq_car_2' => '(More than 5 characters)',
417
+    'info_plus_trois_car' => '(More than 3 characters)',
418
+    'info_popularite' => 'popularity: @popularite@; visits: @visites@',
419
+    'info_post_scriptum' => 'Postscript',
420
+    'info_post_scriptum_2' => 'Postscript:',
421
+    'info_pour' => 'for',
422
+    'info_preview_texte' => 'It is possible to preview the site’s  various editorial elements with at least the "submitted" status, as well as the"editing in progress" elements of which you are the author. Should this preview mode be restricted to administrators, open to all authors, or disabled completely?',
423
+    'info_procedez_par_etape' => 'please proceed step by step',
424
+    'info_procedure_maj_version' => 'the upgrade procedure must be run to adapt
425 425
  the database to this new version of SPIP.',
426
-	'info_proxy_ok' => 'Proxy test successful.',
427
-	'info_ps' => 'P.S.',
428
-	'info_publier' => 'publish',
429
-	'info_publies' => 'Your articles published online',
430
-	'info_question_accepter_visiteurs' => 'If your website’s templates allows visitors to register with no access to the admin area, please activate the following option:',
431
-	'info_question_inscription_nouveaux_redacteurs' => 'Do you wish to allow new editors to register
426
+    'info_proxy_ok' => 'Proxy test successful.',
427
+    'info_ps' => 'P.S.',
428
+    'info_publier' => 'publish',
429
+    'info_publies' => 'Your articles published online',
430
+    'info_question_accepter_visiteurs' => 'If your website’s templates allows visitors to register with no access to the admin area, please activate the following option:',
431
+    'info_question_inscription_nouveaux_redacteurs' => 'Do you wish to allow new editors to register
432 432
  from the public website? If you agree with this, visitors will be able to  register
433 433
   using an automatic form, and then access the admin area to
434 434
   write their own articles. <div class="notice">During the registration process, users usually receive an automatic email
@@ -436,404 +436,404 @@  discard block
 block discarded – undo
436 436
   service providers disallow sending emails from their
437 437
   servers: in that case, automated registration is not
438 438
   possible.</div>',
439
-	'info_qui_edite' => '@nom_auteur_modif@ worked on the contents @date_diff@ minutes ago',
440
-	'info_racine_site' => 'Site root',
441
-	'info_recharger_page' => 'Please wait a few moments, then reload this page.',
442
-	'info_recherche_auteur_zero' => 'No results for "@cherche_auteur@".',
443
-	'info_recommencer' => 'Please try again.',
444
-	'info_redacteur_1' => 'Editor',
445
-	'info_redacteur_2' => 'with access to the admin area (<i>recommended</i>)',
446
-	'info_redacteurs' => 'Editors',
447
-	'info_redaction_en_cours' => 'EDITING IN PROGRESS',
448
-	'info_redirection' => 'Redirection',
449
-	'info_redirection_activee' => 'Redirection is enabled.',
450
-	'info_redirection_boucle' => 'You are trying to redirect the article toward itself. ',
451
-	'info_redirection_desactivee' => 'Redirection is deleted.',
452
-	'info_refuses' => 'Your rejected articles ',
453
-	'info_reglage_ldap' => 'Options: <b>Adjusting LDAP import</b>',
454
-	'info_renvoi_article' => '<b>Redirection.</b> This article redirects to:',
455
-	'info_reserve_admin' => 'Only administrators can modify this address.',
456
-	'info_restreindre_rubrique' => 'Restrict management to section:',
457
-	'info_resultat_recherche' => 'Search results:',
458
-	'info_rubriques' => 'Sections',
459
-	'info_rubriques_02' => 'sections',
460
-	'info_rubriques_trouvees' => 'Sections found',
461
-	'info_sans_titre' => 'Untitled',
462
-	'info_selection_chemin_acces' => '<b>Select</b> the access path in the directory:',
463
-	'info_signatures' => 'signatures',
464
-	'info_site' => 'Site',
465
-	'info_site_2' => 'site:',
466
-	'info_site_min' => 'site',
467
-	'info_site_reference_2' => 'Referenced site',
468
-	'info_site_web' => 'Web site:',
469
-	'info_sites' => 'sites',
470
-	'info_sites_lies_mot' => 'Referenced sites with this keyword',
471
-	'info_sites_proxy' => 'Using a proxy',
472
-	'info_sites_trouves' => 'Sites found',
473
-	'info_sous_titre' => 'Subtitle:',
474
-	'info_statut_administrateur' => 'Administrator',
475
-	'info_statut_auteur' => 'This author’s status:',
476
-	'info_statut_auteur_2' => 'I am',
477
-	'info_statut_auteur_a_confirmer' => 'Registration to be confirmed',
478
-	'info_statut_auteur_autre' => 'Other status:',
479
-	'info_statut_redacteur' => 'Editor',
480
-	'info_statut_utilisateurs_1' => 'Default status for imported users',
481
-	'info_statut_utilisateurs_2' => 'Choose the status to be attributed to persons present in the LDAP directory when they connect for the first time. You can modify this value for each individual author later on.',
482
-	'info_suivi_activite' => 'Follow editorial activity',
483
-	'info_surtitre' => 'Top title:',
484
-	'info_syndication_integrale_1' => 'Your site provides syndication files (see "<a href="@url@">@titre@</a>").',
485
-	'info_syndication_integrale_2' => 'Do you wish to send whole articles or only a summary of a few hundred characters?',
486
-	'info_table_prefix' => 'It is possible to change the prefix of the names of the database tables. (you need to do this if you are installing several sites in the same database). The prefix must be written in unaccented, lower-case letters without any spaces.',
487
-	'info_taille_maximale_images' => 'SPIP will test for the maximum image size (in millions of pixels) which it can process.<br /> Images bigger than this will not be reduced.',
488
-	'info_taille_maximale_vignette' => 'Maximum size for vignettes generated by the system:',
489
-	'info_terminer_installation' => 'You can now finish the standard installation process.',
490
-	'info_texte' => 'Text',
491
-	'info_texte_explicatif' => 'Explanation',
492
-	'info_texte_long' => '(The text is long: it will appear in several parts which will be reassembled after validation.)',
493
-	'info_texte_message' => 'Text of your message:',
494
-	'info_texte_message_02' => 'Message text',
495
-	'info_titre' => 'Title:',
496
-	'info_total' => 'total:',
497
-	'info_tous_articles_en_redaction' => 'All articles in progress',
498
-	'info_tous_articles_presents' => 'All articles published in this section',
499
-	'info_tous_articles_refuses' => 'All refused articles',
500
-	'info_tous_les' => 'every:',
501
-	'info_tout_site' => 'The entire site',
502
-	'info_tout_site2' => 'The article has not been translated into this language.',
503
-	'info_tout_site3' => 'The article has been translated into this language, but changes have since been made to the reference article. The translation needs updating.',
504
-	'info_tout_site4' => 'The article has been translated into this language, and the translation is up-to-date.',
505
-	'info_tout_site5' => 'Original article.',
506
-	'info_tout_site6' => '<b>Warning:</b> only original articles are displayed.
439
+    'info_qui_edite' => '@nom_auteur_modif@ worked on the contents @date_diff@ minutes ago',
440
+    'info_racine_site' => 'Site root',
441
+    'info_recharger_page' => 'Please wait a few moments, then reload this page.',
442
+    'info_recherche_auteur_zero' => 'No results for "@cherche_auteur@".',
443
+    'info_recommencer' => 'Please try again.',
444
+    'info_redacteur_1' => 'Editor',
445
+    'info_redacteur_2' => 'with access to the admin area (<i>recommended</i>)',
446
+    'info_redacteurs' => 'Editors',
447
+    'info_redaction_en_cours' => 'EDITING IN PROGRESS',
448
+    'info_redirection' => 'Redirection',
449
+    'info_redirection_activee' => 'Redirection is enabled.',
450
+    'info_redirection_boucle' => 'You are trying to redirect the article toward itself. ',
451
+    'info_redirection_desactivee' => 'Redirection is deleted.',
452
+    'info_refuses' => 'Your rejected articles ',
453
+    'info_reglage_ldap' => 'Options: <b>Adjusting LDAP import</b>',
454
+    'info_renvoi_article' => '<b>Redirection.</b> This article redirects to:',
455
+    'info_reserve_admin' => 'Only administrators can modify this address.',
456
+    'info_restreindre_rubrique' => 'Restrict management to section:',
457
+    'info_resultat_recherche' => 'Search results:',
458
+    'info_rubriques' => 'Sections',
459
+    'info_rubriques_02' => 'sections',
460
+    'info_rubriques_trouvees' => 'Sections found',
461
+    'info_sans_titre' => 'Untitled',
462
+    'info_selection_chemin_acces' => '<b>Select</b> the access path in the directory:',
463
+    'info_signatures' => 'signatures',
464
+    'info_site' => 'Site',
465
+    'info_site_2' => 'site:',
466
+    'info_site_min' => 'site',
467
+    'info_site_reference_2' => 'Referenced site',
468
+    'info_site_web' => 'Web site:',
469
+    'info_sites' => 'sites',
470
+    'info_sites_lies_mot' => 'Referenced sites with this keyword',
471
+    'info_sites_proxy' => 'Using a proxy',
472
+    'info_sites_trouves' => 'Sites found',
473
+    'info_sous_titre' => 'Subtitle:',
474
+    'info_statut_administrateur' => 'Administrator',
475
+    'info_statut_auteur' => 'This author’s status:',
476
+    'info_statut_auteur_2' => 'I am',
477
+    'info_statut_auteur_a_confirmer' => 'Registration to be confirmed',
478
+    'info_statut_auteur_autre' => 'Other status:',
479
+    'info_statut_redacteur' => 'Editor',
480
+    'info_statut_utilisateurs_1' => 'Default status for imported users',
481
+    'info_statut_utilisateurs_2' => 'Choose the status to be attributed to persons present in the LDAP directory when they connect for the first time. You can modify this value for each individual author later on.',
482
+    'info_suivi_activite' => 'Follow editorial activity',
483
+    'info_surtitre' => 'Top title:',
484
+    'info_syndication_integrale_1' => 'Your site provides syndication files (see "<a href="@url@">@titre@</a>").',
485
+    'info_syndication_integrale_2' => 'Do you wish to send whole articles or only a summary of a few hundred characters?',
486
+    'info_table_prefix' => 'It is possible to change the prefix of the names of the database tables. (you need to do this if you are installing several sites in the same database). The prefix must be written in unaccented, lower-case letters without any spaces.',
487
+    'info_taille_maximale_images' => 'SPIP will test for the maximum image size (in millions of pixels) which it can process.<br /> Images bigger than this will not be reduced.',
488
+    'info_taille_maximale_vignette' => 'Maximum size for vignettes generated by the system:',
489
+    'info_terminer_installation' => 'You can now finish the standard installation process.',
490
+    'info_texte' => 'Text',
491
+    'info_texte_explicatif' => 'Explanation',
492
+    'info_texte_long' => '(The text is long: it will appear in several parts which will be reassembled after validation.)',
493
+    'info_texte_message' => 'Text of your message:',
494
+    'info_texte_message_02' => 'Message text',
495
+    'info_titre' => 'Title:',
496
+    'info_total' => 'total:',
497
+    'info_tous_articles_en_redaction' => 'All articles in progress',
498
+    'info_tous_articles_presents' => 'All articles published in this section',
499
+    'info_tous_articles_refuses' => 'All refused articles',
500
+    'info_tous_les' => 'every:',
501
+    'info_tout_site' => 'The entire site',
502
+    'info_tout_site2' => 'The article has not been translated into this language.',
503
+    'info_tout_site3' => 'The article has been translated into this language, but changes have since been made to the reference article. The translation needs updating.',
504
+    'info_tout_site4' => 'The article has been translated into this language, and the translation is up-to-date.',
505
+    'info_tout_site5' => 'Original article.',
506
+    'info_tout_site6' => '<b>Warning:</b> only original articles are displayed.
507 507
 Translations are linked to the original,
508 508
 and their status is colour-coded:',
509
-	'info_traductions' => 'Translations',
510
-	'info_travail_colaboratif' => 'Collaborative work on articles',
511
-	'info_un_article' => 'an article,',
512
-	'info_un_site' => 'a site,',
513
-	'info_une_rubrique' => 'a section,',
514
-	'info_une_rubrique_02' => '1 section',
515
-	'info_url' => 'URL:',
516
-	'info_url_proxy' => 'Proxy URL',
517
-	'info_url_proxy_pas_conforme' => 'Proxy’s URL not valid.',
518
-	'info_url_site_pas_conforme' => 'the website URL is invalid.',
519
-	'info_url_test_proxy' => 'Test URL',
520
-	'info_urlref' => 'Hyperlink:',
521
-	'info_utilisation_spip' => 'SPIP is now ready for use',
522
-	'info_visites_par_mois' => 'Monthly display:',
523
-	'info_visiteur_1' => 'Visitor',
524
-	'info_visiteur_2' => 'to the public site',
525
-	'info_visiteurs' => 'Visitors',
526
-	'info_visiteurs_02' => 'Public site visitors',
527
-	'info_webmestre_forces' => 'The web administrators are currently defined in <tt>@file_options@</tt>.',
528
-	'install_adresse_base_hebergeur' => 'Database address attributed by the hosting provider',
529
-	'install_connect_ok' => 'The new database has been declared using the server name @connect@.',
530
-	'install_echec_annonce' => 'This installation will probably fail, or damage your site.',
531
-	'install_extension_mbstring' => 'SPIP does not work with:',
532
-	'install_extension_php_obligatoire' => 'SPIP requires the php extension:',
533
-	'install_login_base_hebergeur' => 'Login attributed by the service provider',
534
-	'install_nom_base_hebergeur' => 'Database name attributed by the service provider:',
535
-	'install_pas_table' => 'The database has no tables',
536
-	'install_pass_base_hebergeur' => 'Password attributed by your hosting service ',
537
-	'install_php_extension' => 'The following extensions are missing : @extensions@',
538
-	'install_php_version' => 'This version of PHP @version@ is too old (minimum = @minimum@)',
539
-	'install_php_version_max' => 'PHP version @version@ too recent (maximum = @maximum@)',
540
-	'install_select_langue' => 'Select a language, then click on "next" to start installation.',
541
-	'install_select_type_db' => 'Indicate the type of database:',
542
-	'install_select_type_mysql' => 'MySQL',
543
-	'install_select_type_pg' => 'PostgreSQL',
544
-	'install_select_type_sqlite2' => 'SQLite 2',
545
-	'install_select_type_sqlite3' => 'SQLite 3',
546
-	'install_serveur_hebergeur' => 'Database server attributed by the hosting provider',
547
-	'install_table_prefix_hebergeur' => 'Table prefix attributed by your hosting provider:',
548
-	'install_tables_base' => 'Tables in the database',
549
-	'install_types_db_connus' => 'SPIP can use <b>MySQL</b> (the most common) and <b>SQLite</b>.',
550
-	'install_types_db_connus_avertissement' => 'The support of <b>PostgreSQL</b is actually proposed as experimental',
551
-	'instituer_erreur_statut_a_change' => 'The status has already been modified',
552
-	'instituer_erreur_statut_non_autorise' => 'You cannot select this status',
553
-	'intem_redacteur' => 'editor',
554
-	'intitule_licence' => 'Licence',
555
-	'item_accepter_inscriptions' => 'Allow registration',
556
-	'item_activer_messages_avertissement' => 'Activate warning messages',
557
-	'item_administrateur_2' => 'administrator',
558
-	'item_afficher_calendrier' => 'Display in calendar',
559
-	'item_autoriser_syndication_integrale' => 'Include entire articles in syndication feeds',
560
-	'item_choix_administrateurs' => 'administrators',
561
-	'item_choix_generation_miniature' => 'Generate thumbnails automatically.',
562
-	'item_choix_non_generation_miniature' => 'Do not generate thumbnails.',
563
-	'item_choix_redacteurs' => 'editors',
564
-	'item_choix_visiteurs' => 'visitors to the public site',
565
-	'item_creer_fichiers_authent' => 'Create .htpasswd files',
566
-	'item_login' => 'Login',
567
-	'item_messagerie_agenda' => 'Activate messaging system and calendars',
568
-	'item_mots_cles_association_articles' => 'articles',
569
-	'item_mots_cles_association_rubriques' => 'sections',
570
-	'item_mots_cles_association_sites' => 'referenced or syndicated sites.',
571
-	'item_non' => 'No',
572
-	'item_non_accepter_inscriptions' => 'Disable registration',
573
-	'item_non_activer_messages_avertissement' => 'No warning messages',
574
-	'item_non_afficher_calendrier' => 'Do not show in calendar',
575
-	'item_non_autoriser_syndication_integrale' => 'Only send a summary',
576
-	'item_non_creer_fichiers_authent' => 'Do not create these files',
577
-	'item_non_messagerie_agenda' => 'Disable the messaging system and calendars',
578
-	'item_non_publier_articles' => 'Do not publish articles before their specified publication date.',
579
-	'item_nouvel_auteur' => 'New author',
580
-	'item_nouvelle_rubrique' => 'New section',
581
-	'item_oui' => 'Yes',
582
-	'item_publier_articles' => 'Publish articles, irrespective of publication date.',
583
-	'item_reponse_article' => 'Reply to the article',
584
-	'item_visiteur' => 'visitor',
509
+    'info_traductions' => 'Translations',
510
+    'info_travail_colaboratif' => 'Collaborative work on articles',
511
+    'info_un_article' => 'an article,',
512
+    'info_un_site' => 'a site,',
513
+    'info_une_rubrique' => 'a section,',
514
+    'info_une_rubrique_02' => '1 section',
515
+    'info_url' => 'URL:',
516
+    'info_url_proxy' => 'Proxy URL',
517
+    'info_url_proxy_pas_conforme' => 'Proxy’s URL not valid.',
518
+    'info_url_site_pas_conforme' => 'the website URL is invalid.',
519
+    'info_url_test_proxy' => 'Test URL',
520
+    'info_urlref' => 'Hyperlink:',
521
+    'info_utilisation_spip' => 'SPIP is now ready for use',
522
+    'info_visites_par_mois' => 'Monthly display:',
523
+    'info_visiteur_1' => 'Visitor',
524
+    'info_visiteur_2' => 'to the public site',
525
+    'info_visiteurs' => 'Visitors',
526
+    'info_visiteurs_02' => 'Public site visitors',
527
+    'info_webmestre_forces' => 'The web administrators are currently defined in <tt>@file_options@</tt>.',
528
+    'install_adresse_base_hebergeur' => 'Database address attributed by the hosting provider',
529
+    'install_connect_ok' => 'The new database has been declared using the server name @connect@.',
530
+    'install_echec_annonce' => 'This installation will probably fail, or damage your site.',
531
+    'install_extension_mbstring' => 'SPIP does not work with:',
532
+    'install_extension_php_obligatoire' => 'SPIP requires the php extension:',
533
+    'install_login_base_hebergeur' => 'Login attributed by the service provider',
534
+    'install_nom_base_hebergeur' => 'Database name attributed by the service provider:',
535
+    'install_pas_table' => 'The database has no tables',
536
+    'install_pass_base_hebergeur' => 'Password attributed by your hosting service ',
537
+    'install_php_extension' => 'The following extensions are missing : @extensions@',
538
+    'install_php_version' => 'This version of PHP @version@ is too old (minimum = @minimum@)',
539
+    'install_php_version_max' => 'PHP version @version@ too recent (maximum = @maximum@)',
540
+    'install_select_langue' => 'Select a language, then click on "next" to start installation.',
541
+    'install_select_type_db' => 'Indicate the type of database:',
542
+    'install_select_type_mysql' => 'MySQL',
543
+    'install_select_type_pg' => 'PostgreSQL',
544
+    'install_select_type_sqlite2' => 'SQLite 2',
545
+    'install_select_type_sqlite3' => 'SQLite 3',
546
+    'install_serveur_hebergeur' => 'Database server attributed by the hosting provider',
547
+    'install_table_prefix_hebergeur' => 'Table prefix attributed by your hosting provider:',
548
+    'install_tables_base' => 'Tables in the database',
549
+    'install_types_db_connus' => 'SPIP can use <b>MySQL</b> (the most common) and <b>SQLite</b>.',
550
+    'install_types_db_connus_avertissement' => 'The support of <b>PostgreSQL</b is actually proposed as experimental',
551
+    'instituer_erreur_statut_a_change' => 'The status has already been modified',
552
+    'instituer_erreur_statut_non_autorise' => 'You cannot select this status',
553
+    'intem_redacteur' => 'editor',
554
+    'intitule_licence' => 'Licence',
555
+    'item_accepter_inscriptions' => 'Allow registration',
556
+    'item_activer_messages_avertissement' => 'Activate warning messages',
557
+    'item_administrateur_2' => 'administrator',
558
+    'item_afficher_calendrier' => 'Display in calendar',
559
+    'item_autoriser_syndication_integrale' => 'Include entire articles in syndication feeds',
560
+    'item_choix_administrateurs' => 'administrators',
561
+    'item_choix_generation_miniature' => 'Generate thumbnails automatically.',
562
+    'item_choix_non_generation_miniature' => 'Do not generate thumbnails.',
563
+    'item_choix_redacteurs' => 'editors',
564
+    'item_choix_visiteurs' => 'visitors to the public site',
565
+    'item_creer_fichiers_authent' => 'Create .htpasswd files',
566
+    'item_login' => 'Login',
567
+    'item_messagerie_agenda' => 'Activate messaging system and calendars',
568
+    'item_mots_cles_association_articles' => 'articles',
569
+    'item_mots_cles_association_rubriques' => 'sections',
570
+    'item_mots_cles_association_sites' => 'referenced or syndicated sites.',
571
+    'item_non' => 'No',
572
+    'item_non_accepter_inscriptions' => 'Disable registration',
573
+    'item_non_activer_messages_avertissement' => 'No warning messages',
574
+    'item_non_afficher_calendrier' => 'Do not show in calendar',
575
+    'item_non_autoriser_syndication_integrale' => 'Only send a summary',
576
+    'item_non_creer_fichiers_authent' => 'Do not create these files',
577
+    'item_non_messagerie_agenda' => 'Disable the messaging system and calendars',
578
+    'item_non_publier_articles' => 'Do not publish articles before their specified publication date.',
579
+    'item_nouvel_auteur' => 'New author',
580
+    'item_nouvelle_rubrique' => 'New section',
581
+    'item_oui' => 'Yes',
582
+    'item_publier_articles' => 'Publish articles, irrespective of publication date.',
583
+    'item_reponse_article' => 'Reply to the article',
584
+    'item_visiteur' => 'visitor',
585 585
 
586
-	// J
587
-	'jour_non_connu_nc' => 'unknown',
586
+    // J
587
+    'jour_non_connu_nc' => 'unknown',
588 588
 
589
-	// L
590
-	'label_bando_outils' => 'Toolbar',
591
-	'label_bando_outils_afficher' => 'Show the tools',
592
-	'label_bando_outils_masquer' => 'Hide the tools',
593
-	'label_choix_langue' => 'Choose your language',
594
-	'label_langue' => 'Language',
595
-	'label_nom_fichier_connect' => 'Indicate the name for this server',
596
-	'label_slogan_site' => 'Website slogan',
597
-	'label_taille_ecran' => 'Screen width',
598
-	'label_texte_et_icones_navigation' => 'Navigation menu',
599
-	'label_texte_et_icones_page' => 'Page display',
600
-	'ldap_correspondance' => 'inherit field @champ@',
601
-	'ldap_correspondance_1' => 'Inherit LDAP fields',
602
-	'ldap_correspondance_2' => 'For each of these SPIP fields, enter the name of the corresponding LDAP field. Leave blank if you don’t want it filled, separate with spaces or commas to try several LDAP fields.',
603
-	'lien_ajouter_auteur' => 'Add this author',
604
-	'lien_ajouter_une_rubrique' => 'Add this section',
605
-	'lien_email' => 'email',
606
-	'lien_nom_site' => 'SITE NAME:',
607
-	'lien_rapide_contenu' => 'Go to the content',
608
-	'lien_rapide_navigation' => 'Go to the navigation',
609
-	'lien_rapide_recherche' => 'Go to the search',
610
-	'lien_retirer_auteur' => 'Remove author',
611
-	'lien_retirer_rubrique' => 'Remove the section',
612
-	'lien_retirer_tous_auteurs' => 'Remove all authors',
613
-	'lien_retirer_toutes_rubriques' => 'Remove all sections',
614
-	'lien_site' => 'site',
615
-	'lien_tout_decocher' => 'Uncheck all',
616
-	'lien_tout_deplier' => 'Expand all',
617
-	'lien_tout_replier' => 'Collapse all',
618
-	'lien_tout_supprimer' => 'Delete all',
619
-	'lien_trier_nom' => 'Sort by name',
620
-	'lien_trier_nombre_articles' => 'Sort by total articles',
621
-	'lien_trier_statut' => 'Sort by status',
622
-	'lien_voir_en_ligne' => 'VIEW ONLINE:',
623
-	'logo_article' => 'Article’s logo',
624
-	'logo_auteur' => 'Author’s logo',
625
-	'logo_rubrique' => 'Section’s logo',
626
-	'logo_site' => 'Website’s logo',
627
-	'logo_standard_rubrique' => 'Default sections’ logo',
628
-	'logo_survol' => 'Mouseover logo',
589
+    // L
590
+    'label_bando_outils' => 'Toolbar',
591
+    'label_bando_outils_afficher' => 'Show the tools',
592
+    'label_bando_outils_masquer' => 'Hide the tools',
593
+    'label_choix_langue' => 'Choose your language',
594
+    'label_langue' => 'Language',
595
+    'label_nom_fichier_connect' => 'Indicate the name for this server',
596
+    'label_slogan_site' => 'Website slogan',
597
+    'label_taille_ecran' => 'Screen width',
598
+    'label_texte_et_icones_navigation' => 'Navigation menu',
599
+    'label_texte_et_icones_page' => 'Page display',
600
+    'ldap_correspondance' => 'inherit field @champ@',
601
+    'ldap_correspondance_1' => 'Inherit LDAP fields',
602
+    'ldap_correspondance_2' => 'For each of these SPIP fields, enter the name of the corresponding LDAP field. Leave blank if you don’t want it filled, separate with spaces or commas to try several LDAP fields.',
603
+    'lien_ajouter_auteur' => 'Add this author',
604
+    'lien_ajouter_une_rubrique' => 'Add this section',
605
+    'lien_email' => 'email',
606
+    'lien_nom_site' => 'SITE NAME:',
607
+    'lien_rapide_contenu' => 'Go to the content',
608
+    'lien_rapide_navigation' => 'Go to the navigation',
609
+    'lien_rapide_recherche' => 'Go to the search',
610
+    'lien_retirer_auteur' => 'Remove author',
611
+    'lien_retirer_rubrique' => 'Remove the section',
612
+    'lien_retirer_tous_auteurs' => 'Remove all authors',
613
+    'lien_retirer_toutes_rubriques' => 'Remove all sections',
614
+    'lien_site' => 'site',
615
+    'lien_tout_decocher' => 'Uncheck all',
616
+    'lien_tout_deplier' => 'Expand all',
617
+    'lien_tout_replier' => 'Collapse all',
618
+    'lien_tout_supprimer' => 'Delete all',
619
+    'lien_trier_nom' => 'Sort by name',
620
+    'lien_trier_nombre_articles' => 'Sort by total articles',
621
+    'lien_trier_statut' => 'Sort by status',
622
+    'lien_voir_en_ligne' => 'VIEW ONLINE:',
623
+    'logo_article' => 'Article’s logo',
624
+    'logo_auteur' => 'Author’s logo',
625
+    'logo_rubrique' => 'Section’s logo',
626
+    'logo_site' => 'Website’s logo',
627
+    'logo_standard_rubrique' => 'Default sections’ logo',
628
+    'logo_survol' => 'Mouseover logo',
629 629
 
630
-	// M
631
-	'menu_aide_installation_choix_base' => 'Choosing your database',
632
-	'module_fichier_langue' => 'Language file',
633
-	'module_raccourci' => 'Shortcut',
634
-	'module_texte_affiche' => 'Displayed text',
635
-	'module_texte_explicatif' => 'You can insert thse shortcuts in your website templates. They will be automatically translated into any languages for which a language file exists.',
636
-	'module_texte_traduction' => 'The language file « @module@ » is available in:',
637
-	'mois_non_connu' => 'unknown',
630
+    // M
631
+    'menu_aide_installation_choix_base' => 'Choosing your database',
632
+    'module_fichier_langue' => 'Language file',
633
+    'module_raccourci' => 'Shortcut',
634
+    'module_texte_affiche' => 'Displayed text',
635
+    'module_texte_explicatif' => 'You can insert thse shortcuts in your website templates. They will be automatically translated into any languages for which a language file exists.',
636
+    'module_texte_traduction' => 'The language file « @module@ » is available in:',
637
+    'mois_non_connu' => 'unknown',
638 638
 
639
-	// N
640
-	'nouvelle_version_spip' => 'SPIP upgrade @version@ is available',
641
-	'nouvelle_version_spip_majeure' => 'A new SPIP version @version@ is available',
639
+    // N
640
+    'nouvelle_version_spip' => 'SPIP upgrade @version@ is available',
641
+    'nouvelle_version_spip_majeure' => 'A new SPIP version @version@ is available',
642 642
 
643
-	// O
644
-	'onglet_contenu' => 'Contents',
645
-	'onglet_declarer_une_autre_base' => 'Declare another database',
646
-	'onglet_discuter' => 'Discuss',
647
-	'onglet_interactivite' => 'Interactivity',
648
-	'onglet_proprietes' => 'Properties',
649
-	'onglet_repartition_actuelle' => 'now',
650
-	'onglet_sous_rubriques' => 'Subsections',
643
+    // O
644
+    'onglet_contenu' => 'Contents',
645
+    'onglet_declarer_une_autre_base' => 'Declare another database',
646
+    'onglet_discuter' => 'Discuss',
647
+    'onglet_interactivite' => 'Interactivity',
648
+    'onglet_proprietes' => 'Properties',
649
+    'onglet_repartition_actuelle' => 'now',
650
+    'onglet_sous_rubriques' => 'Subsections',
651 651
 
652
-	// P
653
-	'page_pas_proxy' => 'This page must not go through the proxy',
654
-	'pas_de_proxy_pour' => 'If necessary, indicate to which machines or domains this proxy should not apply (for example: @exemple@)',
655
-	'phpinfo' => 'PHP configuration',
656
-	'plugin_charge_paquet' => 'Loading the archive file @name@',
657
-	'plugin_charger' => 'Download',
658
-	'plugin_erreur_charger' => 'error: @zip@ cannot be loaded',
659
-	'plugin_erreur_droit1' => 'Cannot write to directory <code>@dest@</code>.',
660
-	'plugin_erreur_droit2' => 'Please check write permissions for this directory (and create the directory if necessary). Alternatively, install the files by FTP.',
661
-	'plugin_erreur_zip' => 'pclzip failure: error @status@',
662
-	'plugin_etat_developpement' => 'under development',
663
-	'plugin_etat_experimental' => 'experimental',
664
-	'plugin_etat_stable' => 'stable',
665
-	'plugin_etat_test' => 'being tested',
666
-	'plugin_impossible_activer' => 'Impossible to activate the plugin @plugin@',
667
-	'plugin_info_automatique1' => 'If you wish to allow automatic plugin installation, please:',
668
-	'plugin_info_automatique1_lib' => 'If you want to let this library to be installed automatically, please:',
669
-	'plugin_info_automatique2' => 'Create a directory <code>@rep@</code> ;',
670
-	'plugin_info_automatique3' => 'Check that the server has the proper permissions to write to this directory.',
671
-	'plugin_info_automatique_creer' => 'to create at the root of the website.',
672
-	'plugin_info_automatique_exemples' => 'examples:',
673
-	'plugin_info_automatique_ftp' => 'You may install plugins by FTP in the  <tt>@rep@</tt> directory',
674
-	'plugin_info_automatique_lib' => 'Some plugins need to be able to load files into the <code>lib/</code> directory. This directory should be created at the website root.',
675
-	'plugin_info_automatique_liste' => 'Your plugin lists:',
676
-	'plugin_info_automatique_liste_officielle' => 'official plugins',
677
-	'plugin_info_automatique_liste_update' => 'Update lists',
678
-	'plugin_info_automatique_ou' => 'or...',
679
-	'plugin_info_automatique_select' => 'Select a plugin below: SPIP will load it and will install it in the <code>@rep@</code> directory. If the plugin already exists, it will be updated.',
680
-	'plugin_info_credit' => 'Credits',
681
-	'plugin_info_erreur_xml' => 'Incorrect declaration of the plugin',
682
-	'plugin_info_install_ok' => 'Installation successful',
683
-	'plugin_info_necessite' => 'Requires:',
684
-	'plugin_info_non_compatible_spip' => 'This plugin is incompatible with this version of SPIP',
685
-	'plugin_info_plugins_dist_1' => 'The following plugins are loaded and activated in the @plugins_dist@ directory.',
686
-	'plugin_info_plugins_dist_2' => 'They cannot be disabled.',
687
-	'plugin_info_telecharger' => 'load from @url@ and install to @rep@',
688
-	'plugin_info_upgrade_ok' => 'Successful update',
689
-	'plugin_librairies_installees' => 'Libraries installed',
690
-	'plugin_necessite_extension_php' => 'Requires the PHP extension @plugin@ version @version@.',
691
-	'plugin_necessite_extension_php_sans_version' => 'Requires the PHP extension @plugin@',
692
-	'plugin_necessite_lib' => 'This plugin requires the library @lib@',
693
-	'plugin_necessite_php' => 'Requires @plugin@ version @version@.',
694
-	'plugin_necessite_plugin' => 'Version @version@ of the plugin @plugin@ is required.',
695
-	'plugin_necessite_plugin_sans_version' => 'Requires the plugin @plugin@',
696
-	'plugin_necessite_spip' => 'SPIP version @version@ or newer is required.',
697
-	'plugin_source' => 'source: ',
698
-	'plugin_titre_automatique' => 'Automatic installation',
699
-	'plugin_titre_automatique_ajouter' => 'Add plugins',
700
-	'plugin_titre_installation' => '@plugin@ plugin installation',
701
-	'plugin_titre_modifier' => 'My plugins',
702
-	'plugin_utilise_extension_php' => 'The version of the PHP extension @plugin@ must be @version@.',
703
-	'plugin_utilise_php' => '@plugin@ version must be @version@.',
704
-	'plugin_utilise_plugin' => 'The version of the plugin @plugin@ must be @version@.',
705
-	'plugin_zip_active' => 'Continue in order to activate',
706
-	'plugin_zip_adresse' => 'To load a zipped plugin file, or a list of plugins, enter the path below.',
707
-	'plugin_zip_adresse_champ' => 'Path of the plugin or list ',
708
-	'plugin_zip_content' => 'It contains the following files(@taille@),<br />ready to be installed in the <code>@rep@</code> directory',
709
-	'plugin_zip_installe_finie' => 'The file @zip@ has been unpacked and installed.',
710
-	'plugin_zip_installe_rep_finie' => 'The file @zip@ has been unpacked and installed in the @rep@ directory',
711
-	'plugin_zip_installer' => 'You may now install it.',
712
-	'plugin_zip_telecharge' => 'The file @zip@ has been loaded',
713
-	'plugins_actif_aucun' => 'No plugins active.',
714
-	'plugins_actif_un' => 'One plugin active',
715
-	'plugins_actifs' => '@count@ active plugins.',
716
-	'plugins_actifs_liste' => 'Enabled',
717
-	'plugins_compte' => '@count@ plugins',
718
-	'plugins_disponible_un' => 'One plugin available',
719
-	'plugins_disponibles' => '@count@ plugins available.',
720
-	'plugins_erreur' => 'Error in the plugins: @plugins@',
721
-	'plugins_liste' => 'List of plugins',
722
-	'plugins_liste_dist' => 'Locked plugins',
723
-	'plugins_recents' => 'Recent plugins',
724
-	'plugins_tous_liste' => 'All',
725
-	'plugins_vue_hierarchie' => 'Hierarchy',
726
-	'plugins_vue_liste' => 'List',
727
-	'protocole_ldap' => 'Protocol version:',
652
+    // P
653
+    'page_pas_proxy' => 'This page must not go through the proxy',
654
+    'pas_de_proxy_pour' => 'If necessary, indicate to which machines or domains this proxy should not apply (for example: @exemple@)',
655
+    'phpinfo' => 'PHP configuration',
656
+    'plugin_charge_paquet' => 'Loading the archive file @name@',
657
+    'plugin_charger' => 'Download',
658
+    'plugin_erreur_charger' => 'error: @zip@ cannot be loaded',
659
+    'plugin_erreur_droit1' => 'Cannot write to directory <code>@dest@</code>.',
660
+    'plugin_erreur_droit2' => 'Please check write permissions for this directory (and create the directory if necessary). Alternatively, install the files by FTP.',
661
+    'plugin_erreur_zip' => 'pclzip failure: error @status@',
662
+    'plugin_etat_developpement' => 'under development',
663
+    'plugin_etat_experimental' => 'experimental',
664
+    'plugin_etat_stable' => 'stable',
665
+    'plugin_etat_test' => 'being tested',
666
+    'plugin_impossible_activer' => 'Impossible to activate the plugin @plugin@',
667
+    'plugin_info_automatique1' => 'If you wish to allow automatic plugin installation, please:',
668
+    'plugin_info_automatique1_lib' => 'If you want to let this library to be installed automatically, please:',
669
+    'plugin_info_automatique2' => 'Create a directory <code>@rep@</code> ;',
670
+    'plugin_info_automatique3' => 'Check that the server has the proper permissions to write to this directory.',
671
+    'plugin_info_automatique_creer' => 'to create at the root of the website.',
672
+    'plugin_info_automatique_exemples' => 'examples:',
673
+    'plugin_info_automatique_ftp' => 'You may install plugins by FTP in the  <tt>@rep@</tt> directory',
674
+    'plugin_info_automatique_lib' => 'Some plugins need to be able to load files into the <code>lib/</code> directory. This directory should be created at the website root.',
675
+    'plugin_info_automatique_liste' => 'Your plugin lists:',
676
+    'plugin_info_automatique_liste_officielle' => 'official plugins',
677
+    'plugin_info_automatique_liste_update' => 'Update lists',
678
+    'plugin_info_automatique_ou' => 'or...',
679
+    'plugin_info_automatique_select' => 'Select a plugin below: SPIP will load it and will install it in the <code>@rep@</code> directory. If the plugin already exists, it will be updated.',
680
+    'plugin_info_credit' => 'Credits',
681
+    'plugin_info_erreur_xml' => 'Incorrect declaration of the plugin',
682
+    'plugin_info_install_ok' => 'Installation successful',
683
+    'plugin_info_necessite' => 'Requires:',
684
+    'plugin_info_non_compatible_spip' => 'This plugin is incompatible with this version of SPIP',
685
+    'plugin_info_plugins_dist_1' => 'The following plugins are loaded and activated in the @plugins_dist@ directory.',
686
+    'plugin_info_plugins_dist_2' => 'They cannot be disabled.',
687
+    'plugin_info_telecharger' => 'load from @url@ and install to @rep@',
688
+    'plugin_info_upgrade_ok' => 'Successful update',
689
+    'plugin_librairies_installees' => 'Libraries installed',
690
+    'plugin_necessite_extension_php' => 'Requires the PHP extension @plugin@ version @version@.',
691
+    'plugin_necessite_extension_php_sans_version' => 'Requires the PHP extension @plugin@',
692
+    'plugin_necessite_lib' => 'This plugin requires the library @lib@',
693
+    'plugin_necessite_php' => 'Requires @plugin@ version @version@.',
694
+    'plugin_necessite_plugin' => 'Version @version@ of the plugin @plugin@ is required.',
695
+    'plugin_necessite_plugin_sans_version' => 'Requires the plugin @plugin@',
696
+    'plugin_necessite_spip' => 'SPIP version @version@ or newer is required.',
697
+    'plugin_source' => 'source: ',
698
+    'plugin_titre_automatique' => 'Automatic installation',
699
+    'plugin_titre_automatique_ajouter' => 'Add plugins',
700
+    'plugin_titre_installation' => '@plugin@ plugin installation',
701
+    'plugin_titre_modifier' => 'My plugins',
702
+    'plugin_utilise_extension_php' => 'The version of the PHP extension @plugin@ must be @version@.',
703
+    'plugin_utilise_php' => '@plugin@ version must be @version@.',
704
+    'plugin_utilise_plugin' => 'The version of the plugin @plugin@ must be @version@.',
705
+    'plugin_zip_active' => 'Continue in order to activate',
706
+    'plugin_zip_adresse' => 'To load a zipped plugin file, or a list of plugins, enter the path below.',
707
+    'plugin_zip_adresse_champ' => 'Path of the plugin or list ',
708
+    'plugin_zip_content' => 'It contains the following files(@taille@),<br />ready to be installed in the <code>@rep@</code> directory',
709
+    'plugin_zip_installe_finie' => 'The file @zip@ has been unpacked and installed.',
710
+    'plugin_zip_installe_rep_finie' => 'The file @zip@ has been unpacked and installed in the @rep@ directory',
711
+    'plugin_zip_installer' => 'You may now install it.',
712
+    'plugin_zip_telecharge' => 'The file @zip@ has been loaded',
713
+    'plugins_actif_aucun' => 'No plugins active.',
714
+    'plugins_actif_un' => 'One plugin active',
715
+    'plugins_actifs' => '@count@ active plugins.',
716
+    'plugins_actifs_liste' => 'Enabled',
717
+    'plugins_compte' => '@count@ plugins',
718
+    'plugins_disponible_un' => 'One plugin available',
719
+    'plugins_disponibles' => '@count@ plugins available.',
720
+    'plugins_erreur' => 'Error in the plugins: @plugins@',
721
+    'plugins_liste' => 'List of plugins',
722
+    'plugins_liste_dist' => 'Locked plugins',
723
+    'plugins_recents' => 'Recent plugins',
724
+    'plugins_tous_liste' => 'All',
725
+    'plugins_vue_hierarchie' => 'Hierarchy',
726
+    'plugins_vue_liste' => 'List',
727
+    'protocole_ldap' => 'Protocol version:',
728 728
 
729
-	// Q
730
-	'queue_executer_maintenant' => 'Run now',
731
-	'queue_info_purger' => 'You can delete all pending tasks and reset the list with periodic tasks',
732
-	'queue_nb_jobs_in_queue' => '@nb@ pending tasks',
733
-	'queue_next_job_in_nb_sec' => 'Next task in @nb@ s',
734
-	'queue_no_job_in_queue' => 'No pending tasks',
735
-	'queue_one_job_in_queue' => '1 pending task',
736
-	'queue_priorite_tache' => 'priority',
737
-	'queue_purger_queue' => 'Reset the tasks queue',
738
-	'queue_titre' => 'Background tasks',
729
+    // Q
730
+    'queue_executer_maintenant' => 'Run now',
731
+    'queue_info_purger' => 'You can delete all pending tasks and reset the list with periodic tasks',
732
+    'queue_nb_jobs_in_queue' => '@nb@ pending tasks',
733
+    'queue_next_job_in_nb_sec' => 'Next task in @nb@ s',
734
+    'queue_no_job_in_queue' => 'No pending tasks',
735
+    'queue_one_job_in_queue' => '1 pending task',
736
+    'queue_priorite_tache' => 'priority',
737
+    'queue_purger_queue' => 'Reset the tasks queue',
738
+    'queue_titre' => 'Background tasks',
739 739
 
740
-	// R
741
-	'repertoire_plugins' => 'Directory:',
742
-	'required' => '(Required)',
740
+    // R
741
+    'repertoire_plugins' => 'Directory:',
742
+    'required' => '(Required)',
743 743
 
744
-	// S
745
-	'sans_heure' => 'time not specified',
746
-	'statut_admin_restreint' => 'restricted admin',
747
-	'statut_webmestre' => 'webmaster',
744
+    // S
745
+    'sans_heure' => 'time not specified',
746
+    'statut_admin_restreint' => 'restricted admin',
747
+    'statut_webmestre' => 'webmaster',
748 748
 
749
-	// T
750
-	'tache_cron_asap' => 'CRON task @function@ (ASAP)',
751
-	'tache_cron_secondes' => 'CRON task @function@ (every @nb@ s)',
752
-	'taille_cache_image' => 'The images calculated automatically by SPIP (thumbnails, titles transformed into graphics, mathematical formulae in TeX format, etc.) take up a total of @taille@ in the @dir@ directory.',
753
-	'taille_cache_moins_de' => 'The cache size is less than @octets@.',
754
-	'taille_cache_octets' => 'The size of the cache is currently around @octets@.',
755
-	'taille_cache_vide' => 'The cache is empty.',
756
-	'taille_repertoire_cache' => 'Current cache size ',
757
-	'text_article_propose_publication' => 'Article submitted for publication.',
758
-	'texte_acces_ldap_anonyme_1' => 'Some LDAP servers do not allow anonymous access. In this case you must indicate an initial access identifier for future directory searches. However, in most cases the following fields can be left empty.',
759
-	'texte_admin_effacer_01' => 'This command deletes <i>all</i> content in the database,
749
+    // T
750
+    'tache_cron_asap' => 'CRON task @function@ (ASAP)',
751
+    'tache_cron_secondes' => 'CRON task @function@ (every @nb@ s)',
752
+    'taille_cache_image' => 'The images calculated automatically by SPIP (thumbnails, titles transformed into graphics, mathematical formulae in TeX format, etc.) take up a total of @taille@ in the @dir@ directory.',
753
+    'taille_cache_moins_de' => 'The cache size is less than @octets@.',
754
+    'taille_cache_octets' => 'The size of the cache is currently around @octets@.',
755
+    'taille_cache_vide' => 'The cache is empty.',
756
+    'taille_repertoire_cache' => 'Current cache size ',
757
+    'text_article_propose_publication' => 'Article submitted for publication.',
758
+    'texte_acces_ldap_anonyme_1' => 'Some LDAP servers do not allow anonymous access. In this case you must indicate an initial access identifier for future directory searches. However, in most cases the following fields can be left empty.',
759
+    'texte_admin_effacer_01' => 'This command deletes <i>all</i> content in the database,
760 760
 including <i>all</i> the access parameters for editors and administrators. After using it, you must
761 761
 reinstall SPIP, create a new database and a new administrator account.',
762
-	'texte_adresse_annuaire_1' => '(If your directory is installed on the same machine as your website, it is probably «localhost».)',
763
-	'texte_ajout_auteur' => 'The following author was added to the article:',
764
-	'texte_annuaire_ldap_1' => 'If you have access to a LDAP directory server, you can use it to import users automatically into SPIP.',
765
-	'texte_article_statut' => 'Article status:',
766
-	'texte_article_virtuel' => 'Virtual article',
767
-	'texte_article_virtuel_reference' => '<b>Virtual article:</b> an article on your SPIP website which redirects to another URL. To remove redirection, delete the URL.',
768
-	'texte_aucun_resultat_auteur' => 'No results for "@cherche_auteur@".',
769
-	'texte_auteur_messagerie' => 'This site can update the list of editors online in real time, which allows you to be contacted by other users. You can opt not to appear in this list (you are then "invisible" to other users).',
770
-	'texte_auteurs' => 'THE AUTHORS',
771
-	'texte_choix_base_1' => 'Select your database:',
772
-	'texte_choix_base_2' => 'The SQL server contains several databases.',
773
-	'texte_choix_base_3' => '<b>Select</b> below the one attributed by your hosting provider:',
774
-	'texte_choix_table_prefix' => 'Prefix for tables:',
775
-	'texte_compte_element' => '@count@ element',
776
-	'texte_compte_elements' => '@count@ elements',
777
-	'texte_conflit_edition_correction' => 'Please compare differences between the two versions. You can also copy your changes and start over.',
778
-	'texte_connexion_mysql' => 'Consult the information provided by your hosting service. It should contain the connection codes for the SQL server.',
779
-	'texte_contenu_article' => '(Brief description of the article.)',
780
-	'texte_contenu_articles' => 'Depending on the layout chosen for your site, you can decide
762
+    'texte_adresse_annuaire_1' => '(If your directory is installed on the same machine as your website, it is probably «localhost».)',
763
+    'texte_ajout_auteur' => 'The following author was added to the article:',
764
+    'texte_annuaire_ldap_1' => 'If you have access to a LDAP directory server, you can use it to import users automatically into SPIP.',
765
+    'texte_article_statut' => 'Article status:',
766
+    'texte_article_virtuel' => 'Virtual article',
767
+    'texte_article_virtuel_reference' => '<b>Virtual article:</b> an article on your SPIP website which redirects to another URL. To remove redirection, delete the URL.',
768
+    'texte_aucun_resultat_auteur' => 'No results for "@cherche_auteur@".',
769
+    'texte_auteur_messagerie' => 'This site can update the list of editors online in real time, which allows you to be contacted by other users. You can opt not to appear in this list (you are then "invisible" to other users).',
770
+    'texte_auteurs' => 'THE AUTHORS',
771
+    'texte_choix_base_1' => 'Select your database:',
772
+    'texte_choix_base_2' => 'The SQL server contains several databases.',
773
+    'texte_choix_base_3' => '<b>Select</b> below the one attributed by your hosting provider:',
774
+    'texte_choix_table_prefix' => 'Prefix for tables:',
775
+    'texte_compte_element' => '@count@ element',
776
+    'texte_compte_elements' => '@count@ elements',
777
+    'texte_conflit_edition_correction' => 'Please compare differences between the two versions. You can also copy your changes and start over.',
778
+    'texte_connexion_mysql' => 'Consult the information provided by your hosting service. It should contain the connection codes for the SQL server.',
779
+    'texte_contenu_article' => '(Brief description of the article.)',
780
+    'texte_contenu_articles' => 'Depending on the layout chosen for your site, you can decide
781 781
   that some article options are not to be used.
782 782
   Use the following list to choose which options should be available.',
783
-	'texte_crash_base' => 'If your database
783
+    'texte_crash_base' => 'If your database
784 784
    crashed, you can try to repair it
785 785
    automatically.',
786
-	'texte_creer_rubrique' => 'Before writing any articles,<br /> you must create a section.',
787
-	'texte_date_creation_article' => 'ARTICLE CREATION DATE:',
788
-	'texte_date_creation_objet' => 'Creation date:', # on ajoute le ":"
789
-	'texte_date_publication_anterieure' => 'Date first published:',
790
-	'texte_date_publication_anterieure_nonaffichee' => 'Hide previous publication date.',
791
-	'texte_date_publication_article' => 'PUBLISHED ON:',
792
-	'texte_date_publication_objet' => 'Published on:',
793
-	'texte_definir_comme_traduction_rubrique' => 'This section is a translation of section number:',
794
-	'texte_descriptif_rapide' => 'Brief description',
795
-	'texte_effacer_base' => 'Delete the SPIP database',
796
-	'texte_effacer_statistiques' => 'Delete the statistics',
797
-	'texte_en_cours_validation' => 'The following articles and news have been submitted for evaluation.',
798
-	'texte_enrichir_mise_a_jour' => 'You can enrich the layout of your text by using "typographical shortcuts".',
799
-	'texte_fichier_authent' => '<b>Should SPIP create the special files <tt>.htpasswd</tt>
786
+    'texte_creer_rubrique' => 'Before writing any articles,<br /> you must create a section.',
787
+    'texte_date_creation_article' => 'ARTICLE CREATION DATE:',
788
+    'texte_date_creation_objet' => 'Creation date:', # on ajoute le ":"
789
+    'texte_date_publication_anterieure' => 'Date first published:',
790
+    'texte_date_publication_anterieure_nonaffichee' => 'Hide previous publication date.',
791
+    'texte_date_publication_article' => 'PUBLISHED ON:',
792
+    'texte_date_publication_objet' => 'Published on:',
793
+    'texte_definir_comme_traduction_rubrique' => 'This section is a translation of section number:',
794
+    'texte_descriptif_rapide' => 'Brief description',
795
+    'texte_effacer_base' => 'Delete the SPIP database',
796
+    'texte_effacer_statistiques' => 'Delete the statistics',
797
+    'texte_en_cours_validation' => 'The following articles and news have been submitted for evaluation.',
798
+    'texte_enrichir_mise_a_jour' => 'You can enrich the layout of your text by using "typographical shortcuts".',
799
+    'texte_fichier_authent' => '<b>Should SPIP create the special files <tt>.htpasswd</tt>
800 800
   and <tt>.htpasswd-admin</tt> in the directory @dossier@?</b>
801 801
 <p>These files can be used to restrict access to authors and administrators to other parts of your site (for instance, external statistical programme).</p><p>If you have no need of such files, you can keep this option with its default value (no file creation).</p>',
802
-	'texte_informations_personnelles_1' => 'The system will now  create your personal account for this site.',
803
-	'texte_informations_personnelles_2' => '(Note: if it is a reinstallation, if your former access is still working, you can',
804
-	'texte_introductif_article' => '(Introductory text for the article.)',
805
-	'texte_jeu_caractere' => 'We advise using the universal alphabet (<tt>utf-8</tt>) on your site. This will make it possible to display text in any language. All modern browsers are fully comptabile with this character set.',
806
-	'texte_jeu_caractere_3' => 'Your site currently uses this character set:',
807
-	'texte_jeu_caractere_4' => 'If that does not correspond to your current data (this may occur after restoring your database from a backup), or if <em>you are setting up this site</em> and wish to use a different character set, please indicate the character set here:',
808
-	'texte_login_ldap_1' => '(Keep empty for anonymous access or enter complete path, for instance «<tt>uid=smith, ou=users, dc=my-domain, dc=com</tt>».)',
809
-	'texte_login_precaution' => 'Warning! This is the login which you are currently using.
802
+    'texte_informations_personnelles_1' => 'The system will now  create your personal account for this site.',
803
+    'texte_informations_personnelles_2' => '(Note: if it is a reinstallation, if your former access is still working, you can',
804
+    'texte_introductif_article' => '(Introductory text for the article.)',
805
+    'texte_jeu_caractere' => 'We advise using the universal alphabet (<tt>utf-8</tt>) on your site. This will make it possible to display text in any language. All modern browsers are fully comptabile with this character set.',
806
+    'texte_jeu_caractere_3' => 'Your site currently uses this character set:',
807
+    'texte_jeu_caractere_4' => 'If that does not correspond to your current data (this may occur after restoring your database from a backup), or if <em>you are setting up this site</em> and wish to use a different character set, please indicate the character set here:',
808
+    'texte_login_ldap_1' => '(Keep empty for anonymous access or enter complete path, for instance «<tt>uid=smith, ou=users, dc=my-domain, dc=com</tt>».)',
809
+    'texte_login_precaution' => 'Warning! This is the login which you are currently using.
810 810
  Use this form with caution...',
811
-	'texte_messagerie_agenda' => 'A messaging system lets website’s authors communicate directly into the admin area. It is linked to a calendar.',
812
-	'texte_mise_a_niveau_base_1' => 'You have just updated SPIP files.
811
+    'texte_messagerie_agenda' => 'A messaging system lets website’s authors communicate directly into the admin area. It is linked to a calendar.',
812
+    'texte_mise_a_niveau_base_1' => 'You have just updated SPIP files.
813 813
  Now you must upgrade the site
814 814
  database.',
815
-	'texte_modifier_article' => 'Edit this article:',
816
-	'texte_multilinguisme' => 'If you want to manage objects in several languages​​, with complex navigation, you can add a language selection menu to these objects, depending on the organization of your site.',
817
-	'texte_multilinguisme_trad' => 'You can also enable a system for managing links between the various translations of certain objects.',
818
-	'texte_non_compresse' => '<i>uncompressed</i> (your server does not support this feature)',
819
-	'texte_nouvelle_version_spip_1' => 'You have just installed a new version of SPIP.',
820
-	'texte_nouvelle_version_spip_2' => 'This new version requires a more thorough update than usual. If you are the webmaster of this site, please delete the file @connect@ and restart installation in order to update your database connection parameters. <p>(PS.: if you have forgotten your connection parameters, take a look at the file @connect@ before deleting it!)</p>',
821
-	'texte_operation_echec' => 'Go back to the previous page, select another database or create a new one. Verify the information provided by your hosting service.',
822
-	'texte_plus_trois_car' => 'more than 3 characters',
823
-	'texte_plusieurs_articles' => 'Several authors were found for "@cherche_auteur@":',
824
-	'texte_port_annuaire' => '(Default value is generally suitable.)',
825
-	'texte_presente_plugin' => 'This page shows the plugins available on this site. Activate the plugins you require by ticking the corresponding box.',
826
-	'texte_proposer_publication' => 'When your article is finished,<br /> you can submit it for publication.',
827
-	'texte_proxy' => 'In some cases (e.g. intranet, protected network), it is necessary to use an <i>HTTP proxy</i> to reach external sites (SPIP documentation, syndicated sites, etc.). If this is the case, enter its address in the form @proxy_en_cours@. In most cases you can leave this box empty.',
828
-	'texte_publication_articles_post_dates' => 'Which behaviour should SPIP adopt for articles whose
815
+    'texte_modifier_article' => 'Edit this article:',
816
+    'texte_multilinguisme' => 'If you want to manage objects in several languages​​, with complex navigation, you can add a language selection menu to these objects, depending on the organization of your site.',
817
+    'texte_multilinguisme_trad' => 'You can also enable a system for managing links between the various translations of certain objects.',
818
+    'texte_non_compresse' => '<i>uncompressed</i> (your server does not support this feature)',
819
+    'texte_nouvelle_version_spip_1' => 'You have just installed a new version of SPIP.',
820
+    'texte_nouvelle_version_spip_2' => 'This new version requires a more thorough update than usual. If you are the webmaster of this site, please delete the file @connect@ and restart installation in order to update your database connection parameters. <p>(PS.: if you have forgotten your connection parameters, take a look at the file @connect@ before deleting it!)</p>',
821
+    'texte_operation_echec' => 'Go back to the previous page, select another database or create a new one. Verify the information provided by your hosting service.',
822
+    'texte_plus_trois_car' => 'more than 3 characters',
823
+    'texte_plusieurs_articles' => 'Several authors were found for "@cherche_auteur@":',
824
+    'texte_port_annuaire' => '(Default value is generally suitable.)',
825
+    'texte_presente_plugin' => 'This page shows the plugins available on this site. Activate the plugins you require by ticking the corresponding box.',
826
+    'texte_proposer_publication' => 'When your article is finished,<br /> you can submit it for publication.',
827
+    'texte_proxy' => 'In some cases (e.g. intranet, protected network), it is necessary to use an <i>HTTP proxy</i> to reach external sites (SPIP documentation, syndicated sites, etc.). If this is the case, enter its address in the form @proxy_en_cours@. In most cases you can leave this box empty.',
828
+    'texte_publication_articles_post_dates' => 'Which behaviour should SPIP adopt for articles whose
829 829
   publication date has been set in
830 830
   the future?',
831
-	'texte_rappel_selection_champs' => '[Remember to select this field correctly.]',
832
-	'texte_recalcul_page' => 'If you want
831
+    'texte_rappel_selection_champs' => '[Remember to select this field correctly.]',
832
+    'texte_recalcul_page' => 'If you want
833 833
 to re-process a single page, it is easier to view that page from the public site and click "Re-process this page".',
834
-	'texte_recuperer_base' => 'Repair the database',
835
-	'texte_reference_mais_redirige' => 'article referenced in your SPIP site, but redirected to another URL.',
836
-	'texte_requetes_echouent' => '<b>When some SQL queries fail
834
+    'texte_recuperer_base' => 'Repair the database',
835
+    'texte_reference_mais_redirige' => 'article referenced in your SPIP site, but redirected to another URL.',
836
+    'texte_requetes_echouent' => '<b>When some SQL queries fail
837 837
   systematically, without apparent reason, it is possible
838 838
   that the database itself
839 839
   is the culprit.</b><p>
@@ -844,87 +844,87 @@  discard block
 block discarded – undo
844 844
   clues as to where the problem lies.</p><p>
845 845
   If the problem persists, contact your 
846 846
   service provider.</p>',
847
-	'texte_selection_langue_principale' => 'You can choose the website’s "primary language". This does not mean that you can only write articles in that language, but it will be used to determine
847
+    'texte_selection_langue_principale' => 'You can choose the website’s "primary language". This does not mean that you can only write articles in that language, but it will be used to determine
848 848
 
849 849
 <ul><li> the default date/time format on the public website,</li>
850 850
 <li> the nature of the typographical engine which will be used by SPIP for rendering text,</li>
851 851
 <li> the language in use in public website’s forms,</li>
852 852
 <li> the default language in use in the admin area.</li></ul>',
853
-	'texte_sous_titre' => 'Subtitle',
854
-	'texte_statistiques_visites' => '(dark bars = Sunday, dark curve: average visits)',
855
-	'texte_statut_attente_validation' => 'awaiting validation',
856
-	'texte_statut_publies' => 'published online',
857
-	'texte_statut_refuses' => 'rejected',
858
-	'texte_suppression_fichiers' => 'Use this command to purge all the files
853
+    'texte_sous_titre' => 'Subtitle',
854
+    'texte_statistiques_visites' => '(dark bars = Sunday, dark curve: average visits)',
855
+    'texte_statut_attente_validation' => 'awaiting validation',
856
+    'texte_statut_publies' => 'published online',
857
+    'texte_statut_refuses' => 'rejected',
858
+    'texte_suppression_fichiers' => 'Use this command to purge all the files
859 859
 in the SPIP cache. This will force recalculation of every page on the site, useful after
860 860
 significant modifications to the site’s graphics or structure.',
861
-	'texte_sur_titre' => 'Lead-in title',
862
-	'texte_table_ok' => ': this table is OK.',
863
-	'texte_tentative_recuperation' => 'Attempting to repair',
864
-	'texte_tenter_reparation' => 'Attempt to repair the database',
865
-	'texte_test_proxy' => 'To test this proxy, enter the address of a website
861
+    'texte_sur_titre' => 'Lead-in title',
862
+    'texte_table_ok' => ': this table is OK.',
863
+    'texte_tentative_recuperation' => 'Attempting to repair',
864
+    'texte_tenter_reparation' => 'Attempt to repair the database',
865
+    'texte_test_proxy' => 'To test this proxy, enter the address of a website
866 866
     for verification.',
867
-	'texte_titre_02' => 'Subject:',
868
-	'texte_titre_obligatoire' => '<b>Title</b> [Required]',
869
-	'texte_travail_article' => '@nom_auteur_modif@ edited this article @date_diff@ minutes ago',
870
-	'texte_travail_collaboratif' => 'If several editors often work on the same article, the system can mark recently "opened" articles in order to avoid multiple simultaneous editing.
867
+    'texte_titre_02' => 'Subject:',
868
+    'texte_titre_obligatoire' => '<b>Title</b> [Required]',
869
+    'texte_travail_article' => '@nom_auteur_modif@ edited this article @date_diff@ minutes ago',
870
+    'texte_travail_collaboratif' => 'If several editors often work on the same article, the system can mark recently "opened" articles in order to avoid multiple simultaneous editing.
871 871
   This option is disabled by default to avoid displaying unnecessary warning
872 872
   messages.',
873
-	'texte_vide' => 'empty',
874
-	'texte_vider_cache' => 'Empty the cache',
875
-	'titre_admin_tech' => 'Technical maintenance',
876
-	'titre_admin_vider' => 'Technical maintenance',
877
-	'titre_ajouter_un_auteur' => 'Add an author',
878
-	'titre_ajouter_un_mot' => 'Add a keyword',
879
-	'titre_cadre_afficher_article' => 'Show the articles:',
880
-	'titre_cadre_afficher_traductions' => 'Display the translation status for these languages:',
881
-	'titre_cadre_ajouter_auteur' => 'ADD AN AUTHOR:',
882
-	'titre_cadre_interieur_rubrique' => 'In section',
883
-	'titre_cadre_numero_auteur' => 'AUTHOR NUMBER',
884
-	'titre_cadre_numero_objet' => '@objet@ NUMBER:',
885
-	'titre_cadre_signature_obligatoire' => '<b>Signature</b> [Required]<br />',
886
-	'titre_config_contenu_notifications' => 'Notifications',
887
-	'titre_config_contenu_prive' => 'In the admin area',
888
-	'titre_config_contenu_public' => 'On the public site',
889
-	'titre_config_fonctions' => 'Site configuration',
890
-	'titre_config_langage' => 'Configure the language',
891
-	'titre_configuration' => 'Site configuration',
892
-	'titre_configurer_preferences' => 'Configure your preferences',
893
-	'titre_configurer_preferences_menus' => 'Settings of your menus preferences',
894
-	'titre_conflit_edition' => 'Conflict while editing',
895
-	'titre_connexion_ldap' => 'Options: <b>Your LDAP connection</b>',
896
-	'titre_groupe_mots' => 'KEYWORD GROUP:',
897
-	'titre_identite_site' => 'Site identity',
898
-	'titre_langue_article' => 'Article language',
899
-	'titre_langue_rubrique' => 'Section language',
900
-	'titre_langue_trad_article' => 'ARTICLE LANGUAGE AND TRANSLATIONS',
901
-	'titre_les_articles' => 'ARTICLES',
902
-	'titre_messagerie_agenda' => 'Messaging system and calendar',
903
-	'titre_naviguer_dans_le_site' => 'Browse the site...',
904
-	'titre_nouvelle_rubrique' => 'New section',
905
-	'titre_numero_rubrique' => 'SECTION NUMBER:',
906
-	'titre_page_articles_edit' => 'Modify: @titre@',
907
-	'titre_page_articles_page' => 'Articles',
908
-	'titre_page_articles_tous' => 'The entire site',
909
-	'titre_page_calendrier' => 'Calendar @nom_mois@ @annee@',
910
-	'titre_page_config_contenu' => 'Site configuration',
911
-	'titre_page_delete_all' => 'total and irreversible deletion',
912
-	'titre_page_recherche' => 'Search results @recherche@',
913
-	'titre_page_statistiques_referers' => 'Statistics (incoming links)',
914
-	'titre_page_upgrade' => 'SPIP upgrade',
915
-	'titre_preference_menus_favoris' => 'Favourites menu',
916
-	'titre_publication_articles_post_dates' => 'Publication of post dated articles',
917
-	'titre_reparation' => 'Repair',
918
-	'titre_suivi_petition' => 'Petitions follow-up',
919
-	'tls_ldap' => 'Transport Layer Security :',
920
-	'trad_article_traduction' => 'All the versions of this article:',
921
-	'trad_delier' => 'Stop linking to these translations',
922
-	'trad_lier' => 'This article is a translation of article number:',
923
-	'trad_new' => 'Write a new translation',
873
+    'texte_vide' => 'empty',
874
+    'texte_vider_cache' => 'Empty the cache',
875
+    'titre_admin_tech' => 'Technical maintenance',
876
+    'titre_admin_vider' => 'Technical maintenance',
877
+    'titre_ajouter_un_auteur' => 'Add an author',
878
+    'titre_ajouter_un_mot' => 'Add a keyword',
879
+    'titre_cadre_afficher_article' => 'Show the articles:',
880
+    'titre_cadre_afficher_traductions' => 'Display the translation status for these languages:',
881
+    'titre_cadre_ajouter_auteur' => 'ADD AN AUTHOR:',
882
+    'titre_cadre_interieur_rubrique' => 'In section',
883
+    'titre_cadre_numero_auteur' => 'AUTHOR NUMBER',
884
+    'titre_cadre_numero_objet' => '@objet@ NUMBER:',
885
+    'titre_cadre_signature_obligatoire' => '<b>Signature</b> [Required]<br />',
886
+    'titre_config_contenu_notifications' => 'Notifications',
887
+    'titre_config_contenu_prive' => 'In the admin area',
888
+    'titre_config_contenu_public' => 'On the public site',
889
+    'titre_config_fonctions' => 'Site configuration',
890
+    'titre_config_langage' => 'Configure the language',
891
+    'titre_configuration' => 'Site configuration',
892
+    'titre_configurer_preferences' => 'Configure your preferences',
893
+    'titre_configurer_preferences_menus' => 'Settings of your menus preferences',
894
+    'titre_conflit_edition' => 'Conflict while editing',
895
+    'titre_connexion_ldap' => 'Options: <b>Your LDAP connection</b>',
896
+    'titre_groupe_mots' => 'KEYWORD GROUP:',
897
+    'titre_identite_site' => 'Site identity',
898
+    'titre_langue_article' => 'Article language',
899
+    'titre_langue_rubrique' => 'Section language',
900
+    'titre_langue_trad_article' => 'ARTICLE LANGUAGE AND TRANSLATIONS',
901
+    'titre_les_articles' => 'ARTICLES',
902
+    'titre_messagerie_agenda' => 'Messaging system and calendar',
903
+    'titre_naviguer_dans_le_site' => 'Browse the site...',
904
+    'titre_nouvelle_rubrique' => 'New section',
905
+    'titre_numero_rubrique' => 'SECTION NUMBER:',
906
+    'titre_page_articles_edit' => 'Modify: @titre@',
907
+    'titre_page_articles_page' => 'Articles',
908
+    'titre_page_articles_tous' => 'The entire site',
909
+    'titre_page_calendrier' => 'Calendar @nom_mois@ @annee@',
910
+    'titre_page_config_contenu' => 'Site configuration',
911
+    'titre_page_delete_all' => 'total and irreversible deletion',
912
+    'titre_page_recherche' => 'Search results @recherche@',
913
+    'titre_page_statistiques_referers' => 'Statistics (incoming links)',
914
+    'titre_page_upgrade' => 'SPIP upgrade',
915
+    'titre_preference_menus_favoris' => 'Favourites menu',
916
+    'titre_publication_articles_post_dates' => 'Publication of post dated articles',
917
+    'titre_reparation' => 'Repair',
918
+    'titre_suivi_petition' => 'Petitions follow-up',
919
+    'tls_ldap' => 'Transport Layer Security :',
920
+    'trad_article_traduction' => 'All the versions of this article:',
921
+    'trad_delier' => 'Stop linking to these translations',
922
+    'trad_lier' => 'This article is a translation of article number:',
923
+    'trad_new' => 'Write a new translation',
924 924
 
925
-	// U
926
-	'utf8_convert_erreur_orig' => 'Error: the character set @charset@ is not supported.',
925
+    // U
926
+    'utf8_convert_erreur_orig' => 'Error: the character set @charset@ is not supported.',
927 927
 
928
-	// V
929
-	'version' => 'Version:'
928
+    // V
929
+    'version' => 'Version:'
930 930
 );
Please login to merge, or discard this patch.
ecrire/public/evaluer_page.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 /**
@@ -29,50 +29,50 @@  discard block
 block discarded – undo
29 29
  * @return void
30 30
  */
31 31
 
32
- /** @var bool Évaluation réussie ? */
32
+    /** @var bool Évaluation réussie ? */
33 33
 $res = true;
34 34
 
35 35
 // Cas d'une page contenant du PHP :
36 36
 if (empty($page['process_ins']) or $page['process_ins'] != 'html') {
37
-	include_spip('inc/lang');
37
+    include_spip('inc/lang');
38 38
 
39
-	// restaurer l'etat des notes avant calcul
40
-	if (
41
-		isset($page['notes'])
42
-		and $page['notes']
43
-		and $notes = charger_fonction('notes', 'inc', true)
44
-	) {
45
-		$notes($page['notes'], 'restaurer_etat');
46
-	}
47
-	ob_start();
48
-	if (strpos($page['texte'], '?xml') !== false) {
49
-		$page['texte'] = str_replace('<' . '?xml', "<\1?xml", $page['texte']);
50
-	}
39
+    // restaurer l'etat des notes avant calcul
40
+    if (
41
+        isset($page['notes'])
42
+        and $page['notes']
43
+        and $notes = charger_fonction('notes', 'inc', true)
44
+    ) {
45
+        $notes($page['notes'], 'restaurer_etat');
46
+    }
47
+    ob_start();
48
+    if (strpos($page['texte'], '?xml') !== false) {
49
+        $page['texte'] = str_replace('<' . '?xml', "<\1?xml", $page['texte']);
50
+    }
51 51
 
52
-	try {
53
-		$res = eval('?' . '>' . $page['texte']);
54
-		$page['texte'] = ob_get_contents();
55
-	} catch (\Throwable $e) {
56
-		$code = $page['texte'];
57
-		$GLOBALS['numero_ligne_php'] = 1;
58
-		if (!function_exists('numerote_ligne_php')) {
59
-			function numerote_ligne_php($match) {
60
-				$GLOBALS['numero_ligne_php']++;
61
-				return "\n/*" . str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/';
62
-			}
63
-		}
64
-		$code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', $code);
65
-		$code = trim(highlight_string($code, true));
66
-		erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]);
67
-		$page['texte'] = '<!-- Erreur -->';
68
-	}
69
-	ob_end_clean();
52
+    try {
53
+        $res = eval('?' . '>' . $page['texte']);
54
+        $page['texte'] = ob_get_contents();
55
+    } catch (\Throwable $e) {
56
+        $code = $page['texte'];
57
+        $GLOBALS['numero_ligne_php'] = 1;
58
+        if (!function_exists('numerote_ligne_php')) {
59
+            function numerote_ligne_php($match) {
60
+                $GLOBALS['numero_ligne_php']++;
61
+                return "\n/*" . str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/';
62
+            }
63
+        }
64
+        $code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', $code);
65
+        $code = trim(highlight_string($code, true));
66
+        erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]);
67
+        $page['texte'] = '<!-- Erreur -->';
68
+    }
69
+    ob_end_clean();
70 70
 
71
-	$page['process_ins'] = 'html';
71
+    $page['process_ins'] = 'html';
72 72
 
73
-	if (strpos($page['texte'], '?xml') !== false) {
74
-		$page['texte'] = str_replace("<\1?xml", '<' . '?xml', $page['texte']);
75
-	}
73
+    if (strpos($page['texte'], '?xml') !== false) {
74
+        $page['texte'] = str_replace("<\1?xml", '<' . '?xml', $page['texte']);
75
+    }
76 76
 }
77 77
 
78 78
 // le résultat de calcul d'un squelette est toujours de type string
Please login to merge, or discard this patch.
ecrire/inc/urls.php 1 patch
Indentation   +205 added lines, -205 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
 include_spip('base/objets');
23 23
 
@@ -57,106 +57,106 @@  discard block
 block discarded – undo
57 57
  *
58 58
  */
59 59
 function urls_decoder_url($url, $fond = '', $contexte = [], $assembler = false) {
60
-	static $current_base = null;
60
+    static $current_base = null;
61 61
 
62
-	// les anciennes fonctions modifient directement les globales
63
-	// on les sauve avant l'appel, et on les retablit apres !
64
-	$save = [
65
-		$GLOBALS['fond'] ?? null,
66
-		$GLOBALS['contexte'] ?? null,
67
-		$_SERVER['REDIRECT_url_propre'] ?? null,
68
-		$_ENV['url_propre'] ?? null,
69
-		$GLOBALS['profondeur_url']
70
-	];
62
+    // les anciennes fonctions modifient directement les globales
63
+    // on les sauve avant l'appel, et on les retablit apres !
64
+    $save = [
65
+        $GLOBALS['fond'] ?? null,
66
+        $GLOBALS['contexte'] ?? null,
67
+        $_SERVER['REDIRECT_url_propre'] ?? null,
68
+        $_ENV['url_propre'] ?? null,
69
+        $GLOBALS['profondeur_url']
70
+    ];
71 71
 
72
-	if (is_null($current_base)) {
73
-		include_spip('inc/filtres_mini');
74
-		// le decodage des urls se fait toujours par rapport au site public
75
-		$current_base = url_absolue(_DIR_RACINE ?: './');
76
-	}
77
-	if (strncmp($url, $current_base, strlen($current_base)) == 0) {
78
-		$url = substr($url, strlen($current_base));
79
-	}
72
+    if (is_null($current_base)) {
73
+        include_spip('inc/filtres_mini');
74
+        // le decodage des urls se fait toujours par rapport au site public
75
+        $current_base = url_absolue(_DIR_RACINE ?: './');
76
+    }
77
+    if (strncmp($url, $current_base, strlen($current_base)) == 0) {
78
+        $url = substr($url, strlen($current_base));
79
+    }
80 80
 
81
-	// si on est en train d'assembler la page principale,
82
-	// recuperer l'url depuis les globales url propres si fournies
83
-	// sinon extraire la bonne portion d'url
84
-	if ($assembler) {
85
-		if (isset($_SERVER['REDIRECT_url_propre'])) {
86
-			$url = $_SERVER['REDIRECT_url_propre'];
87
-		} elseif (isset($_ENV['url_propre'])) {
88
-			$url = $_ENV['url_propre'];
89
-		} else {
90
-			$qs = explode('?', $url);
91
-			// ne prendre que le segment d'url qui correspond, en fonction de la profondeur calculee
92
-			$url = ltrim($qs[0], '/');
93
-			$url = explode('/', $url);
94
-			while (count($url) > $GLOBALS['profondeur_url'] + 1) {
95
-				array_shift($url);
96
-			}
97
-			$qs[0] = implode('/', $url);
98
-			$url = implode('?', $qs);
99
-		}
100
-	}
81
+    // si on est en train d'assembler la page principale,
82
+    // recuperer l'url depuis les globales url propres si fournies
83
+    // sinon extraire la bonne portion d'url
84
+    if ($assembler) {
85
+        if (isset($_SERVER['REDIRECT_url_propre'])) {
86
+            $url = $_SERVER['REDIRECT_url_propre'];
87
+        } elseif (isset($_ENV['url_propre'])) {
88
+            $url = $_ENV['url_propre'];
89
+        } else {
90
+            $qs = explode('?', $url);
91
+            // ne prendre que le segment d'url qui correspond, en fonction de la profondeur calculee
92
+            $url = ltrim($qs[0], '/');
93
+            $url = explode('/', $url);
94
+            while (count($url) > $GLOBALS['profondeur_url'] + 1) {
95
+                array_shift($url);
96
+            }
97
+            $qs[0] = implode('/', $url);
98
+            $url = implode('?', $qs);
99
+        }
100
+    }
101 101
 
102
-	unset($_SERVER['REDIRECT_url_propre']);
103
-	unset($_ENV['url_propre']);
104
-	include_spip('inc/filtres_mini');
105
-	if (strpos($url, '://') === false) {
106
-		$GLOBALS['profondeur_url'] = substr_count(ltrim(resolve_path("/$url"), '/'), '/');
107
-	} else {
108
-		$GLOBALS['profondeur_url'] = max(0, substr_count($url, '/') - substr_count($current_base, '/'));
109
-	}
102
+    unset($_SERVER['REDIRECT_url_propre']);
103
+    unset($_ENV['url_propre']);
104
+    include_spip('inc/filtres_mini');
105
+    if (strpos($url, '://') === false) {
106
+        $GLOBALS['profondeur_url'] = substr_count(ltrim(resolve_path("/$url"), '/'), '/');
107
+    } else {
108
+        $GLOBALS['profondeur_url'] = max(0, substr_count($url, '/') - substr_count($current_base, '/'));
109
+    }
110 110
 
111
-	$url_redirect = '';
112
-	$decoder = charger_fonction_url('decoder');
113
-	if ($decoder) {
114
-		$a = $decoder($url, $fond, $contexte);
115
-		if (is_array($a)) {
116
-			[$ncontexte, $type, $url_redirect, $nfond] = array_pad($a, 4, null);
117
-			$url_redirect ??= '';
118
-			if ($url_redirect === $url) {
119
-				$url_redirect = '';
120
-			} // securite pour eviter une redirection infinie
121
-			if ($assembler and strlen($url_redirect)) {
122
-				spip_log("Redirige $url vers $url_redirect");
123
-				include_spip('inc/headers');
124
-				redirige_par_entete($url_redirect, '', 301);
125
-			}
126
-			if (isset($nfond)) {
127
-				$fond = $nfond;
128
-			} else {
129
-				if (
130
-					$fond == ''
131
-					or $fond == 'type_urls' /* compat avec htaccess 2.0.0 */
132
-				) {
133
-					$fond = $type;
134
-				}
135
-			}
136
-			if (isset($ncontexte)) {
137
-				$contexte = $ncontexte;
138
-			}
139
-			if (defined('_DEFINIR_CONTEXTE_TYPE') and _DEFINIR_CONTEXTE_TYPE) {
140
-				$contexte['type'] = $type;
141
-			}
142
-			if (!defined('_DEFINIR_CONTEXTE_TYPE_PAGE') or _DEFINIR_CONTEXTE_TYPE_PAGE) {
143
-				$contexte['type-page'] = $type;
144
-			}
145
-		}
146
-	}
111
+    $url_redirect = '';
112
+    $decoder = charger_fonction_url('decoder');
113
+    if ($decoder) {
114
+        $a = $decoder($url, $fond, $contexte);
115
+        if (is_array($a)) {
116
+            [$ncontexte, $type, $url_redirect, $nfond] = array_pad($a, 4, null);
117
+            $url_redirect ??= '';
118
+            if ($url_redirect === $url) {
119
+                $url_redirect = '';
120
+            } // securite pour eviter une redirection infinie
121
+            if ($assembler and strlen($url_redirect)) {
122
+                spip_log("Redirige $url vers $url_redirect");
123
+                include_spip('inc/headers');
124
+                redirige_par_entete($url_redirect, '', 301);
125
+            }
126
+            if (isset($nfond)) {
127
+                $fond = $nfond;
128
+            } else {
129
+                if (
130
+                    $fond == ''
131
+                    or $fond == 'type_urls' /* compat avec htaccess 2.0.0 */
132
+                ) {
133
+                    $fond = $type;
134
+                }
135
+            }
136
+            if (isset($ncontexte)) {
137
+                $contexte = $ncontexte;
138
+            }
139
+            if (defined('_DEFINIR_CONTEXTE_TYPE') and _DEFINIR_CONTEXTE_TYPE) {
140
+                $contexte['type'] = $type;
141
+            }
142
+            if (!defined('_DEFINIR_CONTEXTE_TYPE_PAGE') or _DEFINIR_CONTEXTE_TYPE_PAGE) {
143
+                $contexte['type-page'] = $type;
144
+            }
145
+        }
146
+    }
147 147
 
148
-	// retablir les globales
149
-	[$GLOBALS['fond'], $GLOBALS['contexte'], $_SERVER['REDIRECT_url_propre'], $_ENV['url_propre'], $GLOBALS['profondeur_url']] = $save;
148
+    // retablir les globales
149
+    [$GLOBALS['fond'], $GLOBALS['contexte'], $_SERVER['REDIRECT_url_propre'], $_ENV['url_propre'], $GLOBALS['profondeur_url']] = $save;
150 150
 
151
-	// vider les globales url propres qui ne doivent plus etre utilisees en cas
152
-	// d'inversion url => objet
153
-	// maintenir pour compat ?
154
-	#if ($assembler) {
155
-	#	unset($_SERVER['REDIRECT_url_propre']);
156
-	#	unset($_ENV['url_propre']);
157
-	#}
151
+    // vider les globales url propres qui ne doivent plus etre utilisees en cas
152
+    // d'inversion url => objet
153
+    // maintenir pour compat ?
154
+    #if ($assembler) {
155
+    #	unset($_SERVER['REDIRECT_url_propre']);
156
+    #	unset($_ENV['url_propre']);
157
+    #}
158 158
 
159
-	return [$fond, $contexte, $url_redirect];
159
+    return [$fond, $contexte, $url_redirect];
160 160
 }
161 161
 
162 162
 /**
@@ -169,20 +169,20 @@  discard block
 block discarded – undo
169 169
  * @return array|false|string
170 170
  */
171 171
 function urls_transition_retrouver_anciennes_url_propres(string $url_propre, string $entite, array $contexte = []): array {
172
-	if ($url_propre) {
173
-		if ($GLOBALS['profondeur_url'] <= 0) {
174
-			$urls_anciennes = charger_fonction_url('decoder', 'propres');
175
-		} else {
176
-			$urls_anciennes = charger_fonction_url('decoder', 'arbo');
177
-		}
172
+    if ($url_propre) {
173
+        if ($GLOBALS['profondeur_url'] <= 0) {
174
+            $urls_anciennes = charger_fonction_url('decoder', 'propres');
175
+        } else {
176
+            $urls_anciennes = charger_fonction_url('decoder', 'arbo');
177
+        }
178 178
 
179
-		if ($urls_anciennes) {
180
-			$urls_anciennes = $urls_anciennes($url_propre, $entite, $contexte);
181
-		}
182
-		return $urls_anciennes ?: [];
183
-	}
179
+        if ($urls_anciennes) {
180
+            $urls_anciennes = $urls_anciennes($url_propre, $entite, $contexte);
181
+        }
182
+        return $urls_anciennes ?: [];
183
+    }
184 184
 
185
-	return [];
185
+    return [];
186 186
 }
187 187
 
188 188
 /**
@@ -195,41 +195,41 @@  discard block
 block discarded – undo
195 195
  * @return array|false|string
196 196
  */
197 197
 function urls_transition_retrouver_anciennes_url_html(string $url, string $entite, array $contexte = []): array {
198
-	// Migration depuis anciennes URLs ?
199
-	// traiter les injections domain.tld/spip.php/n/importe/quoi/rubrique23
200
-	if (
201
-		$url
202
-		and $GLOBALS['profondeur_url'] <= 0
203
-	) {
204
-		$r = nettoyer_url_page($url, $contexte);
205
-		if ($r) {
206
-			[$contexte, $type, , , $suite] = $r;
207
-			$_id = id_table_objet($type);
208
-			$id_objet = $contexte[$_id];
209
-			$url_propre = generer_objet_url($id_objet, $type);
210
-			if (
211
-				strlen($url_propre)
212
-				and !strstr($url, (string) $url_propre)
213
-				and (
214
-					objet_test_si_publie($type, $id_objet)
215
-					or (defined('_VAR_PREVIEW') and _VAR_PREVIEW and autoriser('voir', $type, $id_objet))
216
-				)
217
-			) {
218
-				[, $hash] = array_pad(explode('#', $url_propre), 2, '');
219
-				$args = [];
220
-				foreach (array_filter(explode('&', $suite ?? '')) as $fragment) {
221
-					if ($fragment != "$_id=$id_objet") {
222
-						$args[] = $fragment;
223
-					}
224
-				}
225
-				$url_redirect = generer_objet_url($id_objet, $type, join('&', array_filter($args)), $hash);
198
+    // Migration depuis anciennes URLs ?
199
+    // traiter les injections domain.tld/spip.php/n/importe/quoi/rubrique23
200
+    if (
201
+        $url
202
+        and $GLOBALS['profondeur_url'] <= 0
203
+    ) {
204
+        $r = nettoyer_url_page($url, $contexte);
205
+        if ($r) {
206
+            [$contexte, $type, , , $suite] = $r;
207
+            $_id = id_table_objet($type);
208
+            $id_objet = $contexte[$_id];
209
+            $url_propre = generer_objet_url($id_objet, $type);
210
+            if (
211
+                strlen($url_propre)
212
+                and !strstr($url, (string) $url_propre)
213
+                and (
214
+                    objet_test_si_publie($type, $id_objet)
215
+                    or (defined('_VAR_PREVIEW') and _VAR_PREVIEW and autoriser('voir', $type, $id_objet))
216
+                )
217
+            ) {
218
+                [, $hash] = array_pad(explode('#', $url_propre), 2, '');
219
+                $args = [];
220
+                foreach (array_filter(explode('&', $suite ?? '')) as $fragment) {
221
+                    if ($fragment != "$_id=$id_objet") {
222
+                        $args[] = $fragment;
223
+                    }
224
+                }
225
+                $url_redirect = generer_objet_url($id_objet, $type, join('&', array_filter($args)), $hash);
226 226
 
227
-				return [$contexte, $type, $url_redirect, $type];
228
-			}
229
-		}
230
-	}
231
-	/* Fin compatibilite anciennes urls */
232
-	return [];
227
+                return [$contexte, $type, $url_redirect, $type];
228
+            }
229
+        }
230
+    }
231
+    /* Fin compatibilite anciennes urls */
232
+    return [];
233 233
 }
234 234
 
235 235
 /**
@@ -242,24 +242,24 @@  discard block
 block discarded – undo
242 242
  * @return string|array
243 243
  */
244 244
 function urls_liste_objets($preg = true) {
245
-	static $url_objets = null;
246
-	if (is_null($url_objets)) {
247
-		$url_objets = [];
248
-		// recuperer les tables_objets_sql declarees
249
-		$tables_objets = lister_tables_objets_sql();
250
-		foreach ($tables_objets as $t => $infos) {
251
-			if ($infos['page']) {
252
-				$url_objets[] = $infos['type'];
253
-				$url_objets = array_merge($url_objets, $infos['type_surnoms']);
254
-			}
255
-		}
256
-		$url_objets = pipeline('declarer_url_objets', $url_objets);
257
-	}
258
-	if (!$preg) {
259
-		return $url_objets;
260
-	}
245
+    static $url_objets = null;
246
+    if (is_null($url_objets)) {
247
+        $url_objets = [];
248
+        // recuperer les tables_objets_sql declarees
249
+        $tables_objets = lister_tables_objets_sql();
250
+        foreach ($tables_objets as $t => $infos) {
251
+            if ($infos['page']) {
252
+                $url_objets[] = $infos['type'];
253
+                $url_objets = array_merge($url_objets, $infos['type_surnoms']);
254
+            }
255
+        }
256
+        $url_objets = pipeline('declarer_url_objets', $url_objets);
257
+    }
258
+    if (!$preg) {
259
+        return $url_objets;
260
+    }
261 261
 
262
-	return implode('|', array_map('preg_quote', $url_objets));
262
+    return implode('|', array_map('preg_quote', $url_objets));
263 263
 }
264 264
 
265 265
 /**
@@ -273,26 +273,26 @@  discard block
 block discarded – undo
273 273
  * @return array
274 274
  */
275 275
 function nettoyer_url_page($url, $contexte = []) {
276
-	$url_objets = urls_liste_objets();
277
-	$raccourci_url_page_html = ',^(?:[^?]*/)?(' . $url_objets . ')([0-9]+)(?:\.html)?([?&].*)?$,';
278
-	$raccourci_url_page_id = ',^(?:[^?]*/)?(' . $url_objets . ')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,';
279
-	$raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?](' . $url_objets . ')([0-9]+)=?(&.*)?$,';
276
+    $url_objets = urls_liste_objets();
277
+    $raccourci_url_page_html = ',^(?:[^?]*/)?(' . $url_objets . ')([0-9]+)(?:\.html)?([?&].*)?$,';
278
+    $raccourci_url_page_id = ',^(?:[^?]*/)?(' . $url_objets . ')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,';
279
+    $raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?](' . $url_objets . ')([0-9]+)=?(&.*)?$,';
280 280
 
281
-	if (
282
-		preg_match($raccourci_url_page_html, $url, $regs)
283
-		or preg_match($raccourci_url_page_id, $url, $regs)
284
-		or preg_match($raccourci_url_page_spip, $url, $regs)
285
-	) {
286
-		$regs = array_pad($regs, 4, null);
287
-		$type = objet_type($regs[1]);
288
-		$_id = id_table_objet($type);
289
-		$contexte[$_id] = $regs[2];
290
-		$suite = $regs[3];
281
+    if (
282
+        preg_match($raccourci_url_page_html, $url, $regs)
283
+        or preg_match($raccourci_url_page_id, $url, $regs)
284
+        or preg_match($raccourci_url_page_spip, $url, $regs)
285
+    ) {
286
+        $regs = array_pad($regs, 4, null);
287
+        $type = objet_type($regs[1]);
288
+        $_id = id_table_objet($type);
289
+        $contexte[$_id] = $regs[2];
290
+        $suite = $regs[3];
291 291
 
292
-		return [$contexte, $type, null, $type, $suite];
293
-	}
292
+        return [$contexte, $type, null, $type, $suite];
293
+    }
294 294
 
295
-	return [];
295
+    return [];
296 296
 }
297 297
 
298 298
 /**
@@ -310,38 +310,38 @@  discard block
 block discarded – undo
310 310
  * @return string
311 311
  */
312 312
 function generer_objet_url_ecrire($id, string $objet, string $args = '', string $ancre = '', ?bool $public = null, string $connect = ''): string {
313
-	static $furls = [];
314
-	$id = intval($id);
315
-	if (!isset($furls[$objet])) {
316
-		if (
317
-			function_exists($f = 'generer_' . $objet . '_url_ecrire')
318
-			// ou definie par un plugin
319
-			or $f = charger_fonction($f, 'urls', true)
320
-			// deprecated
321
-			or function_exists($f = 'generer_url_ecrire_' . $objet) or $f = charger_fonction($f, 'urls', true)
322
-		) {
323
-			$furls[$objet] = $f;
324
-		} else {
325
-			$furls[$objet] = '';
326
-		}
327
-	}
328
-	if ($furls[$objet]) {
329
-		return $furls[$objet]($id, $args, $ancre, $public, $connect);
330
-	}
331
-	// si pas de flag public fourni
332
-	// le calculer en fonction de la declaration de statut
333
-	if (is_null($public) and !$connect) {
334
-		$public = objet_test_si_publie($objet, $id, $connect);
335
-	}
336
-	if ($public or $connect) {
337
-		return generer_objet_url_absolue($id, $objet, $args, $ancre, $public, '', $connect);
338
-	}
339
-	$a = id_table_objet($objet) . '=' . intval($id);
340
-	if (!function_exists('objet_info')) {
341
-		include_spip('inc/filtres');
342
-	}
313
+    static $furls = [];
314
+    $id = intval($id);
315
+    if (!isset($furls[$objet])) {
316
+        if (
317
+            function_exists($f = 'generer_' . $objet . '_url_ecrire')
318
+            // ou definie par un plugin
319
+            or $f = charger_fonction($f, 'urls', true)
320
+            // deprecated
321
+            or function_exists($f = 'generer_url_ecrire_' . $objet) or $f = charger_fonction($f, 'urls', true)
322
+        ) {
323
+            $furls[$objet] = $f;
324
+        } else {
325
+            $furls[$objet] = '';
326
+        }
327
+    }
328
+    if ($furls[$objet]) {
329
+        return $furls[$objet]($id, $args, $ancre, $public, $connect);
330
+    }
331
+    // si pas de flag public fourni
332
+    // le calculer en fonction de la declaration de statut
333
+    if (is_null($public) and !$connect) {
334
+        $public = objet_test_si_publie($objet, $id, $connect);
335
+    }
336
+    if ($public or $connect) {
337
+        return generer_objet_url_absolue($id, $objet, $args, $ancre, $public, '', $connect);
338
+    }
339
+    $a = id_table_objet($objet) . '=' . intval($id);
340
+    if (!function_exists('objet_info')) {
341
+        include_spip('inc/filtres');
342
+    }
343 343
 
344
-	return generer_url_ecrire(objet_info($objet, 'url_voir'), $a . ($args ? "&$args" : '')) . ($ancre ? "#$ancre" : '');
344
+    return generer_url_ecrire(objet_info($objet, 'url_voir'), $a . ($args ? "&$args" : '')) . ($ancre ? "#$ancre" : '');
345 345
 }
346 346
 
347 347
 /**
@@ -349,5 +349,5 @@  discard block
 block discarded – undo
349 349
  * @see generer_objet_url_ecrire
350 350
  */
351 351
 function generer_url_ecrire_objet($objet, $id, $args = '', $ancre = '', $public = null, string $connect = '') {
352
-	return generer_objet_url_ecrire($id, $objet, $args, $ancre, $public, $connect);
352
+    return generer_objet_url_ecrire($id, $objet, $args, $ancre, $public, $connect);
353 353
 }
Please login to merge, or discard this patch.
ecrire/inc/lien.php 1 patch
Indentation   +192 added lines, -192 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 include_spip('base/abstract_sql');
@@ -37,42 +37,42 @@  discard block
 block discarded – undo
37 37
  * @return string
38 38
  */
39 39
 function inc_lien_dist(
40
-	$lien,
41
-	$texte = '',
42
-	$class = '',
43
-	$title = '',
44
-	$hlang = '',
45
-	$rel = '',
46
-	string $connect = '',
47
-	$env = []
40
+    $lien,
41
+    $texte = '',
42
+    $class = '',
43
+    $title = '',
44
+    $hlang = '',
45
+    $rel = '',
46
+    string $connect = '',
47
+    $env = []
48 48
 ) {
49
-	return $lien;
49
+    return $lien;
50 50
 }
51 51
 
52 52
 function expanser_liens($t, string $connect = '', $env = []) {
53 53
 
54
-	$t = pipeline('pre_liens', $t);
54
+    $t = pipeline('pre_liens', $t);
55 55
 
56
-	// on passe a traiter_modeles la liste des liens reperes pour lui permettre
57
-	// de remettre le texte d'origine dans les parametres du modele
58
-	$t = traiter_modeles($t, false, false, $connect);
56
+    // on passe a traiter_modeles la liste des liens reperes pour lui permettre
57
+    // de remettre le texte d'origine dans les parametres du modele
58
+    $t = traiter_modeles($t, false, false, $connect);
59 59
 
60
-	return $t;
60
+    return $t;
61 61
 }
62 62
 
63 63
 // Meme analyse mais pour eliminer les liens
64 64
 // et ne laisser que leur titre, a expliciter si ce n'est fait
65 65
 function nettoyer_raccourcis_typo($texte, string $connect = '') {
66
-	return $texte;
66
+    return $texte;
67 67
 }
68 68
 
69 69
 // Repere dans la partie texte d'un raccourci [texte->...]
70 70
 // la langue et la bulle eventuelles
71 71
 function traiter_raccourci_lien_atts($texte) {
72
-	$bulle = '';
73
-	$hlang = '';
72
+    $bulle = '';
73
+    $hlang = '';
74 74
 
75
-	return [trim($texte), $bulle, $hlang];
75
+    return [trim($texte), $bulle, $hlang];
76 76
 }
77 77
 
78 78
 define('_RACCOURCI_CHAPO', '/^(\W*)(\W*)(\w*\d+([?#].*)?)$/');
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
  * @return string
89 89
  */
90 90
 function virtuel_redirige($virtuel, $url = false) {
91
-	return $virtuel;
91
+    return $virtuel;
92 92
 }
93 93
 
94 94
 // Cherche un lien du type [->raccourci 123]
@@ -101,62 +101,62 @@  discard block
 block discarded – undo
101 101
 // 'url':   seulement U  (i.e. generer_url_RACCOURCI)
102 102
 
103 103
 function calculer_url($ref, $texte = '', $pour = 'url', string $connect = '', $echappe_typo = true) {
104
-	$r = traiter_lien_implicite($ref, $texte, $pour, $connect);
104
+    $r = traiter_lien_implicite($ref, $texte, $pour, $connect);
105 105
 
106
-	return $r ?: traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo);
106
+    return $r ?: traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo);
107 107
 }
108 108
 
109 109
 define('_EXTRAIRE_LIEN', ',^\s*(?:' . _PROTOCOLES_STD . '):?/?/?\s*$,iS');
110 110
 
111 111
 function traiter_lien_explicite($ref, $texte = '', $pour = 'url', string $connect = '', $echappe_typo = true) {
112
-	if (preg_match(_EXTRAIRE_LIEN, $ref)) {
113
-		return ($pour != 'tout') ? '' : ['', '', '', ''];
114
-	}
115
-
116
-	$lien = entites_html(trim($ref));
117
-
118
-	// Liens explicites
119
-	if (!$texte) {
120
-		$texte = str_replace('"', '', $lien);
121
-		// evite l'affichage de trops longues urls.
122
-		$lien_court = charger_fonction('lien_court', 'inc');
123
-		$texte = $lien_court($texte);
124
-		if ($echappe_typo) {
125
-			$texte = '<html>' . quote_amp($texte) . '</html>';
126
-		}
127
-	}
128
-
129
-	// petites corrections d'URL
130
-	if (preg_match('/^www\.[^@]+$/S', $lien)) {
131
-		$lien = 'http://' . $lien;
132
-	} else {
133
-		if (strpos($lien, '@') && email_valide($lien)) {
134
-			if (!$texte) {
135
-				$texte = $lien;
136
-			}
137
-			$lien = 'mailto:' . $lien;
138
-		}
139
-	}
140
-
141
-	if ($pour == 'url') {
142
-		return $lien;
143
-	}
144
-
145
-	if ($pour == 'titre') {
146
-		return $texte;
147
-	}
148
-
149
-	return ['url' => $lien, 'titre' => $texte];
112
+    if (preg_match(_EXTRAIRE_LIEN, $ref)) {
113
+        return ($pour != 'tout') ? '' : ['', '', '', ''];
114
+    }
115
+
116
+    $lien = entites_html(trim($ref));
117
+
118
+    // Liens explicites
119
+    if (!$texte) {
120
+        $texte = str_replace('"', '', $lien);
121
+        // evite l'affichage de trops longues urls.
122
+        $lien_court = charger_fonction('lien_court', 'inc');
123
+        $texte = $lien_court($texte);
124
+        if ($echappe_typo) {
125
+            $texte = '<html>' . quote_amp($texte) . '</html>';
126
+        }
127
+    }
128
+
129
+    // petites corrections d'URL
130
+    if (preg_match('/^www\.[^@]+$/S', $lien)) {
131
+        $lien = 'http://' . $lien;
132
+    } else {
133
+        if (strpos($lien, '@') && email_valide($lien)) {
134
+            if (!$texte) {
135
+                $texte = $lien;
136
+            }
137
+            $lien = 'mailto:' . $lien;
138
+        }
139
+    }
140
+
141
+    if ($pour == 'url') {
142
+        return $lien;
143
+    }
144
+
145
+    if ($pour == 'titre') {
146
+        return $texte;
147
+    }
148
+
149
+    return ['url' => $lien, 'titre' => $texte];
150 150
 }
151 151
 
152 152
 function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, string $connect = '') {
153
-	if (function_exists($f = 'glossaire_' . $ancre)) {
154
-		$url = $f($texte, $id);
155
-	} else {
156
-		$url = glossaire_std($texte);
157
-	}
153
+    if (function_exists($f = 'glossaire_' . $ancre)) {
154
+        $url = $f($texte, $id);
155
+    } else {
156
+        $url = glossaire_std($texte);
157
+    }
158 158
 
159
-	return $url;
159
+    return $url;
160 160
 }
161 161
 
162 162
 /**
@@ -178,74 +178,74 @@  discard block
 block discarded – undo
178 178
  * @return array|bool|string
179 179
  */
180 180
 function traiter_lien_implicite($ref, $texte = '', $pour = 'url', $connect = '') {
181
-	$cible = $GLOBALS['lien_implicite_cible_public'] ?? null;
182
-	if (!($match = typer_raccourci($ref))) {
183
-		return false;
184
-	}
185
-
186
-	[$type, , $id, , $args, , $ancre] = array_pad($match, 7, null);
187
-
188
-	# attention dans le cas des sites le lien doit pointer non pas sur
189
-	# la page locale du site, mais directement sur le site lui-meme
190
-	$url = '';
191
-	if ($f = charger_fonction("implicite_$type", 'liens', true)) {
192
-		$url = $f($texte, $id, $type, $args, $ancre, $connect);
193
-	}
194
-
195
-	if (!$url) {
196
-		$url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', $cible, '', $connect ?? '');
197
-	}
198
-
199
-	if (!$url) {
200
-		return false;
201
-	}
202
-
203
-	if (is_array($url)) {
204
-		[$type, $id] = array_pad($url, 2, null);
205
-		$url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', $cible, '', $connect ?? '');
206
-	}
207
-
208
-	if ($pour === 'url') {
209
-		return $url;
210
-	}
211
-
212
-	$r = traiter_raccourci_titre($id, $type, $connect);
213
-	if ($r) {
214
-		$r['class'] = ($type == 'site') ? 'spip_out' : 'spip_in';
215
-	}
216
-
217
-	if ($texte = trim($texte)) {
218
-		$r['titre'] = $texte;
219
-	}
220
-
221
-	if (!@$r['titre']) {
222
-		$r['titre'] = _T($type) . " $id";
223
-	}
224
-
225
-	if ($pour == 'titre') {
226
-		return $r['titre'];
227
-	}
228
-
229
-	$r['url'] = $url;
230
-
231
-	// dans le cas d'un lien vers un doc, ajouter le type='mime/type'
232
-	if (
233
-		$type == 'document'
234
-		and $mime = sql_getfetsel(
235
-			'mime_type',
236
-			'spip_types_documents',
237
-			'extension IN (' . sql_get_select('extension', 'spip_documents', 'id_document=' . sql_quote($id)) . ')',
238
-			'',
239
-			'',
240
-			'',
241
-			'',
242
-			$connect
243
-		)
244
-	) {
245
-		$r['mime'] = $mime;
246
-	}
247
-
248
-	return $r;
181
+    $cible = $GLOBALS['lien_implicite_cible_public'] ?? null;
182
+    if (!($match = typer_raccourci($ref))) {
183
+        return false;
184
+    }
185
+
186
+    [$type, , $id, , $args, , $ancre] = array_pad($match, 7, null);
187
+
188
+    # attention dans le cas des sites le lien doit pointer non pas sur
189
+    # la page locale du site, mais directement sur le site lui-meme
190
+    $url = '';
191
+    if ($f = charger_fonction("implicite_$type", 'liens', true)) {
192
+        $url = $f($texte, $id, $type, $args, $ancre, $connect);
193
+    }
194
+
195
+    if (!$url) {
196
+        $url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', $cible, '', $connect ?? '');
197
+    }
198
+
199
+    if (!$url) {
200
+        return false;
201
+    }
202
+
203
+    if (is_array($url)) {
204
+        [$type, $id] = array_pad($url, 2, null);
205
+        $url = generer_objet_url($id, $type, $args ?? '', $ancre ?? '', $cible, '', $connect ?? '');
206
+    }
207
+
208
+    if ($pour === 'url') {
209
+        return $url;
210
+    }
211
+
212
+    $r = traiter_raccourci_titre($id, $type, $connect);
213
+    if ($r) {
214
+        $r['class'] = ($type == 'site') ? 'spip_out' : 'spip_in';
215
+    }
216
+
217
+    if ($texte = trim($texte)) {
218
+        $r['titre'] = $texte;
219
+    }
220
+
221
+    if (!@$r['titre']) {
222
+        $r['titre'] = _T($type) . " $id";
223
+    }
224
+
225
+    if ($pour == 'titre') {
226
+        return $r['titre'];
227
+    }
228
+
229
+    $r['url'] = $url;
230
+
231
+    // dans le cas d'un lien vers un doc, ajouter le type='mime/type'
232
+    if (
233
+        $type == 'document'
234
+        and $mime = sql_getfetsel(
235
+            'mime_type',
236
+            'spip_types_documents',
237
+            'extension IN (' . sql_get_select('extension', 'spip_documents', 'id_document=' . sql_quote($id)) . ')',
238
+            '',
239
+            '',
240
+            '',
241
+            '',
242
+            $connect
243
+        )
244
+    ) {
245
+        $r['mime'] = $mime;
246
+    }
247
+
248
+    return $r;
249 249
 }
250 250
 
251 251
 // analyse des raccourcis issus de [TITRE->RACCOURCInnn] et connexes
@@ -253,43 +253,43 @@  discard block
 block discarded – undo
253 253
 define('_RACCOURCI_URL', '/^\s*(\w*?)\s*(\d+)(\?(.*?))?(#([^\s]*))?\s*$/S');
254 254
 
255 255
 function typer_raccourci($lien) {
256
-	if (!preg_match(_RACCOURCI_URL, $lien, $match)) {
257
-		return [];
258
-	}
259
-
260
-	$f = $match[1];
261
-	// valeur par defaut et alias historiques
262
-	if (!$f) {
263
-		$f = 'article';
264
-	} else {
265
-		if ($f == 'art') {
266
-			$f = 'article';
267
-		} else {
268
-			if ($f == 'br') {
269
-				$f = 'breve';
270
-			} else {
271
-				if ($f == 'rub') {
272
-					$f = 'rubrique';
273
-				} else {
274
-					if ($f == 'aut') {
275
-						$f = 'auteur';
276
-					} else {
277
-						if ($f == 'doc' or $f == 'im' or $f == 'img' or $f == 'image' or $f == 'emb') {
278
-							$f = 'document';
279
-						} else {
280
-							if (preg_match('/^br..?ve$/S', $f)) {
281
-								$f = 'breve'; # accents :(
282
-							}
283
-						}
284
-					}
285
-				}
286
-			}
287
-		}
288
-	}
289
-
290
-	$match[0] = $f;
291
-
292
-	return $match;
256
+    if (!preg_match(_RACCOURCI_URL, $lien, $match)) {
257
+        return [];
258
+    }
259
+
260
+    $f = $match[1];
261
+    // valeur par defaut et alias historiques
262
+    if (!$f) {
263
+        $f = 'article';
264
+    } else {
265
+        if ($f == 'art') {
266
+            $f = 'article';
267
+        } else {
268
+            if ($f == 'br') {
269
+                $f = 'breve';
270
+            } else {
271
+                if ($f == 'rub') {
272
+                    $f = 'rubrique';
273
+                } else {
274
+                    if ($f == 'aut') {
275
+                        $f = 'auteur';
276
+                    } else {
277
+                        if ($f == 'doc' or $f == 'im' or $f == 'img' or $f == 'image' or $f == 'emb') {
278
+                            $f = 'document';
279
+                        } else {
280
+                            if (preg_match('/^br..?ve$/S', $f)) {
281
+                                $f = 'breve'; # accents :(
282
+                            }
283
+                        }
284
+                    }
285
+                }
286
+            }
287
+        }
288
+    }
289
+
290
+    $match[0] = $f;
291
+
292
+    return $match;
293 293
 }
294 294
 
295 295
 /**
@@ -304,44 +304,44 @@  discard block
 block discarded – undo
304 304
  * }
305 305
  **/
306 306
 function traiter_raccourci_titre($id, $type, $connect = null) {
307
-	$trouver_table = charger_fonction('trouver_table', 'base');
308
-	$desc = $trouver_table(table_objet($type));
307
+    $trouver_table = charger_fonction('trouver_table', 'base');
308
+    $desc = $trouver_table(table_objet($type));
309 309
 
310
-	if (!($desc and $s = $desc['titre'])) {
311
-		return [];
312
-	}
310
+    if (!($desc and $s = $desc['titre'])) {
311
+        return [];
312
+    }
313 313
 
314
-	$_id = $desc['key']['PRIMARY KEY'];
315
-	$r = sql_fetsel($s, $desc['table'], "$_id=$id", '', '', '', '', $connect);
314
+    $_id = $desc['key']['PRIMARY KEY'];
315
+    $r = sql_fetsel($s, $desc['table'], "$_id=$id", '', '', '', '', $connect);
316 316
 
317
-	if (!$r) {
318
-		return [];
319
-	}
317
+    if (!$r) {
318
+        return [];
319
+    }
320 320
 
321
-	$r['titre'] = supprimer_numero($r['titre']);
321
+    $r['titre'] = supprimer_numero($r['titre']);
322 322
 
323
-	if (!$r['titre'] and !empty($r['surnom'])) {
324
-		$r['titre'] = $r['surnom'];
325
-	}
323
+    if (!$r['titre'] and !empty($r['surnom'])) {
324
+        $r['titre'] = $r['surnom'];
325
+    }
326 326
 
327
-	if (!isset($r['lang'])) {
328
-		$r['lang'] = '';
329
-	}
327
+    if (!isset($r['lang'])) {
328
+        $r['lang'] = '';
329
+    }
330 330
 
331
-	return $r;
331
+    return $r;
332 332
 }
333 333
 
334 334
 //
335 335
 // Raccourcis ancre [#ancre<-]
336 336
 //
337 337
 function traiter_raccourci_ancre($letexte) {
338
-	return $letexte;
338
+    return $letexte;
339 339
 }
340 340
 
341 341
 function traiter_raccourci_glossaire($texte) {
342
-	return $texte;
342
+    return $texte;
343 343
 }
344 344
 
345 345
 function glossaire_std($terme) {
346
-	return $terme;
346
+    return $terme;
347 347
 }
Please login to merge, or discard this patch.
ecrire/inc/auth.php 1 patch
Indentation   +453 added lines, -453 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,33 +35,33 @@  discard block
 block discarded – undo
35 35
  *  - une chaîne vide si autorisation à pénétrer dans l'espace privé.
36 36
  */
37 37
 function inc_auth_dist() {
38
-	$row = auth_mode();
38
+    $row = auth_mode();
39 39
 
40
-	if ($row) {
41
-		return auth_init_droits($row);
42
-	}
40
+    if ($row) {
41
+        return auth_init_droits($row);
42
+    }
43 43
 
44
-	if (!$GLOBALS['connect_login']) {
45
-		return auth_a_loger();
46
-	}
44
+    if (!$GLOBALS['connect_login']) {
45
+        return auth_a_loger();
46
+    }
47 47
 
48
-	// Cas ou l'auteur a ete identifie mais on n'a pas d'info sur lui
49
-	// C'est soit parce que la base est inutilisable,
50
-	// soit parce que la table des auteurs a changee (restauration etc)
51
-	// Pas la peine d'insister.
52
-	// Renvoyer le nom fautif et une URL de remise a zero
48
+    // Cas ou l'auteur a ete identifie mais on n'a pas d'info sur lui
49
+    // C'est soit parce que la base est inutilisable,
50
+    // soit parce que la table des auteurs a changee (restauration etc)
51
+    // Pas la peine d'insister.
52
+    // Renvoyer le nom fautif et une URL de remise a zero
53 53
 
54
-	if (spip_connect()) {
55
-		return [
56
-			'login' => $GLOBALS['connect_login'],
57
-			'site' => generer_url_public('', 'action=logout&amp;logout=prive')
58
-		];
59
-	}
54
+    if (spip_connect()) {
55
+        return [
56
+            'login' => $GLOBALS['connect_login'],
57
+            'site' => generer_url_public('', 'action=logout&amp;logout=prive')
58
+        ];
59
+    }
60 60
 
61
-	$n = intval(sql_errno());
62
-	spip_log("Erreur base de donnees $n " . sql_error());
61
+    $n = intval(sql_errno());
62
+    spip_log("Erreur base de donnees $n " . sql_error());
63 63
 
64
-	return $n ?: 1;
64
+    return $n ?: 1;
65 65
 }
66 66
 
67 67
 /**
@@ -71,22 +71,22 @@  discard block
 block discarded – undo
71 71
  */
72 72
 function auth_controler_password_auteur_connecte(string $password): bool {
73 73
 
74
-	if (
75
-		empty($GLOBALS['visiteur_session']['id_auteur'])
76
-		or empty($GLOBALS['visiteur_session']['login'])
77
-	) {
78
-		return false;
79
-	}
80
-
81
-	$auth = auth_identifier_login($GLOBALS['visiteur_session']['login'], $password, '', true);
82
-	if (
83
-		is_array($auth)
84
-		and $auth['id_auteur'] == $GLOBALS['visiteur_session']['id_auteur']
85
-	) {
86
-		return true;
87
-	}
88
-
89
-	return false;
74
+    if (
75
+        empty($GLOBALS['visiteur_session']['id_auteur'])
76
+        or empty($GLOBALS['visiteur_session']['login'])
77
+    ) {
78
+        return false;
79
+    }
80
+
81
+    $auth = auth_identifier_login($GLOBALS['visiteur_session']['login'], $password, '', true);
82
+    if (
83
+        is_array($auth)
84
+        and $auth['id_auteur'] == $GLOBALS['visiteur_session']['id_auteur']
85
+    ) {
86
+        return true;
87
+    }
88
+
89
+    return false;
90 90
 }
91 91
 
92 92
 /**
@@ -98,47 +98,47 @@  discard block
 block discarded – undo
98 98
  * @return array|string
99 99
  */
100 100
 function auth_echec($raison) {
101
-	include_spip('inc/minipres');
102
-	include_spip('inc/headers');
103
-	// pas authentifie. Pourquoi ?
104
-	if (is_string($raison)) {
105
-		// redirection vers une page d'authentification
106
-		// on ne revient pas de cette fonction
107
-		// sauf si pb de header
108
-		$raison = redirige_formulaire($raison);
109
-	} elseif (is_int($raison)) {
110
-		// erreur SQL a afficher
111
-		$raison = minipres(
112
-			_T('info_travaux_titre'),
113
-			_T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>'
114
-		);
115
-	} elseif (@$raison['statut']) {
116
-		// un simple visiteur n'a pas acces a l'espace prive
117
-		spip_log('connexion refusee a ' . @$raison['id_auteur']);
118
-		$est_connecte = (!empty($GLOBALS['visiteur_session']['login']) and !empty($GLOBALS['visiteur_session']['statut'])); // idem test balise #URL_LOGOUT
119
-		$raison = minipres(
120
-			_T('avis_erreur_connexion'),
121
-			_T('avis_erreur_visiteur')
122
-				// Lien vers le site public
123
-				. '<br /><a href="' . url_de_base() . '">' . _T('login_retour_public') . '</a>'
124
-				// Si la personne est connectée, lien de déconnexion ramenant vers la page de login
125
-				. ($est_connecte ? ' | <a href="' . generer_url_public('', 'action=logout&amp;logout=prive') . '">' . _T('icone_deconnecter') . '</a>' : '')
126
-		);
127
-	} else {
128
-		// auteur en fin de droits ...
129
-		$h = $raison['site'];
130
-		$raison = minipres(
131
-			_T('avis_erreur_connexion'),
132
-			'<br /><br /><p>'
133
-			. _T('texte_inc_auth_1', ['auth_login' => $raison['login']])
134
-			. " <a href='$h'>"
135
-			. _T('texte_inc_auth_2')
136
-			. '</a>'
137
-			. _T('texte_inc_auth_3')
138
-		);
139
-	}
140
-
141
-	return $raison;
101
+    include_spip('inc/minipres');
102
+    include_spip('inc/headers');
103
+    // pas authentifie. Pourquoi ?
104
+    if (is_string($raison)) {
105
+        // redirection vers une page d'authentification
106
+        // on ne revient pas de cette fonction
107
+        // sauf si pb de header
108
+        $raison = redirige_formulaire($raison);
109
+    } elseif (is_int($raison)) {
110
+        // erreur SQL a afficher
111
+        $raison = minipres(
112
+            _T('info_travaux_titre'),
113
+            _T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>'
114
+        );
115
+    } elseif (@$raison['statut']) {
116
+        // un simple visiteur n'a pas acces a l'espace prive
117
+        spip_log('connexion refusee a ' . @$raison['id_auteur']);
118
+        $est_connecte = (!empty($GLOBALS['visiteur_session']['login']) and !empty($GLOBALS['visiteur_session']['statut'])); // idem test balise #URL_LOGOUT
119
+        $raison = minipres(
120
+            _T('avis_erreur_connexion'),
121
+            _T('avis_erreur_visiteur')
122
+                // Lien vers le site public
123
+                . '<br /><a href="' . url_de_base() . '">' . _T('login_retour_public') . '</a>'
124
+                // Si la personne est connectée, lien de déconnexion ramenant vers la page de login
125
+                . ($est_connecte ? ' | <a href="' . generer_url_public('', 'action=logout&amp;logout=prive') . '">' . _T('icone_deconnecter') . '</a>' : '')
126
+        );
127
+    } else {
128
+        // auteur en fin de droits ...
129
+        $h = $raison['site'];
130
+        $raison = minipres(
131
+            _T('avis_erreur_connexion'),
132
+            '<br /><br /><p>'
133
+            . _T('texte_inc_auth_1', ['auth_login' => $raison['login']])
134
+            . " <a href='$h'>"
135
+            . _T('texte_inc_auth_2')
136
+            . '</a>'
137
+            . _T('texte_inc_auth_3')
138
+        );
139
+    }
140
+
141
+    return $raison;
142 142
 }
143 143
 
144 144
 /**
@@ -148,81 +148,81 @@  discard block
 block discarded – undo
148 148
  * @return array|bool|string
149 149
  */
150 150
 function auth_mode() {
151
-	//
152
-	// Initialiser variables (eviter hacks par URL)
153
-	//
154
-	$GLOBALS['connect_login'] = '';
155
-	$id_auteur = null;
156
-	$GLOBALS['auth_can_disconnect'] = false;
157
-
158
-	//
159
-	// Recuperer les donnees d'identification
160
-	//
161
-	include_spip('inc/session');
162
-	// Session valide en cours ?
163
-	if (isset($_COOKIE['spip_session'])) {
164
-		$session = charger_fonction('session', 'inc');
165
-		if (
166
-			$id_auteur = $session()
167
-			or $id_auteur === 0 // reprise sur restauration
168
-		) {
169
-			$GLOBALS['auth_can_disconnect'] = true;
170
-			$GLOBALS['connect_login'] = session_get('login');
171
-		} else {
172
-			unset($_COOKIE['spip_session']);
173
-		}
174
-	}
175
-
176
-	// Essayer auth http si significatif
177
-	// (ignorer les login d'intranet independants de spip)
178
-	if (!$GLOBALS['ignore_auth_http']) {
179
-		if (
180
-			(isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW'])
181
-				and $r = lire_php_auth($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']))
182
-			or
183
-			// Si auth http differtente de basic, PHP_AUTH_PW
184
-			// est indisponible mais tentons quand meme pour
185
-			// autocreation via LDAP
186
-			(isset($_SERVER['REMOTE_USER'])
187
-				and $r = lire_php_auth($_SERVER['PHP_AUTH_USER'] = $_SERVER['REMOTE_USER'], ''))
188
-		) {
189
-			if (!$id_auteur) {
190
-				$_SERVER['PHP_AUTH_PW'] = '';
191
-				$GLOBALS['auth_can_disconnect'] = true;
192
-				$GLOBALS['visiteur_session'] = $r;
193
-				$GLOBALS['connect_login'] = session_get('login');
194
-				$id_auteur = $r['id_auteur'];
195
-			} else {
196
-				// cas de la session en plus de PHP_AUTH
197
-				/*				  if ($id_auteur != $r['id_auteur']){
151
+    //
152
+    // Initialiser variables (eviter hacks par URL)
153
+    //
154
+    $GLOBALS['connect_login'] = '';
155
+    $id_auteur = null;
156
+    $GLOBALS['auth_can_disconnect'] = false;
157
+
158
+    //
159
+    // Recuperer les donnees d'identification
160
+    //
161
+    include_spip('inc/session');
162
+    // Session valide en cours ?
163
+    if (isset($_COOKIE['spip_session'])) {
164
+        $session = charger_fonction('session', 'inc');
165
+        if (
166
+            $id_auteur = $session()
167
+            or $id_auteur === 0 // reprise sur restauration
168
+        ) {
169
+            $GLOBALS['auth_can_disconnect'] = true;
170
+            $GLOBALS['connect_login'] = session_get('login');
171
+        } else {
172
+            unset($_COOKIE['spip_session']);
173
+        }
174
+    }
175
+
176
+    // Essayer auth http si significatif
177
+    // (ignorer les login d'intranet independants de spip)
178
+    if (!$GLOBALS['ignore_auth_http']) {
179
+        if (
180
+            (isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW'])
181
+                and $r = lire_php_auth($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']))
182
+            or
183
+            // Si auth http differtente de basic, PHP_AUTH_PW
184
+            // est indisponible mais tentons quand meme pour
185
+            // autocreation via LDAP
186
+            (isset($_SERVER['REMOTE_USER'])
187
+                and $r = lire_php_auth($_SERVER['PHP_AUTH_USER'] = $_SERVER['REMOTE_USER'], ''))
188
+        ) {
189
+            if (!$id_auteur) {
190
+                $_SERVER['PHP_AUTH_PW'] = '';
191
+                $GLOBALS['auth_can_disconnect'] = true;
192
+                $GLOBALS['visiteur_session'] = $r;
193
+                $GLOBALS['connect_login'] = session_get('login');
194
+                $id_auteur = $r['id_auteur'];
195
+            } else {
196
+                // cas de la session en plus de PHP_AUTH
197
+                /*				  if ($id_auteur != $r['id_auteur']){
198 198
 					spip_log("vol de session $id_auteur" . join(', ', $r));
199 199
 				unset($_COOKIE['spip_session']);
200 200
 				$id_auteur = '';
201 201
 				} */
202
-			}
203
-		} else {
204
-			// Authentification .htaccess old style, car .htaccess semble
205
-			// souvent definir *aussi* PHP_AUTH_USER et PHP_AUTH_PW
206
-			if (isset($_SERVER['REMOTE_USER'])) {
207
-				$GLOBALS['connect_login'] = $_SERVER['REMOTE_USER'];
208
-			}
209
-		}
210
-	}
211
-
212
-	$where = (is_numeric($id_auteur)
213
-		/*AND $id_auteur>0*/ // reprise lors des restaurations
214
-	) ?
215
-		"id_auteur=$id_auteur" :
216
-		(!strlen($GLOBALS['connect_login']) ? '' : 'login=' . sql_quote($GLOBALS['connect_login'], '', 'text'));
217
-
218
-	if (!$where) {
219
-		return '';
220
-	}
221
-
222
-	// Trouver les autres infos dans la table auteurs.
223
-	// le champ 'quand' est utilise par l'agenda
224
-
225
-	return sql_fetsel('*, en_ligne AS quand', 'spip_auteurs', "$where AND statut!='5poubelle'");
202
+            }
203
+        } else {
204
+            // Authentification .htaccess old style, car .htaccess semble
205
+            // souvent definir *aussi* PHP_AUTH_USER et PHP_AUTH_PW
206
+            if (isset($_SERVER['REMOTE_USER'])) {
207
+                $GLOBALS['connect_login'] = $_SERVER['REMOTE_USER'];
208
+            }
209
+        }
210
+    }
211
+
212
+    $where = (is_numeric($id_auteur)
213
+        /*AND $id_auteur>0*/ // reprise lors des restaurations
214
+    ) ?
215
+        "id_auteur=$id_auteur" :
216
+        (!strlen($GLOBALS['connect_login']) ? '' : 'login=' . sql_quote($GLOBALS['connect_login'], '', 'text'));
217
+
218
+    if (!$where) {
219
+        return '';
220
+    }
221
+
222
+    // Trouver les autres infos dans la table auteurs.
223
+    // le champ 'quand' est utilise par l'agenda
224
+
225
+    return sql_fetsel('*, en_ligne AS quand', 'spip_auteurs', "$where AND statut!='5poubelle'");
226 226
 }
227 227
 
228 228
 /**
@@ -240,85 +240,85 @@  discard block
 block discarded – undo
240 240
  */
241 241
 function auth_init_droits($row) {
242 242
 
243
-	include_spip('inc/autoriser');
244
-	if (!autoriser('loger', '', 0, $row)) {
245
-		return false;
246
-	}
247
-
248
-
249
-	if ($row['statut'] == 'nouveau') {
250
-		include_spip('action/inscrire_auteur');
251
-		$row = confirmer_statut_inscription($row);
252
-	}
253
-
254
-	$GLOBALS['connect_id_auteur'] = $row['id_auteur'];
255
-	$GLOBALS['connect_login'] = $row['login'];
256
-	$GLOBALS['connect_statut'] = $row['statut'];
257
-
258
-	$GLOBALS['visiteur_session'] = array_merge((array)$GLOBALS['visiteur_session'], $row);
259
-
260
-	// au cas ou : ne pas memoriser les champs sensibles
261
-	unset($GLOBALS['visiteur_session']['pass']);
262
-	unset($GLOBALS['visiteur_session']['htpass']);
263
-	unset($GLOBALS['visiteur_session']['alea_actuel']);
264
-	unset($GLOBALS['visiteur_session']['alea_futur']);
265
-	unset($GLOBALS['visiteur_session']['ldap_password']);
266
-
267
-	// creer la session au besoin
268
-	if (!isset($_COOKIE['spip_session'])) {
269
-		$session = charger_fonction('session', 'inc');
270
-		$spip_session = $session($row);
271
-	}
272
-
273
-	// reinjecter les preferences_auteur apres le reset de spip_session
274
-	// car utilisees au retour par auth_loger()
275
-	$r = @unserialize($row['prefs']);
276
-	$GLOBALS['visiteur_session']['prefs'] = ($r ?: []);
277
-	// si prefs pas definies, les definir par defaut
278
-	if (!isset($GLOBALS['visiteur_session']['prefs']['couleur'])) {
279
-		$GLOBALS['visiteur_session']['prefs']['couleur'] = 2;
280
-		$GLOBALS['visiteur_session']['prefs']['display'] = 2;
281
-		$GLOBALS['visiteur_session']['prefs']['display_navigation'] = 'navigation_avec_icones';
282
-	}
283
-
284
-	$GLOBALS['visiteur_session'] = pipeline(
285
-		'preparer_visiteur_session',
286
-		['args' => ['row' => $row],
287
-		'data' => $GLOBALS['visiteur_session']]
288
-	);
289
-
290
-	// Etablir les droits selon le codage attendu
291
-	// dans ecrire/index.php ecrire/prive.php
292
-
293
-	// Pas autorise a acceder a ecrire ? renvoyer le tableau
294
-	// A noter : le premier appel a autoriser() a le bon gout
295
-	// d'initialiser $GLOBALS['visiteur_session']['restreint'],
296
-	// qui ne figure pas dans le fichier de session
297
-
298
-	if (!autoriser('ecrire')) {
299
-		return $row;
300
-	}
301
-
302
-	// autoriser('ecrire') ne laisse passer que les Admin et les Redac
303
-
304
-	auth_trace($row);
305
-
306
-	// Administrateurs
307
-	if (in_array($GLOBALS['connect_statut'], explode(',', _STATUT_AUTEUR_RUBRIQUE))) {
308
-		if (
309
-			isset($GLOBALS['visiteur_session']['restreint'])
310
-			and is_array($GLOBALS['visiteur_session']['restreint'])
311
-		) {
312
-			$GLOBALS['connect_id_rubrique'] = $GLOBALS['visiteur_session']['restreint'];
313
-		}
314
-		if ($GLOBALS['connect_statut'] == '0minirezo') {
315
-			$GLOBALS['connect_toutes_rubriques'] = !$GLOBALS['connect_id_rubrique'];
316
-		}
317
-	}
318
-
319
-	// Pour les redacteurs, inc_version a fait l'initialisation minimale
320
-
321
-	return ''; // i.e. pas de pb.
243
+    include_spip('inc/autoriser');
244
+    if (!autoriser('loger', '', 0, $row)) {
245
+        return false;
246
+    }
247
+
248
+
249
+    if ($row['statut'] == 'nouveau') {
250
+        include_spip('action/inscrire_auteur');
251
+        $row = confirmer_statut_inscription($row);
252
+    }
253
+
254
+    $GLOBALS['connect_id_auteur'] = $row['id_auteur'];
255
+    $GLOBALS['connect_login'] = $row['login'];
256
+    $GLOBALS['connect_statut'] = $row['statut'];
257
+
258
+    $GLOBALS['visiteur_session'] = array_merge((array)$GLOBALS['visiteur_session'], $row);
259
+
260
+    // au cas ou : ne pas memoriser les champs sensibles
261
+    unset($GLOBALS['visiteur_session']['pass']);
262
+    unset($GLOBALS['visiteur_session']['htpass']);
263
+    unset($GLOBALS['visiteur_session']['alea_actuel']);
264
+    unset($GLOBALS['visiteur_session']['alea_futur']);
265
+    unset($GLOBALS['visiteur_session']['ldap_password']);
266
+
267
+    // creer la session au besoin
268
+    if (!isset($_COOKIE['spip_session'])) {
269
+        $session = charger_fonction('session', 'inc');
270
+        $spip_session = $session($row);
271
+    }
272
+
273
+    // reinjecter les preferences_auteur apres le reset de spip_session
274
+    // car utilisees au retour par auth_loger()
275
+    $r = @unserialize($row['prefs']);
276
+    $GLOBALS['visiteur_session']['prefs'] = ($r ?: []);
277
+    // si prefs pas definies, les definir par defaut
278
+    if (!isset($GLOBALS['visiteur_session']['prefs']['couleur'])) {
279
+        $GLOBALS['visiteur_session']['prefs']['couleur'] = 2;
280
+        $GLOBALS['visiteur_session']['prefs']['display'] = 2;
281
+        $GLOBALS['visiteur_session']['prefs']['display_navigation'] = 'navigation_avec_icones';
282
+    }
283
+
284
+    $GLOBALS['visiteur_session'] = pipeline(
285
+        'preparer_visiteur_session',
286
+        ['args' => ['row' => $row],
287
+        'data' => $GLOBALS['visiteur_session']]
288
+    );
289
+
290
+    // Etablir les droits selon le codage attendu
291
+    // dans ecrire/index.php ecrire/prive.php
292
+
293
+    // Pas autorise a acceder a ecrire ? renvoyer le tableau
294
+    // A noter : le premier appel a autoriser() a le bon gout
295
+    // d'initialiser $GLOBALS['visiteur_session']['restreint'],
296
+    // qui ne figure pas dans le fichier de session
297
+
298
+    if (!autoriser('ecrire')) {
299
+        return $row;
300
+    }
301
+
302
+    // autoriser('ecrire') ne laisse passer que les Admin et les Redac
303
+
304
+    auth_trace($row);
305
+
306
+    // Administrateurs
307
+    if (in_array($GLOBALS['connect_statut'], explode(',', _STATUT_AUTEUR_RUBRIQUE))) {
308
+        if (
309
+            isset($GLOBALS['visiteur_session']['restreint'])
310
+            and is_array($GLOBALS['visiteur_session']['restreint'])
311
+        ) {
312
+            $GLOBALS['connect_id_rubrique'] = $GLOBALS['visiteur_session']['restreint'];
313
+        }
314
+        if ($GLOBALS['connect_statut'] == '0minirezo') {
315
+            $GLOBALS['connect_toutes_rubriques'] = !$GLOBALS['connect_id_rubrique'];
316
+        }
317
+    }
318
+
319
+    // Pour les redacteurs, inc_version a fait l'initialisation minimale
320
+
321
+    return ''; // i.e. pas de pb.
322 322
 }
323 323
 
324 324
 /**
@@ -327,23 +327,23 @@  discard block
 block discarded – undo
327 327
  * @return string
328 328
  */
329 329
 function auth_a_loger() {
330
-	$redirect = generer_url_public('login', 'url=' . rawurlencode(self('&', true)), true);
331
-
332
-	// un echec au "bonjour" (login initial) quand le statut est
333
-	// inconnu signale sans doute un probleme de cookies
334
-	if (isset($_GET['bonjour'])) {
335
-		$redirect = parametre_url(
336
-			$redirect,
337
-			'var_erreur',
338
-			(!isset($GLOBALS['visiteur_session']['statut'])
339
-				? 'cookie'
340
-				: 'statut'
341
-			),
342
-			'&'
343
-		);
344
-	}
345
-
346
-	return $redirect;
330
+    $redirect = generer_url_public('login', 'url=' . rawurlencode(self('&', true)), true);
331
+
332
+    // un echec au "bonjour" (login initial) quand le statut est
333
+    // inconnu signale sans doute un probleme de cookies
334
+    if (isset($_GET['bonjour'])) {
335
+        $redirect = parametre_url(
336
+            $redirect,
337
+            'var_erreur',
338
+            (!isset($GLOBALS['visiteur_session']['statut'])
339
+                ? 'cookie'
340
+                : 'statut'
341
+            ),
342
+            '&'
343
+        );
344
+    }
345
+
346
+    return $redirect;
347 347
 }
348 348
 
349 349
 /**
@@ -355,19 +355,19 @@  discard block
 block discarded – undo
355 355
  * @param null|string $date
356 356
  */
357 357
 function auth_trace($row, $date = null) {
358
-	// Indiquer la connexion. A la minute pres ca suffit.
359
-	if (!is_numeric($connect_quand = $row['quand'] ?? '')) {
360
-		$connect_quand = strtotime($connect_quand);
361
-	}
358
+    // Indiquer la connexion. A la minute pres ca suffit.
359
+    if (!is_numeric($connect_quand = $row['quand'] ?? '')) {
360
+        $connect_quand = strtotime($connect_quand);
361
+    }
362 362
 
363
-	$date ??= date('Y-m-d H:i:s');
363
+    $date ??= date('Y-m-d H:i:s');
364 364
 
365
-	if (abs(strtotime($date) - $connect_quand) >= 60) {
366
-		sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur=' . intval($row['id_auteur']));
367
-		$row['en_ligne'] = $date;
368
-	}
365
+    if (abs(strtotime($date) - $connect_quand) >= 60) {
366
+        sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur=' . intval($row['id_auteur']));
367
+        $row['en_ligne'] = $date;
368
+    }
369 369
 
370
-	pipeline('trig_auth_trace', ['args' => ['row' => $row, 'date' => $date]]);
370
+    pipeline('trig_auth_trace', ['args' => ['row' => $row, 'date' => $date]]);
371 371
 }
372 372
 
373 373
 
@@ -393,28 +393,28 @@  discard block
 block discarded – undo
393 393
  * @return mixed
394 394
  */
395 395
 function auth_administrer($fonction, $args, $defaut = false) {
396
-	$auth_methode = array_shift($args);
397
-	$auth_methode = $auth_methode ?: 'spip'; // valeur par defaut au cas ou
398
-	if (
399
-		$auth = charger_fonction($auth_methode, 'auth', true)
400
-		and function_exists($f = "auth_{$auth_methode}_$fonction")
401
-	) {
402
-		$res = $f(...$args);
403
-	} else {
404
-		$res = $defaut;
405
-	}
406
-	$res = pipeline(
407
-		'auth_administrer',
408
-		[
409
-			'args' => [
410
-				'fonction' => $fonction,
411
-				'methode' => $auth_methode,
412
-				'args' => $args
413
-			],
414
-			'data' => $res
415
-		]
416
-	);
417
-	return $res;
396
+    $auth_methode = array_shift($args);
397
+    $auth_methode = $auth_methode ?: 'spip'; // valeur par defaut au cas ou
398
+    if (
399
+        $auth = charger_fonction($auth_methode, 'auth', true)
400
+        and function_exists($f = "auth_{$auth_methode}_$fonction")
401
+    ) {
402
+        $res = $f(...$args);
403
+    } else {
404
+        $res = $defaut;
405
+    }
406
+    $res = pipeline(
407
+        'auth_administrer',
408
+        [
409
+            'args' => [
410
+                'fonction' => $fonction,
411
+                'methode' => $auth_methode,
412
+                'args' => $args
413
+            ],
414
+            'data' => $res
415
+        ]
416
+    );
417
+    return $res;
418 418
 }
419 419
 
420 420
 /**
@@ -424,11 +424,11 @@  discard block
 block discarded – undo
424 424
  * @return array
425 425
  */
426 426
 function auth_formulaire_login($flux) {
427
-	foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
428
-		$flux = auth_administrer('formulaire_login', [$methode, $flux], $flux);
429
-	}
427
+    foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
428
+        $flux = auth_administrer('formulaire_login', [$methode, $flux], $flux);
429
+    }
430 430
 
431
-	return $flux;
431
+    return $flux;
432 432
 }
433 433
 
434 434
 
@@ -442,19 +442,19 @@  discard block
 block discarded – undo
442 442
  * @return string/bool
443 443
  */
444 444
 function auth_retrouver_login($login, $serveur = '') {
445
-	if (!spip_connect($serveur)) {
446
-		include_spip('inc/minipres');
447
-		echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique'));
448
-		exit;
449
-	}
450
-
451
-	foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
452
-		if ($auteur = auth_administrer('retrouver_login', [$methode, $login, $serveur])) {
453
-			return $auteur;
454
-		}
455
-	}
456
-
457
-	return false;
445
+    if (!spip_connect($serveur)) {
446
+        include_spip('inc/minipres');
447
+        echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique'));
448
+        exit;
449
+    }
450
+
451
+    foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
452
+        if ($auteur = auth_administrer('retrouver_login', [$methode, $login, $serveur])) {
453
+            return $auteur;
454
+        }
455
+    }
456
+
457
+    return false;
458 458
 }
459 459
 
460 460
 /**
@@ -469,34 +469,34 @@  discard block
 block discarded – undo
469 469
  * @return array
470 470
  */
471 471
 function auth_informer_login($login, $serveur = '') {
472
-	if (
473
-		!$login
474
-		or !$login_base = auth_retrouver_login($login, $serveur)
475
-		or !$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)
476
-	) {
477
-		// generer de fausses infos, mais credibles, pour eviter une attaque
478
-		// https://core.spip.net/issues/1758 + https://core.spip.net/issues/3691
479
-
480
-		$row = [
481
-			'login' => $login,
482
-			'cnx' => '0',
483
-			'logo' => '',
484
-		];
485
-
486
-		return $row;
487
-	}
488
-
489
-	$prefs = @unserialize($row['prefs']);
490
-	$infos = [
491
-		'id_auteur' => $row['id_auteur'],
492
-		'login' => $row['login'],
493
-		'cnx' => (isset($prefs['cnx']) and $prefs['cnx'] === 'perma') ? '1' : '0',
494
-		'logo' => recuperer_fond('formulaires/inc-logo_auteur', $row),
495
-	];
496
-
497
-	verifier_visiteur();
498
-
499
-	return auth_administrer('informer_login', [$row['source'], $infos, $row, $serveur], $infos);
472
+    if (
473
+        !$login
474
+        or !$login_base = auth_retrouver_login($login, $serveur)
475
+        or !$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)
476
+    ) {
477
+        // generer de fausses infos, mais credibles, pour eviter une attaque
478
+        // https://core.spip.net/issues/1758 + https://core.spip.net/issues/3691
479
+
480
+        $row = [
481
+            'login' => $login,
482
+            'cnx' => '0',
483
+            'logo' => '',
484
+        ];
485
+
486
+        return $row;
487
+    }
488
+
489
+    $prefs = @unserialize($row['prefs']);
490
+    $infos = [
491
+        'id_auteur' => $row['id_auteur'],
492
+        'login' => $row['login'],
493
+        'cnx' => (isset($prefs['cnx']) and $prefs['cnx'] === 'perma') ? '1' : '0',
494
+        'logo' => recuperer_fond('formulaires/inc-logo_auteur', $row),
495
+    ];
496
+
497
+    verifier_visiteur();
498
+
499
+    return auth_administrer('informer_login', [$row['source'], $infos, $row, $serveur], $infos);
500 500
 }
501 501
 
502 502
 
@@ -510,21 +510,21 @@  discard block
 block discarded – undo
510 510
  * @return mixed
511 511
  */
512 512
 function auth_identifier_login($login, $password, $serveur = '', bool $phpauth = false) {
513
-	$erreur = '';
514
-	foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
515
-		if ($auth = charger_fonction($methode, 'auth', true)) {
516
-			$auteur = $auth($login, $password, $serveur, $phpauth);
517
-			if (is_array($auteur) and count($auteur)) {
518
-				spip_log("connexion de $login par methode $methode");
519
-				$auteur['auth'] = $methode;
520
-				return $auteur;
521
-			} elseif (is_string($auteur)) {
522
-				$erreur .= "$auteur ";
523
-			}
524
-		}
525
-	}
526
-
527
-	return $erreur;
513
+    $erreur = '';
514
+    foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
515
+        if ($auth = charger_fonction($methode, 'auth', true)) {
516
+            $auteur = $auth($login, $password, $serveur, $phpauth);
517
+            if (is_array($auteur) and count($auteur)) {
518
+                spip_log("connexion de $login par methode $methode");
519
+                $auteur['auth'] = $methode;
520
+                return $auteur;
521
+            } elseif (is_string($auteur)) {
522
+                $erreur .= "$auteur ";
523
+            }
524
+        }
525
+    }
526
+
527
+    return $erreur;
528 528
 }
529 529
 
530 530
 /**
@@ -538,8 +538,8 @@  discard block
 block discarded – undo
538 538
  * @return string
539 539
  */
540 540
 function auth_url_retour_login($auth_methode, $login, $redirect = '', $serveur = '') {
541
-	$securiser_action = charger_fonction('securiser_action', 'inc');
542
-	return $securiser_action('auth', "$auth_methode/$login", $redirect, true);
541
+    $securiser_action = charger_fonction('securiser_action', 'inc');
542
+    return $securiser_action('auth', "$auth_methode/$login", $redirect, true);
543 543
 }
544 544
 
545 545
 /**
@@ -553,9 +553,9 @@  discard block
 block discarded – undo
553 553
  * @return mixed
554 554
  */
555 555
 function auth_terminer_identifier_login($auth_methode, $login, $serveur = '') {
556
-	$args = func_get_args();
557
-	$auteur = auth_administrer('terminer_identifier_login', $args);
558
-	return $auteur;
556
+    $args = func_get_args();
557
+    $auteur = auth_administrer('terminer_identifier_login', $args);
558
+    return $auteur;
559 559
 }
560 560
 
561 561
 /**
@@ -565,29 +565,29 @@  discard block
 block discarded – undo
565 565
  * @return bool
566 566
  */
567 567
 function auth_loger($auteur) {
568
-	if (!is_array($auteur) or !count($auteur)) {
569
-		return false;
570
-	}
571
-
572
-	// initialiser et poser le cookie de session
573
-	unset($_COOKIE['spip_session']);
574
-	if (auth_init_droits($auteur) === false) {
575
-		return false;
576
-	}
577
-
578
-	// initialiser les prefs
579
-	$p = $GLOBALS['visiteur_session']['prefs'];
580
-	$p['cnx'] = (isset($auteur['cookie']) and $auteur['cookie'] == 'oui') ? 'perma' : '';
581
-
582
-	sql_updateq(
583
-		'spip_auteurs',
584
-		['prefs' => serialize($p)],
585
-		'id_auteur=' . intval($auteur['id_auteur'])
586
-	);
587
-
588
-	//  bloquer ici le visiteur qui tente d'abuser de ses droits
589
-	verifier_visiteur();
590
-	return true;
568
+    if (!is_array($auteur) or !count($auteur)) {
569
+        return false;
570
+    }
571
+
572
+    // initialiser et poser le cookie de session
573
+    unset($_COOKIE['spip_session']);
574
+    if (auth_init_droits($auteur) === false) {
575
+        return false;
576
+    }
577
+
578
+    // initialiser les prefs
579
+    $p = $GLOBALS['visiteur_session']['prefs'];
580
+    $p['cnx'] = (isset($auteur['cookie']) and $auteur['cookie'] == 'oui') ? 'perma' : '';
581
+
582
+    sql_updateq(
583
+        'spip_auteurs',
584
+        ['prefs' => serialize($p)],
585
+        'id_auteur=' . intval($auteur['id_auteur'])
586
+    );
587
+
588
+    //  bloquer ici le visiteur qui tente d'abuser de ses droits
589
+    verifier_visiteur();
590
+    return true;
591 591
 }
592 592
 
593 593
 /**
@@ -597,8 +597,8 @@  discard block
 block discarded – undo
597 597
  * return void
598 598
  **/
599 599
 function auth_deloger() {
600
-	$logout = charger_fonction('logout', 'action');
601
-	$logout();
600
+    $logout = charger_fonction('logout', 'action');
601
+    $logout();
602 602
 }
603 603
 
604 604
 /**
@@ -612,8 +612,8 @@  discard block
 block discarded – undo
612 612
  * @return bool
613 613
  */
614 614
 function auth_autoriser_modifier_login($auth_methode, $serveur = '') {
615
-	$args = func_get_args();
616
-	return auth_administrer('autoriser_modifier_login', $args);
615
+    $args = func_get_args();
616
+    return auth_administrer('autoriser_modifier_login', $args);
617 617
 }
618 618
 
619 619
 /**
@@ -628,8 +628,8 @@  discard block
 block discarded – undo
628 628
  *  message d'erreur ou chaine vide si pas d'erreur
629 629
  */
630 630
 function auth_verifier_login($auth_methode, $new_login, $id_auteur = 0, $serveur = '') {
631
-	$args = func_get_args();
632
-	return auth_administrer('verifier_login', $args, '');
631
+    $args = func_get_args();
632
+    return auth_administrer('verifier_login', $args, '');
633 633
 }
634 634
 
635 635
 /**
@@ -642,8 +642,8 @@  discard block
 block discarded – undo
642 642
  * @return bool
643 643
  */
644 644
 function auth_modifier_login($auth_methode, $new_login, $id_auteur, $serveur = '') {
645
-	$args = func_get_args();
646
-	return auth_administrer('modifier_login', $args);
645
+    $args = func_get_args();
646
+    return auth_administrer('modifier_login', $args);
647 647
 }
648 648
 
649 649
 /**
@@ -658,8 +658,8 @@  discard block
 block discarded – undo
658 658
  *  succès ou échec
659 659
  */
660 660
 function auth_autoriser_modifier_pass($auth_methode, $serveur = '') {
661
-	$args = func_get_args();
662
-	return auth_administrer('autoriser_modifier_pass', $args);
661
+    $args = func_get_args();
662
+    return auth_administrer('autoriser_modifier_pass', $args);
663 663
 }
664 664
 
665 665
 /**
@@ -675,8 +675,8 @@  discard block
 block discarded – undo
675 675
  *  message d'erreur ou chaine vide si pas d'erreur
676 676
  */
677 677
 function auth_verifier_pass($auth_methode, $login, $new_pass, $id_auteur = 0, $serveur = '') {
678
-	$args = func_get_args();
679
-	return auth_administrer('verifier_pass', $args, '');
678
+    $args = func_get_args();
679
+    return auth_administrer('verifier_pass', $args, '');
680 680
 }
681 681
 
682 682
 /**
@@ -692,8 +692,8 @@  discard block
 block discarded – undo
692 692
  *  succes ou echec
693 693
  */
694 694
 function auth_modifier_pass($auth_methode, $login, $new_pass, $id_auteur, $serveur = '') {
695
-	$args = func_get_args();
696
-	return auth_administrer('modifier_pass', $args);
695
+    $args = func_get_args();
696
+    return auth_administrer('modifier_pass', $args);
697 697
 }
698 698
 
699 699
 /**
@@ -709,24 +709,24 @@  discard block
 block discarded – undo
709 709
  * @return void
710 710
  */
711 711
 function auth_synchroniser_distant(
712
-	$auth_methode = true,
713
-	$id_auteur = 0,
714
-	$champs = [],
715
-	$options = [],
716
-	$serveur = ''
712
+    $auth_methode = true,
713
+    $id_auteur = 0,
714
+    $champs = [],
715
+    $options = [],
716
+    $serveur = ''
717 717
 ) {
718
-	$args = func_get_args();
719
-	if ($auth_methode === true or (isset($options['all']) and $options['all'] == true)) {
720
-		$options['all'] = true; // ajouter une option all=>true pour chaque auth
721
-		$args = [true, $id_auteur, $champs, $options, $serveur];
722
-		foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
723
-			array_shift($args);
724
-			array_unshift($args, $methode);
725
-			auth_administrer('synchroniser_distant', $args);
726
-		}
727
-	} else {
728
-		auth_administrer('synchroniser_distant', $args);
729
-	}
718
+    $args = func_get_args();
719
+    if ($auth_methode === true or (isset($options['all']) and $options['all'] == true)) {
720
+        $options['all'] = true; // ajouter une option all=>true pour chaque auth
721
+        $args = [true, $id_auteur, $champs, $options, $serveur];
722
+        foreach ($GLOBALS['liste_des_authentifications'] as $methode) {
723
+            array_shift($args);
724
+            array_unshift($args, $methode);
725
+            auth_administrer('synchroniser_distant', $args);
726
+        }
727
+    } else {
728
+        auth_administrer('synchroniser_distant', $args);
729
+    }
730 730
 }
731 731
 
732 732
 
@@ -739,46 +739,46 @@  discard block
 block discarded – undo
739 739
  * @return array|bool
740 740
  */
741 741
 function lire_php_auth($login, $pw, $serveur = '') {
742
-	if (
743
-		!$login
744
-		or !$login_base = auth_retrouver_login($login, $serveur)
745
-	) {
746
-		return false;
747
-	}
748
-
749
-	$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur);
750
-
751
-	if (!$row) {
752
-		if (
753
-			include_spip('inc/auth')
754
-			and auth_ldap_connect($serveur)
755
-			and $auth_ldap = charger_fonction('ldap', 'auth', true)
756
-		) {
757
-			return $auth_ldap($login_base, $pw, $serveur, true);
758
-		}
759
-
760
-		return false;
761
-	}
742
+    if (
743
+        !$login
744
+        or !$login_base = auth_retrouver_login($login, $serveur)
745
+    ) {
746
+        return false;
747
+    }
748
+
749
+    $row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur);
750
+
751
+    if (!$row) {
752
+        if (
753
+            include_spip('inc/auth')
754
+            and auth_ldap_connect($serveur)
755
+            and $auth_ldap = charger_fonction('ldap', 'auth', true)
756
+        ) {
757
+            return $auth_ldap($login_base, $pw, $serveur, true);
758
+        }
759
+
760
+        return false;
761
+    }
762 762
 	
763
-	// si pas de source definie
764
-	// ou auth/xxx introuvable, utiliser 'spip' ou autre et avec le login passé par PHP_AUTH_USER
765
-	if (
766
-		!$auth_methode = $row['source']
767
-		or !$auth = charger_fonction($auth_methode, 'auth', true)
768
-	) {
769
-		$auth = charger_fonction('spip', 'auth', true);
770
-	}
771
-
772
-	$auteur = '';
773
-	if ($auth) {
774
-		$auteur = $auth($login, $pw, $serveur, true);
775
-	}
776
-	// verifier que ce n'est pas un message d'erreur
777
-	if (is_array($auteur) and count($auteur)) {
778
-		return $auteur;
779
-	}
780
-
781
-	return false;
763
+    // si pas de source definie
764
+    // ou auth/xxx introuvable, utiliser 'spip' ou autre et avec le login passé par PHP_AUTH_USER
765
+    if (
766
+        !$auth_methode = $row['source']
767
+        or !$auth = charger_fonction($auth_methode, 'auth', true)
768
+    ) {
769
+        $auth = charger_fonction('spip', 'auth', true);
770
+    }
771
+
772
+    $auteur = '';
773
+    if ($auth) {
774
+        $auteur = $auth($login, $pw, $serveur, true);
775
+    }
776
+    // verifier que ce n'est pas un message d'erreur
777
+    if (is_array($auteur) and count($auteur)) {
778
+        return $auteur;
779
+    }
780
+
781
+    return false;
782 782
 }
783 783
 
784 784
 /**
@@ -794,21 +794,21 @@  discard block
 block discarded – undo
794 794
  * @param string $lien
795 795
  */
796 796
 function ask_php_auth($pb, $raison, $retour = '', $url = '', $re = '', $lien = '') {
797
-	@Header('WWW-Authenticate: Basic realm="espace prive"');
798
-	@Header('HTTP/1.0 401 Unauthorized');
799
-	$corps = '';
800
-	$public = generer_url_public();
801
-	$ecrire = generer_url_ecrire();
802
-	$retour = $retour ?: _T('icone_retour');
803
-	$corps .= "<p>$raison</p>[<a href='$public'>$retour</a>] ";
804
-	if ($url) {
805
-		$corps .= "[<a href='" . generer_url_action('cookie', "essai_auth_http=oui&$url") . "'>$re</a>]";
806
-	}
807
-
808
-	if ($lien) {
809
-		$corps .= " [<a href='$ecrire'>" . _T('login_espace_prive') . '</a>]';
810
-	}
811
-	include_spip('inc/minipres');
812
-	echo minipres($pb, $corps);
813
-	exit;
797
+    @Header('WWW-Authenticate: Basic realm="espace prive"');
798
+    @Header('HTTP/1.0 401 Unauthorized');
799
+    $corps = '';
800
+    $public = generer_url_public();
801
+    $ecrire = generer_url_ecrire();
802
+    $retour = $retour ?: _T('icone_retour');
803
+    $corps .= "<p>$raison</p>[<a href='$public'>$retour</a>] ";
804
+    if ($url) {
805
+        $corps .= "[<a href='" . generer_url_action('cookie', "essai_auth_http=oui&$url") . "'>$re</a>]";
806
+    }
807
+
808
+    if ($lien) {
809
+        $corps .= " [<a href='$ecrire'>" . _T('login_espace_prive') . '</a>]';
810
+    }
811
+    include_spip('inc/minipres');
812
+    echo minipres($pb, $corps);
813
+    exit;
814 814
 }
Please login to merge, or discard this patch.
prive/formulaires/editer_liens.php 1 patch
Indentation   +438 added lines, -438 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Formulaires
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 
@@ -36,25 +36,25 @@  discard block
 block discarded – undo
36 36
  *   ($table_source,$objet,$id_objet,$objet_lien)
37 37
  */
38 38
 function determine_source_lien_objet($a, $b, $c) {
39
-	$table_source = $objet_lien = $objet = $id_objet = null;
40
-	// auteurs, article, 23 :
41
-	// associer des auteurs à l'article 23, sur la table pivot spip_auteurs_liens
42
-	if (is_numeric($c) and !is_numeric($b)) {
43
-		$table_source = table_objet($a);
44
-		$objet_lien = objet_type($a);
45
-		$objet = objet_type($b);
46
-		$id_objet = $c;
47
-	}
48
-	// article, 23, auteurs
49
-	// associer des auteurs à l'article 23, sur la table pivot spip_articles_liens
50
-	if (is_numeric($b) and !is_numeric($c)) {
51
-		$table_source = table_objet($c);
52
-		$objet_lien = objet_type($a);
53
-		$objet = objet_type($a);
54
-		$id_objet = $b;
55
-	}
56
-
57
-	return [$table_source, $objet, $id_objet, $objet_lien];
39
+    $table_source = $objet_lien = $objet = $id_objet = null;
40
+    // auteurs, article, 23 :
41
+    // associer des auteurs à l'article 23, sur la table pivot spip_auteurs_liens
42
+    if (is_numeric($c) and !is_numeric($b)) {
43
+        $table_source = table_objet($a);
44
+        $objet_lien = objet_type($a);
45
+        $objet = objet_type($b);
46
+        $id_objet = $c;
47
+    }
48
+    // article, 23, auteurs
49
+    // associer des auteurs à l'article 23, sur la table pivot spip_articles_liens
50
+    if (is_numeric($b) and !is_numeric($c)) {
51
+        $table_source = table_objet($c);
52
+        $objet_lien = objet_type($a);
53
+        $objet = objet_type($a);
54
+        $id_objet = $b;
55
+    }
56
+
57
+    return [$table_source, $objet, $id_objet, $objet_lien];
58 58
 }
59 59
 
60 60
 /**
@@ -80,86 +80,86 @@  discard block
 block discarded – undo
80 80
  */
81 81
 function formulaires_editer_liens_charger_dist($a, $b, $c, $options = []) {
82 82
 
83
-	// compat avec ancienne signature ou le 4eme argument est $editable
84
-	if (!is_array($options)) {
85
-		$options = ['editable' => $options];
86
-	} elseif (!isset($options['editable'])) {
87
-		$options['editable'] = true;
88
-	}
89
-
90
-	$editable = $options['editable'];
91
-
92
-	[$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
93
-	if (!$table_source or !$objet or !$objet_lien or !$id_objet) {
94
-		return false;
95
-	}
96
-
97
-	$objet_source = objet_type($table_source);
98
-	$table_sql_source = table_objet_sql($objet_source);
99
-
100
-	// verifier existence de la table xxx_liens
101
-	include_spip('action/editer_liens');
102
-	if (!objet_associable($objet_lien)) {
103
-		return false;
104
-	}
105
-
106
-	// L'éditabilité :) est définie par un test permanent (par exemple "associermots") ET le 4ème argument
107
-	include_spip('inc/autoriser');
108
-	$editable = ($editable and autoriser('associer' . $table_source, $objet, $id_objet)
109
-		and autoriser('modifier', $objet, $id_objet));
110
-
111
-	if (
112
-		!$editable and !count(objet_trouver_liens(
113
-			[$objet_lien => '*'],
114
-			[($objet_lien == $objet_source ? $objet : $objet_source) => $id_objet]
115
-		))
116
-	) {
117
-		return false;
118
-	}
119
-
120
-	// squelettes de vue et de d'association
121
-	// ils sont différents si des rôles sont définis.
122
-	$skel_vue = $table_source . '_lies';
123
-	$skel_ajout = $table_source . '_associer';
124
-
125
-	// description des roles
126
-	include_spip('inc/roles');
127
-	if ($roles = roles_presents($objet_source, $objet)) {
128
-		// on demande de nouveaux squelettes en conséquence
129
-		$skel_vue = $table_source . '_roles_lies';
130
-		$skel_ajout = $table_source . '_roles_associer';
131
-	}
132
-
133
-	$oups = '';
134
-	if ($editable) {
135
-		$oups = lien_gerer__oups('editer_liens', 'hash');
136
-	}
137
-	$valeurs = [
138
-		'id' => "$table_source-$objet-$id_objet-$objet_lien", // identifiant unique pour les id du form
139
-		'_vue_liee' => $skel_vue,
140
-		'_vue_ajout' => $skel_ajout,
141
-		'_objet_lien' => $objet_lien,
142
-		'id_lien_ajoute' => _request('id_lien_ajoute'),
143
-		'objet' => $objet,
144
-		'id_objet' => $id_objet,
145
-		'objet_source' => $objet_source,
146
-		'table_source' => $table_source,
147
-		'recherche' => '',
148
-		'visible' => 0,
149
-		'ajouter_lien' => '',
150
-		'supprimer_lien' => '',
151
-		'qualifier_lien' => '',
152
-		'ordonner_lien' => '',
153
-		'desordonner_liens' => '',
154
-		'_roles' => $roles, # description des roles
155
-		'_oups' => entites_html($oups),
156
-		'editable' => $editable,
157
-	];
158
-
159
-	// les options non definies dans $valeurs sont passees telles quelles au formulaire html
160
-	$valeurs = array_merge($options, $valeurs);
161
-
162
-	return $valeurs;
83
+    // compat avec ancienne signature ou le 4eme argument est $editable
84
+    if (!is_array($options)) {
85
+        $options = ['editable' => $options];
86
+    } elseif (!isset($options['editable'])) {
87
+        $options['editable'] = true;
88
+    }
89
+
90
+    $editable = $options['editable'];
91
+
92
+    [$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
93
+    if (!$table_source or !$objet or !$objet_lien or !$id_objet) {
94
+        return false;
95
+    }
96
+
97
+    $objet_source = objet_type($table_source);
98
+    $table_sql_source = table_objet_sql($objet_source);
99
+
100
+    // verifier existence de la table xxx_liens
101
+    include_spip('action/editer_liens');
102
+    if (!objet_associable($objet_lien)) {
103
+        return false;
104
+    }
105
+
106
+    // L'éditabilité :) est définie par un test permanent (par exemple "associermots") ET le 4ème argument
107
+    include_spip('inc/autoriser');
108
+    $editable = ($editable and autoriser('associer' . $table_source, $objet, $id_objet)
109
+        and autoriser('modifier', $objet, $id_objet));
110
+
111
+    if (
112
+        !$editable and !count(objet_trouver_liens(
113
+            [$objet_lien => '*'],
114
+            [($objet_lien == $objet_source ? $objet : $objet_source) => $id_objet]
115
+        ))
116
+    ) {
117
+        return false;
118
+    }
119
+
120
+    // squelettes de vue et de d'association
121
+    // ils sont différents si des rôles sont définis.
122
+    $skel_vue = $table_source . '_lies';
123
+    $skel_ajout = $table_source . '_associer';
124
+
125
+    // description des roles
126
+    include_spip('inc/roles');
127
+    if ($roles = roles_presents($objet_source, $objet)) {
128
+        // on demande de nouveaux squelettes en conséquence
129
+        $skel_vue = $table_source . '_roles_lies';
130
+        $skel_ajout = $table_source . '_roles_associer';
131
+    }
132
+
133
+    $oups = '';
134
+    if ($editable) {
135
+        $oups = lien_gerer__oups('editer_liens', 'hash');
136
+    }
137
+    $valeurs = [
138
+        'id' => "$table_source-$objet-$id_objet-$objet_lien", // identifiant unique pour les id du form
139
+        '_vue_liee' => $skel_vue,
140
+        '_vue_ajout' => $skel_ajout,
141
+        '_objet_lien' => $objet_lien,
142
+        'id_lien_ajoute' => _request('id_lien_ajoute'),
143
+        'objet' => $objet,
144
+        'id_objet' => $id_objet,
145
+        'objet_source' => $objet_source,
146
+        'table_source' => $table_source,
147
+        'recherche' => '',
148
+        'visible' => 0,
149
+        'ajouter_lien' => '',
150
+        'supprimer_lien' => '',
151
+        'qualifier_lien' => '',
152
+        'ordonner_lien' => '',
153
+        'desordonner_liens' => '',
154
+        '_roles' => $roles, # description des roles
155
+        '_oups' => entites_html($oups),
156
+        'editable' => $editable,
157
+    ];
158
+
159
+    // les options non definies dans $valeurs sont passees telles quelles au formulaire html
160
+    $valeurs = array_merge($options, $valeurs);
161
+
162
+    return $valeurs;
163 163
 }
164 164
 
165 165
 /**
@@ -203,170 +203,170 @@  discard block
 block discarded – undo
203 203
  * @return array
204 204
  */
205 205
 function formulaires_editer_liens_traiter_dist($a, $b, $c, $options = []) {
206
-	// compat avec ancienne signature ou le 4eme argument est $editable
207
-	if (!is_array($options)) {
208
-		$options = ['editable' => $options];
209
-	} elseif (!isset($options['editable'])) {
210
-		$options['editable'] = true;
211
-	}
212
-
213
-	$editable = $options['editable'];
214
-
215
-	$res = ['editable' => $editable ? true : false];
216
-	[$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
217
-	if (!$table_source or !$objet or !$objet_lien) {
218
-		return $res;
219
-	}
220
-
221
-
222
-	if (_request('tout_voir')) {
223
-		set_request('recherche', '');
224
-	}
225
-
226
-	include_spip('inc/autoriser');
227
-	if (autoriser('modifier', $objet, $id_objet)) {
228
-		// recuperer le oups du coup d'avant pour le propager à charger() si on ne fait rien par exemple
229
-		lien_gerer__oups('editer_liens','request');
230
-
231
-		// annuler les suppressions du coup d'avant ?
232
-		if (
233
-			_request('annuler_oups')
234
-			and $oups = lien_gerer__oups('editer_liens','get')
235
-		) {
236
-			if ($oups_objets = charger_fonction("editer_liens_oups_{$table_source}_{$objet}_{$objet_lien}", 'action', true)) {
237
-				$oups_objets($oups);
238
-			} else {
239
-				$objet_source = objet_type($table_source);
240
-				include_spip('action/editer_liens');
241
-				foreach ($oups as $oup) {
242
-					if ($objet_lien == $objet_source) {
243
-						objet_associer([$objet_source => $oup[$objet_source]], [$objet => $oup[$objet]], $oup);
244
-					} else {
245
-						objet_associer([$objet => $oup[$objet]], [$objet_source => $oup[$objet_source]], $oup);
246
-					}
247
-				}
248
-			}
249
-			# oups ne persiste que pour la derniere action, si suppression
250
-			lien_gerer__oups('editer_liens','reset');
251
-		}
252
-
253
-		$supprimer = _request('supprimer_lien');
254
-		$ajouter = _request('ajouter_lien');
255
-		$ordonner = _request('ordonner_lien');
256
-
257
-		if (_request('desordonner_liens')) {
258
-			include_spip('action/editer_liens');
259
-			objet_qualifier_liens([$objet_lien => '*'], [$objet => $id_objet], ['rang_lien' => 0]);
260
-		}
261
-
262
-		// il est possible de preciser dans une seule variable un remplacement :
263
-		// remplacer_lien[old][new]
264
-		if ($remplacer = _request('remplacer_lien')) {
265
-			foreach ($remplacer as $k => $v) {
266
-				if ($old = lien_verifier_action($k, '')) {
267
-					foreach (is_array($v) ? $v : [$v] as $kn => $vn) {
268
-						if ($new = lien_verifier_action($kn, $vn)) {
269
-							$supprimer[$old] = 'x';
270
-							$ajouter[$new] = '+';
271
-						}
272
-					}
273
-				}
274
-			}
275
-		}
276
-
277
-		if ($supprimer) {
278
-			if (
279
-				$supprimer_objets = charger_fonction(
280
-					"editer_liens_supprimer_{$table_source}_{$objet}_{$objet_lien}",
281
-					'action',
282
-					true
283
-				)
284
-			) {
285
-				$oups = $supprimer_objets($supprimer);
286
-			} else {
287
-				include_spip('action/editer_liens');
288
-				$oups = [];
289
-
290
-				foreach ($supprimer as $k => $v) {
291
-					if ($lien = lien_verifier_action($k, $v)) {
292
-						$lien = explode('-', $lien);
293
-						[$objet_source, $ids, $objet_lie, $idl, $role] = array_pad($lien, 5, null);
294
-						// appliquer une condition sur le rôle si défini ('*' pour tous les roles)
295
-						$cond = (!is_null($role) ? ['role' => $role] : []);
296
-						if ($objet_lien == $objet_source) {
297
-							$oups = array_merge(
298
-								$oups,
299
-								objet_trouver_liens([$objet_source => $ids], [$objet_lie => $idl], $cond)
300
-							);
301
-							objet_dissocier([$objet_source => $ids], [$objet_lie => $idl], $cond);
302
-						} else {
303
-							$oups = array_merge(
304
-								$oups,
305
-								objet_trouver_liens([$objet_lie => $idl], [$objet_source => $ids], $cond)
306
-							);
307
-							objet_dissocier([$objet_lie => $idl], [$objet_source => $ids], $cond);
308
-						}
309
-					}
310
-				}
311
-			}
312
-			if (!empty($oups)) {
313
-				lien_gerer__oups('editer_liens','set', $oups);
314
-			} else {
315
-				lien_gerer__oups('editer_liens','reset');
316
-			}
317
-		}
318
-
319
-		if ($ajouter) {
320
-			if (
321
-				$ajouter_objets = charger_fonction("editer_liens_ajouter_{$table_source}_{$objet}_{$objet_lien}", 'action', true)
322
-			) {
323
-				$ajout_ok = $ajouter_objets($ajouter);
324
-			} else {
325
-				$ajout_ok = false;
326
-				include_spip('action/editer_liens');
327
-				foreach ($ajouter as $k => $v) {
328
-					if ($lien = lien_verifier_action($k, $v)) {
329
-						$ajout_ok = true;
330
-						[$objet1, $ids, $objet2, $idl] = explode('-', $lien);
331
-						$qualifs = lien_retrouver_qualif($objet_lien, $lien);
332
-						if ($objet_lien == $objet1) {
333
-							lien_ajouter_liaisons($objet1, $ids, $objet2, $idl, $qualifs);
334
-						} else {
335
-							lien_ajouter_liaisons($objet2, $idl, $objet1, $ids, $qualifs);
336
-						}
337
-						set_request('id_lien_ajoute', $ids);
338
-					}
339
-				}
340
-			}
341
-			# oups ne persiste que pour la derniere action, si suppression
342
-			# une suppression suivie d'un ajout dans le meme hit est un remplacement
343
-			# non annulable !
344
-			if ($ajout_ok) {
345
-				lien_gerer__oups('editer_liens','reset');
346
-			}
347
-		}
348
-
349
-		if ($ordonner) {
350
-			include_spip('action/editer_liens');
351
-			foreach ($ordonner as $k => $rang_lien) {
352
-				if ($lien = lien_verifier_action($k, '')) {
353
-					[$objet1, $ids, $objet2, $idl] = explode('-', $lien);
354
-					$qualif = ['rang_lien' => $rang_lien];
355
-
356
-					if ($objet_lien == $objet1) {
357
-						objet_qualifier_liens([$objet1 => $ids], [$objet2 => $idl], $qualif);
358
-					} else {
359
-						objet_qualifier_liens([$objet2 => $idl], [$objet1 => $ids], $qualif);
360
-					}
361
-					set_request('id_lien_ajoute', $ids);
362
-					lien_gerer__oups('editer_liens','reset');
363
-				}
364
-			}
365
-		}
366
-	}
367
-
368
-
369
-	return $res;
206
+    // compat avec ancienne signature ou le 4eme argument est $editable
207
+    if (!is_array($options)) {
208
+        $options = ['editable' => $options];
209
+    } elseif (!isset($options['editable'])) {
210
+        $options['editable'] = true;
211
+    }
212
+
213
+    $editable = $options['editable'];
214
+
215
+    $res = ['editable' => $editable ? true : false];
216
+    [$table_source, $objet, $id_objet, $objet_lien] = determine_source_lien_objet($a, $b, $c);
217
+    if (!$table_source or !$objet or !$objet_lien) {
218
+        return $res;
219
+    }
220
+
221
+
222
+    if (_request('tout_voir')) {
223
+        set_request('recherche', '');
224
+    }
225
+
226
+    include_spip('inc/autoriser');
227
+    if (autoriser('modifier', $objet, $id_objet)) {
228
+        // recuperer le oups du coup d'avant pour le propager à charger() si on ne fait rien par exemple
229
+        lien_gerer__oups('editer_liens','request');
230
+
231
+        // annuler les suppressions du coup d'avant ?
232
+        if (
233
+            _request('annuler_oups')
234
+            and $oups = lien_gerer__oups('editer_liens','get')
235
+        ) {
236
+            if ($oups_objets = charger_fonction("editer_liens_oups_{$table_source}_{$objet}_{$objet_lien}", 'action', true)) {
237
+                $oups_objets($oups);
238
+            } else {
239
+                $objet_source = objet_type($table_source);
240
+                include_spip('action/editer_liens');
241
+                foreach ($oups as $oup) {
242
+                    if ($objet_lien == $objet_source) {
243
+                        objet_associer([$objet_source => $oup[$objet_source]], [$objet => $oup[$objet]], $oup);
244
+                    } else {
245
+                        objet_associer([$objet => $oup[$objet]], [$objet_source => $oup[$objet_source]], $oup);
246
+                    }
247
+                }
248
+            }
249
+            # oups ne persiste que pour la derniere action, si suppression
250
+            lien_gerer__oups('editer_liens','reset');
251
+        }
252
+
253
+        $supprimer = _request('supprimer_lien');
254
+        $ajouter = _request('ajouter_lien');
255
+        $ordonner = _request('ordonner_lien');
256
+
257
+        if (_request('desordonner_liens')) {
258
+            include_spip('action/editer_liens');
259
+            objet_qualifier_liens([$objet_lien => '*'], [$objet => $id_objet], ['rang_lien' => 0]);
260
+        }
261
+
262
+        // il est possible de preciser dans une seule variable un remplacement :
263
+        // remplacer_lien[old][new]
264
+        if ($remplacer = _request('remplacer_lien')) {
265
+            foreach ($remplacer as $k => $v) {
266
+                if ($old = lien_verifier_action($k, '')) {
267
+                    foreach (is_array($v) ? $v : [$v] as $kn => $vn) {
268
+                        if ($new = lien_verifier_action($kn, $vn)) {
269
+                            $supprimer[$old] = 'x';
270
+                            $ajouter[$new] = '+';
271
+                        }
272
+                    }
273
+                }
274
+            }
275
+        }
276
+
277
+        if ($supprimer) {
278
+            if (
279
+                $supprimer_objets = charger_fonction(
280
+                    "editer_liens_supprimer_{$table_source}_{$objet}_{$objet_lien}",
281
+                    'action',
282
+                    true
283
+                )
284
+            ) {
285
+                $oups = $supprimer_objets($supprimer);
286
+            } else {
287
+                include_spip('action/editer_liens');
288
+                $oups = [];
289
+
290
+                foreach ($supprimer as $k => $v) {
291
+                    if ($lien = lien_verifier_action($k, $v)) {
292
+                        $lien = explode('-', $lien);
293
+                        [$objet_source, $ids, $objet_lie, $idl, $role] = array_pad($lien, 5, null);
294
+                        // appliquer une condition sur le rôle si défini ('*' pour tous les roles)
295
+                        $cond = (!is_null($role) ? ['role' => $role] : []);
296
+                        if ($objet_lien == $objet_source) {
297
+                            $oups = array_merge(
298
+                                $oups,
299
+                                objet_trouver_liens([$objet_source => $ids], [$objet_lie => $idl], $cond)
300
+                            );
301
+                            objet_dissocier([$objet_source => $ids], [$objet_lie => $idl], $cond);
302
+                        } else {
303
+                            $oups = array_merge(
304
+                                $oups,
305
+                                objet_trouver_liens([$objet_lie => $idl], [$objet_source => $ids], $cond)
306
+                            );
307
+                            objet_dissocier([$objet_lie => $idl], [$objet_source => $ids], $cond);
308
+                        }
309
+                    }
310
+                }
311
+            }
312
+            if (!empty($oups)) {
313
+                lien_gerer__oups('editer_liens','set', $oups);
314
+            } else {
315
+                lien_gerer__oups('editer_liens','reset');
316
+            }
317
+        }
318
+
319
+        if ($ajouter) {
320
+            if (
321
+                $ajouter_objets = charger_fonction("editer_liens_ajouter_{$table_source}_{$objet}_{$objet_lien}", 'action', true)
322
+            ) {
323
+                $ajout_ok = $ajouter_objets($ajouter);
324
+            } else {
325
+                $ajout_ok = false;
326
+                include_spip('action/editer_liens');
327
+                foreach ($ajouter as $k => $v) {
328
+                    if ($lien = lien_verifier_action($k, $v)) {
329
+                        $ajout_ok = true;
330
+                        [$objet1, $ids, $objet2, $idl] = explode('-', $lien);
331
+                        $qualifs = lien_retrouver_qualif($objet_lien, $lien);
332
+                        if ($objet_lien == $objet1) {
333
+                            lien_ajouter_liaisons($objet1, $ids, $objet2, $idl, $qualifs);
334
+                        } else {
335
+                            lien_ajouter_liaisons($objet2, $idl, $objet1, $ids, $qualifs);
336
+                        }
337
+                        set_request('id_lien_ajoute', $ids);
338
+                    }
339
+                }
340
+            }
341
+            # oups ne persiste que pour la derniere action, si suppression
342
+            # une suppression suivie d'un ajout dans le meme hit est un remplacement
343
+            # non annulable !
344
+            if ($ajout_ok) {
345
+                lien_gerer__oups('editer_liens','reset');
346
+            }
347
+        }
348
+
349
+        if ($ordonner) {
350
+            include_spip('action/editer_liens');
351
+            foreach ($ordonner as $k => $rang_lien) {
352
+                if ($lien = lien_verifier_action($k, '')) {
353
+                    [$objet1, $ids, $objet2, $idl] = explode('-', $lien);
354
+                    $qualif = ['rang_lien' => $rang_lien];
355
+
356
+                    if ($objet_lien == $objet1) {
357
+                        objet_qualifier_liens([$objet1 => $ids], [$objet2 => $idl], $qualif);
358
+                    } else {
359
+                        objet_qualifier_liens([$objet2 => $idl], [$objet1 => $ids], $qualif);
360
+                    }
361
+                    set_request('id_lien_ajoute', $ids);
362
+                    lien_gerer__oups('editer_liens','reset');
363
+                }
364
+            }
365
+        }
366
+    }
367
+
368
+
369
+    return $res;
370 370
 }
371 371
 
372 372
 
@@ -389,24 +389,24 @@  discard block
 block discarded – undo
389 389
  * @return string Action demandée si trouvée, sinon ''
390 390
  */
391 391
 function lien_verifier_action($k, $v) {
392
-	$action = '';
393
-	if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $k)) {
394
-		$action = $k;
395
-	}
396
-	if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $v)) {
397
-		if (is_numeric($k)) {
398
-			$action = $v;
399
-		}
400
-		if (_request($k)) {
401
-			$action = $v;
402
-		}
403
-	}
404
-	// ajout un role null fictif (plus pratique) si pas défini
405
-	if ($action and count(explode('-', $action)) == 4) {
406
-		$action .= '-';
407
-	}
408
-
409
-	return $action;
392
+    $action = '';
393
+    if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $k)) {
394
+        $action = $k;
395
+    }
396
+    if (preg_match(',^\w+-[\w*]+-[\w*]+-[\w*]+(-[\w*])?,', $v)) {
397
+        if (is_numeric($k)) {
398
+            $action = $v;
399
+        }
400
+        if (_request($k)) {
401
+            $action = $v;
402
+        }
403
+    }
404
+    // ajout un role null fictif (plus pratique) si pas défini
405
+    if ($action and count(explode('-', $action)) == 4) {
406
+        $action .= '-';
407
+    }
408
+
409
+    return $action;
410 410
 }
411 411
 
412 412
 
@@ -422,66 +422,66 @@  discard block
 block discarded – undo
422 422
  *   Liste des qualifs pour chaque lien. Tableau vide s'il n'y en a pas.
423 423
  **/
424 424
 function lien_retrouver_qualif($objet_lien, $lien) {
425
-	// un role est défini dans la liaison
426
-	$defs = explode('-', $lien);
427
-	[$objet1, , $objet2, , $role] = array_pad($defs, 5, null);
428
-	if ($objet_lien == $objet1) {
429
-		$colonne_role = roles_colonne($objet1, $objet2);
430
-	} else {
431
-		$colonne_role = roles_colonne($objet2, $objet1);
432
-	}
433
-
434
-	// cas ou le role est defini en 5e argument de l'action sur le lien (suppression, ajout rapide sans autre attribut)
435
-	if ($role) {
436
-		return [
437
-			// un seul lien avec ce role
438
-			[$colonne_role => $role]
439
-		];
440
-	}
441
-
442
-	// retrouver les rôles postés pour cette liaison, s'il y en a.
443
-	$qualifier_lien = _request('qualifier_lien');
444
-	if (!$qualifier_lien or !is_array($qualifier_lien)) {
445
-		return [];
446
-	}
447
-
448
-	// pas avec l'action complete (incluant le role)
449
-	$qualif = [];
450
-	if (
451
-		(!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien])
452
-		and count($defs) == 5
453
-	) {
454
-		// on tente avec l'action sans le role
455
-		array_pop($defs);
456
-		$lien = implode('-', $defs);
457
-		if (!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien]) {
458
-			$qualif = [];
459
-		}
460
-	}
461
-
462
-	// $qualif de la forme array(role=>array(...),valeur=>array(...),....)
463
-	// on le reforme en array(array(role=>..,valeur=>..,..),array(role=>..,valeur=>..,..),...)
464
-	$qualifs = [];
465
-	while (is_countable($qualif) ? count($qualif) : 0) {
466
-		$q = [];
467
-		foreach ($qualif as $att => $values) {
468
-			if (is_array($values)) {
469
-				$q[$att] = array_shift($qualif[$att]);
470
-				if (!(is_countable($qualif[$att]) ? count($qualif[$att]) : 0)) {
471
-					unset($qualif[$att]);
472
-				}
473
-			} else {
474
-				$q[$att] = $values;
475
-				unset($qualif[$att]);
476
-			}
477
-		}
478
-		// pas de rôle vide
479
-		if (!$colonne_role or !isset($q[$colonne_role]) or $q[$colonne_role]) {
480
-			$qualifs[] = $q;
481
-		}
482
-	}
483
-
484
-	return $qualifs;
425
+    // un role est défini dans la liaison
426
+    $defs = explode('-', $lien);
427
+    [$objet1, , $objet2, , $role] = array_pad($defs, 5, null);
428
+    if ($objet_lien == $objet1) {
429
+        $colonne_role = roles_colonne($objet1, $objet2);
430
+    } else {
431
+        $colonne_role = roles_colonne($objet2, $objet1);
432
+    }
433
+
434
+    // cas ou le role est defini en 5e argument de l'action sur le lien (suppression, ajout rapide sans autre attribut)
435
+    if ($role) {
436
+        return [
437
+            // un seul lien avec ce role
438
+            [$colonne_role => $role]
439
+        ];
440
+    }
441
+
442
+    // retrouver les rôles postés pour cette liaison, s'il y en a.
443
+    $qualifier_lien = _request('qualifier_lien');
444
+    if (!$qualifier_lien or !is_array($qualifier_lien)) {
445
+        return [];
446
+    }
447
+
448
+    // pas avec l'action complete (incluant le role)
449
+    $qualif = [];
450
+    if (
451
+        (!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien])
452
+        and count($defs) == 5
453
+    ) {
454
+        // on tente avec l'action sans le role
455
+        array_pop($defs);
456
+        $lien = implode('-', $defs);
457
+        if (!isset($qualifier_lien[$lien]) or !$qualif = $qualifier_lien[$lien]) {
458
+            $qualif = [];
459
+        }
460
+    }
461
+
462
+    // $qualif de la forme array(role=>array(...),valeur=>array(...),....)
463
+    // on le reforme en array(array(role=>..,valeur=>..,..),array(role=>..,valeur=>..,..),...)
464
+    $qualifs = [];
465
+    while (is_countable($qualif) ? count($qualif) : 0) {
466
+        $q = [];
467
+        foreach ($qualif as $att => $values) {
468
+            if (is_array($values)) {
469
+                $q[$att] = array_shift($qualif[$att]);
470
+                if (!(is_countable($qualif[$att]) ? count($qualif[$att]) : 0)) {
471
+                    unset($qualif[$att]);
472
+                }
473
+            } else {
474
+                $q[$att] = $values;
475
+                unset($qualif[$att]);
476
+            }
477
+        }
478
+        // pas de rôle vide
479
+        if (!$colonne_role or !isset($q[$colonne_role]) or $q[$colonne_role]) {
480
+            $qualifs[] = $q;
481
+        }
482
+    }
483
+
484
+    return $qualifs;
485 485
 }
486 486
 
487 487
 /**
@@ -500,14 +500,14 @@  discard block
 block discarded – undo
500 500
  **/
501 501
 function lien_ajouter_liaisons($objet_source, $ids, $objet_lien, $idl, $qualifs) {
502 502
 
503
-	// retrouver la colonne de roles s'il y en a a lier
504
-	if (is_array($qualifs) and count($qualifs)) {
505
-		foreach ($qualifs as $qualif) {
506
-			objet_associer([$objet_source => $ids], [$objet_lien => $idl], $qualif);
507
-		}
508
-	} else {
509
-		objet_associer([$objet_source => $ids], [$objet_lien => $idl]);
510
-	}
503
+    // retrouver la colonne de roles s'il y en a a lier
504
+    if (is_array($qualifs) and count($qualifs)) {
505
+        foreach ($qualifs as $qualif) {
506
+            objet_associer([$objet_source => $ids], [$objet_lien => $idl], $qualif);
507
+        }
508
+    } else {
509
+        objet_associer([$objet_source => $ids], [$objet_lien => $idl]);
510
+    }
511 511
 }
512 512
 
513 513
 
@@ -519,79 +519,79 @@  discard block
 block discarded – undo
519 519
  * @return array|string|null
520 520
  */
521 521
 function lien_gerer__oups(string $form, string $action, ?array $valeur = null) {
522
-	static $_oups_value;
523
-
524
-	switch ($action) {
525
-		case 'reset':
526
-			$res = (empty($_oups_value) ? false : true);
527
-			$_oups_value = null;
528
-			return $res;
529
-
530
-		case 'get':
531
-			return $_oups_value ?: null;
532
-
533
-		case 'set':
534
-			$_oups_value = $valeur;
535
-			return true;
536
-
537
-		case 'request':
538
-			$_oups_value = null;
539
-			if ($oups = _request('_oups')) {
540
-				include_spip('inc/filtres');
541
-				// on accepte uniquement une valeur signée
542
-				if ($oups = decoder_contexte_ajax($oups, $form)) {
543
-					if (!is_array($oups)
544
-						or empty($oups['id_auteur'])
545
-						or $oups['id_auteur'] !== $GLOBALS['visiteur_session']['id_auteur']
546
-						or empty($oups['time'])
547
-						or $oups['time'] < $_SERVER['REQUEST_TIME'] - 86400
548
-						or empty($oups['args'])
549
-						or $oups['args'] !== lien_gerer__oups_collecter_args($form, debug_backtrace(null, 5))
550
-						or empty($oups['oups_value'])) {
551
-						$oups = null;
552
-					}
553
-					else {
554
-						$oups = $oups['oups_value'];
555
-						// controler le contenu
556
-						foreach ($oups as $k => $oup) {
557
-							if (!is_array($oup)) {
558
-								unset($oups[$k]);
559
-							}
560
-							else {
561
-								foreach ($oup as $champ => $valeur) {
562
-									if (!is_scalar($champ)
563
-										or !is_scalar($valeur)
564
-										or preg_match(',\W,', $champ)
565
-									) {
566
-										unset($oups[$k][$champ]);
567
-									}
568
-								}
569
-								if (empty($oups[$k])) {
570
-									unset($oups[$k]);
571
-								}
572
-							}
573
-						}
574
-					}
575
-					$_oups_value = $oups;
576
-					return $_oups_value;
577
-				}
578
-			}
579
-			break;
580
-
581
-		case 'hash':
582
-			if (!$_oups_value) {
583
-				return '';
584
-			}
585
-
586
-			include_spip('inc/filtres');
587
-			$oups = [
588
-				'id_auteur' => $GLOBALS['visiteur_session']['id_auteur'] ?? 0,
589
-				'time' => strtotime(date('Y-m-d H:00:00')),
590
-				'args' => lien_gerer__oups_collecter_args($form, debug_backtrace(null, 5)),
591
-				'oups_value' => $_oups_value,
592
-			];
593
-			return encoder_contexte_ajax($oups, $form);
594
-	}
522
+    static $_oups_value;
523
+
524
+    switch ($action) {
525
+        case 'reset':
526
+            $res = (empty($_oups_value) ? false : true);
527
+            $_oups_value = null;
528
+            return $res;
529
+
530
+        case 'get':
531
+            return $_oups_value ?: null;
532
+
533
+        case 'set':
534
+            $_oups_value = $valeur;
535
+            return true;
536
+
537
+        case 'request':
538
+            $_oups_value = null;
539
+            if ($oups = _request('_oups')) {
540
+                include_spip('inc/filtres');
541
+                // on accepte uniquement une valeur signée
542
+                if ($oups = decoder_contexte_ajax($oups, $form)) {
543
+                    if (!is_array($oups)
544
+                        or empty($oups['id_auteur'])
545
+                        or $oups['id_auteur'] !== $GLOBALS['visiteur_session']['id_auteur']
546
+                        or empty($oups['time'])
547
+                        or $oups['time'] < $_SERVER['REQUEST_TIME'] - 86400
548
+                        or empty($oups['args'])
549
+                        or $oups['args'] !== lien_gerer__oups_collecter_args($form, debug_backtrace(null, 5))
550
+                        or empty($oups['oups_value'])) {
551
+                        $oups = null;
552
+                    }
553
+                    else {
554
+                        $oups = $oups['oups_value'];
555
+                        // controler le contenu
556
+                        foreach ($oups as $k => $oup) {
557
+                            if (!is_array($oup)) {
558
+                                unset($oups[$k]);
559
+                            }
560
+                            else {
561
+                                foreach ($oup as $champ => $valeur) {
562
+                                    if (!is_scalar($champ)
563
+                                        or !is_scalar($valeur)
564
+                                        or preg_match(',\W,', $champ)
565
+                                    ) {
566
+                                        unset($oups[$k][$champ]);
567
+                                    }
568
+                                }
569
+                                if (empty($oups[$k])) {
570
+                                    unset($oups[$k]);
571
+                                }
572
+                            }
573
+                        }
574
+                    }
575
+                    $_oups_value = $oups;
576
+                    return $_oups_value;
577
+                }
578
+            }
579
+            break;
580
+
581
+        case 'hash':
582
+            if (!$_oups_value) {
583
+                return '';
584
+            }
585
+
586
+            include_spip('inc/filtres');
587
+            $oups = [
588
+                'id_auteur' => $GLOBALS['visiteur_session']['id_auteur'] ?? 0,
589
+                'time' => strtotime(date('Y-m-d H:00:00')),
590
+                'args' => lien_gerer__oups_collecter_args($form, debug_backtrace(null, 5)),
591
+                'oups_value' => $_oups_value,
592
+            ];
593
+            return encoder_contexte_ajax($oups, $form);
594
+    }
595 595
 }
596 596
 
597 597
 /**
@@ -600,19 +600,19 @@  discard block
 block discarded – undo
600 600
  * @return false|float|int|mixed|Services_JSON_Error|string
601 601
  */
602 602
 function lien_gerer__oups_collecter_args($form, $trace) {
603
-	$args = '';
604
-	if (!empty($trace)) {
605
-		do {
606
-			$t = array_shift($trace);
607
-			$function = $t['function'] ?? '';
608
-			if (strpos($function, 'formulaires_'. $form) === 0) {
609
-				if (isset($t['args'])) {
610
-					$args = json_encode($t['args']);
611
-				}
612
-				break;
613
-			}
614
-		}
615
-		while (count($trace));
616
-	}
617
-	return $args;
603
+    $args = '';
604
+    if (!empty($trace)) {
605
+        do {
606
+            $t = array_shift($trace);
607
+            $function = $t['function'] ?? '';
608
+            if (strpos($function, 'formulaires_'. $form) === 0) {
609
+                if (isset($t['args'])) {
610
+                    $args = json_encode($t['args']);
611
+                }
612
+                break;
613
+            }
614
+        }
615
+        while (count($trace));
616
+    }
617
+    return $args;
618 618
 }
Please login to merge, or discard this patch.
ecrire/maj/2021.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,21 +19,21 @@  discard block
 block discarded – undo
19 19
  * @package SPIP\Core\SQL\Upgrade
20 20
  **/
21 21
 if (!defined('_ECRIRE_INC_VERSION')) {
22
-	return;
22
+    return;
23 23
 }
24 24
 
25 25
 $GLOBALS['maj'][2021_02_18_00] = [
26
-	['sql_alter', "TABLE spip_auteurs CHANGE imessage imessage VARCHAR(3) DEFAULT '' NOT NULL" ],
27
-	['sql_updateq', 'spip_auteurs', ['imessage' => 'oui'], "imessage != 'non' OR imessage IS NULL" ],
26
+    ['sql_alter', "TABLE spip_auteurs CHANGE imessage imessage VARCHAR(3) DEFAULT '' NOT NULL" ],
27
+    ['sql_updateq', 'spip_auteurs', ['imessage' => 'oui'], "imessage != 'non' OR imessage IS NULL" ],
28 28
 ];
29 29
 
30 30
 $GLOBALS['maj'][2022_02_23_02] = [
31
-	['sql_alter', "TABLE spip_auteurs ADD backup_cles mediumtext DEFAULT '' NOT NULL" ],
32
-	['sql_delete', 'spip_meta', "nom='secret_du_site'" ],
31
+    ['sql_alter', "TABLE spip_auteurs ADD backup_cles mediumtext DEFAULT '' NOT NULL" ],
32
+    ['sql_delete', 'spip_meta', "nom='secret_du_site'" ],
33 33
 ];
34 34
 
35 35
 $GLOBALS['maj'][2022_02_23_03] = [
36
-	['maj2021_supprimer_toutes_sessions_si_aucun_backup_cles'],
36
+    ['maj2021_supprimer_toutes_sessions_si_aucun_backup_cles'],
37 37
 ];
38 38
 
39 39
 /**
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
  * - les autres auteurs vont tous regénérer un mot de passe plus sécure au premier login
45 45
  **/
46 46
 function maj2021_supprimer_toutes_sessions_si_aucun_backup_cles() {
47
-	if (!sql_countsel('spip_auteurs', "webmestre='oui' AND backup_cles!=''")) {
48
-		spip_log('supprimer sessions auteur', 'maj');
49
-		if ($dir = opendir(_DIR_SESSIONS)) {
50
-			while (($f = readdir($dir)) !== false) {
51
-				spip_unlink(_DIR_SESSIONS . $f);
52
-				if (time() >= _TIME_OUT) {
53
-					return;
54
-				}
55
-			}
56
-		}
57
-	}
47
+    if (!sql_countsel('spip_auteurs', "webmestre='oui' AND backup_cles!=''")) {
48
+        spip_log('supprimer sessions auteur', 'maj');
49
+        if ($dir = opendir(_DIR_SESSIONS)) {
50
+            while (($f = readdir($dir)) !== false) {
51
+                spip_unlink(_DIR_SESSIONS . $f);
52
+                if (time() >= _TIME_OUT) {
53
+                    return;
54
+                }
55
+            }
56
+        }
57
+    }
58 58
 }
Please login to merge, or discard this patch.
ecrire/action/api_transmettre.php 1 patch
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -17,92 +17,92 @@
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 
24 24
 function action_api_transmettre_dist($arg = null) {
25 25
 
26
-	// Obtenir l'argument 'id_auteur/cle/format/fond'
27
-	if (is_null($arg)) {
28
-		$arg = _request('arg');
29
-	}
30
-
31
-	$args = explode('/', $arg);
32
-
33
-	if (count($args) !== 4) {
34
-		action_api_transmettre_fail($arg);
35
-	}
36
-
37
-	[$id_auteur, $cle, $format, $fond] = $args;
38
-	$id_auteur = intval($id_auteur);
39
-
40
-	if (preg_match(',[^\w\\.-],', $format)) {
41
-		action_api_transmettre_fail("format $format ??");
42
-	}
43
-	if (preg_match(',[^\w\\.-],', $fond)) {
44
-		action_api_transmettre_fail("fond $fond ??");
45
-	}
46
-
47
-	// verifier la cle
48
-	//[(#ENV{id,0}|securiser_acces{#ENV{cle}, voirstats, #ENV{op}, #ENV{args}}|?{1,0})]
49
-	//[(#ENV{id,0}|securiser_acces{#ENV{cle}, voirstats, #ENV{op}, #ENV{args}}|?{1,0})]
50
-
51
-	$qs = $_SERVER['QUERY_STRING'];
52
-	// retirer action et arg de la qs
53
-	$contexte = [];
54
-	parse_str($qs, $contexte);
55
-	foreach ($contexte as $k => $v) {
56
-		if (in_array($k, ['action', 'arg', 'var_mode'])) {
57
-			unset($contexte[$k]);
58
-		}
59
-	}
60
-	$qs = http_build_query($contexte);
61
-	include_spip('inc/acces');
62
-	if (!securiser_acces_low_sec(intval($id_auteur), $cle, "transmettre/$format", $fond, $qs)) {
63
-		// si le autoriser low_sec n'est pas bon, on peut valider l'appel si l'auteur est identifie
64
-		include_spip('inc/autoriser');
65
-		$autoriser_type = preg_replace(',\W+,', '', "_{$format}{$fond}");
66
-		if (
67
-			!$id_auteur
68
-			or empty($GLOBALS['visiteur_session']['id_auteur'])
69
-			or $GLOBALS['visiteur_session']['id_auteur'] != $id_auteur
70
-			or !autoriser('transmettre', $autoriser_type, $id_auteur)
71
-		) {
72
-			action_api_transmettre_fail("auth QS $qs ??");
73
-		}
74
-	}
75
-
76
-	$contexte['id_auteur'] = $id_auteur;
77
-
78
-	$fond = "transmettre/$format/$fond";
79
-
80
-	if (!trouver_fond($fond)) {
81
-		$fond = "prive/$fond";
82
-	}
83
-
84
-	if (!trouver_fond($fond)) {
85
-		action_api_transmettre_fail("fond $fond ??");
86
-	}
87
-
88
-	$res = recuperer_fond($fond, $contexte, ['raw' => true]);
89
-	if (!empty($res['entetes'])) {
90
-		foreach ($res['entetes'] as $h => $v) {
91
-			header("$h: $v");
92
-		}
93
-	}
94
-
95
-	$res = ltrim($res['texte']);
96
-	if (empty($res)) {
97
-		spip_log("$arg $qs resultat vide", 'transmettre' . _LOG_INFO_IMPORTANTE);
98
-	}
99
-
100
-	echo $res;
101
-	exit();
26
+    // Obtenir l'argument 'id_auteur/cle/format/fond'
27
+    if (is_null($arg)) {
28
+        $arg = _request('arg');
29
+    }
30
+
31
+    $args = explode('/', $arg);
32
+
33
+    if (count($args) !== 4) {
34
+        action_api_transmettre_fail($arg);
35
+    }
36
+
37
+    [$id_auteur, $cle, $format, $fond] = $args;
38
+    $id_auteur = intval($id_auteur);
39
+
40
+    if (preg_match(',[^\w\\.-],', $format)) {
41
+        action_api_transmettre_fail("format $format ??");
42
+    }
43
+    if (preg_match(',[^\w\\.-],', $fond)) {
44
+        action_api_transmettre_fail("fond $fond ??");
45
+    }
46
+
47
+    // verifier la cle
48
+    //[(#ENV{id,0}|securiser_acces{#ENV{cle}, voirstats, #ENV{op}, #ENV{args}}|?{1,0})]
49
+    //[(#ENV{id,0}|securiser_acces{#ENV{cle}, voirstats, #ENV{op}, #ENV{args}}|?{1,0})]
50
+
51
+    $qs = $_SERVER['QUERY_STRING'];
52
+    // retirer action et arg de la qs
53
+    $contexte = [];
54
+    parse_str($qs, $contexte);
55
+    foreach ($contexte as $k => $v) {
56
+        if (in_array($k, ['action', 'arg', 'var_mode'])) {
57
+            unset($contexte[$k]);
58
+        }
59
+    }
60
+    $qs = http_build_query($contexte);
61
+    include_spip('inc/acces');
62
+    if (!securiser_acces_low_sec(intval($id_auteur), $cle, "transmettre/$format", $fond, $qs)) {
63
+        // si le autoriser low_sec n'est pas bon, on peut valider l'appel si l'auteur est identifie
64
+        include_spip('inc/autoriser');
65
+        $autoriser_type = preg_replace(',\W+,', '', "_{$format}{$fond}");
66
+        if (
67
+            !$id_auteur
68
+            or empty($GLOBALS['visiteur_session']['id_auteur'])
69
+            or $GLOBALS['visiteur_session']['id_auteur'] != $id_auteur
70
+            or !autoriser('transmettre', $autoriser_type, $id_auteur)
71
+        ) {
72
+            action_api_transmettre_fail("auth QS $qs ??");
73
+        }
74
+    }
75
+
76
+    $contexte['id_auteur'] = $id_auteur;
77
+
78
+    $fond = "transmettre/$format/$fond";
79
+
80
+    if (!trouver_fond($fond)) {
81
+        $fond = "prive/$fond";
82
+    }
83
+
84
+    if (!trouver_fond($fond)) {
85
+        action_api_transmettre_fail("fond $fond ??");
86
+    }
87
+
88
+    $res = recuperer_fond($fond, $contexte, ['raw' => true]);
89
+    if (!empty($res['entetes'])) {
90
+        foreach ($res['entetes'] as $h => $v) {
91
+            header("$h: $v");
92
+        }
93
+    }
94
+
95
+    $res = ltrim($res['texte']);
96
+    if (empty($res)) {
97
+        spip_log("$arg $qs resultat vide", 'transmettre' . _LOG_INFO_IMPORTANTE);
98
+    }
99
+
100
+    echo $res;
101
+    exit();
102 102
 }
103 103
 
104 104
 function action_api_transmettre_fail($arg) {
105
-	include_spip('inc/minipres');
106
-	echo minipres(_T('info_acces_interdit'), $arg);
107
-	exit;
105
+    include_spip('inc/minipres');
106
+    echo minipres(_T('info_acces_interdit'), $arg);
107
+    exit;
108 108
 }
Please login to merge, or discard this patch.
ecrire/src/Texte/Collecteur/AbstractCollecteur.php 1 patch
Indentation   +149 added lines, -149 removed lines patch added patch discarded remove patch
@@ -14,154 +14,154 @@
 block discarded – undo
14 14
 
15 15
 abstract class AbstractCollecteur {
16 16
 
17
-	protected static string $markPrefix = 'COLLECT';
18
-	protected string $markId;
19
-
20
-	/**
21
-	 * Collecteur générique des occurences d'une preg dans un texte avec leurs positions et longueur
22
-	 * @param string $texte
23
-	 *   texte à analyser pour la collecte
24
-	 * @param string $if_chars
25
-	 *   caractere(s) à tester avant de tenter la preg
26
-	 * @param string $start_with
27
-	 *   caractere(s) par lesquels commencent l'expression recherchée (permet de démarrer la preg à la prochaine occurence de cette chaine)
28
-	 * @param string $preg
29
-	 *   preg utilisée pour la collecte
30
-	 * @param int $max_items
31
-	 *   pour limiter le nombre de preg collectée (pour la detection simple de présence par exemple)
32
-	 * @return array
33
-	 */
34
-	protected static function collecteur(string $texte, string $if_chars, string $start_with, string $preg, int $max_items = 0): array {
35
-
36
-		$collection = [];
37
-		$pos = 0;
38
-		while (
39
-			(!$if_chars || strpos($texte, $if_chars, $pos) !== false)
40
-			and ($next = ($start_with ? strpos($texte, $start_with, $pos) : $pos)) !== false
41
-			and preg_match($preg, $texte, $r, PREG_OFFSET_CAPTURE, $next)) {
42
-
43
-			$found_pos = $r[0][1];
44
-			$found_length = strlen($r[0][0]);
45
-			$match = [
46
-				'raw' => $r[0][0],
47
-				'match' => array_column($r, 0),
48
-				'pos' => $found_pos,
49
-				'length' => $found_length
50
-			];
51
-
52
-			$collection[] = $match;
53
-
54
-			if ($max_items and count($collection) === $max_items) {
55
-				break;
56
-			}
57
-
58
-			$pos = $match['pos'] + $match['length'];
59
-		}
60
-
61
-		return $collection;
62
-	}
63
-
64
-	/**
65
-	 * Sanitizer une collection d'occurences
66
-	 *
67
-	 * @param array $collection
68
-	 * @param string $sanitize_callback
69
-	 * @return array
70
-	 */
71
-	protected function sanitizer_collection(array $collection, string $sanitize_callback): array {
72
-		foreach ($collection as &$c) {
73
-			$c['raw'] = $sanitize_callback($c['raw']);
74
-		}
75
-
76
-		return $collection;
77
-	}
78
-
79
-	/**
80
-	 * @param string $texte
81
-	 * @param array $options
82
-	 * @return array
83
-	 */
84
-	public function collecter(string $texte, array $options = []): array {
85
-		$collection = [];
86
-		return $collection;
87
-	}
88
-
89
-	public function detecter($texte): bool {
90
-		if (!empty($this->markId) and strpos($texte, $this->markId) !== false) {
91
-			return true;
92
-		}
93
-		return !empty($this->collecter($texte, ['detecter_presence' => true]));
94
-	}
95
-
96
-	/**
97
-	 * Echapper les occurences de la collecte par un texte neutre du point de vue HTML
98
-	 *
99
-	 * @see retablir()
100
-	 * @param string $texte
101
-	 * @param array $options
102
-	 *   string $sanitize_callback
103
-	 * @return array
104
-	 *   texte, marqueur utilise pour echapper les modeles
105
-	 */
106
-	public function echapper(string $texte, array $options = []): string {
107
-		if (!function_exists('creer_uniqid')) {
108
-			include_spip('inc/acces');
109
-		}
110
-
111
-		$collection = $this->collecter($texte, $options);
112
-		if (!empty($options['sanitize_callback']) and is_callable($options['sanitize_callback'])) {
113
-			$collection = $this->sanitizer_collection($collection, $options['sanitize_callback']);
114
-		}
115
-
116
-		if (!empty($collection)) {
117
-			if (empty($this->markId)) {
118
-				// generer un marqueur qui n'existe pas dans le texte
119
-				do {
120
-					$this->markId = substr(md5(uniqid(static::class, 1)), 0, 7);
121
-					$this->markId = "@|".static::$markPrefix . $this->markId . "|";
122
-				} while (strpos($texte, $this->markId) !== false);
123
-			}
124
-
125
-			$offset_pos = 0;
126
-			foreach ($collection as $c) {
127
-				$rempl = $this->markId . base64_encode($c['raw']) . '|@';
128
-				$texte = substr_replace($texte, $rempl, $c['pos'] + $offset_pos, $c['length']);
129
-				$offset_pos += strlen($rempl) - $c['length'];
130
-			}
131
-		}
132
-
133
-		return $texte;
134
-	}
135
-
136
-
137
-	/**
138
-	 * Retablir les occurences échappées précédemment
139
-	 *
140
-	 * @see echapper()
141
-	 * @param string $texte
142
-	 * @return string
143
-	 */
144
-	function retablir(string $texte): string {
145
-
146
-		if (!empty($this->markId)) {
147
-			$lm = strlen($this->markId);
148
-			$pos = 0;
149
-			while (
150
-				($p = strpos($texte, $this->markId, $pos)) !== false
151
-				and $end = strpos($texte, '|@', $p + $lm)
152
-			) {
153
-				$base64 = substr($texte, $p + $lm, $end - ($p + $lm));
154
-				if ($c = base64_decode($base64, true)) {
155
-					$texte = substr_replace($texte, $c, $p, $end + 2 - $p);
156
-					$pos = $p + strlen($c);
157
-				}
158
-				else {
159
-					$pos = $end;
160
-				}
161
-			}
162
-		}
163
-
164
-		return $texte;
165
-	}
17
+    protected static string $markPrefix = 'COLLECT';
18
+    protected string $markId;
19
+
20
+    /**
21
+     * Collecteur générique des occurences d'une preg dans un texte avec leurs positions et longueur
22
+     * @param string $texte
23
+     *   texte à analyser pour la collecte
24
+     * @param string $if_chars
25
+     *   caractere(s) à tester avant de tenter la preg
26
+     * @param string $start_with
27
+     *   caractere(s) par lesquels commencent l'expression recherchée (permet de démarrer la preg à la prochaine occurence de cette chaine)
28
+     * @param string $preg
29
+     *   preg utilisée pour la collecte
30
+     * @param int $max_items
31
+     *   pour limiter le nombre de preg collectée (pour la detection simple de présence par exemple)
32
+     * @return array
33
+     */
34
+    protected static function collecteur(string $texte, string $if_chars, string $start_with, string $preg, int $max_items = 0): array {
35
+
36
+        $collection = [];
37
+        $pos = 0;
38
+        while (
39
+            (!$if_chars || strpos($texte, $if_chars, $pos) !== false)
40
+            and ($next = ($start_with ? strpos($texte, $start_with, $pos) : $pos)) !== false
41
+            and preg_match($preg, $texte, $r, PREG_OFFSET_CAPTURE, $next)) {
42
+
43
+            $found_pos = $r[0][1];
44
+            $found_length = strlen($r[0][0]);
45
+            $match = [
46
+                'raw' => $r[0][0],
47
+                'match' => array_column($r, 0),
48
+                'pos' => $found_pos,
49
+                'length' => $found_length
50
+            ];
51
+
52
+            $collection[] = $match;
53
+
54
+            if ($max_items and count($collection) === $max_items) {
55
+                break;
56
+            }
57
+
58
+            $pos = $match['pos'] + $match['length'];
59
+        }
60
+
61
+        return $collection;
62
+    }
63
+
64
+    /**
65
+     * Sanitizer une collection d'occurences
66
+     *
67
+     * @param array $collection
68
+     * @param string $sanitize_callback
69
+     * @return array
70
+     */
71
+    protected function sanitizer_collection(array $collection, string $sanitize_callback): array {
72
+        foreach ($collection as &$c) {
73
+            $c['raw'] = $sanitize_callback($c['raw']);
74
+        }
75
+
76
+        return $collection;
77
+    }
78
+
79
+    /**
80
+     * @param string $texte
81
+     * @param array $options
82
+     * @return array
83
+     */
84
+    public function collecter(string $texte, array $options = []): array {
85
+        $collection = [];
86
+        return $collection;
87
+    }
88
+
89
+    public function detecter($texte): bool {
90
+        if (!empty($this->markId) and strpos($texte, $this->markId) !== false) {
91
+            return true;
92
+        }
93
+        return !empty($this->collecter($texte, ['detecter_presence' => true]));
94
+    }
95
+
96
+    /**
97
+     * Echapper les occurences de la collecte par un texte neutre du point de vue HTML
98
+     *
99
+     * @see retablir()
100
+     * @param string $texte
101
+     * @param array $options
102
+     *   string $sanitize_callback
103
+     * @return array
104
+     *   texte, marqueur utilise pour echapper les modeles
105
+     */
106
+    public function echapper(string $texte, array $options = []): string {
107
+        if (!function_exists('creer_uniqid')) {
108
+            include_spip('inc/acces');
109
+        }
110
+
111
+        $collection = $this->collecter($texte, $options);
112
+        if (!empty($options['sanitize_callback']) and is_callable($options['sanitize_callback'])) {
113
+            $collection = $this->sanitizer_collection($collection, $options['sanitize_callback']);
114
+        }
115
+
116
+        if (!empty($collection)) {
117
+            if (empty($this->markId)) {
118
+                // generer un marqueur qui n'existe pas dans le texte
119
+                do {
120
+                    $this->markId = substr(md5(uniqid(static::class, 1)), 0, 7);
121
+                    $this->markId = "@|".static::$markPrefix . $this->markId . "|";
122
+                } while (strpos($texte, $this->markId) !== false);
123
+            }
124
+
125
+            $offset_pos = 0;
126
+            foreach ($collection as $c) {
127
+                $rempl = $this->markId . base64_encode($c['raw']) . '|@';
128
+                $texte = substr_replace($texte, $rempl, $c['pos'] + $offset_pos, $c['length']);
129
+                $offset_pos += strlen($rempl) - $c['length'];
130
+            }
131
+        }
132
+
133
+        return $texte;
134
+    }
135
+
136
+
137
+    /**
138
+     * Retablir les occurences échappées précédemment
139
+     *
140
+     * @see echapper()
141
+     * @param string $texte
142
+     * @return string
143
+     */
144
+    function retablir(string $texte): string {
145
+
146
+        if (!empty($this->markId)) {
147
+            $lm = strlen($this->markId);
148
+            $pos = 0;
149
+            while (
150
+                ($p = strpos($texte, $this->markId, $pos)) !== false
151
+                and $end = strpos($texte, '|@', $p + $lm)
152
+            ) {
153
+                $base64 = substr($texte, $p + $lm, $end - ($p + $lm));
154
+                if ($c = base64_decode($base64, true)) {
155
+                    $texte = substr_replace($texte, $c, $p, $end + 2 - $p);
156
+                    $pos = $p + strlen($c);
157
+                }
158
+                else {
159
+                    $pos = $end;
160
+                }
161
+            }
162
+        }
163
+
164
+        return $texte;
165
+    }
166 166
 
167 167
 }
Please login to merge, or discard this patch.