@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * Pile complétée du code compilé |
| 38 | 38 | **/ |
| 39 | 39 | function balise_MENU_LANG_ECRIRE($p) { |
| 40 | - return calculer_balise_dynamique($p, 'MENU_LANG_ECRIRE', ['lang']); |
|
| 40 | + return calculer_balise_dynamique($p, 'MENU_LANG_ECRIRE', ['lang']); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | * - string: Si pas de multilinguisme |
| 57 | 57 | */ |
| 58 | 58 | function balise_MENU_LANG_ECRIRE_stat($args, $context_compil) { |
| 59 | - include_spip('inc/lang'); |
|
| 60 | - if (strpos($GLOBALS['meta']['langues_proposees'], ',') === false) { |
|
| 61 | - return ''; |
|
| 62 | - } |
|
| 59 | + include_spip('inc/lang'); |
|
| 60 | + if (strpos($GLOBALS['meta']['langues_proposees'], ',') === false) { |
|
| 61 | + return ''; |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - return $args; |
|
| 64 | + return $args; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * Liste : Chemin du squelette, durée du cache, contexte |
| 78 | 78 | **/ |
| 79 | 79 | function balise_MENU_LANG_ECRIRE_dyn($opt) { |
| 80 | - return menu_lang_pour_tous('var_lang_ecrire', $opt); |
|
| 80 | + return menu_lang_pour_tous('var_lang_ecrire', $opt); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -97,30 +97,30 @@ discard block |
||
| 97 | 97 | * Liste : Chemin du squelette, durée du cache, contexte |
| 98 | 98 | **/ |
| 99 | 99 | function menu_lang_pour_tous($nom, $default) { |
| 100 | - include_spip('inc/lang'); |
|
| 100 | + include_spip('inc/lang'); |
|
| 101 | 101 | |
| 102 | - if ($GLOBALS['spip_lang'] <> $default) { |
|
| 103 | - $opt = lang_select($default); # et remplace |
|
| 104 | - if ($GLOBALS['spip_lang'] <> $default) { |
|
| 105 | - $default = ''; # annule tout choix par defaut |
|
| 106 | - if ($opt) { |
|
| 107 | - lang_select(); |
|
| 108 | - } |
|
| 109 | - } |
|
| 110 | - } |
|
| 102 | + if ($GLOBALS['spip_lang'] <> $default) { |
|
| 103 | + $opt = lang_select($default); # et remplace |
|
| 104 | + if ($GLOBALS['spip_lang'] <> $default) { |
|
| 105 | + $default = ''; # annule tout choix par defaut |
|
| 106 | + if ($opt) { |
|
| 107 | + lang_select(); |
|
| 108 | + } |
|
| 109 | + } |
|
| 110 | + } |
|
| 111 | 111 | |
| 112 | - # lien a partir de / |
|
| 113 | - $cible = parametre_url(self(), 'lang', '', '&'); |
|
| 114 | - $post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), true); |
|
| 112 | + # lien a partir de / |
|
| 113 | + $cible = parametre_url(self(), 'lang', '', '&'); |
|
| 114 | + $post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), true); |
|
| 115 | 115 | |
| 116 | - return [ |
|
| 117 | - 'formulaires/menu_lang', |
|
| 118 | - 3600, |
|
| 119 | - [ |
|
| 120 | - 'nom' => $nom, |
|
| 121 | - 'url' => $post, |
|
| 122 | - 'name' => $nom, |
|
| 123 | - 'default' => $default, |
|
| 124 | - ] |
|
| 125 | - ]; |
|
| 116 | + return [ |
|
| 117 | + 'formulaires/menu_lang', |
|
| 118 | + 3600, |
|
| 119 | + [ |
|
| 120 | + 'nom' => $nom, |
|
| 121 | + 'url' => $post, |
|
| 122 | + 'name' => $nom, |
|
| 123 | + 'default' => $default, |
|
| 124 | + ] |
|
| 125 | + ]; |
|
| 126 | 126 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | **/ |
| 23 | 23 | |
| 24 | 24 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 25 | - return; |
|
| 25 | + return; |
|
| 26 | 26 | } |
| 27 | 27 | include_spip('inc/filtres'); |
| 28 | 28 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @return string Rien. |
| 40 | 40 | **/ |
| 41 | 41 | function filtre_image_dist($t) { |
| 42 | - return ''; |
|
| 42 | + return ''; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @return string Rien. |
| 53 | 53 | **/ |
| 54 | 54 | function filtre_audio_dist($t) { |
| 55 | - return ''; |
|
| 55 | + return ''; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @return string Rien. |
| 66 | 66 | **/ |
| 67 | 67 | function filtre_video_dist($t) { |
| 68 | - return ''; |
|
| 68 | + return ''; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @return string Rien. |
| 79 | 79 | **/ |
| 80 | 80 | function filtre_application_dist($t) { |
| 81 | - return ''; |
|
| 81 | + return ''; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @return string Rien. |
| 92 | 92 | **/ |
| 93 | 93 | function filtre_message_dist($t) { |
| 94 | - return ''; |
|
| 94 | + return ''; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @return string Rien. |
| 105 | 105 | **/ |
| 106 | 106 | function filtre_multipart_dist($t) { |
| 107 | - return ''; |
|
| 107 | + return ''; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -117,10 +117,10 @@ discard block |
||
| 117 | 117 | * @return string Contenu échappé. |
| 118 | 118 | **/ |
| 119 | 119 | function filtre_text_dist($t) { |
| 120 | - static $t1 = ['&', '<', '>']; |
|
| 121 | - static $t2 = ['&', '<', '>']; |
|
| 120 | + static $t1 = ['&', '<', '>']; |
|
| 121 | + static $t2 = ['&', '<', '>']; |
|
| 122 | 122 | |
| 123 | - return '<pre>' . str_replace($t1, $t2, (string) $t) . '</pre>'; |
|
| 123 | + return '<pre>' . str_replace($t1, $t2, (string) $t) . '</pre>'; |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -135,21 +135,21 @@ discard block |
||
| 135 | 135 | * Tableau (formaté en SPIP) |
| 136 | 136 | **/ |
| 137 | 137 | function filtre_text_csv_dist($t) { |
| 138 | - include_spip('inc/csv'); |
|
| 139 | - [$entete, $lignes, $caption] = analyse_csv($t); |
|
| 140 | - foreach ($lignes as &$l) { |
|
| 141 | - $l = join('|', $l); |
|
| 142 | - } |
|
| 143 | - $corps = join("\n", $lignes) . "\n"; |
|
| 144 | - $corps = $caption . |
|
| 145 | - "\n|{{" . |
|
| 146 | - join('}}|{{', $entete) . |
|
| 147 | - '}}|' . |
|
| 148 | - "\n|" . |
|
| 149 | - str_replace("\n", "|\n|", $corps); |
|
| 150 | - include_spip('inc/texte'); |
|
| 151 | - |
|
| 152 | - return propre($corps); |
|
| 138 | + include_spip('inc/csv'); |
|
| 139 | + [$entete, $lignes, $caption] = analyse_csv($t); |
|
| 140 | + foreach ($lignes as &$l) { |
|
| 141 | + $l = join('|', $l); |
|
| 142 | + } |
|
| 143 | + $corps = join("\n", $lignes) . "\n"; |
|
| 144 | + $corps = $caption . |
|
| 145 | + "\n|{{" . |
|
| 146 | + join('}}|{{', $entete) . |
|
| 147 | + '}}|' . |
|
| 148 | + "\n|" . |
|
| 149 | + str_replace("\n", "|\n|", $corps); |
|
| 150 | + include_spip('inc/texte'); |
|
| 151 | + |
|
| 152 | + return propre($corps); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
@@ -163,33 +163,33 @@ discard block |
||
| 163 | 163 | * @return string Code html sécurisé ou texte échappé |
| 164 | 164 | **/ |
| 165 | 165 | function filtre_text_html_dist($t) { |
| 166 | - if (!preg_match(',^(.*?)<body[^>]*>(.*)</body>,is', $t, $r)) { |
|
| 167 | - return appliquer_filtre($t, 'text/plain'); |
|
| 168 | - } |
|
| 169 | - |
|
| 170 | - [, $h, $t] = $r; |
|
| 171 | - |
|
| 172 | - $style = ''; |
|
| 173 | - // recuperer les styles internes |
|
| 174 | - if (preg_match_all(',<style>(.*?)</style>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 175 | - $style = join("\n", $r[1]); |
|
| 176 | - } |
|
| 177 | - // ... et externes |
|
| 178 | - |
|
| 179 | - include_spip('inc/distant'); |
|
| 180 | - if (preg_match_all(',<link[^>]+type=.text/css[^>]*>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 181 | - foreach ($r[0] as $l) { |
|
| 182 | - preg_match("/href='([^']*)'/", str_replace('"', "'", $l), $m); |
|
| 183 | - $page = recuperer_url($m[1]); |
|
| 184 | - $page = $page['page'] ?? ''; |
|
| 185 | - $style .= "\n/* $l */\n" |
|
| 186 | - . str_replace('<', '', $page); |
|
| 187 | - } |
|
| 188 | - } |
|
| 189 | - // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? |
|
| 190 | - $t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t)); |
|
| 191 | - |
|
| 192 | - return (!$style ? '' : "\n<style>" . $style . '</style>') . $t; |
|
| 166 | + if (!preg_match(',^(.*?)<body[^>]*>(.*)</body>,is', $t, $r)) { |
|
| 167 | + return appliquer_filtre($t, 'text/plain'); |
|
| 168 | + } |
|
| 169 | + |
|
| 170 | + [, $h, $t] = $r; |
|
| 171 | + |
|
| 172 | + $style = ''; |
|
| 173 | + // recuperer les styles internes |
|
| 174 | + if (preg_match_all(',<style>(.*?)</style>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 175 | + $style = join("\n", $r[1]); |
|
| 176 | + } |
|
| 177 | + // ... et externes |
|
| 178 | + |
|
| 179 | + include_spip('inc/distant'); |
|
| 180 | + if (preg_match_all(',<link[^>]+type=.text/css[^>]*>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 181 | + foreach ($r[0] as $l) { |
|
| 182 | + preg_match("/href='([^']*)'/", str_replace('"', "'", $l), $m); |
|
| 183 | + $page = recuperer_url($m[1]); |
|
| 184 | + $page = $page['page'] ?? ''; |
|
| 185 | + $style .= "\n/* $l */\n" |
|
| 186 | + . str_replace('<', '', $page); |
|
| 187 | + } |
|
| 188 | + } |
|
| 189 | + // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? |
|
| 190 | + $t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t)); |
|
| 191 | + |
|
| 192 | + return (!$style ? '' : "\n<style>" . $style . '</style>') . $t; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | * @return string Code HTML des balises `<param>` |
| 203 | 203 | **/ |
| 204 | 204 | function filtre_audio_x_pn_realaudio($id) { |
| 205 | - return " |
|
| 205 | + return " |
|
| 206 | 206 | <param name='controls' value='PositionSlider' /> |
| 207 | 207 | <param name='controls' value='ImageWindow' /> |
| 208 | 208 | <param name='controls' value='PlayButton' /> |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 23 | - return; |
|
| 23 | + return; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | include_spip('inc/config'); |
@@ -32,31 +32,31 @@ discard block |
||
| 32 | 32 | * @return array|false |
| 33 | 33 | */ |
| 34 | 34 | function cvtconf_formulaire_charger($flux) { |
| 35 | - if ( |
|
| 36 | - $form = $flux['args']['form'] |
|
| 37 | - and strncmp($form, 'configurer_', 11) == 0 // un #FORMULAIRE_CONFIGURER_XXX |
|
| 38 | - ) { |
|
| 39 | - // Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé |
|
| 40 | - include_spip('inc/autoriser'); |
|
| 41 | - if (!autoriser('configurer', '_' . substr($form, 11))) { |
|
| 42 | - return false; |
|
| 43 | - } |
|
| 35 | + if ( |
|
| 36 | + $form = $flux['args']['form'] |
|
| 37 | + and strncmp($form, 'configurer_', 11) == 0 // un #FORMULAIRE_CONFIGURER_XXX |
|
| 38 | + ) { |
|
| 39 | + // Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé |
|
| 40 | + include_spip('inc/autoriser'); |
|
| 41 | + if (!autoriser('configurer', '_' . substr($form, 11))) { |
|
| 42 | + return false; |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - // S'il n'y a pas de fonction charger(), on génère un contexte automatiquement |
|
| 46 | - if (!charger_fonction('charger', "formulaires/$form/", true)) { |
|
| 47 | - $flux['data'] = cvtconf_formulaires_configurer_recense($form); |
|
| 48 | - $flux['data']['editable'] = true; |
|
| 49 | - if (_request('var_mode') == 'configurer' and autoriser('webmestre')) { |
|
| 50 | - if (!_AJAX) { |
|
| 51 | - var_dump($flux['data']); |
|
| 52 | - } |
|
| 53 | - // reinjecter pour la trace au traitement |
|
| 54 | - $flux['data']['_hidden'] = "<input type='hidden' name='var_mode' value='configurer' />"; |
|
| 55 | - } |
|
| 56 | - } |
|
| 57 | - } |
|
| 45 | + // S'il n'y a pas de fonction charger(), on génère un contexte automatiquement |
|
| 46 | + if (!charger_fonction('charger', "formulaires/$form/", true)) { |
|
| 47 | + $flux['data'] = cvtconf_formulaires_configurer_recense($form); |
|
| 48 | + $flux['data']['editable'] = true; |
|
| 49 | + if (_request('var_mode') == 'configurer' and autoriser('webmestre')) { |
|
| 50 | + if (!_AJAX) { |
|
| 51 | + var_dump($flux['data']); |
|
| 52 | + } |
|
| 53 | + // reinjecter pour la trace au traitement |
|
| 54 | + $flux['data']['_hidden'] = "<input type='hidden' name='var_mode' value='configurer' />"; |
|
| 55 | + } |
|
| 56 | + } |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - return $flux; |
|
| 59 | + return $flux; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -66,16 +66,16 @@ discard block |
||
| 66 | 66 | * @return array |
| 67 | 67 | */ |
| 68 | 68 | function cvtconf_formulaire_traiter($flux) { |
| 69 | - if ( |
|
| 70 | - $form = $flux['args']['form'] |
|
| 71 | - and strncmp($form, 'configurer_', 11) == 0 // un #FORMULAIRE_CONFIGURER_XXX |
|
| 72 | - and !charger_fonction('traiter', "formulaires/$form/", true) // sans fonction traiter() |
|
| 73 | - ) { |
|
| 74 | - $trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']); |
|
| 75 | - $flux['data'] = ['message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true]; |
|
| 76 | - } |
|
| 69 | + if ( |
|
| 70 | + $form = $flux['args']['form'] |
|
| 71 | + and strncmp($form, 'configurer_', 11) == 0 // un #FORMULAIRE_CONFIGURER_XXX |
|
| 72 | + and !charger_fonction('traiter', "formulaires/$form/", true) // sans fonction traiter() |
|
| 73 | + ) { |
|
| 74 | + $trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']); |
|
| 75 | + $flux['data'] = ['message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true]; |
|
| 76 | + } |
|
| 77 | 77 | |
| 78 | - return $flux; |
|
| 78 | + return $flux; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -91,32 +91,32 @@ discard block |
||
| 91 | 91 | * @return string |
| 92 | 92 | */ |
| 93 | 93 | function cvtconf_formulaires_configurer_enregistre($form, $args) { |
| 94 | - $valeurs = []; |
|
| 95 | - // charger les valeurs |
|
| 96 | - // ce qui permet de prendre en charge une fonction charger() existante |
|
| 97 | - // qui prend alors la main sur l'auto detection |
|
| 98 | - if ($charger_valeurs = charger_fonction('charger', "formulaires/$form/", true)) { |
|
| 99 | - $valeurs = $charger_valeurs(...$args); |
|
| 100 | - } |
|
| 101 | - $valeurs = pipeline( |
|
| 102 | - 'formulaire_charger', |
|
| 103 | - [ |
|
| 104 | - 'args' => ['form' => $form, 'args' => $args, 'je_suis_poste' => false], |
|
| 105 | - 'data' => $valeurs |
|
| 106 | - ] |
|
| 107 | - ); |
|
| 108 | - // ne pas stocker editable ! |
|
| 109 | - unset($valeurs['editable']); |
|
| 94 | + $valeurs = []; |
|
| 95 | + // charger les valeurs |
|
| 96 | + // ce qui permet de prendre en charge une fonction charger() existante |
|
| 97 | + // qui prend alors la main sur l'auto detection |
|
| 98 | + if ($charger_valeurs = charger_fonction('charger', "formulaires/$form/", true)) { |
|
| 99 | + $valeurs = $charger_valeurs(...$args); |
|
| 100 | + } |
|
| 101 | + $valeurs = pipeline( |
|
| 102 | + 'formulaire_charger', |
|
| 103 | + [ |
|
| 104 | + 'args' => ['form' => $form, 'args' => $args, 'je_suis_poste' => false], |
|
| 105 | + 'data' => $valeurs |
|
| 106 | + ] |
|
| 107 | + ); |
|
| 108 | + // ne pas stocker editable ! |
|
| 109 | + unset($valeurs['editable']); |
|
| 110 | 110 | |
| 111 | - // recuperer les valeurs postees |
|
| 112 | - $store = []; |
|
| 113 | - foreach ($valeurs as $k => $v) { |
|
| 114 | - if (substr($k, 0, 1) !== '_') { |
|
| 115 | - $store[$k] = _request($k); |
|
| 116 | - } |
|
| 117 | - } |
|
| 111 | + // recuperer les valeurs postees |
|
| 112 | + $store = []; |
|
| 113 | + foreach ($valeurs as $k => $v) { |
|
| 114 | + if (substr($k, 0, 1) !== '_') { |
|
| 115 | + $store[$k] = _request($k); |
|
| 116 | + } |
|
| 117 | + } |
|
| 118 | 118 | |
| 119 | - return cvtconf_configurer_stocker($form, $valeurs, $store); |
|
| 119 | + return cvtconf_configurer_stocker($form, $valeurs, $store); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -132,31 +132,31 @@ discard block |
||
| 132 | 132 | * @return array |
| 133 | 133 | */ |
| 134 | 134 | function cvtconf_definir_configurer_conteneur($form, $valeurs) { |
| 135 | - // stocker en base |
|
| 136 | - // par defaut, dans un casier serialize dans spip_meta (idem CFG) |
|
| 137 | - $casier = substr($form, 11); |
|
| 138 | - $table = 'meta'; |
|
| 139 | - $prefixe = ''; |
|
| 140 | - $stockage = ''; |
|
| 135 | + // stocker en base |
|
| 136 | + // par defaut, dans un casier serialize dans spip_meta (idem CFG) |
|
| 137 | + $casier = substr($form, 11); |
|
| 138 | + $table = 'meta'; |
|
| 139 | + $prefixe = ''; |
|
| 140 | + $stockage = ''; |
|
| 141 | 141 | |
| 142 | - if (isset($valeurs['_meta_casier'])) { |
|
| 143 | - $casier = $valeurs['_meta_casier']; |
|
| 144 | - } |
|
| 145 | - if (isset($valeurs['_meta_prefixe'])) { |
|
| 146 | - $prefixe = $valeurs['_meta_prefixe']; |
|
| 147 | - } |
|
| 148 | - if (isset($valeurs['_meta_stockage'])) { |
|
| 149 | - $stockage = $valeurs['_meta_stockage'] . '::'; |
|
| 150 | - } |
|
| 142 | + if (isset($valeurs['_meta_casier'])) { |
|
| 143 | + $casier = $valeurs['_meta_casier']; |
|
| 144 | + } |
|
| 145 | + if (isset($valeurs['_meta_prefixe'])) { |
|
| 146 | + $prefixe = $valeurs['_meta_prefixe']; |
|
| 147 | + } |
|
| 148 | + if (isset($valeurs['_meta_stockage'])) { |
|
| 149 | + $stockage = $valeurs['_meta_stockage'] . '::'; |
|
| 150 | + } |
|
| 151 | 151 | |
| 152 | - // si on indique juste une table, il faut vider les autres proprietes |
|
| 153 | - // car par defaut on utilise ni casier ni prefixe dans ce cas |
|
| 154 | - if (isset($valeurs['_meta_table'])) { |
|
| 155 | - $table = $valeurs['_meta_table']; |
|
| 156 | - $casier = ($valeurs['_meta_casier'] ?? ''); |
|
| 157 | - } |
|
| 152 | + // si on indique juste une table, il faut vider les autres proprietes |
|
| 153 | + // car par defaut on utilise ni casier ni prefixe dans ce cas |
|
| 154 | + if (isset($valeurs['_meta_table'])) { |
|
| 155 | + $table = $valeurs['_meta_table']; |
|
| 156 | + $casier = ($valeurs['_meta_casier'] ?? ''); |
|
| 157 | + } |
|
| 158 | 158 | |
| 159 | - return [$table, $casier, $prefixe, $stockage]; |
|
| 159 | + return [$table, $casier, $prefixe, $stockage]; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -167,48 +167,48 @@ discard block |
||
| 167 | 167 | * @return array |
| 168 | 168 | */ |
| 169 | 169 | function cvtconf_formulaires_configurer_recense($form) { |
| 170 | - $valeurs = ['editable' => ' ']; |
|
| 170 | + $valeurs = ['editable' => ' ']; |
|
| 171 | 171 | |
| 172 | - // sinon cas analyse du squelette |
|
| 173 | - if ( |
|
| 174 | - $f = find_in_path($form . '.' . _EXTENSION_SQUELETTES, 'formulaires/') |
|
| 175 | - and lire_fichier($f, $contenu) |
|
| 176 | - ) { |
|
| 177 | - for ($i = 0; $i < 2; $i++) { |
|
| 178 | - // a la seconde iteration, evaluer le fond avec les valeurs deja trouvees |
|
| 179 | - // permet de trouver aussi les name="#GET{truc}" |
|
| 180 | - if ($i == 1) { |
|
| 181 | - $contenu = recuperer_fond("formulaires/$form", $valeurs); |
|
| 182 | - } |
|
| 172 | + // sinon cas analyse du squelette |
|
| 173 | + if ( |
|
| 174 | + $f = find_in_path($form . '.' . _EXTENSION_SQUELETTES, 'formulaires/') |
|
| 175 | + and lire_fichier($f, $contenu) |
|
| 176 | + ) { |
|
| 177 | + for ($i = 0; $i < 2; $i++) { |
|
| 178 | + // a la seconde iteration, evaluer le fond avec les valeurs deja trouvees |
|
| 179 | + // permet de trouver aussi les name="#GET{truc}" |
|
| 180 | + if ($i == 1) { |
|
| 181 | + $contenu = recuperer_fond("formulaires/$form", $valeurs); |
|
| 182 | + } |
|
| 183 | 183 | |
| 184 | - $balises = array_merge( |
|
| 185 | - extraire_balises($contenu, 'input'), |
|
| 186 | - extraire_balises($contenu, 'textarea'), |
|
| 187 | - extraire_balises($contenu, 'select') |
|
| 188 | - ); |
|
| 184 | + $balises = array_merge( |
|
| 185 | + extraire_balises($contenu, 'input'), |
|
| 186 | + extraire_balises($contenu, 'textarea'), |
|
| 187 | + extraire_balises($contenu, 'select') |
|
| 188 | + ); |
|
| 189 | 189 | |
| 190 | - foreach ($balises as $b) { |
|
| 191 | - if ( |
|
| 192 | - $n = extraire_attribut($b, 'name') |
|
| 193 | - and preg_match(',^([\w\-]+)(\[\w*\])?$,', $n, $r) |
|
| 194 | - and !in_array($n, ['formulaire_action', 'formulaire_action_args', 'formulaire_action_sign']) |
|
| 195 | - and extraire_attribut($b, 'type') !== 'submit' |
|
| 196 | - ) { |
|
| 197 | - $valeurs[$r[1]] = ''; |
|
| 198 | - // recuperer les valeurs _meta_xx qui peuvent etre fournies |
|
| 199 | - // en input hidden dans le squelette |
|
| 200 | - if (strncmp($r[1], '_meta_', 6) == 0) { |
|
| 201 | - $valeurs[$r[1]] = extraire_attribut($b, 'value'); |
|
| 202 | - } |
|
| 203 | - } |
|
| 204 | - } |
|
| 205 | - } |
|
| 206 | - } |
|
| 190 | + foreach ($balises as $b) { |
|
| 191 | + if ( |
|
| 192 | + $n = extraire_attribut($b, 'name') |
|
| 193 | + and preg_match(',^([\w\-]+)(\[\w*\])?$,', $n, $r) |
|
| 194 | + and !in_array($n, ['formulaire_action', 'formulaire_action_args', 'formulaire_action_sign']) |
|
| 195 | + and extraire_attribut($b, 'type') !== 'submit' |
|
| 196 | + ) { |
|
| 197 | + $valeurs[$r[1]] = ''; |
|
| 198 | + // recuperer les valeurs _meta_xx qui peuvent etre fournies |
|
| 199 | + // en input hidden dans le squelette |
|
| 200 | + if (strncmp($r[1], '_meta_', 6) == 0) { |
|
| 201 | + $valeurs[$r[1]] = extraire_attribut($b, 'value'); |
|
| 202 | + } |
|
| 203 | + } |
|
| 204 | + } |
|
| 205 | + } |
|
| 206 | + } |
|
| 207 | 207 | |
| 208 | 208 | |
| 209 | - cvtconf_configurer_lire_meta($form, $valeurs); |
|
| 209 | + cvtconf_configurer_lire_meta($form, $valeurs); |
|
| 210 | 210 | |
| 211 | - return $valeurs; |
|
| 211 | + return $valeurs; |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | /** |
@@ -220,26 +220,26 @@ discard block |
||
| 220 | 220 | * @return string |
| 221 | 221 | */ |
| 222 | 222 | function cvtconf_configurer_stocker($form, $valeurs, $store) { |
| 223 | - $trace = ''; |
|
| 224 | - [$table, $casier, $prefixe, $stockage] = cvtconf_definir_configurer_conteneur($form, $valeurs); |
|
| 225 | - // stocker en base |
|
| 226 | - // par defaut, dans un casier serialize dans spip_meta (idem CFG) |
|
| 227 | - if (!isset($GLOBALS[$table])) { |
|
| 228 | - lire_metas($table); |
|
| 229 | - } |
|
| 223 | + $trace = ''; |
|
| 224 | + [$table, $casier, $prefixe, $stockage] = cvtconf_definir_configurer_conteneur($form, $valeurs); |
|
| 225 | + // stocker en base |
|
| 226 | + // par defaut, dans un casier serialize dans spip_meta (idem CFG) |
|
| 227 | + if (!isset($GLOBALS[$table])) { |
|
| 228 | + lire_metas($table); |
|
| 229 | + } |
|
| 230 | 230 | |
| 231 | - $prefixe = ($prefixe ? $prefixe . '_' : ''); |
|
| 232 | - $table = ($table) ? "/$table/" : ''; |
|
| 233 | - $casier = ($casier) ? rtrim($casier, '/') . '/' : ''; // slash final, sinon rien |
|
| 231 | + $prefixe = ($prefixe ? $prefixe . '_' : ''); |
|
| 232 | + $table = ($table) ? "/$table/" : ''; |
|
| 233 | + $casier = ($casier) ? rtrim($casier, '/') . '/' : ''; // slash final, sinon rien |
|
| 234 | 234 | |
| 235 | - foreach ($store as $k => $v) { |
|
| 236 | - ecrire_config("$stockage$table$prefixe$casier$k", $v); |
|
| 237 | - if (_request('var_mode') == 'configurer' and autoriser('webmestre')) { |
|
| 238 | - $trace .= "<br />table $table : " . $prefixe . $k . " = $v;"; |
|
| 239 | - } |
|
| 240 | - } |
|
| 235 | + foreach ($store as $k => $v) { |
|
| 236 | + ecrire_config("$stockage$table$prefixe$casier$k", $v); |
|
| 237 | + if (_request('var_mode') == 'configurer' and autoriser('webmestre')) { |
|
| 238 | + $trace .= "<br />table $table : " . $prefixe . $k . " = $v;"; |
|
| 239 | + } |
|
| 240 | + } |
|
| 241 | 241 | |
| 242 | - return $trace; |
|
| 242 | + return $trace; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | /** |
@@ -249,21 +249,21 @@ discard block |
||
| 249 | 249 | * @param array $valeurs |
| 250 | 250 | */ |
| 251 | 251 | function cvtconf_configurer_lire_meta($form, &$valeurs) { |
| 252 | - [$table, $casier, $prefixe, $stockage] = cvtconf_definir_configurer_conteneur($form, $valeurs); |
|
| 252 | + [$table, $casier, $prefixe, $stockage] = cvtconf_definir_configurer_conteneur($form, $valeurs); |
|
| 253 | 253 | |
| 254 | - $table = ($table) ? "/$table/" : ''; |
|
| 255 | - $prefixe = ($prefixe ? $prefixe . '_' : ''); |
|
| 256 | - if ($casier) { |
|
| 257 | - $meta = lire_config("$stockage$table$prefixe$casier"); |
|
| 258 | - $prefixe = ''; |
|
| 259 | - } else { |
|
| 260 | - $table = rtrim($table, '/'); |
|
| 261 | - $meta = lire_config("$stockage$table"); |
|
| 262 | - } |
|
| 254 | + $table = ($table) ? "/$table/" : ''; |
|
| 255 | + $prefixe = ($prefixe ? $prefixe . '_' : ''); |
|
| 256 | + if ($casier) { |
|
| 257 | + $meta = lire_config("$stockage$table$prefixe$casier"); |
|
| 258 | + $prefixe = ''; |
|
| 259 | + } else { |
|
| 260 | + $table = rtrim($table, '/'); |
|
| 261 | + $meta = lire_config("$stockage$table"); |
|
| 262 | + } |
|
| 263 | 263 | |
| 264 | - foreach ($valeurs as $k => $v) { |
|
| 265 | - if (substr($k, 0, 1) !== '_') { |
|
| 266 | - $valeurs[$k] = ($meta[$prefixe . $k] ?? null); |
|
| 267 | - } |
|
| 268 | - } |
|
| 264 | + foreach ($valeurs as $k => $v) { |
|
| 265 | + if (substr($k, 0, 1) !== '_') { |
|
| 266 | + $valeurs[$k] = ($meta[$prefixe . $k] ?? null); |
|
| 267 | + } |
|
| 268 | + } |
|
| 269 | 269 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/charsets'); |
@@ -32,13 +32,13 @@ discard block |
||
| 32 | 32 | * @return string |
| 33 | 33 | */ |
| 34 | 34 | function exporter_csv_champ($champ) { |
| 35 | - #$champ = str_replace("\r", "\n", $champ); |
|
| 36 | - #$champ = preg_replace(",[\n]+,ms", "\n", $champ); |
|
| 37 | - #$champ = str_replace("\n", ", ", $champ); |
|
| 38 | - $champ = preg_replace(',[\s]+,ms', ' ', $champ); |
|
| 39 | - $champ = str_replace('"', '""', $champ); |
|
| 35 | + #$champ = str_replace("\r", "\n", $champ); |
|
| 36 | + #$champ = preg_replace(",[\n]+,ms", "\n", $champ); |
|
| 37 | + #$champ = str_replace("\n", ", ", $champ); |
|
| 38 | + $champ = preg_replace(',[\s]+,ms', ' ', $champ); |
|
| 39 | + $champ = str_replace('"', '""', $champ); |
|
| 40 | 40 | |
| 41 | - return '"' . $champ . '"'; |
|
| 41 | + return '"' . $champ . '"'; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -55,15 +55,15 @@ discard block |
||
| 55 | 55 | * @return string |
| 56 | 56 | */ |
| 57 | 57 | function exporter_csv_ligne_numerotee($nb, $ligne, $delim = ',', $importer_charset = null, ?callable $callback = null) { |
| 58 | - if ($callback) { |
|
| 59 | - $ligne = $callback($nb, $ligne, $delim, $importer_charset); |
|
| 60 | - } |
|
| 61 | - $output = join($delim, array_map('exporter_csv_champ', $ligne)) . "\r\n"; |
|
| 62 | - if ($importer_charset) { |
|
| 63 | - $output = str_replace('’', '\'', $output); |
|
| 64 | - $output = unicode2charset(html2unicode(charset2unicode($output)), $importer_charset); |
|
| 65 | - } |
|
| 66 | - return $output; |
|
| 58 | + if ($callback) { |
|
| 59 | + $ligne = $callback($nb, $ligne, $delim, $importer_charset); |
|
| 60 | + } |
|
| 61 | + $output = join($delim, array_map('exporter_csv_champ', $ligne)) . "\r\n"; |
|
| 62 | + if ($importer_charset) { |
|
| 63 | + $output = str_replace('’', '\'', $output); |
|
| 64 | + $output = unicode2charset(html2unicode(charset2unicode($output)), $importer_charset); |
|
| 65 | + } |
|
| 66 | + return $output; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * @return string |
| 76 | 76 | */ |
| 77 | 77 | function exporter_csv_ligne($ligne, $delim = ',', $importer_charset = null) { |
| 78 | - return exporter_csv_ligne_numerotee(null, $ligne, $delim, $importer_charset); |
|
| 78 | + return exporter_csv_ligne_numerotee(null, $ligne, $delim, $importer_charset); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -101,101 +101,101 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | function inc_exporter_csv_dist($titre, $resource, $options = []) { |
| 103 | 103 | |
| 104 | - // support ancienne syntaxe |
|
| 105 | - // inc_exporter_csv_dist($titre, $resource, $delim = ', ', $entetes = null, $envoyer = true) |
|
| 106 | - if (is_string($options)) { |
|
| 107 | - $args = func_get_args(); |
|
| 108 | - $options = []; |
|
| 109 | - foreach ([2 => 'delim', 3 => 'entetes', 4 => 'envoyer'] as $k => $option) { |
|
| 110 | - if (!empty($args[$k])) { |
|
| 111 | - $options[$option] = $args[$k]; |
|
| 112 | - } |
|
| 113 | - } |
|
| 114 | - } |
|
| 115 | - |
|
| 116 | - $default_options = [ |
|
| 117 | - 'delim' => ', ', |
|
| 118 | - 'entetes' => null, |
|
| 119 | - 'envoyer' => true, |
|
| 120 | - 'charset' => null, |
|
| 121 | - 'callback' => null, |
|
| 122 | - ]; |
|
| 123 | - $options = array_merge($default_options, $options); |
|
| 124 | - |
|
| 125 | - $filename = preg_replace(',[^-_\w]+,', '_', translitteration(textebrut(typo($titre)))); |
|
| 126 | - |
|
| 127 | - if ($options['delim'] == 'TAB') { |
|
| 128 | - $options['delim'] = "\t"; |
|
| 129 | - } |
|
| 130 | - if (!in_array($options['delim'], [',', ';', "\t"])) { |
|
| 131 | - $options['delim'] = ','; |
|
| 132 | - } |
|
| 133 | - |
|
| 134 | - $charset = $GLOBALS['meta']['charset']; |
|
| 135 | - $importer_charset = null; |
|
| 136 | - if ($options['delim'] == ',') { |
|
| 137 | - $extension = 'csv'; |
|
| 138 | - } else { |
|
| 139 | - $extension = 'xls'; |
|
| 140 | - # Excel n'accepte pas l'utf-8 ni les entites html... on transcode tout ce qu'on peut |
|
| 141 | - $charset = 'iso-8859-1'; |
|
| 142 | - } |
|
| 143 | - // mais si une option charset est explicite, elle a la priorite |
|
| 144 | - if (!empty($options['charset'])) { |
|
| 145 | - $charset = $options['charset']; |
|
| 146 | - } |
|
| 147 | - |
|
| 148 | - $importer_charset = (($charset === $GLOBALS['meta']['charset']) ? null : $charset); |
|
| 149 | - |
|
| 150 | - $filename = "$filename.$extension"; |
|
| 151 | - |
|
| 152 | - $output = ''; |
|
| 153 | - $nb = 0; |
|
| 154 | - if (!empty($options['entetes']) and is_array($options['entetes'])) { |
|
| 155 | - $output = exporter_csv_ligne_numerotee($nb, $options['entetes'], $options['delim'], $importer_charset, $options['callback']); |
|
| 156 | - } |
|
| 157 | - // les donnees commencent toujours a la ligne 1, qu'il y ait ou non des entetes |
|
| 158 | - $nb++; |
|
| 159 | - |
|
| 160 | - if ($options['envoyer']) { |
|
| 161 | - $disposition = ($options['envoyer'] === 'attachment' ? 'attachment' : 'inline'); |
|
| 162 | - header("Content-Type: text/comma-separated-values; charset=$charset"); |
|
| 163 | - header("Content-Disposition: $disposition; filename=$filename"); |
|
| 164 | - |
|
| 165 | - // Vider tous les tampons |
|
| 166 | - $level = @ob_get_level(); |
|
| 167 | - while ($level--) { |
|
| 168 | - @ob_end_flush(); |
|
| 169 | - } |
|
| 170 | - } |
|
| 171 | - |
|
| 172 | - // si envoyer=='attachment' on passe par un fichier temporaire |
|
| 173 | - // sinon on ecrit directement sur stdout |
|
| 174 | - if ($options['envoyer'] and $options['envoyer'] !== 'attachment') { |
|
| 175 | - $fichier = 'php://output'; |
|
| 176 | - } |
|
| 177 | - else { |
|
| 178 | - $fichier = sous_repertoire(_DIR_CACHE, 'export') . $filename; |
|
| 179 | - } |
|
| 180 | - |
|
| 181 | - $fp = fopen($fichier, 'w'); |
|
| 182 | - $length = fwrite($fp, $output); |
|
| 183 | - |
|
| 184 | - while ($row = is_array($resource) ? array_shift($resource) : sql_fetch($resource)) { |
|
| 185 | - $output = exporter_csv_ligne_numerotee($nb, $row, $options['delim'], $importer_charset, $options['callback']); |
|
| 186 | - $length += fwrite($fp, $output); |
|
| 187 | - $nb++; |
|
| 188 | - } |
|
| 189 | - fclose($fp); |
|
| 190 | - |
|
| 191 | - if ($options['envoyer']) { |
|
| 192 | - if ($options['envoyer'] === 'attachment') { |
|
| 193 | - header("Content-Length: $length"); |
|
| 194 | - readfile($fichier); |
|
| 195 | - } |
|
| 196 | - // si on a envoye inline, c'est deja tout bon |
|
| 197 | - exit; |
|
| 198 | - } |
|
| 199 | - |
|
| 200 | - return $fichier; |
|
| 104 | + // support ancienne syntaxe |
|
| 105 | + // inc_exporter_csv_dist($titre, $resource, $delim = ', ', $entetes = null, $envoyer = true) |
|
| 106 | + if (is_string($options)) { |
|
| 107 | + $args = func_get_args(); |
|
| 108 | + $options = []; |
|
| 109 | + foreach ([2 => 'delim', 3 => 'entetes', 4 => 'envoyer'] as $k => $option) { |
|
| 110 | + if (!empty($args[$k])) { |
|
| 111 | + $options[$option] = $args[$k]; |
|
| 112 | + } |
|
| 113 | + } |
|
| 114 | + } |
|
| 115 | + |
|
| 116 | + $default_options = [ |
|
| 117 | + 'delim' => ', ', |
|
| 118 | + 'entetes' => null, |
|
| 119 | + 'envoyer' => true, |
|
| 120 | + 'charset' => null, |
|
| 121 | + 'callback' => null, |
|
| 122 | + ]; |
|
| 123 | + $options = array_merge($default_options, $options); |
|
| 124 | + |
|
| 125 | + $filename = preg_replace(',[^-_\w]+,', '_', translitteration(textebrut(typo($titre)))); |
|
| 126 | + |
|
| 127 | + if ($options['delim'] == 'TAB') { |
|
| 128 | + $options['delim'] = "\t"; |
|
| 129 | + } |
|
| 130 | + if (!in_array($options['delim'], [',', ';', "\t"])) { |
|
| 131 | + $options['delim'] = ','; |
|
| 132 | + } |
|
| 133 | + |
|
| 134 | + $charset = $GLOBALS['meta']['charset']; |
|
| 135 | + $importer_charset = null; |
|
| 136 | + if ($options['delim'] == ',') { |
|
| 137 | + $extension = 'csv'; |
|
| 138 | + } else { |
|
| 139 | + $extension = 'xls'; |
|
| 140 | + # Excel n'accepte pas l'utf-8 ni les entites html... on transcode tout ce qu'on peut |
|
| 141 | + $charset = 'iso-8859-1'; |
|
| 142 | + } |
|
| 143 | + // mais si une option charset est explicite, elle a la priorite |
|
| 144 | + if (!empty($options['charset'])) { |
|
| 145 | + $charset = $options['charset']; |
|
| 146 | + } |
|
| 147 | + |
|
| 148 | + $importer_charset = (($charset === $GLOBALS['meta']['charset']) ? null : $charset); |
|
| 149 | + |
|
| 150 | + $filename = "$filename.$extension"; |
|
| 151 | + |
|
| 152 | + $output = ''; |
|
| 153 | + $nb = 0; |
|
| 154 | + if (!empty($options['entetes']) and is_array($options['entetes'])) { |
|
| 155 | + $output = exporter_csv_ligne_numerotee($nb, $options['entetes'], $options['delim'], $importer_charset, $options['callback']); |
|
| 156 | + } |
|
| 157 | + // les donnees commencent toujours a la ligne 1, qu'il y ait ou non des entetes |
|
| 158 | + $nb++; |
|
| 159 | + |
|
| 160 | + if ($options['envoyer']) { |
|
| 161 | + $disposition = ($options['envoyer'] === 'attachment' ? 'attachment' : 'inline'); |
|
| 162 | + header("Content-Type: text/comma-separated-values; charset=$charset"); |
|
| 163 | + header("Content-Disposition: $disposition; filename=$filename"); |
|
| 164 | + |
|
| 165 | + // Vider tous les tampons |
|
| 166 | + $level = @ob_get_level(); |
|
| 167 | + while ($level--) { |
|
| 168 | + @ob_end_flush(); |
|
| 169 | + } |
|
| 170 | + } |
|
| 171 | + |
|
| 172 | + // si envoyer=='attachment' on passe par un fichier temporaire |
|
| 173 | + // sinon on ecrit directement sur stdout |
|
| 174 | + if ($options['envoyer'] and $options['envoyer'] !== 'attachment') { |
|
| 175 | + $fichier = 'php://output'; |
|
| 176 | + } |
|
| 177 | + else { |
|
| 178 | + $fichier = sous_repertoire(_DIR_CACHE, 'export') . $filename; |
|
| 179 | + } |
|
| 180 | + |
|
| 181 | + $fp = fopen($fichier, 'w'); |
|
| 182 | + $length = fwrite($fp, $output); |
|
| 183 | + |
|
| 184 | + while ($row = is_array($resource) ? array_shift($resource) : sql_fetch($resource)) { |
|
| 185 | + $output = exporter_csv_ligne_numerotee($nb, $row, $options['delim'], $importer_charset, $options['callback']); |
|
| 186 | + $length += fwrite($fp, $output); |
|
| 187 | + $nb++; |
|
| 188 | + } |
|
| 189 | + fclose($fp); |
|
| 190 | + |
|
| 191 | + if ($options['envoyer']) { |
|
| 192 | + if ($options['envoyer'] === 'attachment') { |
|
| 193 | + header("Content-Length: $length"); |
|
| 194 | + readfile($fichier); |
|
| 195 | + } |
|
| 196 | + // si on a envoye inline, c'est deja tout bon |
|
| 197 | + exit; |
|
| 198 | + } |
|
| 199 | + |
|
| 200 | + return $fichier; |
|
| 201 | 201 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | /** |
@@ -21,31 +21,31 @@ discard block |
||
| 21 | 21 | * @return array |
| 22 | 22 | */ |
| 23 | 23 | function plugins_extraire_boutons_dist($arbre) { |
| 24 | - $les_boutons = null; |
|
| 25 | - $ret = ['bouton' => [], 'onglet' => []]; |
|
| 26 | - // recuperer les boutons et onglets si necessaire |
|
| 27 | - spip_xml_match_nodes(',^(bouton|onglet)\s,', $arbre, $les_boutons); |
|
| 28 | - if (is_array($les_boutons) && count($les_boutons)) { |
|
| 29 | - $ret['bouton'] = []; |
|
| 30 | - $ret['onglet'] = []; |
|
| 31 | - foreach ($les_boutons as $bouton => $val) { |
|
| 32 | - $bouton = spip_xml_decompose_tag($bouton); |
|
| 33 | - $type = reset($bouton); |
|
| 34 | - $bouton = end($bouton); |
|
| 35 | - if (isset($bouton['id'])) { |
|
| 36 | - $id = $bouton['id']; |
|
| 37 | - $val = reset($val); |
|
| 38 | - if (is_array($val)) { |
|
| 39 | - $ret[$type][$id]['parent'] = $bouton['parent'] ?? ''; |
|
| 40 | - $ret[$type][$id]['position'] = $bouton['position'] ?? ''; |
|
| 41 | - $ret[$type][$id]['titre'] = isset($val['titre']) ? trim(spip_xml_aplatit($val['titre'])) : ''; |
|
| 42 | - $ret[$type][$id]['icone'] = isset($val['icone']) ? trim(end($val['icone'])) : ''; |
|
| 43 | - $ret[$type][$id]['action'] = isset($val['url']) ? trim(end($val['url'])) : ''; |
|
| 44 | - $ret[$type][$id]['parametres'] = isset($val['args']) ? trim(end($val['args'])) : ''; |
|
| 45 | - } |
|
| 46 | - } |
|
| 47 | - } |
|
| 48 | - } |
|
| 24 | + $les_boutons = null; |
|
| 25 | + $ret = ['bouton' => [], 'onglet' => []]; |
|
| 26 | + // recuperer les boutons et onglets si necessaire |
|
| 27 | + spip_xml_match_nodes(',^(bouton|onglet)\s,', $arbre, $les_boutons); |
|
| 28 | + if (is_array($les_boutons) && count($les_boutons)) { |
|
| 29 | + $ret['bouton'] = []; |
|
| 30 | + $ret['onglet'] = []; |
|
| 31 | + foreach ($les_boutons as $bouton => $val) { |
|
| 32 | + $bouton = spip_xml_decompose_tag($bouton); |
|
| 33 | + $type = reset($bouton); |
|
| 34 | + $bouton = end($bouton); |
|
| 35 | + if (isset($bouton['id'])) { |
|
| 36 | + $id = $bouton['id']; |
|
| 37 | + $val = reset($val); |
|
| 38 | + if (is_array($val)) { |
|
| 39 | + $ret[$type][$id]['parent'] = $bouton['parent'] ?? ''; |
|
| 40 | + $ret[$type][$id]['position'] = $bouton['position'] ?? ''; |
|
| 41 | + $ret[$type][$id]['titre'] = isset($val['titre']) ? trim(spip_xml_aplatit($val['titre'])) : ''; |
|
| 42 | + $ret[$type][$id]['icone'] = isset($val['icone']) ? trim(end($val['icone'])) : ''; |
|
| 43 | + $ret[$type][$id]['action'] = isset($val['url']) ? trim(end($val['url'])) : ''; |
|
| 44 | + $ret[$type][$id]['parametres'] = isset($val['args']) ? trim(end($val['args'])) : ''; |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | + } |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - return $ret; |
|
| 50 | + return $ret; |
|
| 51 | 51 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Notifications |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | |
@@ -33,16 +33,16 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | function inc_notifications_dist($quoi, $id = 0, $options = []) { |
| 35 | 35 | |
| 36 | - // charger les fichiers qui veulent ajouter des definitions |
|
| 37 | - // ou faire des trucs aussi dans le pipeline, ca fait deux api pour le prix d'une ... |
|
| 38 | - pipeline('notifications', ['args' => ['quoi' => $quoi, 'id' => $id, 'options' => $options]]); |
|
| 36 | + // charger les fichiers qui veulent ajouter des definitions |
|
| 37 | + // ou faire des trucs aussi dans le pipeline, ca fait deux api pour le prix d'une ... |
|
| 38 | + pipeline('notifications', ['args' => ['quoi' => $quoi, 'id' => $id, 'options' => $options]]); |
|
| 39 | 39 | |
| 40 | - if ($notification = charger_fonction($quoi, 'notifications', true)) { |
|
| 41 | - spip_log("$notification($quoi,$id" |
|
| 42 | - . ($options ? ',' . serialize($options) : '') |
|
| 43 | - . ')', 'notifications'); |
|
| 44 | - $notification($quoi, $id, $options); |
|
| 45 | - } |
|
| 40 | + if ($notification = charger_fonction($quoi, 'notifications', true)) { |
|
| 41 | + spip_log("$notification($quoi,$id" |
|
| 42 | + . ($options ? ',' . serialize($options) : '') |
|
| 43 | + . ')', 'notifications'); |
|
| 44 | + $notification($quoi, $id, $options); |
|
| 45 | + } |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -56,15 +56,15 @@ discard block |
||
| 56 | 56 | * @param array $exclure |
| 57 | 57 | */ |
| 58 | 58 | function notifications_nettoyer_emails(&$emails, $exclure = []) { |
| 59 | - // filtrer et unifier |
|
| 60 | - include_spip('inc/filtres'); |
|
| 61 | - $emails = array_unique(array_filter(array_map('email_valide', array_map('trim', $emails)))); |
|
| 62 | - if ($exclure and count($exclure)) { |
|
| 63 | - // nettoyer les exclusions d'abord |
|
| 64 | - notifications_nettoyer_emails($exclure); |
|
| 65 | - // faire un diff |
|
| 66 | - $emails = array_diff($emails, $exclure); |
|
| 67 | - } |
|
| 59 | + // filtrer et unifier |
|
| 60 | + include_spip('inc/filtres'); |
|
| 61 | + $emails = array_unique(array_filter(array_map('email_valide', array_map('trim', $emails)))); |
|
| 62 | + if ($exclure and count($exclure)) { |
|
| 63 | + // nettoyer les exclusions d'abord |
|
| 64 | + notifications_nettoyer_emails($exclure); |
|
| 65 | + // faire un diff |
|
| 66 | + $emails = array_diff($emails, $exclure); |
|
| 67 | + } |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -79,90 +79,90 @@ discard block |
||
| 79 | 79 | * @param string $headers |
| 80 | 80 | */ |
| 81 | 81 | function notifications_envoyer_mails($emails, $texte, $sujet = '', $from = '', $headers = '') { |
| 82 | - // rien a faire si pas de texte ! |
|
| 83 | - if (!strlen($texte)) { |
|
| 84 | - return; |
|
| 85 | - } |
|
| 86 | - |
|
| 87 | - // si on ne specifie qu'un email, le mettre dans un tableau |
|
| 88 | - if (!is_array($emails)) { |
|
| 89 | - $emails = explode(',', $emails); |
|
| 90 | - } |
|
| 91 | - |
|
| 92 | - notifications_nettoyer_emails($emails); |
|
| 93 | - |
|
| 94 | - // tester si le mail est deja en html |
|
| 95 | - if ( |
|
| 96 | - strpos($texte, '<') !== false // eviter les tests suivants si possible |
|
| 97 | - and $ttrim = trim($texte) |
|
| 98 | - and substr($ttrim, 0, 1) == '<' |
|
| 99 | - and substr($ttrim, -1, 1) == '>' |
|
| 100 | - and stripos($ttrim, '</html>') !== false |
|
| 101 | - ) { |
|
| 102 | - if (!strlen($sujet)) { |
|
| 103 | - // dans ce cas on ruse un peu : extraire le sujet du title |
|
| 104 | - if (preg_match(',<title>(.*)</title>,Uims', $texte, $m)) { |
|
| 105 | - $sujet = $m[1]; |
|
| 106 | - } else { |
|
| 107 | - // fallback, on prend le body si on le trouve |
|
| 108 | - if (preg_match(',<body[^>]*>(.*)</body>,Uims', $texte, $m)) { |
|
| 109 | - $ttrim = $m[1]; |
|
| 110 | - } |
|
| 111 | - |
|
| 112 | - // et on extrait la premiere ligne de vrai texte... |
|
| 113 | - // nettoyer le html et les retours chariots |
|
| 114 | - $ttrim = textebrut($ttrim); |
|
| 115 | - $ttrim = str_replace("\r\n", "\r", $ttrim); |
|
| 116 | - $ttrim = str_replace("\r", "\n", $ttrim); |
|
| 117 | - // decouper |
|
| 118 | - $ttrim = explode("\n", trim($ttrim)); |
|
| 119 | - // extraire la premiere ligne de texte brut |
|
| 120 | - $sujet = array_shift($ttrim); |
|
| 121 | - } |
|
| 122 | - } |
|
| 123 | - |
|
| 124 | - // si besoin on ajoute le content-type dans les headers |
|
| 125 | - if (stripos($headers, 'Content-Type') === false) { |
|
| 126 | - $headers .= "Content-Type: text/html\n"; |
|
| 127 | - } |
|
| 128 | - } |
|
| 129 | - |
|
| 130 | - // si le sujet est vide, extraire la premiere ligne du corps |
|
| 131 | - // du mail qui est donc du texte |
|
| 132 | - if (!strlen($sujet)) { |
|
| 133 | - // nettoyer un peu les retours chariots |
|
| 134 | - $texte = str_replace("\r\n", "\r", $texte); |
|
| 135 | - $texte = str_replace("\r", "\n", $texte); |
|
| 136 | - // decouper |
|
| 137 | - $texte = explode("\n", trim($texte)); |
|
| 138 | - // extraire la premiere ligne |
|
| 139 | - $sujet = array_shift($texte); |
|
| 140 | - $texte = trim(implode("\n", $texte)); |
|
| 141 | - } |
|
| 142 | - |
|
| 143 | - $envoyer_mail = charger_fonction('envoyer_mail', 'inc'); |
|
| 144 | - foreach ($emails as $email) { |
|
| 145 | - // passer dans un pipeline qui permet un ajout eventuel |
|
| 146 | - // (url de suivi des notifications par exemple) |
|
| 147 | - $envoi = pipeline( |
|
| 148 | - 'notifications_envoyer_mails', |
|
| 149 | - [ |
|
| 150 | - 'email' => $email, |
|
| 151 | - 'sujet' => $sujet, |
|
| 152 | - 'texte' => $texte, |
|
| 153 | - 'from' => $from, |
|
| 154 | - 'headers' => $headers, |
|
| 155 | - ] |
|
| 156 | - ); |
|
| 157 | - $email = $envoi['email']; |
|
| 158 | - |
|
| 159 | - job_queue_add( |
|
| 160 | - 'envoyer_mail', |
|
| 161 | - ">$email : " . $envoi['sujet'], |
|
| 162 | - [$email, $envoi['sujet'], $envoi['texte'], $envoi['from'], $envoi['headers']], |
|
| 163 | - 'inc/' |
|
| 164 | - ); |
|
| 165 | - } |
|
| 82 | + // rien a faire si pas de texte ! |
|
| 83 | + if (!strlen($texte)) { |
|
| 84 | + return; |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + // si on ne specifie qu'un email, le mettre dans un tableau |
|
| 88 | + if (!is_array($emails)) { |
|
| 89 | + $emails = explode(',', $emails); |
|
| 90 | + } |
|
| 91 | + |
|
| 92 | + notifications_nettoyer_emails($emails); |
|
| 93 | + |
|
| 94 | + // tester si le mail est deja en html |
|
| 95 | + if ( |
|
| 96 | + strpos($texte, '<') !== false // eviter les tests suivants si possible |
|
| 97 | + and $ttrim = trim($texte) |
|
| 98 | + and substr($ttrim, 0, 1) == '<' |
|
| 99 | + and substr($ttrim, -1, 1) == '>' |
|
| 100 | + and stripos($ttrim, '</html>') !== false |
|
| 101 | + ) { |
|
| 102 | + if (!strlen($sujet)) { |
|
| 103 | + // dans ce cas on ruse un peu : extraire le sujet du title |
|
| 104 | + if (preg_match(',<title>(.*)</title>,Uims', $texte, $m)) { |
|
| 105 | + $sujet = $m[1]; |
|
| 106 | + } else { |
|
| 107 | + // fallback, on prend le body si on le trouve |
|
| 108 | + if (preg_match(',<body[^>]*>(.*)</body>,Uims', $texte, $m)) { |
|
| 109 | + $ttrim = $m[1]; |
|
| 110 | + } |
|
| 111 | + |
|
| 112 | + // et on extrait la premiere ligne de vrai texte... |
|
| 113 | + // nettoyer le html et les retours chariots |
|
| 114 | + $ttrim = textebrut($ttrim); |
|
| 115 | + $ttrim = str_replace("\r\n", "\r", $ttrim); |
|
| 116 | + $ttrim = str_replace("\r", "\n", $ttrim); |
|
| 117 | + // decouper |
|
| 118 | + $ttrim = explode("\n", trim($ttrim)); |
|
| 119 | + // extraire la premiere ligne de texte brut |
|
| 120 | + $sujet = array_shift($ttrim); |
|
| 121 | + } |
|
| 122 | + } |
|
| 123 | + |
|
| 124 | + // si besoin on ajoute le content-type dans les headers |
|
| 125 | + if (stripos($headers, 'Content-Type') === false) { |
|
| 126 | + $headers .= "Content-Type: text/html\n"; |
|
| 127 | + } |
|
| 128 | + } |
|
| 129 | + |
|
| 130 | + // si le sujet est vide, extraire la premiere ligne du corps |
|
| 131 | + // du mail qui est donc du texte |
|
| 132 | + if (!strlen($sujet)) { |
|
| 133 | + // nettoyer un peu les retours chariots |
|
| 134 | + $texte = str_replace("\r\n", "\r", $texte); |
|
| 135 | + $texte = str_replace("\r", "\n", $texte); |
|
| 136 | + // decouper |
|
| 137 | + $texte = explode("\n", trim($texte)); |
|
| 138 | + // extraire la premiere ligne |
|
| 139 | + $sujet = array_shift($texte); |
|
| 140 | + $texte = trim(implode("\n", $texte)); |
|
| 141 | + } |
|
| 142 | + |
|
| 143 | + $envoyer_mail = charger_fonction('envoyer_mail', 'inc'); |
|
| 144 | + foreach ($emails as $email) { |
|
| 145 | + // passer dans un pipeline qui permet un ajout eventuel |
|
| 146 | + // (url de suivi des notifications par exemple) |
|
| 147 | + $envoi = pipeline( |
|
| 148 | + 'notifications_envoyer_mails', |
|
| 149 | + [ |
|
| 150 | + 'email' => $email, |
|
| 151 | + 'sujet' => $sujet, |
|
| 152 | + 'texte' => $texte, |
|
| 153 | + 'from' => $from, |
|
| 154 | + 'headers' => $headers, |
|
| 155 | + ] |
|
| 156 | + ); |
|
| 157 | + $email = $envoi['email']; |
|
| 158 | + |
|
| 159 | + job_queue_add( |
|
| 160 | + 'envoyer_mail', |
|
| 161 | + ">$email : " . $envoi['sujet'], |
|
| 162 | + [$email, $envoi['sujet'], $envoi['texte'], $envoi['from'], $envoi['headers']], |
|
| 163 | + 'inc/' |
|
| 164 | + ); |
|
| 165 | + } |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /** |
@@ -178,10 +178,10 @@ discard block |
||
| 178 | 178 | * @return string |
| 179 | 179 | */ |
| 180 | 180 | function email_notification_objet($id_objet, $type_objet, $modele) { |
| 181 | - $envoyer_mail = charger_fonction('envoyer_mail', 'inc'); // pour nettoyer_titre_email |
|
| 182 | - $id_type = id_table_objet($type_objet); |
|
| 181 | + $envoyer_mail = charger_fonction('envoyer_mail', 'inc'); // pour nettoyer_titre_email |
|
| 182 | + $id_type = id_table_objet($type_objet); |
|
| 183 | 183 | |
| 184 | - return recuperer_fond($modele, [$id_type => $id_objet, 'id' => $id_objet]); |
|
| 184 | + return recuperer_fond($modele, [$id_type => $id_objet, 'id' => $id_objet]); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * @return string |
| 197 | 197 | */ |
| 198 | 198 | function email_notification_article($id_article, $modele) { |
| 199 | - $envoyer_mail = charger_fonction('envoyer_mail', 'inc'); // pour nettoyer_titre_email |
|
| 199 | + $envoyer_mail = charger_fonction('envoyer_mail', 'inc'); // pour nettoyer_titre_email |
|
| 200 | 200 | |
| 201 | - return recuperer_fond($modele, ['id_article' => $id_article]); |
|
| 201 | + return recuperer_fond($modele, ['id_article' => $id_article]); |
|
| 202 | 202 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/presentation'); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @uses exec_puce_statut_args() |
| 32 | 32 | **/ |
| 33 | 33 | function exec_puce_statut_dist(): void { |
| 34 | - exec_puce_statut_args(_request('id'), _request('type')); |
|
| 34 | + exec_puce_statut_args(_request('id'), _request('type')); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -50,26 +50,26 @@ discard block |
||
| 50 | 50 | * Type d'objet |
| 51 | 51 | **/ |
| 52 | 52 | function exec_puce_statut_args($id, $type): void { |
| 53 | - $id = intval($id); |
|
| 54 | - if ( |
|
| 55 | - $table_objet_sql = table_objet_sql($type) |
|
| 56 | - and $d = lister_tables_objets_sql($table_objet_sql) |
|
| 57 | - and isset($d['statut_textes_instituer']) |
|
| 58 | - and $d['statut_textes_instituer'] |
|
| 59 | - ) { |
|
| 60 | - $prim = id_table_objet($type); |
|
| 61 | - if (isset($d['field']['id_rubrique'])) { |
|
| 62 | - $select = 'id_rubrique,statut'; |
|
| 63 | - } else { |
|
| 64 | - $select = '0 as id_rubrique,statut'; |
|
| 65 | - } |
|
| 66 | - $r = sql_fetsel($select, $table_objet_sql, "$prim=$id"); |
|
| 67 | - $statut = $r['statut']; |
|
| 68 | - $id_rubrique = $r['id_rubrique']; |
|
| 69 | - } else { |
|
| 70 | - $id_rubrique = $id; |
|
| 71 | - $statut = 'prop'; // arbitraire |
|
| 72 | - } |
|
| 73 | - $puce_statut = charger_fonction('puce_statut', 'inc'); |
|
| 74 | - ajax_retour($puce_statut($id, $statut, $id_rubrique, $type, true)); |
|
| 53 | + $id = intval($id); |
|
| 54 | + if ( |
|
| 55 | + $table_objet_sql = table_objet_sql($type) |
|
| 56 | + and $d = lister_tables_objets_sql($table_objet_sql) |
|
| 57 | + and isset($d['statut_textes_instituer']) |
|
| 58 | + and $d['statut_textes_instituer'] |
|
| 59 | + ) { |
|
| 60 | + $prim = id_table_objet($type); |
|
| 61 | + if (isset($d['field']['id_rubrique'])) { |
|
| 62 | + $select = 'id_rubrique,statut'; |
|
| 63 | + } else { |
|
| 64 | + $select = '0 as id_rubrique,statut'; |
|
| 65 | + } |
|
| 66 | + $r = sql_fetsel($select, $table_objet_sql, "$prim=$id"); |
|
| 67 | + $statut = $r['statut']; |
|
| 68 | + $id_rubrique = $r['id_rubrique']; |
|
| 69 | + } else { |
|
| 70 | + $id_rubrique = $id; |
|
| 71 | + $statut = 'prop'; // arbitraire |
|
| 72 | + } |
|
| 73 | + $puce_statut = charger_fonction('puce_statut', 'inc'); |
|
| 74 | + ajax_retour($puce_statut($id, $statut, $id_rubrique, $type, true)); |
|
| 75 | 75 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | |
| 68 | 68 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 69 | - return; |
|
| 69 | + return; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -77,46 +77,46 @@ discard block |
||
| 77 | 77 | * @return array|false |
| 78 | 78 | */ |
| 79 | 79 | function cvtmulti_recuperer_post_precedents($form) { |
| 80 | - include_spip('inc/filtres'); |
|
| 81 | - if ( |
|
| 82 | - $form |
|
| 83 | - and $c = _request('cvtm_prev_post') |
|
| 84 | - and $c = decoder_contexte_ajax($c, $form) |
|
| 85 | - ) { |
|
| 86 | - #var_dump($c); |
|
| 80 | + include_spip('inc/filtres'); |
|
| 81 | + if ( |
|
| 82 | + $form |
|
| 83 | + and $c = _request('cvtm_prev_post') |
|
| 84 | + and $c = decoder_contexte_ajax($c, $form) |
|
| 85 | + ) { |
|
| 86 | + #var_dump($c); |
|
| 87 | 87 | |
| 88 | - # reinjecter dans la bonne variable pour permettre de retrouver |
|
| 89 | - # toutes les saisies dans un seul tableau |
|
| 90 | - if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 91 | - $store = &$_POST; |
|
| 92 | - } else { |
|
| 93 | - $store = &$_GET; |
|
| 94 | - } |
|
| 88 | + # reinjecter dans la bonne variable pour permettre de retrouver |
|
| 89 | + # toutes les saisies dans un seul tableau |
|
| 90 | + if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
|
| 91 | + $store = &$_POST; |
|
| 92 | + } else { |
|
| 93 | + $store = &$_GET; |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | - foreach ($c as $k => $v) { // on ecrase pas si saisi a nouveau ! |
|
| 97 | - if (!isset($store[$k])) { |
|
| 98 | - $_REQUEST[$k] = $store[$k] = $v; |
|
| 99 | - } // mais si tableau des deux cotes, on merge avec priorite a la derniere saisie |
|
| 100 | - elseif ( |
|
| 101 | - is_array($store[$k]) |
|
| 102 | - and is_array($v) |
|
| 103 | - and $z = array_keys($v) |
|
| 104 | - and !is_numeric(reset($z)) |
|
| 105 | - and $z = array_keys($store[$k]) |
|
| 106 | - and !is_numeric(reset($z)) |
|
| 107 | - ) { |
|
| 108 | - $_REQUEST[$k] = $store[$k] = array_merge($v, $store[$k]); |
|
| 109 | - } |
|
| 110 | - } |
|
| 96 | + foreach ($c as $k => $v) { // on ecrase pas si saisi a nouveau ! |
|
| 97 | + if (!isset($store[$k])) { |
|
| 98 | + $_REQUEST[$k] = $store[$k] = $v; |
|
| 99 | + } // mais si tableau des deux cotes, on merge avec priorite a la derniere saisie |
|
| 100 | + elseif ( |
|
| 101 | + is_array($store[$k]) |
|
| 102 | + and is_array($v) |
|
| 103 | + and $z = array_keys($v) |
|
| 104 | + and !is_numeric(reset($z)) |
|
| 105 | + and $z = array_keys($store[$k]) |
|
| 106 | + and !is_numeric(reset($z)) |
|
| 107 | + ) { |
|
| 108 | + $_REQUEST[$k] = $store[$k] = array_merge($v, $store[$k]); |
|
| 109 | + } |
|
| 110 | + } |
|
| 111 | 111 | |
| 112 | - // vider pour eviter un second appel a verifier_n |
|
| 113 | - // en cas de double implementation (unipotence) |
|
| 114 | - set_request('cvtm_prev_post'); |
|
| 112 | + // vider pour eviter un second appel a verifier_n |
|
| 113 | + // en cas de double implementation (unipotence) |
|
| 114 | + set_request('cvtm_prev_post'); |
|
| 115 | 115 | |
| 116 | - return [$c['_etape'], $c['_etapes']]; |
|
| 117 | - } |
|
| 116 | + return [$c['_etape'], $c['_etapes']]; |
|
| 117 | + } |
|
| 118 | 118 | |
| 119 | - return false; |
|
| 119 | + return false; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -129,28 +129,28 @@ discard block |
||
| 129 | 129 | * @return array |
| 130 | 130 | */ |
| 131 | 131 | function cvtmulti_sauver_post($form, $je_suis_poste, &$valeurs) { |
| 132 | - if (!isset($valeurs['_cvtm_prev_post'])) { |
|
| 133 | - $post = ['_etape' => $valeurs['_etape'], '_etapes' => $valeurs['_etapes']]; |
|
| 134 | - foreach (array_keys($valeurs) as $champ) { |
|
| 135 | - if (substr($champ, 0, 1) !== '_') { |
|
| 136 | - if ($je_suis_poste || (isset($valeurs['_forcer_request']) && $valeurs['_forcer_request'])) { |
|
| 137 | - if (($v = _request($champ)) !== null) { |
|
| 138 | - $post[$champ] = $v; |
|
| 139 | - } |
|
| 140 | - } |
|
| 141 | - } |
|
| 142 | - } |
|
| 143 | - include_spip('inc/filtres'); |
|
| 144 | - $c = encoder_contexte_ajax($post, $form); |
|
| 145 | - if (!isset($valeurs['_hidden'])) { |
|
| 146 | - $valeurs['_hidden'] = ''; |
|
| 147 | - } |
|
| 148 | - $valeurs['_hidden'] .= "<input type='hidden' name='cvtm_prev_post' value='$c' />"; |
|
| 149 | - // marquer comme fait, pour eviter double encodage (unipotence) |
|
| 150 | - $valeurs['_cvtm_prev_post'] = true; |
|
| 151 | - } |
|
| 132 | + if (!isset($valeurs['_cvtm_prev_post'])) { |
|
| 133 | + $post = ['_etape' => $valeurs['_etape'], '_etapes' => $valeurs['_etapes']]; |
|
| 134 | + foreach (array_keys($valeurs) as $champ) { |
|
| 135 | + if (substr($champ, 0, 1) !== '_') { |
|
| 136 | + if ($je_suis_poste || (isset($valeurs['_forcer_request']) && $valeurs['_forcer_request'])) { |
|
| 137 | + if (($v = _request($champ)) !== null) { |
|
| 138 | + $post[$champ] = $v; |
|
| 139 | + } |
|
| 140 | + } |
|
| 141 | + } |
|
| 142 | + } |
|
| 143 | + include_spip('inc/filtres'); |
|
| 144 | + $c = encoder_contexte_ajax($post, $form); |
|
| 145 | + if (!isset($valeurs['_hidden'])) { |
|
| 146 | + $valeurs['_hidden'] = ''; |
|
| 147 | + } |
|
| 148 | + $valeurs['_hidden'] .= "<input type='hidden' name='cvtm_prev_post' value='$c' />"; |
|
| 149 | + // marquer comme fait, pour eviter double encodage (unipotence) |
|
| 150 | + $valeurs['_cvtm_prev_post'] = true; |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | - return $valeurs; |
|
| 153 | + return $valeurs; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | |
@@ -164,14 +164,14 @@ discard block |
||
| 164 | 164 | * @return array |
| 165 | 165 | */ |
| 166 | 166 | function cvtmulti_formulaire_charger($flux) { |
| 167 | - if ( |
|
| 168 | - is_array($flux['data']) |
|
| 169 | - and isset($flux['data']['_etapes']) |
|
| 170 | - ) { |
|
| 171 | - $flux['data'] = cvtmulti_formulaire_charger_etapes($flux['args'], $flux['data']); |
|
| 172 | - } |
|
| 167 | + if ( |
|
| 168 | + is_array($flux['data']) |
|
| 169 | + and isset($flux['data']['_etapes']) |
|
| 170 | + ) { |
|
| 171 | + $flux['data'] = cvtmulti_formulaire_charger_etapes($flux['args'], $flux['data']); |
|
| 172 | + } |
|
| 173 | 173 | |
| 174 | - return $flux; |
|
| 174 | + return $flux; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | /** |
@@ -181,19 +181,19 @@ discard block |
||
| 181 | 181 | * @return array |
| 182 | 182 | */ |
| 183 | 183 | function cvtmulti_formulaire_charger_etapes($args, $valeurs) { |
| 184 | - if (!isset($valeurs['_etape'])) { |
|
| 185 | - $form = $args['form']; |
|
| 186 | - $je_suis_poste = $args['je_suis_poste']; |
|
| 187 | - $nb_etapes = $valeurs['_etapes']; |
|
| 188 | - $etape = _request('_etape'); |
|
| 189 | - $etape = min(max($etape, 1), $nb_etapes); |
|
| 190 | - set_request('_etape', $etape); |
|
| 191 | - $valeurs['_etape'] = $etape; |
|
| 184 | + if (!isset($valeurs['_etape'])) { |
|
| 185 | + $form = $args['form']; |
|
| 186 | + $je_suis_poste = $args['je_suis_poste']; |
|
| 187 | + $nb_etapes = $valeurs['_etapes']; |
|
| 188 | + $etape = _request('_etape'); |
|
| 189 | + $etape = min(max($etape, 1), $nb_etapes); |
|
| 190 | + set_request('_etape', $etape); |
|
| 191 | + $valeurs['_etape'] = $etape; |
|
| 192 | 192 | |
| 193 | - // sauver les posts de cette etape pour les avoir a la prochaine etape |
|
| 194 | - $valeurs = cvtmulti_sauver_post($form, $je_suis_poste, $valeurs); |
|
| 195 | - } |
|
| 196 | - return $valeurs; |
|
| 193 | + // sauver les posts de cette etape pour les avoir a la prochaine etape |
|
| 194 | + $valeurs = cvtmulti_sauver_post($form, $je_suis_poste, $valeurs); |
|
| 195 | + } |
|
| 196 | + return $valeurs; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | |
@@ -206,8 +206,8 @@ discard block |
||
| 206 | 206 | * @return array |
| 207 | 207 | */ |
| 208 | 208 | function cvtmulti_formulaire_verifier($flux) { |
| 209 | - $flux['data'] = cvtmulti_formulaire_verifier_etapes($flux['args'], $flux['data']); |
|
| 210 | - return $flux; |
|
| 209 | + $flux['data'] = cvtmulti_formulaire_verifier_etapes($flux['args'], $flux['data']); |
|
| 210 | + return $flux; |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | /** |
@@ -218,87 +218,87 @@ discard block |
||
| 218 | 218 | * @return array |
| 219 | 219 | */ |
| 220 | 220 | function cvtmulti_formulaire_verifier_etapes($args, $erreurs) { |
| 221 | - #var_dump('Pipe verifier'); |
|
| 221 | + #var_dump('Pipe verifier'); |
|
| 222 | 222 | |
| 223 | - if ( |
|
| 224 | - $form = $args['form'] |
|
| 225 | - and ($e = cvtmulti_recuperer_post_precedents($form)) !== false |
|
| 226 | - ) { |
|
| 227 | - // recuperer l'etape saisie et le nombre d'etapes total |
|
| 228 | - [$etape, $etapes] = $e; |
|
| 229 | - $etape_demandee = intval(_request('aller_a_etape')); // possibilite de poster un entier dans aller_a_etape |
|
| 223 | + if ( |
|
| 224 | + $form = $args['form'] |
|
| 225 | + and ($e = cvtmulti_recuperer_post_precedents($form)) !== false |
|
| 226 | + ) { |
|
| 227 | + // recuperer l'etape saisie et le nombre d'etapes total |
|
| 228 | + [$etape, $etapes] = $e; |
|
| 229 | + $etape_demandee = intval(_request('aller_a_etape')); // possibilite de poster un entier dans aller_a_etape |
|
| 230 | 230 | |
| 231 | - $args['etape_saisie'] = $etape; |
|
| 232 | - $args['etapes'] = $etapes; |
|
| 233 | - // lancer les verifs pour chaque etape deja saisie de 1 a $etape |
|
| 234 | - $erreurs_etapes = []; |
|
| 235 | - $derniere_etape_ok = 0; |
|
| 236 | - $e = 0; |
|
| 237 | - while ($e < max($etape, $etape_demandee - 1) and $e < $etapes) { |
|
| 238 | - $e++; |
|
| 239 | - $erreurs_etapes[$e] = []; |
|
| 240 | - if ($verifier = charger_fonction("verifier_$e", "formulaires/$form/", true)) { |
|
| 241 | - $erreurs_etapes[$e] = $verifier(...$args['args']); |
|
| 242 | - } elseif ($verifier = charger_fonction('verifier_etape', "formulaires/$form/", true)) { |
|
| 243 | - $a = $args['args']; |
|
| 244 | - array_unshift($a, $e); |
|
| 245 | - $erreurs_etapes[$e] = $verifier(...$a); |
|
| 246 | - } |
|
| 247 | - // et on appelle un pipeline dedie aux etapes, plus easy |
|
| 248 | - $args['etape'] = $e; |
|
| 249 | - $args['etape_demandee'] = $etape_demandee; |
|
| 250 | - $erreurs_etapes[$e] = pipeline( |
|
| 251 | - 'formulaire_verifier_etape', |
|
| 252 | - [ |
|
| 253 | - 'args' => $args, |
|
| 254 | - 'data' => $erreurs_etapes[$e] |
|
| 255 | - ] |
|
| 256 | - ); |
|
| 231 | + $args['etape_saisie'] = $etape; |
|
| 232 | + $args['etapes'] = $etapes; |
|
| 233 | + // lancer les verifs pour chaque etape deja saisie de 1 a $etape |
|
| 234 | + $erreurs_etapes = []; |
|
| 235 | + $derniere_etape_ok = 0; |
|
| 236 | + $e = 0; |
|
| 237 | + while ($e < max($etape, $etape_demandee - 1) and $e < $etapes) { |
|
| 238 | + $e++; |
|
| 239 | + $erreurs_etapes[$e] = []; |
|
| 240 | + if ($verifier = charger_fonction("verifier_$e", "formulaires/$form/", true)) { |
|
| 241 | + $erreurs_etapes[$e] = $verifier(...$args['args']); |
|
| 242 | + } elseif ($verifier = charger_fonction('verifier_etape', "formulaires/$form/", true)) { |
|
| 243 | + $a = $args['args']; |
|
| 244 | + array_unshift($a, $e); |
|
| 245 | + $erreurs_etapes[$e] = $verifier(...$a); |
|
| 246 | + } |
|
| 247 | + // et on appelle un pipeline dedie aux etapes, plus easy |
|
| 248 | + $args['etape'] = $e; |
|
| 249 | + $args['etape_demandee'] = $etape_demandee; |
|
| 250 | + $erreurs_etapes[$e] = pipeline( |
|
| 251 | + 'formulaire_verifier_etape', |
|
| 252 | + [ |
|
| 253 | + 'args' => $args, |
|
| 254 | + 'data' => $erreurs_etapes[$e] |
|
| 255 | + ] |
|
| 256 | + ); |
|
| 257 | 257 | |
| 258 | - if ($derniere_etape_ok == $e - 1 and !(is_countable($erreurs_etapes[$e]) ? count($erreurs_etapes[$e]) : 0)) { |
|
| 259 | - $derniere_etape_ok = $e; |
|
| 260 | - } |
|
| 261 | - // possibilite de poster dans _retour_etape_x ou aller_a_etape |
|
| 262 | - if (!is_null(_request("_retour_etape_$e"))) { |
|
| 263 | - $etape_demandee = $e; |
|
| 264 | - } |
|
| 265 | - // Il se peut que les verifications ait décidé de faire sauter des étapes |
|
| 266 | - if ($aller_a_etape = intval(_request('aller_a_etape'))) { |
|
| 267 | - $etape_demandee = $aller_a_etape; // possibilite de poster un entier dans aller_a_etape |
|
| 268 | - } |
|
| 269 | - } |
|
| 258 | + if ($derniere_etape_ok == $e - 1 and !(is_countable($erreurs_etapes[$e]) ? count($erreurs_etapes[$e]) : 0)) { |
|
| 259 | + $derniere_etape_ok = $e; |
|
| 260 | + } |
|
| 261 | + // possibilite de poster dans _retour_etape_x ou aller_a_etape |
|
| 262 | + if (!is_null(_request("_retour_etape_$e"))) { |
|
| 263 | + $etape_demandee = $e; |
|
| 264 | + } |
|
| 265 | + // Il se peut que les verifications ait décidé de faire sauter des étapes |
|
| 266 | + if ($aller_a_etape = intval(_request('aller_a_etape'))) { |
|
| 267 | + $etape_demandee = $aller_a_etape; // possibilite de poster un entier dans aller_a_etape |
|
| 268 | + } |
|
| 269 | + } |
|
| 270 | 270 | |
| 271 | 271 | |
| 272 | - // si la derniere etape OK etait la derniere |
|
| 273 | - // on renvoie le flux inchange et ca declenche traiter |
|
| 274 | - if ( |
|
| 275 | - $derniere_etape_ok == $etapes |
|
| 276 | - and (!$etape_demandee or $etape_demandee >= $etapes) |
|
| 277 | - ) { |
|
| 278 | - return $erreurs; |
|
| 279 | - } else { |
|
| 280 | - $etape = $derniere_etape_ok + 1; |
|
| 281 | - if ($etape_demandee > 0 and $etape_demandee < $etape) { |
|
| 282 | - $etape = $etape_demandee; |
|
| 283 | - } |
|
| 284 | - $etape = min($etape, $etapes); |
|
| 285 | - #var_dump("prochaine etape $etape"); |
|
| 286 | - // retourner les erreurs de l'etape ciblee |
|
| 287 | - $erreurs = $erreurs_etapes[$etape] ?? []; |
|
| 288 | - // Ne pas se tromper dans le texte du message d'erreur : la clé '_etapes' n'est pas une erreur ! |
|
| 289 | - if ($erreurs) { |
|
| 290 | - if (!isset($erreurs['message_erreur'])) { |
|
| 291 | - $erreurs['message_erreur'] = singulier_ou_pluriel(is_countable($erreurs) ? count($erreurs) : 0, 'avis_1_erreur_saisie', 'avis_nb_erreurs_saisie'); |
|
| 292 | - } |
|
| 293 | - } else { |
|
| 294 | - $erreurs['message_erreur'] = ''; |
|
| 295 | - } |
|
| 296 | - $erreurs['_etapes'] = "etape suivante $etape"; |
|
| 297 | - set_request('_etape', $etape); |
|
| 298 | - } |
|
| 299 | - } |
|
| 272 | + // si la derniere etape OK etait la derniere |
|
| 273 | + // on renvoie le flux inchange et ca declenche traiter |
|
| 274 | + if ( |
|
| 275 | + $derniere_etape_ok == $etapes |
|
| 276 | + and (!$etape_demandee or $etape_demandee >= $etapes) |
|
| 277 | + ) { |
|
| 278 | + return $erreurs; |
|
| 279 | + } else { |
|
| 280 | + $etape = $derniere_etape_ok + 1; |
|
| 281 | + if ($etape_demandee > 0 and $etape_demandee < $etape) { |
|
| 282 | + $etape = $etape_demandee; |
|
| 283 | + } |
|
| 284 | + $etape = min($etape, $etapes); |
|
| 285 | + #var_dump("prochaine etape $etape"); |
|
| 286 | + // retourner les erreurs de l'etape ciblee |
|
| 287 | + $erreurs = $erreurs_etapes[$etape] ?? []; |
|
| 288 | + // Ne pas se tromper dans le texte du message d'erreur : la clé '_etapes' n'est pas une erreur ! |
|
| 289 | + if ($erreurs) { |
|
| 290 | + if (!isset($erreurs['message_erreur'])) { |
|
| 291 | + $erreurs['message_erreur'] = singulier_ou_pluriel(is_countable($erreurs) ? count($erreurs) : 0, 'avis_1_erreur_saisie', 'avis_nb_erreurs_saisie'); |
|
| 292 | + } |
|
| 293 | + } else { |
|
| 294 | + $erreurs['message_erreur'] = ''; |
|
| 295 | + } |
|
| 296 | + $erreurs['_etapes'] = "etape suivante $etape"; |
|
| 297 | + set_request('_etape', $etape); |
|
| 298 | + } |
|
| 299 | + } |
|
| 300 | 300 | |
| 301 | - return $erreurs; |
|
| 301 | + return $erreurs; |
|
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
@@ -310,17 +310,17 @@ discard block |
||
| 310 | 310 | * @return array |
| 311 | 311 | */ |
| 312 | 312 | function cvtmulti_styliser($flux) { |
| 313 | - if ( |
|
| 314 | - strncmp($flux['args']['fond'], 'formulaires/', 12) == 0 |
|
| 315 | - and isset($flux['args']['contexte']['_etapes']) |
|
| 316 | - and isset($flux['args']['contexte']['_etape']) |
|
| 317 | - and ($e = $flux['args']['contexte']['_etape']) > 1 |
|
| 318 | - and $ext = $flux['args']['ext'] |
|
| 319 | - and $f = $flux['data'] |
|
| 320 | - and file_exists($f . "_$e.$ext") |
|
| 321 | - ) { |
|
| 322 | - $flux['data'] = $f . "_$e"; |
|
| 323 | - } |
|
| 313 | + if ( |
|
| 314 | + strncmp($flux['args']['fond'], 'formulaires/', 12) == 0 |
|
| 315 | + and isset($flux['args']['contexte']['_etapes']) |
|
| 316 | + and isset($flux['args']['contexte']['_etape']) |
|
| 317 | + and ($e = $flux['args']['contexte']['_etape']) > 1 |
|
| 318 | + and $ext = $flux['args']['ext'] |
|
| 319 | + and $f = $flux['data'] |
|
| 320 | + and file_exists($f . "_$e.$ext") |
|
| 321 | + ) { |
|
| 322 | + $flux['data'] = $f . "_$e"; |
|
| 323 | + } |
|
| 324 | 324 | |
| 325 | - return $flux; |
|
| 325 | + return $flux; |
|
| 326 | 326 | } |
@@ -9,384 +9,384 @@ |
||
| 9 | 9 | |
| 10 | 10 | $GLOBALS['CHARSET']['translit'] = [ |
| 11 | 11 | // latin [fausse plage] |
| 12 | - 128 => 'EUR', |
|
| 13 | - 131 => 'f', |
|
| 14 | - 140 => 'OE', |
|
| 15 | - 147 => '\'\'', |
|
| 16 | - 148 => '\'\'', |
|
| 17 | - 153 => '(TM)', |
|
| 18 | - 156 => 'oe', |
|
| 19 | - 159 => 'Y', |
|
| 12 | + 128 => 'EUR', |
|
| 13 | + 131 => 'f', |
|
| 14 | + 140 => 'OE', |
|
| 15 | + 147 => '\'\'', |
|
| 16 | + 148 => '\'\'', |
|
| 17 | + 153 => '(TM)', |
|
| 18 | + 156 => 'oe', |
|
| 19 | + 159 => 'Y', |
|
| 20 | 20 | |
| 21 | 21 | // latin [legal] |
| 22 | - 160 => ' ', |
|
| 23 | - 161 => '!', |
|
| 24 | - 162 => 'c', |
|
| 25 | - 163 => 'L', |
|
| 26 | - 164 => 'O', |
|
| 27 | - 165 => 'yen', |
|
| 28 | - 166 => '|', |
|
| 29 | - 167 => 'p', |
|
| 30 | - 169 => '(c)', |
|
| 31 | - 171 => '<<', |
|
| 32 | - 172 => '-', |
|
| 33 | - 173 => '-', |
|
| 34 | - 174 => '(R)', |
|
| 35 | - 176 => 'o', |
|
| 36 | - 177 => '+-', |
|
| 37 | - 181 => 'mu', |
|
| 38 | - 182 => 'p', |
|
| 39 | - 183 => '.', |
|
| 40 | - 186 => 'o ', |
|
| 41 | - 187 => '>>', |
|
| 42 | - 191 => '?', |
|
| 43 | - 192 => 'A', |
|
| 44 | - 193 => 'A', |
|
| 45 | - 194 => 'A', |
|
| 46 | - 195 => 'A', |
|
| 47 | - 196 => 'A', |
|
| 48 | - 197 => 'A', |
|
| 49 | - 198 => 'AE', |
|
| 50 | - 199 => 'C', |
|
| 51 | - 200 => 'E', |
|
| 52 | - 201 => 'E', |
|
| 53 | - 202 => 'E', |
|
| 54 | - 203 => 'E', |
|
| 55 | - 204 => 'I', |
|
| 56 | - 205 => 'I', |
|
| 57 | - 206 => 'I', |
|
| 58 | - 207 => 'I', |
|
| 59 | - 209 => 'N', |
|
| 60 | - 210 => 'O', |
|
| 61 | - 211 => 'O', |
|
| 62 | - 212 => 'O', |
|
| 63 | - 213 => 'O', |
|
| 64 | - 214 => 'O', |
|
| 65 | - 216 => 'O', |
|
| 66 | - 217 => 'U', |
|
| 67 | - 218 => 'U', |
|
| 68 | - 219 => 'U', |
|
| 69 | - 220 => 'U', |
|
| 70 | - 223 => 'ss', |
|
| 71 | - 224 => 'a', |
|
| 72 | - 225 => 'a', |
|
| 73 | - 226 => 'a', |
|
| 74 | - 227 => 'a', |
|
| 75 | - 228 => 'a', |
|
| 76 | - 229 => 'a', |
|
| 77 | - 230 => 'ae', |
|
| 78 | - 231 => 'c', |
|
| 79 | - 232 => 'e', |
|
| 80 | - 233 => 'e', |
|
| 81 | - 234 => 'e', |
|
| 82 | - 235 => 'e', |
|
| 83 | - 236 => 'i', |
|
| 84 | - 237 => 'i', |
|
| 85 | - 238 => 'i', |
|
| 86 | - 239 => 'i', |
|
| 87 | - 241 => 'n', |
|
| 88 | - 242 => 'o', |
|
| 89 | - 243 => 'o', |
|
| 90 | - 244 => 'o', |
|
| 91 | - 245 => 'o', |
|
| 92 | - 246 => 'o', |
|
| 93 | - 248 => 'o', |
|
| 94 | - 249 => 'u', |
|
| 95 | - 250 => 'u', |
|
| 96 | - 251 => 'u', |
|
| 97 | - 252 => 'u', |
|
| 98 | - 255 => 'y', |
|
| 22 | + 160 => ' ', |
|
| 23 | + 161 => '!', |
|
| 24 | + 162 => 'c', |
|
| 25 | + 163 => 'L', |
|
| 26 | + 164 => 'O', |
|
| 27 | + 165 => 'yen', |
|
| 28 | + 166 => '|', |
|
| 29 | + 167 => 'p', |
|
| 30 | + 169 => '(c)', |
|
| 31 | + 171 => '<<', |
|
| 32 | + 172 => '-', |
|
| 33 | + 173 => '-', |
|
| 34 | + 174 => '(R)', |
|
| 35 | + 176 => 'o', |
|
| 36 | + 177 => '+-', |
|
| 37 | + 181 => 'mu', |
|
| 38 | + 182 => 'p', |
|
| 39 | + 183 => '.', |
|
| 40 | + 186 => 'o ', |
|
| 41 | + 187 => '>>', |
|
| 42 | + 191 => '?', |
|
| 43 | + 192 => 'A', |
|
| 44 | + 193 => 'A', |
|
| 45 | + 194 => 'A', |
|
| 46 | + 195 => 'A', |
|
| 47 | + 196 => 'A', |
|
| 48 | + 197 => 'A', |
|
| 49 | + 198 => 'AE', |
|
| 50 | + 199 => 'C', |
|
| 51 | + 200 => 'E', |
|
| 52 | + 201 => 'E', |
|
| 53 | + 202 => 'E', |
|
| 54 | + 203 => 'E', |
|
| 55 | + 204 => 'I', |
|
| 56 | + 205 => 'I', |
|
| 57 | + 206 => 'I', |
|
| 58 | + 207 => 'I', |
|
| 59 | + 209 => 'N', |
|
| 60 | + 210 => 'O', |
|
| 61 | + 211 => 'O', |
|
| 62 | + 212 => 'O', |
|
| 63 | + 213 => 'O', |
|
| 64 | + 214 => 'O', |
|
| 65 | + 216 => 'O', |
|
| 66 | + 217 => 'U', |
|
| 67 | + 218 => 'U', |
|
| 68 | + 219 => 'U', |
|
| 69 | + 220 => 'U', |
|
| 70 | + 223 => 'ss', |
|
| 71 | + 224 => 'a', |
|
| 72 | + 225 => 'a', |
|
| 73 | + 226 => 'a', |
|
| 74 | + 227 => 'a', |
|
| 75 | + 228 => 'a', |
|
| 76 | + 229 => 'a', |
|
| 77 | + 230 => 'ae', |
|
| 78 | + 231 => 'c', |
|
| 79 | + 232 => 'e', |
|
| 80 | + 233 => 'e', |
|
| 81 | + 234 => 'e', |
|
| 82 | + 235 => 'e', |
|
| 83 | + 236 => 'i', |
|
| 84 | + 237 => 'i', |
|
| 85 | + 238 => 'i', |
|
| 86 | + 239 => 'i', |
|
| 87 | + 241 => 'n', |
|
| 88 | + 242 => 'o', |
|
| 89 | + 243 => 'o', |
|
| 90 | + 244 => 'o', |
|
| 91 | + 245 => 'o', |
|
| 92 | + 246 => 'o', |
|
| 93 | + 248 => 'o', |
|
| 94 | + 249 => 'u', |
|
| 95 | + 250 => 'u', |
|
| 96 | + 251 => 'u', |
|
| 97 | + 252 => 'u', |
|
| 98 | + 255 => 'y', |
|
| 99 | 99 | |
| 100 | 100 | // turc |
| 101 | - 286 => 'G', |
|
| 102 | - 287 => 'g', |
|
| 103 | - 304 => 'I', |
|
| 104 | - 305 => 'i', |
|
| 101 | + 286 => 'G', |
|
| 102 | + 287 => 'g', |
|
| 103 | + 304 => 'I', |
|
| 104 | + 305 => 'i', |
|
| 105 | 105 | |
| 106 | 106 | // esperanto |
| 107 | - 264 => 'Cx', |
|
| 108 | - 265 => 'cx', |
|
| 109 | - 284 => 'Gx', |
|
| 110 | - 285 => 'gx', |
|
| 111 | - 292 => 'Hx', |
|
| 112 | - 293 => 'hx', |
|
| 113 | - 308 => 'Jx', |
|
| 114 | - 309 => 'jx', |
|
| 115 | - 348 => 'Sx', |
|
| 116 | - 349 => 'sx', |
|
| 117 | - 364 => 'Ux', |
|
| 118 | - 365 => 'ux', |
|
| 107 | + 264 => 'Cx', |
|
| 108 | + 265 => 'cx', |
|
| 109 | + 284 => 'Gx', |
|
| 110 | + 285 => 'gx', |
|
| 111 | + 292 => 'Hx', |
|
| 112 | + 293 => 'hx', |
|
| 113 | + 308 => 'Jx', |
|
| 114 | + 309 => 'jx', |
|
| 115 | + 348 => 'Sx', |
|
| 116 | + 349 => 'sx', |
|
| 117 | + 364 => 'Ux', |
|
| 118 | + 365 => 'ux', |
|
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | // latin2 [Czech] |
| 122 | - 283 => 'e', |
|
| 123 | - 353 => 's', |
|
| 124 | - 269 => 'c', |
|
| 125 | - 345 => 'r', |
|
| 126 | - 382 => 'z', |
|
| 127 | - 367 => 'u', |
|
| 128 | - 328 => 'n', |
|
| 129 | - 357 => 't', |
|
| 130 | - 271 => 'd', |
|
| 131 | - 449 => 'o', |
|
| 132 | - 282 => 'E', |
|
| 133 | - 352 => 'S', |
|
| 134 | - 268 => 'C', |
|
| 135 | - 344 => 'R', |
|
| 136 | - 381 => 'Z', |
|
| 137 | - 366 => 'U', |
|
| 138 | - 327 => 'N', |
|
| 139 | - 356 => 'T', |
|
| 140 | - 270 => 'D', |
|
| 141 | - 467 => 'O', |
|
| 122 | + 283 => 'e', |
|
| 123 | + 353 => 's', |
|
| 124 | + 269 => 'c', |
|
| 125 | + 345 => 'r', |
|
| 126 | + 382 => 'z', |
|
| 127 | + 367 => 'u', |
|
| 128 | + 328 => 'n', |
|
| 129 | + 357 => 't', |
|
| 130 | + 271 => 'd', |
|
| 131 | + 449 => 'o', |
|
| 132 | + 282 => 'E', |
|
| 133 | + 352 => 'S', |
|
| 134 | + 268 => 'C', |
|
| 135 | + 344 => 'R', |
|
| 136 | + 381 => 'Z', |
|
| 137 | + 366 => 'U', |
|
| 138 | + 327 => 'N', |
|
| 139 | + 356 => 'T', |
|
| 140 | + 270 => 'D', |
|
| 141 | + 467 => 'O', |
|
| 142 | 142 | |
| 143 | 143 | // francais |
| 144 | - 338 => 'OE', |
|
| 145 | - 339 => 'oe', |
|
| 146 | - 376 => 'Y', |
|
| 147 | - 402 => 'f', |
|
| 144 | + 338 => 'OE', |
|
| 145 | + 339 => 'oe', |
|
| 146 | + 376 => 'Y', |
|
| 147 | + 402 => 'f', |
|
| 148 | 148 | |
| 149 | 149 | //polskie |
| 150 | - 260 => 'A', |
|
| 151 | - 261 => 'a', |
|
| 152 | - 262 => 'C', |
|
| 153 | - 263 => 'c', |
|
| 154 | - 280 => 'E', |
|
| 155 | - 281 => 'e', |
|
| 156 | - 321 => 'L', |
|
| 157 | - 322 => 'l', |
|
| 158 | - 323 => 'N', |
|
| 159 | - 324 => 'n', |
|
| 160 | - 346 => 'S', |
|
| 161 | - 347 => 's', |
|
| 162 | - 377 => 'Z', |
|
| 163 | - 378 => 'z', |
|
| 164 | - 379 => 'Z', |
|
| 165 | - 380 => 'z', |
|
| 150 | + 260 => 'A', |
|
| 151 | + 261 => 'a', |
|
| 152 | + 262 => 'C', |
|
| 153 | + 263 => 'c', |
|
| 154 | + 280 => 'E', |
|
| 155 | + 281 => 'e', |
|
| 156 | + 321 => 'L', |
|
| 157 | + 322 => 'l', |
|
| 158 | + 323 => 'N', |
|
| 159 | + 324 => 'n', |
|
| 160 | + 346 => 'S', |
|
| 161 | + 347 => 's', |
|
| 162 | + 377 => 'Z', |
|
| 163 | + 378 => 'z', |
|
| 164 | + 379 => 'Z', |
|
| 165 | + 380 => 'z', |
|
| 166 | 166 | |
| 167 | 167 | //roumain |
| 168 | - 258 => 'A', |
|
| 169 | - 259 => 'a', |
|
| 170 | - 354 => 'T', |
|
| 171 | - 355 => 't', |
|
| 168 | + 258 => 'A', |
|
| 169 | + 259 => 'a', |
|
| 170 | + 354 => 'T', |
|
| 171 | + 355 => 't', |
|
| 172 | 172 | |
| 173 | 173 | //turc & roumain |
| 174 | - 350 => 'S', |
|
| 175 | - 351 => 's', |
|
| 174 | + 350 => 'S', |
|
| 175 | + 351 => 's', |
|
| 176 | 176 | |
| 177 | 177 | // cyrillique |
| 178 | - 1026 => 'D%', |
|
| 179 | - 1027 => 'G%', |
|
| 180 | - 8218 => '\'', |
|
| 181 | - 1107 => 'g%', |
|
| 182 | - 8222 => '"', |
|
| 183 | - 8230 => '...', |
|
| 184 | - 8224 => '/-', |
|
| 185 | - 8225 => '/=', |
|
| 186 | - 8364 => 'EUR', |
|
| 187 | - 8240 => '0/00', |
|
| 188 | - 1033 => 'LJ', |
|
| 189 | - 8249 => '<', |
|
| 190 | - 1034 => 'NJ', |
|
| 191 | - 1036 => 'KJ', |
|
| 192 | - 1035 => 'Ts', |
|
| 193 | - 1039 => 'DZ', |
|
| 194 | - 1106 => 'd%', |
|
| 195 | - 8216 => '`', |
|
| 196 | - 8217 => '\'', |
|
| 197 | - 8220 => '"', |
|
| 198 | - 8221 => '"', |
|
| 199 | - 8226 => ' o ', |
|
| 200 | - 8211 => '-', |
|
| 201 | - 8212 => '~', |
|
| 202 | - 8482 => '(TM)', |
|
| 203 | - 1113 => 'lj', |
|
| 204 | - 8250 => '>', |
|
| 205 | - 1114 => 'nj', |
|
| 206 | - 1116 => 'kj', |
|
| 207 | - 1115 => 'ts', |
|
| 208 | - 1119 => 'dz', |
|
| 209 | - 1038 => 'V%', |
|
| 210 | - 1118 => 'v%', |
|
| 211 | - 1032 => 'J%', |
|
| 212 | - 1168 => 'G3', |
|
| 213 | - 1025 => 'IO', |
|
| 214 | - 1028 => 'IE', |
|
| 215 | - 1031 => 'YI', |
|
| 216 | - 1030 => 'II', |
|
| 217 | - 1110 => 'ii', |
|
| 218 | - 1169 => 'g3', |
|
| 219 | - 1105 => 'io', |
|
| 220 | - 8470 => 'No.', |
|
| 221 | - 1108 => 'ie', |
|
| 222 | - 1112 => 'j%', |
|
| 223 | - 1029 => 'DS', |
|
| 224 | - 1109 => 'ds', |
|
| 225 | - 1111 => 'yi', |
|
| 226 | - 1040 => 'A', |
|
| 227 | - 1041 => 'B', |
|
| 228 | - 1042 => 'V', |
|
| 229 | - 1043 => 'G', |
|
| 230 | - 1044 => 'D', |
|
| 231 | - 1045 => 'E', |
|
| 232 | - 1046 => 'ZH', |
|
| 233 | - 1047 => 'Z', |
|
| 234 | - 1048 => 'I', |
|
| 235 | - 1049 => 'J', |
|
| 236 | - 1050 => 'K', |
|
| 237 | - 1051 => 'L', |
|
| 238 | - 1052 => 'M', |
|
| 239 | - 1053 => 'N', |
|
| 240 | - 1054 => 'O', |
|
| 241 | - 1055 => 'P', |
|
| 242 | - 1056 => 'R', |
|
| 243 | - 1057 => 'S', |
|
| 244 | - 1058 => 'T', |
|
| 245 | - 1059 => 'U', |
|
| 246 | - 1060 => 'F', |
|
| 247 | - 1061 => 'H', |
|
| 248 | - 1062 => 'C', |
|
| 249 | - 1063 => 'CH', |
|
| 250 | - 1064 => 'SH', |
|
| 251 | - 1065 => 'SCH', |
|
| 252 | - 1066 => '"', |
|
| 253 | - 1067 => 'Y', |
|
| 254 | - 1068 => '\'', |
|
| 255 | - 1069 => '`E', |
|
| 256 | - 1070 => 'YU', |
|
| 257 | - 1071 => 'YA', |
|
| 258 | - 1072 => 'a', |
|
| 259 | - 1073 => 'b', |
|
| 260 | - 1074 => 'v', |
|
| 261 | - 1075 => 'g', |
|
| 262 | - 1076 => 'd', |
|
| 263 | - 1077 => 'e', |
|
| 264 | - 1078 => 'zh', |
|
| 265 | - 1079 => 'z', |
|
| 266 | - 1080 => 'i', |
|
| 267 | - 1081 => 'j', |
|
| 268 | - 1082 => 'k', |
|
| 269 | - 1083 => 'l', |
|
| 270 | - 1084 => 'm', |
|
| 271 | - 1085 => 'n', |
|
| 272 | - 1086 => 'o', |
|
| 273 | - 1087 => 'p', |
|
| 274 | - 1088 => 'r', |
|
| 275 | - 1089 => 's', |
|
| 276 | - 1090 => 't', |
|
| 277 | - 1091 => 'u', |
|
| 278 | - 1092 => 'f', |
|
| 279 | - 1093 => 'h', |
|
| 280 | - 1094 => 'c', |
|
| 281 | - 1095 => 'ch', |
|
| 282 | - 1096 => 'sh', |
|
| 283 | - 1097 => 'sch', |
|
| 284 | - 1098 => '"', |
|
| 285 | - 1099 => 'y', |
|
| 286 | - 1100 => '\'', |
|
| 287 | - 1101 => '`e', |
|
| 288 | - 1102 => 'yu', |
|
| 289 | - 1103 => 'ya', |
|
| 178 | + 1026 => 'D%', |
|
| 179 | + 1027 => 'G%', |
|
| 180 | + 8218 => '\'', |
|
| 181 | + 1107 => 'g%', |
|
| 182 | + 8222 => '"', |
|
| 183 | + 8230 => '...', |
|
| 184 | + 8224 => '/-', |
|
| 185 | + 8225 => '/=', |
|
| 186 | + 8364 => 'EUR', |
|
| 187 | + 8240 => '0/00', |
|
| 188 | + 1033 => 'LJ', |
|
| 189 | + 8249 => '<', |
|
| 190 | + 1034 => 'NJ', |
|
| 191 | + 1036 => 'KJ', |
|
| 192 | + 1035 => 'Ts', |
|
| 193 | + 1039 => 'DZ', |
|
| 194 | + 1106 => 'd%', |
|
| 195 | + 8216 => '`', |
|
| 196 | + 8217 => '\'', |
|
| 197 | + 8220 => '"', |
|
| 198 | + 8221 => '"', |
|
| 199 | + 8226 => ' o ', |
|
| 200 | + 8211 => '-', |
|
| 201 | + 8212 => '~', |
|
| 202 | + 8482 => '(TM)', |
|
| 203 | + 1113 => 'lj', |
|
| 204 | + 8250 => '>', |
|
| 205 | + 1114 => 'nj', |
|
| 206 | + 1116 => 'kj', |
|
| 207 | + 1115 => 'ts', |
|
| 208 | + 1119 => 'dz', |
|
| 209 | + 1038 => 'V%', |
|
| 210 | + 1118 => 'v%', |
|
| 211 | + 1032 => 'J%', |
|
| 212 | + 1168 => 'G3', |
|
| 213 | + 1025 => 'IO', |
|
| 214 | + 1028 => 'IE', |
|
| 215 | + 1031 => 'YI', |
|
| 216 | + 1030 => 'II', |
|
| 217 | + 1110 => 'ii', |
|
| 218 | + 1169 => 'g3', |
|
| 219 | + 1105 => 'io', |
|
| 220 | + 8470 => 'No.', |
|
| 221 | + 1108 => 'ie', |
|
| 222 | + 1112 => 'j%', |
|
| 223 | + 1029 => 'DS', |
|
| 224 | + 1109 => 'ds', |
|
| 225 | + 1111 => 'yi', |
|
| 226 | + 1040 => 'A', |
|
| 227 | + 1041 => 'B', |
|
| 228 | + 1042 => 'V', |
|
| 229 | + 1043 => 'G', |
|
| 230 | + 1044 => 'D', |
|
| 231 | + 1045 => 'E', |
|
| 232 | + 1046 => 'ZH', |
|
| 233 | + 1047 => 'Z', |
|
| 234 | + 1048 => 'I', |
|
| 235 | + 1049 => 'J', |
|
| 236 | + 1050 => 'K', |
|
| 237 | + 1051 => 'L', |
|
| 238 | + 1052 => 'M', |
|
| 239 | + 1053 => 'N', |
|
| 240 | + 1054 => 'O', |
|
| 241 | + 1055 => 'P', |
|
| 242 | + 1056 => 'R', |
|
| 243 | + 1057 => 'S', |
|
| 244 | + 1058 => 'T', |
|
| 245 | + 1059 => 'U', |
|
| 246 | + 1060 => 'F', |
|
| 247 | + 1061 => 'H', |
|
| 248 | + 1062 => 'C', |
|
| 249 | + 1063 => 'CH', |
|
| 250 | + 1064 => 'SH', |
|
| 251 | + 1065 => 'SCH', |
|
| 252 | + 1066 => '"', |
|
| 253 | + 1067 => 'Y', |
|
| 254 | + 1068 => '\'', |
|
| 255 | + 1069 => '`E', |
|
| 256 | + 1070 => 'YU', |
|
| 257 | + 1071 => 'YA', |
|
| 258 | + 1072 => 'a', |
|
| 259 | + 1073 => 'b', |
|
| 260 | + 1074 => 'v', |
|
| 261 | + 1075 => 'g', |
|
| 262 | + 1076 => 'd', |
|
| 263 | + 1077 => 'e', |
|
| 264 | + 1078 => 'zh', |
|
| 265 | + 1079 => 'z', |
|
| 266 | + 1080 => 'i', |
|
| 267 | + 1081 => 'j', |
|
| 268 | + 1082 => 'k', |
|
| 269 | + 1083 => 'l', |
|
| 270 | + 1084 => 'm', |
|
| 271 | + 1085 => 'n', |
|
| 272 | + 1086 => 'o', |
|
| 273 | + 1087 => 'p', |
|
| 274 | + 1088 => 'r', |
|
| 275 | + 1089 => 's', |
|
| 276 | + 1090 => 't', |
|
| 277 | + 1091 => 'u', |
|
| 278 | + 1092 => 'f', |
|
| 279 | + 1093 => 'h', |
|
| 280 | + 1094 => 'c', |
|
| 281 | + 1095 => 'ch', |
|
| 282 | + 1096 => 'sh', |
|
| 283 | + 1097 => 'sch', |
|
| 284 | + 1098 => '"', |
|
| 285 | + 1099 => 'y', |
|
| 286 | + 1100 => '\'', |
|
| 287 | + 1101 => '`e', |
|
| 288 | + 1102 => 'yu', |
|
| 289 | + 1103 => 'ya', |
|
| 290 | 290 | |
| 291 | 291 | // vietnamien en translitteration de base |
| 292 | - 7843 => 'a', |
|
| 293 | - 7841 => 'a', |
|
| 294 | - 7845 => 'a', |
|
| 295 | - 7847 => 'a', |
|
| 296 | - 7849 => 'a', |
|
| 297 | - 7851 => 'a', |
|
| 298 | - 7853 => 'a', |
|
| 299 | - 7855 => 'a', |
|
| 300 | - 7857 => 'a', |
|
| 301 | - 7859 => 'a', |
|
| 302 | - 7861 => 'a', |
|
| 303 | - 7863 => 'a', |
|
| 304 | - 7842 => 'A', |
|
| 305 | - 7840 => 'A', |
|
| 306 | - 7844 => 'A', |
|
| 307 | - 7846 => 'A', |
|
| 308 | - 7848 => 'A', |
|
| 309 | - 7850 => 'A', |
|
| 310 | - 7852 => 'A', |
|
| 311 | - 7854 => 'A', |
|
| 312 | - 7856 => 'A', |
|
| 313 | - 7858 => 'A', |
|
| 314 | - 7860 => 'A', |
|
| 315 | - 7862 => 'A', |
|
| 316 | - 7867 => 'e', |
|
| 317 | - 7869 => 'e', |
|
| 318 | - 7865 => 'e', |
|
| 319 | - 7871 => 'e', |
|
| 320 | - 7873 => 'e', |
|
| 321 | - 7875 => 'e', |
|
| 322 | - 7877 => 'e', |
|
| 323 | - 7879 => 'e', |
|
| 324 | - 7866 => 'E', |
|
| 325 | - 7868 => 'E', |
|
| 326 | - 7864 => 'E', |
|
| 327 | - 7870 => 'E', |
|
| 328 | - 7872 => 'E', |
|
| 329 | - 7874 => 'E', |
|
| 330 | - 7876 => 'E', |
|
| 331 | - 7878 => 'E', |
|
| 332 | - 7881 => 'i', |
|
| 333 | - 7883 => 'i', |
|
| 334 | - 7880 => 'I', |
|
| 335 | - 7882 => 'I', |
|
| 336 | - 7887 => 'o', |
|
| 337 | - 7885 => 'o', |
|
| 338 | - 7889 => 'o', |
|
| 339 | - 7891 => 'o', |
|
| 340 | - 7893 => 'o', |
|
| 341 | - 7895 => 'o', |
|
| 342 | - 7897 => 'o', |
|
| 343 | - 417 => 'o', |
|
| 344 | - 7899 => 'o', |
|
| 345 | - 7901 => 'o', |
|
| 346 | - 7903 => 'o', |
|
| 347 | - 7905 => 'o', |
|
| 348 | - 7907 => 'o', |
|
| 349 | - 7886 => 'O', |
|
| 350 | - 7884 => 'O', |
|
| 351 | - 7888 => 'O', |
|
| 352 | - 7890 => 'O', |
|
| 353 | - 7892 => 'O', |
|
| 354 | - 7894 => 'O', |
|
| 355 | - 7896 => 'O', |
|
| 356 | - 416 => 'O', |
|
| 357 | - 7898 => 'O', |
|
| 358 | - 7900 => 'O', |
|
| 359 | - 7902 => 'O', |
|
| 360 | - 7904 => 'O', |
|
| 361 | - 7906 => 'O', |
|
| 362 | - 7911 => 'u', |
|
| 363 | - 361 => 'u', |
|
| 364 | - 7909 => 'u', |
|
| 365 | - 432 => 'u', |
|
| 366 | - 7913 => 'u', |
|
| 367 | - 7915 => 'u', |
|
| 368 | - 7917 => 'u', |
|
| 369 | - 7919 => 'u', |
|
| 370 | - 7921 => 'u', |
|
| 371 | - 7910 => 'U', |
|
| 372 | - 360 => 'U', |
|
| 373 | - 7908 => 'U', |
|
| 374 | - 431 => 'U', |
|
| 375 | - 7912 => 'U', |
|
| 376 | - 7914 => 'U', |
|
| 377 | - 7916 => 'U', |
|
| 378 | - 7918 => 'U', |
|
| 379 | - 7920 => 'U', |
|
| 380 | - 253 => 'y', |
|
| 381 | - 7923 => 'y', |
|
| 382 | - 7927 => 'y', |
|
| 383 | - 7929 => 'y', |
|
| 384 | - 7925 => 'y', |
|
| 385 | - 221 => 'Y', |
|
| 386 | - 7922 => 'Y', |
|
| 387 | - 7926 => 'Y', |
|
| 388 | - 7928 => 'Y', |
|
| 389 | - 7924 => 'Y', |
|
| 390 | - 273 => 'd' |
|
| 292 | + 7843 => 'a', |
|
| 293 | + 7841 => 'a', |
|
| 294 | + 7845 => 'a', |
|
| 295 | + 7847 => 'a', |
|
| 296 | + 7849 => 'a', |
|
| 297 | + 7851 => 'a', |
|
| 298 | + 7853 => 'a', |
|
| 299 | + 7855 => 'a', |
|
| 300 | + 7857 => 'a', |
|
| 301 | + 7859 => 'a', |
|
| 302 | + 7861 => 'a', |
|
| 303 | + 7863 => 'a', |
|
| 304 | + 7842 => 'A', |
|
| 305 | + 7840 => 'A', |
|
| 306 | + 7844 => 'A', |
|
| 307 | + 7846 => 'A', |
|
| 308 | + 7848 => 'A', |
|
| 309 | + 7850 => 'A', |
|
| 310 | + 7852 => 'A', |
|
| 311 | + 7854 => 'A', |
|
| 312 | + 7856 => 'A', |
|
| 313 | + 7858 => 'A', |
|
| 314 | + 7860 => 'A', |
|
| 315 | + 7862 => 'A', |
|
| 316 | + 7867 => 'e', |
|
| 317 | + 7869 => 'e', |
|
| 318 | + 7865 => 'e', |
|
| 319 | + 7871 => 'e', |
|
| 320 | + 7873 => 'e', |
|
| 321 | + 7875 => 'e', |
|
| 322 | + 7877 => 'e', |
|
| 323 | + 7879 => 'e', |
|
| 324 | + 7866 => 'E', |
|
| 325 | + 7868 => 'E', |
|
| 326 | + 7864 => 'E', |
|
| 327 | + 7870 => 'E', |
|
| 328 | + 7872 => 'E', |
|
| 329 | + 7874 => 'E', |
|
| 330 | + 7876 => 'E', |
|
| 331 | + 7878 => 'E', |
|
| 332 | + 7881 => 'i', |
|
| 333 | + 7883 => 'i', |
|
| 334 | + 7880 => 'I', |
|
| 335 | + 7882 => 'I', |
|
| 336 | + 7887 => 'o', |
|
| 337 | + 7885 => 'o', |
|
| 338 | + 7889 => 'o', |
|
| 339 | + 7891 => 'o', |
|
| 340 | + 7893 => 'o', |
|
| 341 | + 7895 => 'o', |
|
| 342 | + 7897 => 'o', |
|
| 343 | + 417 => 'o', |
|
| 344 | + 7899 => 'o', |
|
| 345 | + 7901 => 'o', |
|
| 346 | + 7903 => 'o', |
|
| 347 | + 7905 => 'o', |
|
| 348 | + 7907 => 'o', |
|
| 349 | + 7886 => 'O', |
|
| 350 | + 7884 => 'O', |
|
| 351 | + 7888 => 'O', |
|
| 352 | + 7890 => 'O', |
|
| 353 | + 7892 => 'O', |
|
| 354 | + 7894 => 'O', |
|
| 355 | + 7896 => 'O', |
|
| 356 | + 416 => 'O', |
|
| 357 | + 7898 => 'O', |
|
| 358 | + 7900 => 'O', |
|
| 359 | + 7902 => 'O', |
|
| 360 | + 7904 => 'O', |
|
| 361 | + 7906 => 'O', |
|
| 362 | + 7911 => 'u', |
|
| 363 | + 361 => 'u', |
|
| 364 | + 7909 => 'u', |
|
| 365 | + 432 => 'u', |
|
| 366 | + 7913 => 'u', |
|
| 367 | + 7915 => 'u', |
|
| 368 | + 7917 => 'u', |
|
| 369 | + 7919 => 'u', |
|
| 370 | + 7921 => 'u', |
|
| 371 | + 7910 => 'U', |
|
| 372 | + 360 => 'U', |
|
| 373 | + 7908 => 'U', |
|
| 374 | + 431 => 'U', |
|
| 375 | + 7912 => 'U', |
|
| 376 | + 7914 => 'U', |
|
| 377 | + 7916 => 'U', |
|
| 378 | + 7918 => 'U', |
|
| 379 | + 7920 => 'U', |
|
| 380 | + 253 => 'y', |
|
| 381 | + 7923 => 'y', |
|
| 382 | + 7927 => 'y', |
|
| 383 | + 7929 => 'y', |
|
| 384 | + 7925 => 'y', |
|
| 385 | + 221 => 'Y', |
|
| 386 | + 7922 => 'Y', |
|
| 387 | + 7926 => 'Y', |
|
| 388 | + 7928 => 'Y', |
|
| 389 | + 7924 => 'Y', |
|
| 390 | + 273 => 'd' |
|
| 391 | 391 | |
| 392 | 392 | ]; |