@@ -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 | |
@@ -54,65 +54,65 @@ discard block |
||
| 54 | 54 | * true si le statut change effectivement |
| 55 | 55 | **/ |
| 56 | 56 | function calculer_rubriques_if($id_rubrique, $modifs, $infos = [], $postdate = false) { |
| 57 | - $statuts_publies = null; |
|
| 58 | - $neuf = false; |
|
| 59 | - |
|
| 60 | - // Compat avec l'ancienne signature |
|
| 61 | - if (is_string($infos)) { |
|
| 62 | - $infos = ['statut_ancien' => $infos]; |
|
| 63 | - } |
|
| 64 | - if (!isset($infos['statut_ancien'])) { |
|
| 65 | - $infos['statut_ancien'] = ''; |
|
| 66 | - } |
|
| 67 | - |
|
| 68 | - // On recherche quels statuts tester |
|
| 69 | - if ( |
|
| 70 | - isset($infos['objet']) |
|
| 71 | - and include_spip('inc/filtres') |
|
| 72 | - and $declaration_statut = objet_info($infos['objet'], 'statut') |
|
| 73 | - and is_array($declaration_statut) |
|
| 74 | - ) { |
|
| 75 | - foreach ($declaration_statut as $champ_statut) { |
|
| 76 | - if ($champ_statut['champ'] == 'statut') { |
|
| 77 | - $statuts_publies = array_map('trim', explode(',', $champ_statut['publie'])); |
|
| 78 | - break; // stop on a trouvé le bon champ |
|
| 79 | - } |
|
| 80 | - } |
|
| 81 | - } else { |
|
| 82 | - $statuts_publies = ['publie']; |
|
| 83 | - } |
|
| 84 | - |
|
| 85 | - if (in_array($infos['statut_ancien'], $statuts_publies)) { |
|
| 86 | - if ( |
|
| 87 | - isset($modifs['statut']) |
|
| 88 | - or isset($modifs['id_rubrique']) |
|
| 89 | - or ($postdate and strtotime($postdate) > time()) |
|
| 90 | - ) { |
|
| 91 | - $neuf |= depublier_branche_rubrique_if($id_rubrique); |
|
| 92 | - } |
|
| 93 | - // ne publier que si c'est pas un postdate, ou si la date n'est pas dans le futur |
|
| 94 | - if ($postdate) { |
|
| 95 | - calculer_prochain_postdate(true); |
|
| 96 | - $neuf |= (strtotime($postdate) <= time()); // par securite |
|
| 97 | - } elseif (isset($modifs['id_rubrique'])) { |
|
| 98 | - $neuf |= publier_branche_rubrique($modifs['id_rubrique']); |
|
| 99 | - } |
|
| 100 | - } elseif (isset($modifs['statut']) and in_array($modifs['statut'], $statuts_publies)) { |
|
| 101 | - if ($postdate) { |
|
| 102 | - calculer_prochain_postdate(true); |
|
| 103 | - $neuf |= (strtotime($postdate) <= time()); // par securite |
|
| 104 | - } else { |
|
| 105 | - $neuf |= publier_branche_rubrique($id_rubrique); |
|
| 106 | - } |
|
| 107 | - } |
|
| 108 | - |
|
| 109 | - if ($neuf) { |
|
| 110 | - // Sauver la date de la derniere mise a jour (pour menu_rubriques) |
|
| 111 | - ecrire_meta('date_calcul_rubriques', date('U')); |
|
| 112 | - } |
|
| 113 | - |
|
| 114 | - $langues = calculer_langues_utilisees(); |
|
| 115 | - ecrire_meta('langues_utilisees', $langues); |
|
| 57 | + $statuts_publies = null; |
|
| 58 | + $neuf = false; |
|
| 59 | + |
|
| 60 | + // Compat avec l'ancienne signature |
|
| 61 | + if (is_string($infos)) { |
|
| 62 | + $infos = ['statut_ancien' => $infos]; |
|
| 63 | + } |
|
| 64 | + if (!isset($infos['statut_ancien'])) { |
|
| 65 | + $infos['statut_ancien'] = ''; |
|
| 66 | + } |
|
| 67 | + |
|
| 68 | + // On recherche quels statuts tester |
|
| 69 | + if ( |
|
| 70 | + isset($infos['objet']) |
|
| 71 | + and include_spip('inc/filtres') |
|
| 72 | + and $declaration_statut = objet_info($infos['objet'], 'statut') |
|
| 73 | + and is_array($declaration_statut) |
|
| 74 | + ) { |
|
| 75 | + foreach ($declaration_statut as $champ_statut) { |
|
| 76 | + if ($champ_statut['champ'] == 'statut') { |
|
| 77 | + $statuts_publies = array_map('trim', explode(',', $champ_statut['publie'])); |
|
| 78 | + break; // stop on a trouvé le bon champ |
|
| 79 | + } |
|
| 80 | + } |
|
| 81 | + } else { |
|
| 82 | + $statuts_publies = ['publie']; |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + if (in_array($infos['statut_ancien'], $statuts_publies)) { |
|
| 86 | + if ( |
|
| 87 | + isset($modifs['statut']) |
|
| 88 | + or isset($modifs['id_rubrique']) |
|
| 89 | + or ($postdate and strtotime($postdate) > time()) |
|
| 90 | + ) { |
|
| 91 | + $neuf |= depublier_branche_rubrique_if($id_rubrique); |
|
| 92 | + } |
|
| 93 | + // ne publier que si c'est pas un postdate, ou si la date n'est pas dans le futur |
|
| 94 | + if ($postdate) { |
|
| 95 | + calculer_prochain_postdate(true); |
|
| 96 | + $neuf |= (strtotime($postdate) <= time()); // par securite |
|
| 97 | + } elseif (isset($modifs['id_rubrique'])) { |
|
| 98 | + $neuf |= publier_branche_rubrique($modifs['id_rubrique']); |
|
| 99 | + } |
|
| 100 | + } elseif (isset($modifs['statut']) and in_array($modifs['statut'], $statuts_publies)) { |
|
| 101 | + if ($postdate) { |
|
| 102 | + calculer_prochain_postdate(true); |
|
| 103 | + $neuf |= (strtotime($postdate) <= time()); // par securite |
|
| 104 | + } else { |
|
| 105 | + $neuf |= publier_branche_rubrique($id_rubrique); |
|
| 106 | + } |
|
| 107 | + } |
|
| 108 | + |
|
| 109 | + if ($neuf) { |
|
| 110 | + // Sauver la date de la derniere mise a jour (pour menu_rubriques) |
|
| 111 | + ecrire_meta('date_calcul_rubriques', date('U')); |
|
| 112 | + } |
|
| 113 | + |
|
| 114 | + $langues = calculer_langues_utilisees(); |
|
| 115 | + ecrire_meta('langues_utilisees', $langues); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | |
@@ -130,22 +130,22 @@ discard block |
||
| 130 | 130 | * true si le statut change effectivement |
| 131 | 131 | */ |
| 132 | 132 | function publier_branche_rubrique($id_rubrique) { |
| 133 | - $id_pred = $id_rubrique; |
|
| 134 | - while (true) { |
|
| 135 | - sql_updateq( |
|
| 136 | - 'spip_rubriques', |
|
| 137 | - ['statut' => 'publie', 'date' => date('Y-m-d H:i:s')], |
|
| 138 | - 'id_rubrique=' . intval($id_rubrique) |
|
| 139 | - ); |
|
| 140 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques AS R', 'R.id_rubrique=' . intval($id_rubrique)); |
|
| 141 | - if (!$id_parent) { |
|
| 142 | - break; |
|
| 143 | - } |
|
| 144 | - $id_rubrique = $id_parent; |
|
| 145 | - } |
|
| 133 | + $id_pred = $id_rubrique; |
|
| 134 | + while (true) { |
|
| 135 | + sql_updateq( |
|
| 136 | + 'spip_rubriques', |
|
| 137 | + ['statut' => 'publie', 'date' => date('Y-m-d H:i:s')], |
|
| 138 | + 'id_rubrique=' . intval($id_rubrique) |
|
| 139 | + ); |
|
| 140 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques AS R', 'R.id_rubrique=' . intval($id_rubrique)); |
|
| 141 | + if (!$id_parent) { |
|
| 142 | + break; |
|
| 143 | + } |
|
| 144 | + $id_rubrique = $id_parent; |
|
| 145 | + } |
|
| 146 | 146 | |
| 147 | 147 | # spip_log(" publier_branche_rubrique($id_rubrique $id_pred"); |
| 148 | - return $id_pred != $id_rubrique; |
|
| 148 | + return $id_pred != $id_rubrique; |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |
@@ -163,20 +163,20 @@ discard block |
||
| 163 | 163 | * true si le statut change effectivement |
| 164 | 164 | */ |
| 165 | 165 | function depublier_branche_rubrique_if($id_rubrique) { |
| 166 | - $date = date('Y-m-d H:i:s'); // figer la date |
|
| 167 | - |
|
| 168 | - # spip_log("depublier_branche_rubrique($id_rubrique ?"); |
|
| 169 | - $id_pred = $id_rubrique; |
|
| 170 | - while ($id_pred) { |
|
| 171 | - if (!depublier_rubrique_if($id_pred, $date)) { |
|
| 172 | - return $id_pred != $id_rubrique; |
|
| 173 | - } |
|
| 174 | - // passer au parent si on a depublie |
|
| 175 | - $r = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_pred)); |
|
| 176 | - $id_pred = $r['id_parent']; |
|
| 177 | - } |
|
| 178 | - |
|
| 179 | - return $id_pred != $id_rubrique; |
|
| 166 | + $date = date('Y-m-d H:i:s'); // figer la date |
|
| 167 | + |
|
| 168 | + # spip_log("depublier_branche_rubrique($id_rubrique ?"); |
|
| 169 | + $id_pred = $id_rubrique; |
|
| 170 | + while ($id_pred) { |
|
| 171 | + if (!depublier_rubrique_if($id_pred, $date)) { |
|
| 172 | + return $id_pred != $id_rubrique; |
|
| 173 | + } |
|
| 174 | + // passer au parent si on a depublie |
|
| 175 | + $r = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_pred)); |
|
| 176 | + $id_pred = $r['id_parent']; |
|
| 177 | + } |
|
| 178 | + |
|
| 179 | + return $id_pred != $id_rubrique; |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -193,61 +193,61 @@ discard block |
||
| 193 | 193 | * true si la rubrique a été dépubliée |
| 194 | 194 | */ |
| 195 | 195 | function depublier_rubrique_if($id_rubrique, $date = null) { |
| 196 | - if (is_null($date)) { |
|
| 197 | - $date = date('Y-m-d H:i:s'); |
|
| 198 | - } |
|
| 199 | - $postdates = ($GLOBALS['meta']['post_dates'] == 'non') ? |
|
| 200 | - ' AND date <= ' . sql_quote($date) : ''; |
|
| 201 | - |
|
| 202 | - if (!$id_rubrique = intval($id_rubrique)) { |
|
| 203 | - return false; |
|
| 204 | - } |
|
| 205 | - |
|
| 206 | - // verifier qu'elle existe et est bien publiee |
|
| 207 | - $r = sql_fetsel('id_rubrique,statut', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 208 | - if (!$r or $r['statut'] !== 'publie') { |
|
| 209 | - return false; |
|
| 210 | - } |
|
| 211 | - |
|
| 212 | - // On met le nombre de chaque type d'enfants dans un tableau |
|
| 213 | - // Le type de l'objet est au pluriel |
|
| 214 | - $compte = [ |
|
| 215 | - 'articles' => sql_countsel( |
|
| 216 | - 'spip_articles', |
|
| 217 | - 'id_rubrique=' . intval($id_rubrique) . " AND statut='publie'$postdates" |
|
| 218 | - ), |
|
| 219 | - 'rubriques' => sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique) . " AND statut='publie'"), |
|
| 220 | - 'documents' => sql_countsel( |
|
| 221 | - 'spip_documents AS D JOIN spip_documents_liens AS L ON D.id_document=L.id_document', |
|
| 222 | - 'L.id_objet=' . intval($id_rubrique) . " AND L.objet='rubrique' and D.mode NOT IN('logoon', 'logooff') " |
|
| 223 | - ) |
|
| 224 | - ]; |
|
| 225 | - |
|
| 226 | - // On passe le tableau des comptes dans un pipeline pour que les plugins puissent ajouter (ou retirer) des enfants |
|
| 227 | - $compte = pipeline( |
|
| 228 | - 'objet_compte_enfants', |
|
| 229 | - [ |
|
| 230 | - 'args' => [ |
|
| 231 | - 'objet' => 'rubrique', |
|
| 232 | - 'id_objet' => $id_rubrique, |
|
| 233 | - 'statut' => 'publie', |
|
| 234 | - 'date' => $date |
|
| 235 | - ], |
|
| 236 | - 'data' => $compte |
|
| 237 | - ] |
|
| 238 | - ); |
|
| 239 | - |
|
| 240 | - // S'il y a au moins un enfant de n'importe quoi, on ne dépublie pas |
|
| 241 | - foreach ($compte as $objet => $n) { |
|
| 242 | - if ($n) { |
|
| 243 | - return false; |
|
| 244 | - } |
|
| 245 | - } |
|
| 246 | - |
|
| 247 | - sql_updateq('spip_rubriques', ['statut' => 'prepa'], 'id_rubrique=' . intval($id_rubrique)); |
|
| 196 | + if (is_null($date)) { |
|
| 197 | + $date = date('Y-m-d H:i:s'); |
|
| 198 | + } |
|
| 199 | + $postdates = ($GLOBALS['meta']['post_dates'] == 'non') ? |
|
| 200 | + ' AND date <= ' . sql_quote($date) : ''; |
|
| 201 | + |
|
| 202 | + if (!$id_rubrique = intval($id_rubrique)) { |
|
| 203 | + return false; |
|
| 204 | + } |
|
| 205 | + |
|
| 206 | + // verifier qu'elle existe et est bien publiee |
|
| 207 | + $r = sql_fetsel('id_rubrique,statut', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 208 | + if (!$r or $r['statut'] !== 'publie') { |
|
| 209 | + return false; |
|
| 210 | + } |
|
| 211 | + |
|
| 212 | + // On met le nombre de chaque type d'enfants dans un tableau |
|
| 213 | + // Le type de l'objet est au pluriel |
|
| 214 | + $compte = [ |
|
| 215 | + 'articles' => sql_countsel( |
|
| 216 | + 'spip_articles', |
|
| 217 | + 'id_rubrique=' . intval($id_rubrique) . " AND statut='publie'$postdates" |
|
| 218 | + ), |
|
| 219 | + 'rubriques' => sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique) . " AND statut='publie'"), |
|
| 220 | + 'documents' => sql_countsel( |
|
| 221 | + 'spip_documents AS D JOIN spip_documents_liens AS L ON D.id_document=L.id_document', |
|
| 222 | + 'L.id_objet=' . intval($id_rubrique) . " AND L.objet='rubrique' and D.mode NOT IN('logoon', 'logooff') " |
|
| 223 | + ) |
|
| 224 | + ]; |
|
| 225 | + |
|
| 226 | + // On passe le tableau des comptes dans un pipeline pour que les plugins puissent ajouter (ou retirer) des enfants |
|
| 227 | + $compte = pipeline( |
|
| 228 | + 'objet_compte_enfants', |
|
| 229 | + [ |
|
| 230 | + 'args' => [ |
|
| 231 | + 'objet' => 'rubrique', |
|
| 232 | + 'id_objet' => $id_rubrique, |
|
| 233 | + 'statut' => 'publie', |
|
| 234 | + 'date' => $date |
|
| 235 | + ], |
|
| 236 | + 'data' => $compte |
|
| 237 | + ] |
|
| 238 | + ); |
|
| 239 | + |
|
| 240 | + // S'il y a au moins un enfant de n'importe quoi, on ne dépublie pas |
|
| 241 | + foreach ($compte as $objet => $n) { |
|
| 242 | + if ($n) { |
|
| 243 | + return false; |
|
| 244 | + } |
|
| 245 | + } |
|
| 246 | + |
|
| 247 | + sql_updateq('spip_rubriques', ['statut' => 'prepa'], 'id_rubrique=' . intval($id_rubrique)); |
|
| 248 | 248 | |
| 249 | 249 | # spip_log("depublier_rubrique $id_pred"); |
| 250 | - return true; |
|
| 250 | + return true; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
@@ -270,18 +270,18 @@ discard block |
||
| 270 | 270 | **/ |
| 271 | 271 | function calculer_rubriques() { |
| 272 | 272 | |
| 273 | - calculer_rubriques_publiees(); |
|
| 273 | + calculer_rubriques_publiees(); |
|
| 274 | 274 | |
| 275 | - // Apres chaque (de)publication |
|
| 276 | - // recalculer les langues utilisees sur le site |
|
| 277 | - $langues = calculer_langues_utilisees(); |
|
| 278 | - ecrire_meta('langues_utilisees', $langues); |
|
| 275 | + // Apres chaque (de)publication |
|
| 276 | + // recalculer les langues utilisees sur le site |
|
| 277 | + $langues = calculer_langues_utilisees(); |
|
| 278 | + ecrire_meta('langues_utilisees', $langues); |
|
| 279 | 279 | |
| 280 | - // Sauver la date de la derniere mise a jour (pour menu_rubriques) |
|
| 281 | - ecrire_meta('date_calcul_rubriques', date('U')); |
|
| 280 | + // Sauver la date de la derniere mise a jour (pour menu_rubriques) |
|
| 281 | + ecrire_meta('date_calcul_rubriques', date('U')); |
|
| 282 | 282 | |
| 283 | - // on calcule la date du prochain article post-date |
|
| 284 | - calculer_prochain_postdate(); |
|
| 283 | + // on calcule la date du prochain article post-date |
|
| 284 | + calculer_prochain_postdate(); |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | |
@@ -298,61 +298,61 @@ discard block |
||
| 298 | 298 | **/ |
| 299 | 299 | function calculer_rubriques_publiees() { |
| 300 | 300 | |
| 301 | - // Mettre les compteurs a zero |
|
| 302 | - sql_updateq('spip_rubriques', ['date_tmp' => '0000-00-00 00:00:00', 'statut_tmp' => 'prepa']); |
|
| 303 | - |
|
| 304 | - // |
|
| 305 | - // Publier et dater les rubriques qui ont un article publie |
|
| 306 | - // |
|
| 307 | - |
|
| 308 | - // Afficher les articles post-dates ? |
|
| 309 | - $postdates = ($GLOBALS['meta']['post_dates'] == 'non') ? |
|
| 310 | - 'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : ''; |
|
| 311 | - |
|
| 312 | - $r = sql_select( |
|
| 313 | - 'R.id_rubrique AS id, max(A.date) AS date_h', |
|
| 314 | - 'spip_rubriques AS R JOIN spip_articles AS A ON R.id_rubrique = A.id_rubrique', |
|
| 315 | - "A.date>R.date_tmp AND A.statut='publie' $postdates ", |
|
| 316 | - 'R.id_rubrique' |
|
| 317 | - ); |
|
| 318 | - while ($row = sql_fetch($r)) { |
|
| 319 | - sql_updateq( |
|
| 320 | - 'spip_rubriques', |
|
| 321 | - ['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']], |
|
| 322 | - 'id_rubrique=' . intval($row['id']) |
|
| 323 | - ); |
|
| 324 | - } |
|
| 325 | - |
|
| 326 | - // point d'entree pour permettre a des plugins de gerer le statut |
|
| 327 | - // autrement (par ex: toute rubrique est publiee des sa creation) |
|
| 328 | - // Ce pipeline fait ce qu'il veut, mais s'il touche aux statuts/dates |
|
| 329 | - // c'est statut_tmp/date_tmp qu'il doit modifier |
|
| 330 | - // [C'est un trigger... a renommer en trig_calculer_rubriques ?] |
|
| 331 | - pipeline('calculer_rubriques', null); |
|
| 332 | - |
|
| 333 | - |
|
| 334 | - // Les rubriques qui ont une rubrique fille plus recente |
|
| 335 | - // on tourne tant que les donnees remontent vers la racine. |
|
| 336 | - do { |
|
| 337 | - $continuer = false; |
|
| 338 | - $r = sql_select( |
|
| 339 | - 'R.id_rubrique AS id, max(SR.date_tmp) AS date_h', |
|
| 340 | - 'spip_rubriques AS R JOIN spip_rubriques AS SR ON R.id_rubrique = SR.id_parent', |
|
| 341 | - "(SR.date_tmp>R.date_tmp OR R.statut_tmp<>'publie') AND SR.statut_tmp='publie' ", |
|
| 342 | - 'R.id_rubrique' |
|
| 343 | - ); |
|
| 344 | - while ($row = sql_fetch($r)) { |
|
| 345 | - sql_updateq( |
|
| 346 | - 'spip_rubriques', |
|
| 347 | - ['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']], |
|
| 348 | - 'id_rubrique=' . intval($row['id']) |
|
| 349 | - ); |
|
| 350 | - $continuer = true; |
|
| 351 | - } |
|
| 352 | - } while ($continuer); |
|
| 353 | - |
|
| 354 | - // Enregistrement des modifs |
|
| 355 | - sql_update('spip_rubriques', ['date' => 'date_tmp', 'statut' => 'statut_tmp']); |
|
| 301 | + // Mettre les compteurs a zero |
|
| 302 | + sql_updateq('spip_rubriques', ['date_tmp' => '0000-00-00 00:00:00', 'statut_tmp' => 'prepa']); |
|
| 303 | + |
|
| 304 | + // |
|
| 305 | + // Publier et dater les rubriques qui ont un article publie |
|
| 306 | + // |
|
| 307 | + |
|
| 308 | + // Afficher les articles post-dates ? |
|
| 309 | + $postdates = ($GLOBALS['meta']['post_dates'] == 'non') ? |
|
| 310 | + 'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : ''; |
|
| 311 | + |
|
| 312 | + $r = sql_select( |
|
| 313 | + 'R.id_rubrique AS id, max(A.date) AS date_h', |
|
| 314 | + 'spip_rubriques AS R JOIN spip_articles AS A ON R.id_rubrique = A.id_rubrique', |
|
| 315 | + "A.date>R.date_tmp AND A.statut='publie' $postdates ", |
|
| 316 | + 'R.id_rubrique' |
|
| 317 | + ); |
|
| 318 | + while ($row = sql_fetch($r)) { |
|
| 319 | + sql_updateq( |
|
| 320 | + 'spip_rubriques', |
|
| 321 | + ['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']], |
|
| 322 | + 'id_rubrique=' . intval($row['id']) |
|
| 323 | + ); |
|
| 324 | + } |
|
| 325 | + |
|
| 326 | + // point d'entree pour permettre a des plugins de gerer le statut |
|
| 327 | + // autrement (par ex: toute rubrique est publiee des sa creation) |
|
| 328 | + // Ce pipeline fait ce qu'il veut, mais s'il touche aux statuts/dates |
|
| 329 | + // c'est statut_tmp/date_tmp qu'il doit modifier |
|
| 330 | + // [C'est un trigger... a renommer en trig_calculer_rubriques ?] |
|
| 331 | + pipeline('calculer_rubriques', null); |
|
| 332 | + |
|
| 333 | + |
|
| 334 | + // Les rubriques qui ont une rubrique fille plus recente |
|
| 335 | + // on tourne tant que les donnees remontent vers la racine. |
|
| 336 | + do { |
|
| 337 | + $continuer = false; |
|
| 338 | + $r = sql_select( |
|
| 339 | + 'R.id_rubrique AS id, max(SR.date_tmp) AS date_h', |
|
| 340 | + 'spip_rubriques AS R JOIN spip_rubriques AS SR ON R.id_rubrique = SR.id_parent', |
|
| 341 | + "(SR.date_tmp>R.date_tmp OR R.statut_tmp<>'publie') AND SR.statut_tmp='publie' ", |
|
| 342 | + 'R.id_rubrique' |
|
| 343 | + ); |
|
| 344 | + while ($row = sql_fetch($r)) { |
|
| 345 | + sql_updateq( |
|
| 346 | + 'spip_rubriques', |
|
| 347 | + ['statut_tmp' => 'publie', 'date_tmp' => $row['date_h']], |
|
| 348 | + 'id_rubrique=' . intval($row['id']) |
|
| 349 | + ); |
|
| 350 | + $continuer = true; |
|
| 351 | + } |
|
| 352 | + } while ($continuer); |
|
| 353 | + |
|
| 354 | + // Enregistrement des modifs |
|
| 355 | + sql_update('spip_rubriques', ['date' => 'date_tmp', 'statut' => 'statut_tmp']); |
|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | /** |
@@ -367,123 +367,123 @@ discard block |
||
| 367 | 367 | * @return void |
| 368 | 368 | **/ |
| 369 | 369 | function propager_les_secteurs() { |
| 370 | - // Profondeur 0 |
|
| 371 | - // Toutes les rubriques racines sont de profondeur 0 |
|
| 372 | - // et fixer les id_secteur des rubriques racines |
|
| 373 | - sql_update('spip_rubriques', ['id_secteur' => 'id_rubrique', 'profondeur' => 0], 'id_parent=0'); |
|
| 374 | - // Toute rubrique non racine est de profondeur >0 |
|
| 375 | - sql_updateq('spip_rubriques', ['profondeur' => 1], 'id_parent<>0 AND profondeur=0'); |
|
| 376 | - |
|
| 377 | - // securite : pas plus d'iteration que de rubriques dans la base |
|
| 378 | - $maxiter = sql_countsel('spip_rubriques'); |
|
| 379 | - |
|
| 380 | - // reparer les rubriques qui n'ont pas l'id_secteur de leur parent |
|
| 381 | - // on fait profondeur par profondeur |
|
| 382 | - |
|
| 383 | - $prof = 0; |
|
| 384 | - do { |
|
| 385 | - $continuer = false; |
|
| 386 | - |
|
| 387 | - // Par recursivite : si toutes les rubriques de profondeur $prof sont bonnes |
|
| 388 | - // on fixe le profondeur $prof+1 |
|
| 389 | - |
|
| 390 | - // Toutes les rubriques dont le parent est de profondeur $prof ont une profondeur $prof+1 |
|
| 391 | - // on teste A.profondeur > $prof+1 car : |
|
| 392 | - // - toutes les rubriques de profondeur 0 à $prof sont bonnes |
|
| 393 | - // - si A.profondeur = $prof+1 c'est bon |
|
| 394 | - // - cela nous protege de la boucle infinie en cas de reference circulaire dans les rubriques |
|
| 395 | - $maxiter2 = $maxiter; |
|
| 396 | - while ( |
|
| 397 | - $maxiter2-- |
|
| 398 | - and $rows = sql_allfetsel( |
|
| 399 | - 'A.id_rubrique AS id, R.id_secteur AS id_secteur, R.profondeur+1 as profondeur', |
|
| 400 | - 'spip_rubriques AS A JOIN spip_rubriques AS R ON A.id_parent = R.id_rubrique', |
|
| 401 | - 'R.profondeur=' . intval($prof) . ' AND (A.id_secteur <> R.id_secteur OR A.profondeur > R.profondeur+1)', |
|
| 402 | - '', |
|
| 403 | - 'R.id_secteur', |
|
| 404 | - '0,100' |
|
| 405 | - ) |
|
| 406 | - ) { |
|
| 407 | - $id_secteur = null; |
|
| 408 | - $ids = []; |
|
| 409 | - while ($row = array_shift($rows)) { |
|
| 410 | - if ($row['id_secteur'] !== $id_secteur) { |
|
| 411 | - if (count($ids)) { |
|
| 412 | - sql_updateq( |
|
| 413 | - 'spip_rubriques', |
|
| 414 | - ['id_secteur' => $id_secteur, 'profondeur' => $prof + 1], |
|
| 415 | - sql_in('id_rubrique', $ids) |
|
| 416 | - ); |
|
| 417 | - } |
|
| 418 | - $id_secteur = $row['id_secteur']; |
|
| 419 | - $ids = []; |
|
| 420 | - } |
|
| 421 | - $ids[] = $row['id']; |
|
| 422 | - } |
|
| 423 | - if (count($ids)) { |
|
| 424 | - sql_updateq( |
|
| 425 | - 'spip_rubriques', |
|
| 426 | - ['id_secteur' => $id_secteur, 'profondeur' => $prof + 1], |
|
| 427 | - sql_in('id_rubrique', $ids) |
|
| 428 | - ); |
|
| 429 | - } |
|
| 430 | - } |
|
| 431 | - |
|
| 432 | - |
|
| 433 | - // Toutes les rubriques de profondeur $prof+1 qui n'ont pas un parent de profondeur $prof sont decalees |
|
| 434 | - $maxiter2 = $maxiter; |
|
| 435 | - while ( |
|
| 436 | - $maxiter2-- |
|
| 437 | - and $rows = sql_allfetsel( |
|
| 438 | - 'id_rubrique as id', |
|
| 439 | - 'spip_rubriques', |
|
| 440 | - 'profondeur=' . intval($prof + 1) . ' AND id_parent NOT IN (' . sql_get_select( |
|
| 441 | - 'zzz.id_rubrique', |
|
| 442 | - 'spip_rubriques AS zzz', |
|
| 443 | - 'zzz.profondeur=' . intval($prof) |
|
| 444 | - ) . ')', |
|
| 445 | - '', |
|
| 446 | - '', |
|
| 447 | - '0,100' |
|
| 448 | - ) |
|
| 449 | - ) { |
|
| 450 | - $rows = array_column($rows, 'id'); |
|
| 451 | - sql_updateq('spip_rubriques', ['profondeur' => $prof + 2], sql_in('id_rubrique', $rows)); |
|
| 452 | - } |
|
| 453 | - |
|
| 454 | - // ici on a fini de valider $prof+1, toutes les rubriques de prondeur 0 a $prof+1 sont OK |
|
| 455 | - // si pas de rubrique a profondeur $prof+1 pas la peine de continuer |
|
| 456 | - // si il reste des rubriques non vues, c'est une branche morte ou reference circulaire (base foireuse) |
|
| 457 | - // on arrete les frais |
|
| 458 | - if (sql_countsel('spip_rubriques', 'profondeur=' . intval($prof + 1))) { |
|
| 459 | - $prof++; |
|
| 460 | - $continuer = true; |
|
| 461 | - } |
|
| 462 | - } while ($continuer and $maxiter--); |
|
| 463 | - |
|
| 464 | - // loger si la table des rubriques semble foireuse |
|
| 465 | - // et mettre un id_secteur=0 sur ces rubriques pour eviter toute selection par les boucles |
|
| 466 | - if (sql_countsel('spip_rubriques', 'profondeur>' . intval($prof + 1))) { |
|
| 467 | - spip_log( |
|
| 468 | - 'Les rubriques de profondeur>' . ($prof + 1) . ' semblent suspectes (branches morte ou reference circulaire dans les parents)', |
|
| 469 | - _LOG_CRITIQUE |
|
| 470 | - ); |
|
| 471 | - sql_update('spip_rubriques', ['id_secteur' => 0], 'profondeur>' . intval($prof + 1)); |
|
| 472 | - } |
|
| 473 | - |
|
| 474 | - // reparer les articles |
|
| 475 | - $r = sql_select( |
|
| 476 | - 'A.id_article AS id, R.id_secteur AS secteur', |
|
| 477 | - 'spip_articles AS A, spip_rubriques AS R', |
|
| 478 | - 'A.id_rubrique = R.id_rubrique AND A.id_secteur <> R.id_secteur' |
|
| 479 | - ); |
|
| 480 | - |
|
| 481 | - while ($row = sql_fetch($r)) { |
|
| 482 | - sql_update('spip_articles', ['id_secteur' => $row['secteur']], 'id_article=' . intval($row['id'])); |
|
| 483 | - } |
|
| 484 | - |
|
| 485 | - // avertir les plugins qui peuvent faire leur mises a jour egalement |
|
| 486 | - pipeline('trig_propager_les_secteurs', ''); |
|
| 370 | + // Profondeur 0 |
|
| 371 | + // Toutes les rubriques racines sont de profondeur 0 |
|
| 372 | + // et fixer les id_secteur des rubriques racines |
|
| 373 | + sql_update('spip_rubriques', ['id_secteur' => 'id_rubrique', 'profondeur' => 0], 'id_parent=0'); |
|
| 374 | + // Toute rubrique non racine est de profondeur >0 |
|
| 375 | + sql_updateq('spip_rubriques', ['profondeur' => 1], 'id_parent<>0 AND profondeur=0'); |
|
| 376 | + |
|
| 377 | + // securite : pas plus d'iteration que de rubriques dans la base |
|
| 378 | + $maxiter = sql_countsel('spip_rubriques'); |
|
| 379 | + |
|
| 380 | + // reparer les rubriques qui n'ont pas l'id_secteur de leur parent |
|
| 381 | + // on fait profondeur par profondeur |
|
| 382 | + |
|
| 383 | + $prof = 0; |
|
| 384 | + do { |
|
| 385 | + $continuer = false; |
|
| 386 | + |
|
| 387 | + // Par recursivite : si toutes les rubriques de profondeur $prof sont bonnes |
|
| 388 | + // on fixe le profondeur $prof+1 |
|
| 389 | + |
|
| 390 | + // Toutes les rubriques dont le parent est de profondeur $prof ont une profondeur $prof+1 |
|
| 391 | + // on teste A.profondeur > $prof+1 car : |
|
| 392 | + // - toutes les rubriques de profondeur 0 à $prof sont bonnes |
|
| 393 | + // - si A.profondeur = $prof+1 c'est bon |
|
| 394 | + // - cela nous protege de la boucle infinie en cas de reference circulaire dans les rubriques |
|
| 395 | + $maxiter2 = $maxiter; |
|
| 396 | + while ( |
|
| 397 | + $maxiter2-- |
|
| 398 | + and $rows = sql_allfetsel( |
|
| 399 | + 'A.id_rubrique AS id, R.id_secteur AS id_secteur, R.profondeur+1 as profondeur', |
|
| 400 | + 'spip_rubriques AS A JOIN spip_rubriques AS R ON A.id_parent = R.id_rubrique', |
|
| 401 | + 'R.profondeur=' . intval($prof) . ' AND (A.id_secteur <> R.id_secteur OR A.profondeur > R.profondeur+1)', |
|
| 402 | + '', |
|
| 403 | + 'R.id_secteur', |
|
| 404 | + '0,100' |
|
| 405 | + ) |
|
| 406 | + ) { |
|
| 407 | + $id_secteur = null; |
|
| 408 | + $ids = []; |
|
| 409 | + while ($row = array_shift($rows)) { |
|
| 410 | + if ($row['id_secteur'] !== $id_secteur) { |
|
| 411 | + if (count($ids)) { |
|
| 412 | + sql_updateq( |
|
| 413 | + 'spip_rubriques', |
|
| 414 | + ['id_secteur' => $id_secteur, 'profondeur' => $prof + 1], |
|
| 415 | + sql_in('id_rubrique', $ids) |
|
| 416 | + ); |
|
| 417 | + } |
|
| 418 | + $id_secteur = $row['id_secteur']; |
|
| 419 | + $ids = []; |
|
| 420 | + } |
|
| 421 | + $ids[] = $row['id']; |
|
| 422 | + } |
|
| 423 | + if (count($ids)) { |
|
| 424 | + sql_updateq( |
|
| 425 | + 'spip_rubriques', |
|
| 426 | + ['id_secteur' => $id_secteur, 'profondeur' => $prof + 1], |
|
| 427 | + sql_in('id_rubrique', $ids) |
|
| 428 | + ); |
|
| 429 | + } |
|
| 430 | + } |
|
| 431 | + |
|
| 432 | + |
|
| 433 | + // Toutes les rubriques de profondeur $prof+1 qui n'ont pas un parent de profondeur $prof sont decalees |
|
| 434 | + $maxiter2 = $maxiter; |
|
| 435 | + while ( |
|
| 436 | + $maxiter2-- |
|
| 437 | + and $rows = sql_allfetsel( |
|
| 438 | + 'id_rubrique as id', |
|
| 439 | + 'spip_rubriques', |
|
| 440 | + 'profondeur=' . intval($prof + 1) . ' AND id_parent NOT IN (' . sql_get_select( |
|
| 441 | + 'zzz.id_rubrique', |
|
| 442 | + 'spip_rubriques AS zzz', |
|
| 443 | + 'zzz.profondeur=' . intval($prof) |
|
| 444 | + ) . ')', |
|
| 445 | + '', |
|
| 446 | + '', |
|
| 447 | + '0,100' |
|
| 448 | + ) |
|
| 449 | + ) { |
|
| 450 | + $rows = array_column($rows, 'id'); |
|
| 451 | + sql_updateq('spip_rubriques', ['profondeur' => $prof + 2], sql_in('id_rubrique', $rows)); |
|
| 452 | + } |
|
| 453 | + |
|
| 454 | + // ici on a fini de valider $prof+1, toutes les rubriques de prondeur 0 a $prof+1 sont OK |
|
| 455 | + // si pas de rubrique a profondeur $prof+1 pas la peine de continuer |
|
| 456 | + // si il reste des rubriques non vues, c'est une branche morte ou reference circulaire (base foireuse) |
|
| 457 | + // on arrete les frais |
|
| 458 | + if (sql_countsel('spip_rubriques', 'profondeur=' . intval($prof + 1))) { |
|
| 459 | + $prof++; |
|
| 460 | + $continuer = true; |
|
| 461 | + } |
|
| 462 | + } while ($continuer and $maxiter--); |
|
| 463 | + |
|
| 464 | + // loger si la table des rubriques semble foireuse |
|
| 465 | + // et mettre un id_secteur=0 sur ces rubriques pour eviter toute selection par les boucles |
|
| 466 | + if (sql_countsel('spip_rubriques', 'profondeur>' . intval($prof + 1))) { |
|
| 467 | + spip_log( |
|
| 468 | + 'Les rubriques de profondeur>' . ($prof + 1) . ' semblent suspectes (branches morte ou reference circulaire dans les parents)', |
|
| 469 | + _LOG_CRITIQUE |
|
| 470 | + ); |
|
| 471 | + sql_update('spip_rubriques', ['id_secteur' => 0], 'profondeur>' . intval($prof + 1)); |
|
| 472 | + } |
|
| 473 | + |
|
| 474 | + // reparer les articles |
|
| 475 | + $r = sql_select( |
|
| 476 | + 'A.id_article AS id, R.id_secteur AS secteur', |
|
| 477 | + 'spip_articles AS A, spip_rubriques AS R', |
|
| 478 | + 'A.id_rubrique = R.id_rubrique AND A.id_secteur <> R.id_secteur' |
|
| 479 | + ); |
|
| 480 | + |
|
| 481 | + while ($row = sql_fetch($r)) { |
|
| 482 | + sql_update('spip_articles', ['id_secteur' => $row['secteur']], 'id_article=' . intval($row['id'])); |
|
| 483 | + } |
|
| 484 | + |
|
| 485 | + // avertir les plugins qui peuvent faire leur mises a jour egalement |
|
| 486 | + pipeline('trig_propager_les_secteurs', ''); |
|
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | |
@@ -498,23 +498,23 @@ discard block |
||
| 498 | 498 | * true si un changement a eu lieu |
| 499 | 499 | **/ |
| 500 | 500 | function calculer_langues_rubriques_etape() { |
| 501 | - $s = sql_select( |
|
| 502 | - 'A.id_rubrique AS id_rubrique, R.lang AS lang', |
|
| 503 | - 'spip_rubriques AS A, spip_rubriques AS R', |
|
| 504 | - "A.id_parent = R.id_rubrique AND A.langue_choisie != 'oui' AND R.lang<>'' AND R.lang<>A.lang" |
|
| 505 | - ); |
|
| 506 | - |
|
| 507 | - $t = false; |
|
| 508 | - while ($row = sql_fetch($s)) { |
|
| 509 | - $id_rubrique = $row['id_rubrique']; |
|
| 510 | - $t = sql_updateq( |
|
| 511 | - 'spip_rubriques', |
|
| 512 | - ['lang' => $row['lang'], 'langue_choisie' => 'non'], |
|
| 513 | - 'id_rubrique=' . intval($id_rubrique) |
|
| 514 | - ); |
|
| 515 | - } |
|
| 516 | - |
|
| 517 | - return $t; |
|
| 501 | + $s = sql_select( |
|
| 502 | + 'A.id_rubrique AS id_rubrique, R.lang AS lang', |
|
| 503 | + 'spip_rubriques AS A, spip_rubriques AS R', |
|
| 504 | + "A.id_parent = R.id_rubrique AND A.langue_choisie != 'oui' AND R.lang<>'' AND R.lang<>A.lang" |
|
| 505 | + ); |
|
| 506 | + |
|
| 507 | + $t = false; |
|
| 508 | + while ($row = sql_fetch($s)) { |
|
| 509 | + $id_rubrique = $row['id_rubrique']; |
|
| 510 | + $t = sql_updateq( |
|
| 511 | + 'spip_rubriques', |
|
| 512 | + ['lang' => $row['lang'], 'langue_choisie' => 'non'], |
|
| 513 | + 'id_rubrique=' . intval($id_rubrique) |
|
| 514 | + ); |
|
| 515 | + } |
|
| 516 | + |
|
| 517 | + return $t; |
|
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | /** |
@@ -534,38 +534,38 @@ discard block |
||
| 534 | 534 | **/ |
| 535 | 535 | function calculer_langues_rubriques() { |
| 536 | 536 | |
| 537 | - // rubriques (recursivite) |
|
| 538 | - sql_updateq( |
|
| 539 | - 'spip_rubriques', |
|
| 540 | - ['lang' => $GLOBALS['meta']['langue_site'], 'langue_choisie' => 'non'], |
|
| 541 | - "id_parent=0 AND langue_choisie != 'oui'" |
|
| 542 | - ); |
|
| 543 | - while (calculer_langues_rubriques_etape()) { |
|
| 544 | - ; |
|
| 545 | - } |
|
| 546 | - |
|
| 547 | - // articles |
|
| 548 | - $s = sql_select( |
|
| 549 | - 'A.id_article AS id_article, R.lang AS lang', |
|
| 550 | - 'spip_articles AS A, spip_rubriques AS R', |
|
| 551 | - "A.id_rubrique = R.id_rubrique AND A.langue_choisie != 'oui' AND (length(A.lang)=0 OR length(R.lang)>0) AND R.lang<>A.lang" |
|
| 552 | - ); |
|
| 553 | - while ($row = sql_fetch($s)) { |
|
| 554 | - $id_article = $row['id_article']; |
|
| 555 | - sql_updateq( |
|
| 556 | - 'spip_articles', |
|
| 557 | - ['lang' => $row['lang'], 'langue_choisie' => 'non'], |
|
| 558 | - 'id_article=' . intval($id_article) |
|
| 559 | - ); |
|
| 560 | - } |
|
| 561 | - |
|
| 562 | - if ($GLOBALS['meta']['multi_rubriques'] == 'oui') { |
|
| 563 | - $langues = calculer_langues_utilisees(); |
|
| 564 | - ecrire_meta('langues_utilisees', $langues); |
|
| 565 | - } |
|
| 566 | - |
|
| 567 | - // avertir les plugins qui peuvent faire leur mises a jour egalement |
|
| 568 | - pipeline('trig_calculer_langues_rubriques', ''); |
|
| 537 | + // rubriques (recursivite) |
|
| 538 | + sql_updateq( |
|
| 539 | + 'spip_rubriques', |
|
| 540 | + ['lang' => $GLOBALS['meta']['langue_site'], 'langue_choisie' => 'non'], |
|
| 541 | + "id_parent=0 AND langue_choisie != 'oui'" |
|
| 542 | + ); |
|
| 543 | + while (calculer_langues_rubriques_etape()) { |
|
| 544 | + ; |
|
| 545 | + } |
|
| 546 | + |
|
| 547 | + // articles |
|
| 548 | + $s = sql_select( |
|
| 549 | + 'A.id_article AS id_article, R.lang AS lang', |
|
| 550 | + 'spip_articles AS A, spip_rubriques AS R', |
|
| 551 | + "A.id_rubrique = R.id_rubrique AND A.langue_choisie != 'oui' AND (length(A.lang)=0 OR length(R.lang)>0) AND R.lang<>A.lang" |
|
| 552 | + ); |
|
| 553 | + while ($row = sql_fetch($s)) { |
|
| 554 | + $id_article = $row['id_article']; |
|
| 555 | + sql_updateq( |
|
| 556 | + 'spip_articles', |
|
| 557 | + ['lang' => $row['lang'], 'langue_choisie' => 'non'], |
|
| 558 | + 'id_article=' . intval($id_article) |
|
| 559 | + ); |
|
| 560 | + } |
|
| 561 | + |
|
| 562 | + if ($GLOBALS['meta']['multi_rubriques'] == 'oui') { |
|
| 563 | + $langues = calculer_langues_utilisees(); |
|
| 564 | + ecrire_meta('langues_utilisees', $langues); |
|
| 565 | + } |
|
| 566 | + |
|
| 567 | + // avertir les plugins qui peuvent faire leur mises a jour egalement |
|
| 568 | + pipeline('trig_calculer_langues_rubriques', ''); |
|
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | |
@@ -582,80 +582,80 @@ discard block |
||
| 582 | 582 | * Liste des langues utilisées séparées par des virgules |
| 583 | 583 | **/ |
| 584 | 584 | function calculer_langues_utilisees($serveur = '') { |
| 585 | - include_spip('public/interfaces'); |
|
| 586 | - include_spip('public/compiler'); |
|
| 587 | - include_spip('public/composer'); |
|
| 588 | - include_spip('public/phraser_html'); |
|
| 589 | - $langues = []; |
|
| 590 | - |
|
| 591 | - $langues[$GLOBALS['meta']['langue_site']] = 1; |
|
| 592 | - |
|
| 593 | - include_spip('base/objets'); |
|
| 594 | - $tables = lister_tables_objets_sql(); |
|
| 595 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 596 | - |
|
| 597 | - foreach (array_keys($tables) as $t) { |
|
| 598 | - $desc = $trouver_table($t, $serveur); |
|
| 599 | - // c'est une table avec des langues |
|
| 600 | - if ( |
|
| 601 | - $desc['exist'] |
|
| 602 | - and isset($desc['field']['lang']) |
|
| 603 | - and isset($desc['field']['langue_choisie']) |
|
| 604 | - ) { |
|
| 605 | - $boucle = new Boucle(); |
|
| 606 | - $boucle->show = $desc; |
|
| 607 | - $boucle->nom = 'calculer_langues_utilisees'; |
|
| 608 | - $boucle->id_boucle = $desc['table_objet']; |
|
| 609 | - $boucle->id_table = $desc['table_objet']; |
|
| 610 | - $boucle->primary = $desc['key']['PRIMARY KEY'] ?? ''; |
|
| 611 | - $boucle->sql_serveur = $serveur; |
|
| 612 | - $boucle->select[] = 'DISTINCT lang'; |
|
| 613 | - $boucle->from[$desc['table_objet']] = $t; |
|
| 614 | - $boucle->separateur[] = ','; |
|
| 615 | - $boucle->return = '$Pile[$SP][\'lang\']'; |
|
| 616 | - $boucle->iterateur = 'sql'; |
|
| 617 | - |
|
| 618 | - $boucle->descr['nom'] = 'calculer_langues_utilisees'; // eviter notice php |
|
| 619 | - $boucle->descr['sourcefile'] = 'internal'; |
|
| 620 | - $boucle->descr['gram'] = 'html'; |
|
| 621 | - |
|
| 622 | - $boucle = pipeline('pre_boucle', $boucle); |
|
| 623 | - |
|
| 624 | - if ( |
|
| 625 | - isset($desc['statut']) |
|
| 626 | - and $desc['statut'] |
|
| 627 | - ) { |
|
| 628 | - $boucles = [ |
|
| 629 | - 'calculer_langues_utilisees' => $boucle, |
|
| 630 | - ]; |
|
| 631 | - // generer un nom de fonction "anonyme" unique |
|
| 632 | - do { |
|
| 633 | - $functionname = 'f_calculer_langues_utilisees_' . $boucle->id_table . '_' . time() . '_' . random_int(0, mt_getrandmax()); |
|
| 634 | - } while (function_exists($functionname)); |
|
| 635 | - $code = calculer_boucle('calculer_langues_utilisees', $boucles); |
|
| 636 | - $code = '$SP=0; $command=array();$command["connect"] = $connect = "' . $serveur . '"; $Pile=array(0=>array());' . "\n" . $code; |
|
| 637 | - $code = 'function ' . $functionname . '(){' . $code . '};$res = ' . $functionname . '();'; |
|
| 638 | - $res = ''; |
|
| 639 | - eval($code); |
|
| 640 | - $res = explode(',', $res); |
|
| 641 | - foreach ($res as $lang) { |
|
| 642 | - $langues[$lang] = 1; |
|
| 643 | - } |
|
| 644 | - } else { |
|
| 645 | - $res = sql_select(implode(',', $boucle->select), $boucle->from); |
|
| 646 | - while ($row = sql_fetch($res)) { |
|
| 647 | - $langues[$row['lang']] = 1; |
|
| 648 | - } |
|
| 649 | - } |
|
| 650 | - } |
|
| 651 | - } |
|
| 652 | - |
|
| 653 | - $langues = array_filter(array_keys($langues)); |
|
| 654 | - sort($langues); |
|
| 655 | - $langues = join(',', $langues); |
|
| 656 | - spip_log("langues utilisees: $langues"); |
|
| 657 | - |
|
| 658 | - return $langues; |
|
| 585 | + include_spip('public/interfaces'); |
|
| 586 | + include_spip('public/compiler'); |
|
| 587 | + include_spip('public/composer'); |
|
| 588 | + include_spip('public/phraser_html'); |
|
| 589 | + $langues = []; |
|
| 590 | + |
|
| 591 | + $langues[$GLOBALS['meta']['langue_site']] = 1; |
|
| 592 | + |
|
| 593 | + include_spip('base/objets'); |
|
| 594 | + $tables = lister_tables_objets_sql(); |
|
| 595 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 596 | + |
|
| 597 | + foreach (array_keys($tables) as $t) { |
|
| 598 | + $desc = $trouver_table($t, $serveur); |
|
| 599 | + // c'est une table avec des langues |
|
| 600 | + if ( |
|
| 601 | + $desc['exist'] |
|
| 602 | + and isset($desc['field']['lang']) |
|
| 603 | + and isset($desc['field']['langue_choisie']) |
|
| 604 | + ) { |
|
| 605 | + $boucle = new Boucle(); |
|
| 606 | + $boucle->show = $desc; |
|
| 607 | + $boucle->nom = 'calculer_langues_utilisees'; |
|
| 608 | + $boucle->id_boucle = $desc['table_objet']; |
|
| 609 | + $boucle->id_table = $desc['table_objet']; |
|
| 610 | + $boucle->primary = $desc['key']['PRIMARY KEY'] ?? ''; |
|
| 611 | + $boucle->sql_serveur = $serveur; |
|
| 612 | + $boucle->select[] = 'DISTINCT lang'; |
|
| 613 | + $boucle->from[$desc['table_objet']] = $t; |
|
| 614 | + $boucle->separateur[] = ','; |
|
| 615 | + $boucle->return = '$Pile[$SP][\'lang\']'; |
|
| 616 | + $boucle->iterateur = 'sql'; |
|
| 617 | + |
|
| 618 | + $boucle->descr['nom'] = 'calculer_langues_utilisees'; // eviter notice php |
|
| 619 | + $boucle->descr['sourcefile'] = 'internal'; |
|
| 620 | + $boucle->descr['gram'] = 'html'; |
|
| 621 | + |
|
| 622 | + $boucle = pipeline('pre_boucle', $boucle); |
|
| 623 | + |
|
| 624 | + if ( |
|
| 625 | + isset($desc['statut']) |
|
| 626 | + and $desc['statut'] |
|
| 627 | + ) { |
|
| 628 | + $boucles = [ |
|
| 629 | + 'calculer_langues_utilisees' => $boucle, |
|
| 630 | + ]; |
|
| 631 | + // generer un nom de fonction "anonyme" unique |
|
| 632 | + do { |
|
| 633 | + $functionname = 'f_calculer_langues_utilisees_' . $boucle->id_table . '_' . time() . '_' . random_int(0, mt_getrandmax()); |
|
| 634 | + } while (function_exists($functionname)); |
|
| 635 | + $code = calculer_boucle('calculer_langues_utilisees', $boucles); |
|
| 636 | + $code = '$SP=0; $command=array();$command["connect"] = $connect = "' . $serveur . '"; $Pile=array(0=>array());' . "\n" . $code; |
|
| 637 | + $code = 'function ' . $functionname . '(){' . $code . '};$res = ' . $functionname . '();'; |
|
| 638 | + $res = ''; |
|
| 639 | + eval($code); |
|
| 640 | + $res = explode(',', $res); |
|
| 641 | + foreach ($res as $lang) { |
|
| 642 | + $langues[$lang] = 1; |
|
| 643 | + } |
|
| 644 | + } else { |
|
| 645 | + $res = sql_select(implode(',', $boucle->select), $boucle->from); |
|
| 646 | + while ($row = sql_fetch($res)) { |
|
| 647 | + $langues[$row['lang']] = 1; |
|
| 648 | + } |
|
| 649 | + } |
|
| 650 | + } |
|
| 651 | + } |
|
| 652 | + |
|
| 653 | + $langues = array_filter(array_keys($langues)); |
|
| 654 | + sort($langues); |
|
| 655 | + $langues = join(',', $langues); |
|
| 656 | + spip_log("langues utilisees: $langues"); |
|
| 657 | + |
|
| 658 | + return $langues; |
|
| 659 | 659 | } |
| 660 | 660 | |
| 661 | 661 | /** |
@@ -672,9 +672,9 @@ discard block |
||
| 672 | 672 | * incluant les rubriques noeuds et toutes leurs descendances |
| 673 | 673 | */ |
| 674 | 674 | function calcul_branche_in($id) { |
| 675 | - $calcul_branche_in = charger_fonction('calcul_branche_in', 'inc'); |
|
| 675 | + $calcul_branche_in = charger_fonction('calcul_branche_in', 'inc'); |
|
| 676 | 676 | |
| 677 | - return $calcul_branche_in($id); |
|
| 677 | + return $calcul_branche_in($id); |
|
| 678 | 678 | } |
| 679 | 679 | |
| 680 | 680 | /** |
@@ -692,9 +692,9 @@ discard block |
||
| 692 | 692 | * incluant les rubriques transmises et toutes leurs parentées |
| 693 | 693 | */ |
| 694 | 694 | function calcul_hierarchie_in($id, $tout = true) { |
| 695 | - $calcul_hierarchie_in = charger_fonction('calcul_hierarchie_in', 'inc'); |
|
| 695 | + $calcul_hierarchie_in = charger_fonction('calcul_hierarchie_in', 'inc'); |
|
| 696 | 696 | |
| 697 | - return $calcul_hierarchie_in($id, $tout); |
|
| 697 | + return $calcul_hierarchie_in($id, $tout); |
|
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | |
@@ -715,40 +715,40 @@ discard block |
||
| 715 | 715 | * incluant les rubriques noeuds et toutes leurs descendances |
| 716 | 716 | */ |
| 717 | 717 | function inc_calcul_branche_in_dist($id) { |
| 718 | - static $b = []; |
|
| 719 | - |
|
| 720 | - // normaliser $id qui a pu arriver comme un array, comme un entier, ou comme une chaine NN,NN,NN |
|
| 721 | - if (!is_array($id)) { |
|
| 722 | - $id = explode(',', $id); |
|
| 723 | - } |
|
| 724 | - $id = join(',', array_map('intval', $id)); |
|
| 725 | - if (isset($b[$id])) { |
|
| 726 | - return $b[$id]; |
|
| 727 | - } |
|
| 728 | - |
|
| 729 | - // Notre branche commence par la rubrique de depart |
|
| 730 | - $branche = $r = $id; |
|
| 731 | - |
|
| 732 | - // On ajoute une generation (les filles de la generation precedente) |
|
| 733 | - // jusqu'a epuisement, en se protegeant des references circulaires |
|
| 734 | - $maxiter = 10000; |
|
| 735 | - while ( |
|
| 736 | - $maxiter-- and $filles = sql_allfetsel( |
|
| 737 | - 'id_rubrique', |
|
| 738 | - 'spip_rubriques', |
|
| 739 | - sql_in('id_parent', $r) . ' AND ' . sql_in('id_rubrique', $r, 'NOT') |
|
| 740 | - ) |
|
| 741 | - ) { |
|
| 742 | - $r = join(',', array_column($filles, 'id_rubrique')); |
|
| 743 | - $branche .= ',' . $r; |
|
| 744 | - } |
|
| 745 | - |
|
| 746 | - # securite pour ne pas plomber la conso memoire sur les sites prolifiques |
|
| 747 | - if (strlen($branche) < 10000) { |
|
| 748 | - $b[$id] = $branche; |
|
| 749 | - } |
|
| 750 | - |
|
| 751 | - return $branche; |
|
| 718 | + static $b = []; |
|
| 719 | + |
|
| 720 | + // normaliser $id qui a pu arriver comme un array, comme un entier, ou comme une chaine NN,NN,NN |
|
| 721 | + if (!is_array($id)) { |
|
| 722 | + $id = explode(',', $id); |
|
| 723 | + } |
|
| 724 | + $id = join(',', array_map('intval', $id)); |
|
| 725 | + if (isset($b[$id])) { |
|
| 726 | + return $b[$id]; |
|
| 727 | + } |
|
| 728 | + |
|
| 729 | + // Notre branche commence par la rubrique de depart |
|
| 730 | + $branche = $r = $id; |
|
| 731 | + |
|
| 732 | + // On ajoute une generation (les filles de la generation precedente) |
|
| 733 | + // jusqu'a epuisement, en se protegeant des references circulaires |
|
| 734 | + $maxiter = 10000; |
|
| 735 | + while ( |
|
| 736 | + $maxiter-- and $filles = sql_allfetsel( |
|
| 737 | + 'id_rubrique', |
|
| 738 | + 'spip_rubriques', |
|
| 739 | + sql_in('id_parent', $r) . ' AND ' . sql_in('id_rubrique', $r, 'NOT') |
|
| 740 | + ) |
|
| 741 | + ) { |
|
| 742 | + $r = join(',', array_column($filles, 'id_rubrique')); |
|
| 743 | + $branche .= ',' . $r; |
|
| 744 | + } |
|
| 745 | + |
|
| 746 | + # securite pour ne pas plomber la conso memoire sur les sites prolifiques |
|
| 747 | + if (strlen($branche) < 10000) { |
|
| 748 | + $b[$id] = $branche; |
|
| 749 | + } |
|
| 750 | + |
|
| 751 | + return $branche; |
|
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | |
@@ -770,45 +770,45 @@ discard block |
||
| 770 | 770 | * incluant les rubriques transmises et toutes leurs parentées |
| 771 | 771 | */ |
| 772 | 772 | function inc_calcul_hierarchie_in_dist($id, $tout = true) { |
| 773 | - static $b = []; |
|
| 774 | - |
|
| 775 | - // normaliser $id qui a pu arriver comme un array, comme un entier, ou comme une chaine NN,NN,NN |
|
| 776 | - if (!is_array($id)) { |
|
| 777 | - $id = explode(',', $id); |
|
| 778 | - } |
|
| 779 | - $id = join(',', array_map('intval', $id)); |
|
| 780 | - |
|
| 781 | - if (isset($b[$id])) { |
|
| 782 | - // Notre branche commence par la rubrique de depart si $tout=true |
|
| 783 | - return $tout ? (strlen($b[$id]) ? $b[$id] . ",$id" : $id) : $b[$id]; |
|
| 784 | - } |
|
| 785 | - |
|
| 786 | - $hier = ''; |
|
| 787 | - |
|
| 788 | - // On ajoute une generation (les filles de la generation precedente) |
|
| 789 | - // jusqu'a epuisement, en se protegeant des references circulaires |
|
| 790 | - $ids_nouveaux_parents = $id; |
|
| 791 | - $maxiter = 10000; |
|
| 792 | - while ( |
|
| 793 | - $maxiter-- and $parents = sql_allfetsel( |
|
| 794 | - 'id_parent', |
|
| 795 | - 'spip_rubriques', |
|
| 796 | - sql_in('id_rubrique', $ids_nouveaux_parents) . ' AND ' . sql_in('id_parent', $hier, 'NOT') |
|
| 797 | - ) |
|
| 798 | - ) { |
|
| 799 | - $ids_nouveaux_parents = join(',', array_column($parents, 'id_parent')); |
|
| 800 | - $hier = $ids_nouveaux_parents . (strlen($hier) ? ',' . $hier : ''); |
|
| 801 | - } |
|
| 802 | - |
|
| 803 | - # securite pour ne pas plomber la conso memoire sur les sites prolifiques |
|
| 804 | - if (strlen($hier) < 10000) { |
|
| 805 | - $b[$id] = $hier; |
|
| 806 | - } |
|
| 807 | - |
|
| 808 | - // Notre branche commence par la rubrique de depart si $tout=true |
|
| 809 | - $hier = $tout ? (strlen($hier) ? "$hier,$id" : $id) : $hier; |
|
| 810 | - |
|
| 811 | - return $hier; |
|
| 773 | + static $b = []; |
|
| 774 | + |
|
| 775 | + // normaliser $id qui a pu arriver comme un array, comme un entier, ou comme une chaine NN,NN,NN |
|
| 776 | + if (!is_array($id)) { |
|
| 777 | + $id = explode(',', $id); |
|
| 778 | + } |
|
| 779 | + $id = join(',', array_map('intval', $id)); |
|
| 780 | + |
|
| 781 | + if (isset($b[$id])) { |
|
| 782 | + // Notre branche commence par la rubrique de depart si $tout=true |
|
| 783 | + return $tout ? (strlen($b[$id]) ? $b[$id] . ",$id" : $id) : $b[$id]; |
|
| 784 | + } |
|
| 785 | + |
|
| 786 | + $hier = ''; |
|
| 787 | + |
|
| 788 | + // On ajoute une generation (les filles de la generation precedente) |
|
| 789 | + // jusqu'a epuisement, en se protegeant des references circulaires |
|
| 790 | + $ids_nouveaux_parents = $id; |
|
| 791 | + $maxiter = 10000; |
|
| 792 | + while ( |
|
| 793 | + $maxiter-- and $parents = sql_allfetsel( |
|
| 794 | + 'id_parent', |
|
| 795 | + 'spip_rubriques', |
|
| 796 | + sql_in('id_rubrique', $ids_nouveaux_parents) . ' AND ' . sql_in('id_parent', $hier, 'NOT') |
|
| 797 | + ) |
|
| 798 | + ) { |
|
| 799 | + $ids_nouveaux_parents = join(',', array_column($parents, 'id_parent')); |
|
| 800 | + $hier = $ids_nouveaux_parents . (strlen($hier) ? ',' . $hier : ''); |
|
| 801 | + } |
|
| 802 | + |
|
| 803 | + # securite pour ne pas plomber la conso memoire sur les sites prolifiques |
|
| 804 | + if (strlen($hier) < 10000) { |
|
| 805 | + $b[$id] = $hier; |
|
| 806 | + } |
|
| 807 | + |
|
| 808 | + // Notre branche commence par la rubrique de depart si $tout=true |
|
| 809 | + $hier = $tout ? (strlen($hier) ? "$hier,$id" : $id) : $hier; |
|
| 810 | + |
|
| 811 | + return $hier; |
|
| 812 | 812 | } |
| 813 | 813 | |
| 814 | 814 | |
@@ -826,47 +826,47 @@ discard block |
||
| 826 | 826 | * @return void |
| 827 | 827 | **/ |
| 828 | 828 | function calculer_prochain_postdate($check = false) { |
| 829 | - include_spip('base/abstract_sql'); |
|
| 830 | - if ($check) { |
|
| 831 | - $postdates = ($GLOBALS['meta']['post_dates'] == 'non') ? |
|
| 832 | - 'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : ''; |
|
| 833 | - |
|
| 834 | - $r = sql_select( |
|
| 835 | - 'DISTINCT A.id_rubrique AS id', |
|
| 836 | - 'spip_articles AS A LEFT JOIN spip_rubriques AS R ON A.id_rubrique=R.id_rubrique', |
|
| 837 | - "R.statut != 'publie' AND A.statut='publie'$postdates" |
|
| 838 | - ); |
|
| 839 | - while ($row = sql_fetch($r)) { |
|
| 840 | - publier_branche_rubrique($row['id']); |
|
| 841 | - } |
|
| 842 | - |
|
| 843 | - pipeline('trig_calculer_prochain_postdate', ''); |
|
| 844 | - } |
|
| 845 | - |
|
| 846 | - $t = sql_fetsel( |
|
| 847 | - 'date', |
|
| 848 | - 'spip_articles', |
|
| 849 | - "statut='publie' AND date > " . sql_quote(date('Y-m-d H:i:s')), |
|
| 850 | - '', |
|
| 851 | - 'date', |
|
| 852 | - '1' |
|
| 853 | - ); |
|
| 854 | - |
|
| 855 | - if ($t) { |
|
| 856 | - $t = $t['date']; |
|
| 857 | - if ( |
|
| 858 | - !isset($GLOBALS['meta']['date_prochain_postdate']) |
|
| 859 | - or $t <> $GLOBALS['meta']['date_prochain_postdate'] |
|
| 860 | - ) { |
|
| 861 | - ecrire_meta('date_prochain_postdate', strtotime($t)); |
|
| 862 | - ecrire_meta('derniere_modif', time()); |
|
| 863 | - } |
|
| 864 | - } else { |
|
| 865 | - effacer_meta('date_prochain_postdate'); |
|
| 866 | - ecrire_meta('derniere_modif', time()); |
|
| 867 | - } |
|
| 868 | - |
|
| 869 | - spip_log("prochain postdate: $t"); |
|
| 829 | + include_spip('base/abstract_sql'); |
|
| 830 | + if ($check) { |
|
| 831 | + $postdates = ($GLOBALS['meta']['post_dates'] == 'non') ? |
|
| 832 | + 'AND A.date <= ' . sql_quote(date('Y-m-d H:i:s')) : ''; |
|
| 833 | + |
|
| 834 | + $r = sql_select( |
|
| 835 | + 'DISTINCT A.id_rubrique AS id', |
|
| 836 | + 'spip_articles AS A LEFT JOIN spip_rubriques AS R ON A.id_rubrique=R.id_rubrique', |
|
| 837 | + "R.statut != 'publie' AND A.statut='publie'$postdates" |
|
| 838 | + ); |
|
| 839 | + while ($row = sql_fetch($r)) { |
|
| 840 | + publier_branche_rubrique($row['id']); |
|
| 841 | + } |
|
| 842 | + |
|
| 843 | + pipeline('trig_calculer_prochain_postdate', ''); |
|
| 844 | + } |
|
| 845 | + |
|
| 846 | + $t = sql_fetsel( |
|
| 847 | + 'date', |
|
| 848 | + 'spip_articles', |
|
| 849 | + "statut='publie' AND date > " . sql_quote(date('Y-m-d H:i:s')), |
|
| 850 | + '', |
|
| 851 | + 'date', |
|
| 852 | + '1' |
|
| 853 | + ); |
|
| 854 | + |
|
| 855 | + if ($t) { |
|
| 856 | + $t = $t['date']; |
|
| 857 | + if ( |
|
| 858 | + !isset($GLOBALS['meta']['date_prochain_postdate']) |
|
| 859 | + or $t <> $GLOBALS['meta']['date_prochain_postdate'] |
|
| 860 | + ) { |
|
| 861 | + ecrire_meta('date_prochain_postdate', strtotime($t)); |
|
| 862 | + ecrire_meta('derniere_modif', time()); |
|
| 863 | + } |
|
| 864 | + } else { |
|
| 865 | + effacer_meta('date_prochain_postdate'); |
|
| 866 | + ecrire_meta('derniere_modif', time()); |
|
| 867 | + } |
|
| 868 | + |
|
| 869 | + spip_log("prochain postdate: $t"); |
|
| 870 | 870 | } |
| 871 | 871 | |
| 872 | 872 | /** |
@@ -891,62 +891,62 @@ discard block |
||
| 891 | 891 | */ |
| 892 | 892 | function creer_rubrique_nommee($titre, $id_parent = 0, $serveur = '') { |
| 893 | 893 | |
| 894 | - // eclater l'arborescence demandee |
|
| 895 | - // echapper les </multi> et autres balises fermantes html |
|
| 896 | - $titre = preg_replace(',</([a-z][^>]*)>,ims', "<@\\1>", $titre); |
|
| 897 | - $arbo = explode('/', preg_replace(',^/,', '', $titre)); |
|
| 898 | - include_spip('base/abstract_sql'); |
|
| 899 | - foreach ($arbo as $titre) { |
|
| 900 | - // retablir les </multi> et autres balises fermantes html |
|
| 901 | - $titre = preg_replace(',<@([a-z][^>]*)>,ims', "</\\1>", $titre); |
|
| 902 | - $r = sql_getfetsel( |
|
| 903 | - 'id_rubrique', |
|
| 904 | - 'spip_rubriques', |
|
| 905 | - 'titre = ' . sql_quote($titre) . ' AND id_parent=' . intval($id_parent), |
|
| 906 | - $groupby = [], |
|
| 907 | - $orderby = [], |
|
| 908 | - $limit = '', |
|
| 909 | - $having = [], |
|
| 910 | - $serveur |
|
| 911 | - ); |
|
| 912 | - if ($r !== null) { |
|
| 913 | - $id_parent = $r; |
|
| 914 | - } else { |
|
| 915 | - $id_rubrique = sql_insertq('spip_rubriques', [ |
|
| 916 | - 'titre' => $titre, |
|
| 917 | - 'id_parent' => $id_parent, |
|
| 918 | - 'statut' => 'prepa' |
|
| 919 | - ], $desc = [], $serveur); |
|
| 920 | - if ($id_parent > 0) { |
|
| 921 | - $data = sql_fetsel( |
|
| 922 | - 'id_secteur,lang', |
|
| 923 | - 'spip_rubriques', |
|
| 924 | - "id_rubrique=$id_parent", |
|
| 925 | - $groupby = [], |
|
| 926 | - $orderby = [], |
|
| 927 | - $limit = '', |
|
| 928 | - $having = [], |
|
| 929 | - $serveur |
|
| 930 | - ); |
|
| 931 | - $id_secteur = $data['id_secteur']; |
|
| 932 | - $lang = $data['lang']; |
|
| 933 | - } else { |
|
| 934 | - $id_secteur = $id_rubrique; |
|
| 935 | - $lang = $GLOBALS['meta']['langue_site']; |
|
| 936 | - } |
|
| 937 | - |
|
| 938 | - sql_updateq( |
|
| 939 | - 'spip_rubriques', |
|
| 940 | - ['id_secteur' => $id_secteur, 'lang' => $lang], |
|
| 941 | - 'id_rubrique=' . intval($id_rubrique), |
|
| 942 | - [], |
|
| 943 | - $serveur |
|
| 944 | - ); |
|
| 945 | - |
|
| 946 | - // pour la recursion |
|
| 947 | - $id_parent = $id_rubrique; |
|
| 948 | - } |
|
| 949 | - } |
|
| 950 | - |
|
| 951 | - return intval($id_parent); |
|
| 894 | + // eclater l'arborescence demandee |
|
| 895 | + // echapper les </multi> et autres balises fermantes html |
|
| 896 | + $titre = preg_replace(',</([a-z][^>]*)>,ims', "<@\\1>", $titre); |
|
| 897 | + $arbo = explode('/', preg_replace(',^/,', '', $titre)); |
|
| 898 | + include_spip('base/abstract_sql'); |
|
| 899 | + foreach ($arbo as $titre) { |
|
| 900 | + // retablir les </multi> et autres balises fermantes html |
|
| 901 | + $titre = preg_replace(',<@([a-z][^>]*)>,ims', "</\\1>", $titre); |
|
| 902 | + $r = sql_getfetsel( |
|
| 903 | + 'id_rubrique', |
|
| 904 | + 'spip_rubriques', |
|
| 905 | + 'titre = ' . sql_quote($titre) . ' AND id_parent=' . intval($id_parent), |
|
| 906 | + $groupby = [], |
|
| 907 | + $orderby = [], |
|
| 908 | + $limit = '', |
|
| 909 | + $having = [], |
|
| 910 | + $serveur |
|
| 911 | + ); |
|
| 912 | + if ($r !== null) { |
|
| 913 | + $id_parent = $r; |
|
| 914 | + } else { |
|
| 915 | + $id_rubrique = sql_insertq('spip_rubriques', [ |
|
| 916 | + 'titre' => $titre, |
|
| 917 | + 'id_parent' => $id_parent, |
|
| 918 | + 'statut' => 'prepa' |
|
| 919 | + ], $desc = [], $serveur); |
|
| 920 | + if ($id_parent > 0) { |
|
| 921 | + $data = sql_fetsel( |
|
| 922 | + 'id_secteur,lang', |
|
| 923 | + 'spip_rubriques', |
|
| 924 | + "id_rubrique=$id_parent", |
|
| 925 | + $groupby = [], |
|
| 926 | + $orderby = [], |
|
| 927 | + $limit = '', |
|
| 928 | + $having = [], |
|
| 929 | + $serveur |
|
| 930 | + ); |
|
| 931 | + $id_secteur = $data['id_secteur']; |
|
| 932 | + $lang = $data['lang']; |
|
| 933 | + } else { |
|
| 934 | + $id_secteur = $id_rubrique; |
|
| 935 | + $lang = $GLOBALS['meta']['langue_site']; |
|
| 936 | + } |
|
| 937 | + |
|
| 938 | + sql_updateq( |
|
| 939 | + 'spip_rubriques', |
|
| 940 | + ['id_secteur' => $id_secteur, 'lang' => $lang], |
|
| 941 | + 'id_rubrique=' . intval($id_rubrique), |
|
| 942 | + [], |
|
| 943 | + $serveur |
|
| 944 | + ); |
|
| 945 | + |
|
| 946 | + // pour la recursion |
|
| 947 | + $id_parent = $id_rubrique; |
|
| 948 | + } |
|
| 949 | + } |
|
| 950 | + |
|
| 951 | + return intval($id_parent); |
|
| 952 | 952 | } |
@@ -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 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | // securité |
| 24 | 24 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 25 | - return; |
|
| 25 | + return; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | // se faciliter la lecture du charset |
@@ -42,45 +42,45 @@ discard block |
||
| 42 | 42 | * - false si le charset n'est pas décrit dans le répertoire charsets/ |
| 43 | 43 | **/ |
| 44 | 44 | function load_charset($charset = 'AUTO') { |
| 45 | - if ($charset == 'AUTO') { |
|
| 46 | - $charset = $GLOBALS['meta']['charset']; |
|
| 47 | - } |
|
| 48 | - $charset = trim(strtolower($charset)); |
|
| 49 | - if (isset($GLOBALS['CHARSET'][$charset])) { |
|
| 50 | - return $charset; |
|
| 51 | - } |
|
| 52 | - |
|
| 53 | - if ($charset == 'utf-8') { |
|
| 54 | - $GLOBALS['CHARSET'][$charset] = []; |
|
| 55 | - |
|
| 56 | - return $charset; |
|
| 57 | - } |
|
| 58 | - |
|
| 59 | - // Quelques synonymes |
|
| 60 | - if ($charset == '') { |
|
| 61 | - $charset = 'iso-8859-1'; |
|
| 62 | - } else { |
|
| 63 | - if ($charset == 'windows-1250') { |
|
| 64 | - $charset = 'cp1250'; |
|
| 65 | - } else { |
|
| 66 | - if ($charset == 'windows-1251') { |
|
| 67 | - $charset = 'cp1251'; |
|
| 68 | - } else { |
|
| 69 | - if ($charset == 'windows-1256') { |
|
| 70 | - $charset = 'cp1256'; |
|
| 71 | - } |
|
| 72 | - } |
|
| 73 | - } |
|
| 74 | - } |
|
| 75 | - |
|
| 76 | - if (find_in_path($charset . '.php', 'charsets/', true)) { |
|
| 77 | - return $charset; |
|
| 78 | - } else { |
|
| 79 | - spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'"); |
|
| 80 | - $GLOBALS['CHARSET'][$charset] = []; |
|
| 81 | - |
|
| 82 | - return false; |
|
| 83 | - } |
|
| 45 | + if ($charset == 'AUTO') { |
|
| 46 | + $charset = $GLOBALS['meta']['charset']; |
|
| 47 | + } |
|
| 48 | + $charset = trim(strtolower($charset)); |
|
| 49 | + if (isset($GLOBALS['CHARSET'][$charset])) { |
|
| 50 | + return $charset; |
|
| 51 | + } |
|
| 52 | + |
|
| 53 | + if ($charset == 'utf-8') { |
|
| 54 | + $GLOBALS['CHARSET'][$charset] = []; |
|
| 55 | + |
|
| 56 | + return $charset; |
|
| 57 | + } |
|
| 58 | + |
|
| 59 | + // Quelques synonymes |
|
| 60 | + if ($charset == '') { |
|
| 61 | + $charset = 'iso-8859-1'; |
|
| 62 | + } else { |
|
| 63 | + if ($charset == 'windows-1250') { |
|
| 64 | + $charset = 'cp1250'; |
|
| 65 | + } else { |
|
| 66 | + if ($charset == 'windows-1251') { |
|
| 67 | + $charset = 'cp1251'; |
|
| 68 | + } else { |
|
| 69 | + if ($charset == 'windows-1256') { |
|
| 70 | + $charset = 'cp1256'; |
|
| 71 | + } |
|
| 72 | + } |
|
| 73 | + } |
|
| 74 | + } |
|
| 75 | + |
|
| 76 | + if (find_in_path($charset . '.php', 'charsets/', true)) { |
|
| 77 | + return $charset; |
|
| 78 | + } else { |
|
| 79 | + spip_log("Erreur: pas de fichier de conversion 'charsets/$charset'"); |
|
| 80 | + $GLOBALS['CHARSET'][$charset] = []; |
|
| 81 | + |
|
| 82 | + return false; |
|
| 83 | + } |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | |
@@ -91,31 +91,31 @@ discard block |
||
| 91 | 91 | * true si toutes les fonctions mb nécessaires sont présentes |
| 92 | 92 | **/ |
| 93 | 93 | function init_mb_string() { |
| 94 | - static $mb; |
|
| 95 | - |
|
| 96 | - // verifier que tout est present (fonctions mb_string pour php >= 4.0.6) |
|
| 97 | - // et que le charset interne est connu de mb_string |
|
| 98 | - if (!$mb) { |
|
| 99 | - if ( |
|
| 100 | - function_exists('mb_internal_encoding') |
|
| 101 | - and function_exists('mb_detect_order') |
|
| 102 | - and function_exists('mb_substr') |
|
| 103 | - and function_exists('mb_strlen') |
|
| 104 | - and function_exists('mb_strtolower') |
|
| 105 | - and function_exists('mb_strtoupper') |
|
| 106 | - and function_exists('mb_encode_mimeheader') |
|
| 107 | - and function_exists('mb_encode_numericentity') |
|
| 108 | - and function_exists('mb_decode_numericentity') |
|
| 109 | - and mb_detect_order(lire_config('charset', _DEFAULT_CHARSET)) |
|
| 110 | - ) { |
|
| 111 | - mb_internal_encoding('utf-8'); |
|
| 112 | - $mb = 1; |
|
| 113 | - } else { |
|
| 114 | - $mb = -1; |
|
| 115 | - } |
|
| 116 | - } |
|
| 117 | - |
|
| 118 | - return ($mb == 1); |
|
| 94 | + static $mb; |
|
| 95 | + |
|
| 96 | + // verifier que tout est present (fonctions mb_string pour php >= 4.0.6) |
|
| 97 | + // et que le charset interne est connu de mb_string |
|
| 98 | + if (!$mb) { |
|
| 99 | + if ( |
|
| 100 | + function_exists('mb_internal_encoding') |
|
| 101 | + and function_exists('mb_detect_order') |
|
| 102 | + and function_exists('mb_substr') |
|
| 103 | + and function_exists('mb_strlen') |
|
| 104 | + and function_exists('mb_strtolower') |
|
| 105 | + and function_exists('mb_strtoupper') |
|
| 106 | + and function_exists('mb_encode_mimeheader') |
|
| 107 | + and function_exists('mb_encode_numericentity') |
|
| 108 | + and function_exists('mb_decode_numericentity') |
|
| 109 | + and mb_detect_order(lire_config('charset', _DEFAULT_CHARSET)) |
|
| 110 | + ) { |
|
| 111 | + mb_internal_encoding('utf-8'); |
|
| 112 | + $mb = 1; |
|
| 113 | + } else { |
|
| 114 | + $mb = -1; |
|
| 115 | + } |
|
| 116 | + } |
|
| 117 | + |
|
| 118 | + return ($mb == 1); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -130,21 +130,21 @@ discard block |
||
| 130 | 130 | * true si iconv fonctionne correctement |
| 131 | 131 | **/ |
| 132 | 132 | function test_iconv() { |
| 133 | - static $iconv_ok; |
|
| 134 | - |
|
| 135 | - if (!$iconv_ok) { |
|
| 136 | - if (!function_exists('iconv')) { |
|
| 137 | - $iconv_ok = -1; |
|
| 138 | - } else { |
|
| 139 | - if (utf_32_to_unicode(@iconv('utf-8', 'utf-32', 'chaine de test')) == 'chaine de test') { |
|
| 140 | - $iconv_ok = 1; |
|
| 141 | - } else { |
|
| 142 | - $iconv_ok = -1; |
|
| 143 | - } |
|
| 144 | - } |
|
| 145 | - } |
|
| 146 | - |
|
| 147 | - return ($iconv_ok == 1); |
|
| 133 | + static $iconv_ok; |
|
| 134 | + |
|
| 135 | + if (!$iconv_ok) { |
|
| 136 | + if (!function_exists('iconv')) { |
|
| 137 | + $iconv_ok = -1; |
|
| 138 | + } else { |
|
| 139 | + if (utf_32_to_unicode(@iconv('utf-8', 'utf-32', 'chaine de test')) == 'chaine de test') { |
|
| 140 | + $iconv_ok = 1; |
|
| 141 | + } else { |
|
| 142 | + $iconv_ok = -1; |
|
| 143 | + } |
|
| 144 | + } |
|
| 145 | + } |
|
| 146 | + |
|
| 147 | + return ($iconv_ok == 1); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | |
@@ -157,18 +157,18 @@ discard block |
||
| 157 | 157 | * true si PCRE supporte l'UTF-8 correctement |
| 158 | 158 | **/ |
| 159 | 159 | function test_pcre_unicode() { |
| 160 | - static $pcre_ok = 0; |
|
| 161 | - |
|
| 162 | - if (!$pcre_ok) { |
|
| 163 | - $s = ' ' . chr(195) . chr(169) . 't' . chr(195) . chr(169) . ' '; |
|
| 164 | - if (preg_match(',\W...\W,u', $s)) { |
|
| 165 | - $pcre_ok = 1; |
|
| 166 | - } else { |
|
| 167 | - $pcre_ok = -1; |
|
| 168 | - } |
|
| 169 | - } |
|
| 170 | - |
|
| 171 | - return $pcre_ok == 1; |
|
| 160 | + static $pcre_ok = 0; |
|
| 161 | + |
|
| 162 | + if (!$pcre_ok) { |
|
| 163 | + $s = ' ' . chr(195) . chr(169) . 't' . chr(195) . chr(169) . ' '; |
|
| 164 | + if (preg_match(',\W...\W,u', $s)) { |
|
| 165 | + $pcre_ok = 1; |
|
| 166 | + } else { |
|
| 167 | + $pcre_ok = -1; |
|
| 168 | + } |
|
| 169 | + } |
|
| 170 | + |
|
| 171 | + return $pcre_ok == 1; |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -184,22 +184,22 @@ discard block |
||
| 184 | 184 | * Plage de caractères |
| 185 | 185 | **/ |
| 186 | 186 | function pcre_lettres_unicode() { |
| 187 | - static $plage_unicode; |
|
| 188 | - |
|
| 189 | - if (!$plage_unicode) { |
|
| 190 | - if (test_pcre_unicode()) { |
|
| 191 | - // cf. http://www.unicode.org/charts/ |
|
| 192 | - $plage_unicode = '\w' // iso-latin |
|
| 193 | - . '\x{100}-\x{24f}' // europeen etendu |
|
| 194 | - . '\x{300}-\x{1cff}' // des tas de trucs |
|
| 195 | - ; |
|
| 196 | - } else { |
|
| 197 | - // fallback a trois sous |
|
| 198 | - $plage_unicode = '\w'; |
|
| 199 | - } |
|
| 200 | - } |
|
| 201 | - |
|
| 202 | - return $plage_unicode; |
|
| 187 | + static $plage_unicode; |
|
| 188 | + |
|
| 189 | + if (!$plage_unicode) { |
|
| 190 | + if (test_pcre_unicode()) { |
|
| 191 | + // cf. http://www.unicode.org/charts/ |
|
| 192 | + $plage_unicode = '\w' // iso-latin |
|
| 193 | + . '\x{100}-\x{24f}' // europeen etendu |
|
| 194 | + . '\x{300}-\x{1cff}' // des tas de trucs |
|
| 195 | + ; |
|
| 196 | + } else { |
|
| 197 | + // fallback a trois sous |
|
| 198 | + $plage_unicode = '\w'; |
|
| 199 | + } |
|
| 200 | + } |
|
| 201 | + |
|
| 202 | + return $plage_unicode; |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | * Plage de caractères |
| 218 | 218 | **/ |
| 219 | 219 | function plage_punct_unicode() { |
| 220 | - return '\xE2(\x80[\x80-\xBF]|\x81[\x80-\xAF])'; |
|
| 220 | + return '\xE2(\x80[\x80-\xBF]|\x81[\x80-\xAF])'; |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | /** |
@@ -237,75 +237,75 @@ discard block |
||
| 237 | 237 | * Texte corrigé |
| 238 | 238 | **/ |
| 239 | 239 | function corriger_caracteres_windows($texte, $charset = 'AUTO', $charset_cible = 'unicode') { |
| 240 | - static $trans; |
|
| 241 | - |
|
| 242 | - if (is_array($texte)) { |
|
| 243 | - return array_map('corriger_caracteres_windows', $texte); |
|
| 244 | - } |
|
| 245 | - |
|
| 246 | - if ($charset == 'AUTO') { |
|
| 247 | - $charset = lire_config('charset', _DEFAULT_CHARSET); |
|
| 248 | - } |
|
| 249 | - if ($charset == 'utf-8') { |
|
| 250 | - $p = chr(194); |
|
| 251 | - if (strpos($texte, $p) == false) { |
|
| 252 | - return $texte; |
|
| 253 | - } |
|
| 254 | - } else { |
|
| 255 | - if ($charset == 'iso-8859-1') { |
|
| 256 | - $p = ''; |
|
| 257 | - } else { |
|
| 258 | - return $texte; |
|
| 259 | - } |
|
| 260 | - } |
|
| 261 | - |
|
| 262 | - if (!isset($trans[$charset][$charset_cible])) { |
|
| 263 | - $trans[$charset][$charset_cible] = [ |
|
| 264 | - $p . chr(128) => '€', |
|
| 265 | - $p . chr(129) => ' ', # pas affecte |
|
| 266 | - $p . chr(130) => '‚', |
|
| 267 | - $p . chr(131) => 'ƒ', |
|
| 268 | - $p . chr(132) => '„', |
|
| 269 | - $p . chr(133) => '…', |
|
| 270 | - $p . chr(134) => '†', |
|
| 271 | - $p . chr(135) => '‡', |
|
| 272 | - $p . chr(136) => 'ˆ', |
|
| 273 | - $p . chr(137) => '‰', |
|
| 274 | - $p . chr(138) => 'Š', |
|
| 275 | - $p . chr(139) => '‹', |
|
| 276 | - $p . chr(140) => 'Œ', |
|
| 277 | - $p . chr(141) => ' ', # pas affecte |
|
| 278 | - $p . chr(142) => 'Ž', |
|
| 279 | - $p . chr(143) => ' ', # pas affecte |
|
| 280 | - $p . chr(144) => ' ', # pas affecte |
|
| 281 | - $p . chr(145) => '‘', |
|
| 282 | - $p . chr(146) => '’', |
|
| 283 | - $p . chr(147) => '“', |
|
| 284 | - $p . chr(148) => '”', |
|
| 285 | - $p . chr(149) => '•', |
|
| 286 | - $p . chr(150) => '–', |
|
| 287 | - $p . chr(151) => '—', |
|
| 288 | - $p . chr(152) => '˜', |
|
| 289 | - $p . chr(153) => '™', |
|
| 290 | - $p . chr(154) => 'š', |
|
| 291 | - $p . chr(155) => '›', |
|
| 292 | - $p . chr(156) => 'œ', |
|
| 293 | - $p . chr(157) => ' ', # pas affecte |
|
| 294 | - $p . chr(158) => 'ž', |
|
| 295 | - $p . chr(159) => 'Ÿ', |
|
| 296 | - ]; |
|
| 297 | - if ($charset_cible != 'unicode') { |
|
| 298 | - foreach ($trans[$charset][$charset_cible] as $k => $c) { |
|
| 299 | - $trans[$charset][$charset_cible][$k] = unicode2charset($c, $charset_cible); |
|
| 300 | - } |
|
| 301 | - } |
|
| 302 | - } |
|
| 303 | - |
|
| 304 | - return @str_replace( |
|
| 305 | - array_keys($trans[$charset][$charset_cible]), |
|
| 306 | - array_values($trans[$charset][$charset_cible]), |
|
| 307 | - $texte |
|
| 308 | - ); |
|
| 240 | + static $trans; |
|
| 241 | + |
|
| 242 | + if (is_array($texte)) { |
|
| 243 | + return array_map('corriger_caracteres_windows', $texte); |
|
| 244 | + } |
|
| 245 | + |
|
| 246 | + if ($charset == 'AUTO') { |
|
| 247 | + $charset = lire_config('charset', _DEFAULT_CHARSET); |
|
| 248 | + } |
|
| 249 | + if ($charset == 'utf-8') { |
|
| 250 | + $p = chr(194); |
|
| 251 | + if (strpos($texte, $p) == false) { |
|
| 252 | + return $texte; |
|
| 253 | + } |
|
| 254 | + } else { |
|
| 255 | + if ($charset == 'iso-8859-1') { |
|
| 256 | + $p = ''; |
|
| 257 | + } else { |
|
| 258 | + return $texte; |
|
| 259 | + } |
|
| 260 | + } |
|
| 261 | + |
|
| 262 | + if (!isset($trans[$charset][$charset_cible])) { |
|
| 263 | + $trans[$charset][$charset_cible] = [ |
|
| 264 | + $p . chr(128) => '€', |
|
| 265 | + $p . chr(129) => ' ', # pas affecte |
|
| 266 | + $p . chr(130) => '‚', |
|
| 267 | + $p . chr(131) => 'ƒ', |
|
| 268 | + $p . chr(132) => '„', |
|
| 269 | + $p . chr(133) => '…', |
|
| 270 | + $p . chr(134) => '†', |
|
| 271 | + $p . chr(135) => '‡', |
|
| 272 | + $p . chr(136) => 'ˆ', |
|
| 273 | + $p . chr(137) => '‰', |
|
| 274 | + $p . chr(138) => 'Š', |
|
| 275 | + $p . chr(139) => '‹', |
|
| 276 | + $p . chr(140) => 'Œ', |
|
| 277 | + $p . chr(141) => ' ', # pas affecte |
|
| 278 | + $p . chr(142) => 'Ž', |
|
| 279 | + $p . chr(143) => ' ', # pas affecte |
|
| 280 | + $p . chr(144) => ' ', # pas affecte |
|
| 281 | + $p . chr(145) => '‘', |
|
| 282 | + $p . chr(146) => '’', |
|
| 283 | + $p . chr(147) => '“', |
|
| 284 | + $p . chr(148) => '”', |
|
| 285 | + $p . chr(149) => '•', |
|
| 286 | + $p . chr(150) => '–', |
|
| 287 | + $p . chr(151) => '—', |
|
| 288 | + $p . chr(152) => '˜', |
|
| 289 | + $p . chr(153) => '™', |
|
| 290 | + $p . chr(154) => 'š', |
|
| 291 | + $p . chr(155) => '›', |
|
| 292 | + $p . chr(156) => 'œ', |
|
| 293 | + $p . chr(157) => ' ', # pas affecte |
|
| 294 | + $p . chr(158) => 'ž', |
|
| 295 | + $p . chr(159) => 'Ÿ', |
|
| 296 | + ]; |
|
| 297 | + if ($charset_cible != 'unicode') { |
|
| 298 | + foreach ($trans[$charset][$charset_cible] as $k => $c) { |
|
| 299 | + $trans[$charset][$charset_cible][$k] = unicode2charset($c, $charset_cible); |
|
| 300 | + } |
|
| 301 | + } |
|
| 302 | + } |
|
| 303 | + |
|
| 304 | + return @str_replace( |
|
| 305 | + array_keys($trans[$charset][$charset_cible]), |
|
| 306 | + array_values($trans[$charset][$charset_cible]), |
|
| 307 | + $texte |
|
| 308 | + ); |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | |
@@ -322,26 +322,26 @@ discard block |
||
| 322 | 322 | * Texte converti |
| 323 | 323 | **/ |
| 324 | 324 | function html2unicode($texte, $secure = false) { |
| 325 | - if (strpos($texte, '&') === false) { |
|
| 326 | - return $texte; |
|
| 327 | - } |
|
| 328 | - static $trans = []; |
|
| 329 | - if (!$trans) { |
|
| 330 | - load_charset('html'); |
|
| 331 | - foreach ($GLOBALS['CHARSET']['html'] as $key => $val) { |
|
| 332 | - $trans["&$key;"] = $val; |
|
| 333 | - } |
|
| 334 | - } |
|
| 335 | - |
|
| 336 | - if ($secure) { |
|
| 337 | - return str_replace(array_keys($trans), array_values($trans), $texte); |
|
| 338 | - } else { |
|
| 339 | - return str_replace( |
|
| 340 | - ['&', '"', '<', '>'], |
|
| 341 | - ['&', '"', '<', '>'], |
|
| 342 | - str_replace(array_keys($trans), array_values($trans), $texte) |
|
| 343 | - ); |
|
| 344 | - } |
|
| 325 | + if (strpos($texte, '&') === false) { |
|
| 326 | + return $texte; |
|
| 327 | + } |
|
| 328 | + static $trans = []; |
|
| 329 | + if (!$trans) { |
|
| 330 | + load_charset('html'); |
|
| 331 | + foreach ($GLOBALS['CHARSET']['html'] as $key => $val) { |
|
| 332 | + $trans["&$key;"] = $val; |
|
| 333 | + } |
|
| 334 | + } |
|
| 335 | + |
|
| 336 | + if ($secure) { |
|
| 337 | + return str_replace(array_keys($trans), array_values($trans), $texte); |
|
| 338 | + } else { |
|
| 339 | + return str_replace( |
|
| 340 | + ['&', '"', '<', '>'], |
|
| 341 | + ['&', '"', '<', '>'], |
|
| 342 | + str_replace(array_keys($trans), array_values($trans), $texte) |
|
| 343 | + ); |
|
| 344 | + } |
|
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | |
@@ -356,16 +356,16 @@ discard block |
||
| 356 | 356 | * Texte converti |
| 357 | 357 | **/ |
| 358 | 358 | function mathml2unicode($texte) { |
| 359 | - static $trans; |
|
| 360 | - if (!$trans) { |
|
| 361 | - load_charset('mathml'); |
|
| 359 | + static $trans; |
|
| 360 | + if (!$trans) { |
|
| 361 | + load_charset('mathml'); |
|
| 362 | 362 | |
| 363 | - foreach ($GLOBALS['CHARSET']['mathml'] as $key => $val) { |
|
| 364 | - $trans["&$key;"] = $val; |
|
| 365 | - } |
|
| 366 | - } |
|
| 363 | + foreach ($GLOBALS['CHARSET']['mathml'] as $key => $val) { |
|
| 364 | + $trans["&$key;"] = $val; |
|
| 365 | + } |
|
| 366 | + } |
|
| 367 | 367 | |
| 368 | - return str_replace(array_keys($trans), array_values($trans), $texte); |
|
| 368 | + return str_replace(array_keys($trans), array_values($trans), $texte); |
|
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | |
@@ -387,75 +387,75 @@ discard block |
||
| 387 | 387 | * Texte converti en unicode |
| 388 | 388 | **/ |
| 389 | 389 | function charset2unicode($texte, $charset = 'AUTO' /* $forcer: obsolete*/) { |
| 390 | - static $trans; |
|
| 391 | - |
|
| 392 | - if ($charset == 'AUTO') { |
|
| 393 | - $charset = lire_config('charset', _DEFAULT_CHARSET); |
|
| 394 | - } |
|
| 395 | - |
|
| 396 | - if ($charset == '') { |
|
| 397 | - $charset = 'iso-8859-1'; |
|
| 398 | - } |
|
| 399 | - $charset = strtolower($charset); |
|
| 400 | - |
|
| 401 | - switch ($charset) { |
|
| 402 | - case 'utf-8': |
|
| 403 | - case 'utf8': |
|
| 404 | - return utf_8_to_unicode($texte); |
|
| 405 | - |
|
| 406 | - case 'iso-8859-1': |
|
| 407 | - $texte = corriger_caracteres_windows($texte, 'iso-8859-1'); |
|
| 408 | - // pas de break; ici, on suit sur default: |
|
| 409 | - |
|
| 410 | - default: |
|
| 411 | - // mbstring presente ? |
|
| 412 | - if (init_mb_string()) { |
|
| 413 | - $order = mb_detect_order(); |
|
| 414 | - try { |
|
| 415 | - # mb_string connait-il $charset? |
|
| 416 | - if ($order and mb_detect_order($charset)) { |
|
| 417 | - $s = mb_convert_encoding($texte, 'utf-8', $charset); |
|
| 418 | - if ($s && $s != $texte) { |
|
| 419 | - return utf_8_to_unicode($s); |
|
| 420 | - } |
|
| 421 | - } |
|
| 422 | - } catch (\Error $e) { |
|
| 423 | - // Le charset n'existe probablement pas |
|
| 424 | - } finally { |
|
| 425 | - mb_detect_order($order); # remettre comme precedemment |
|
| 426 | - } |
|
| 427 | - } |
|
| 428 | - |
|
| 429 | - // Sinon, peut-etre connaissons-nous ce charset ? |
|
| 430 | - if (!isset($trans[$charset])) { |
|
| 431 | - if ( |
|
| 432 | - $cset = load_charset($charset) |
|
| 433 | - and is_array($GLOBALS['CHARSET'][$cset]) |
|
| 434 | - ) { |
|
| 435 | - foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) { |
|
| 436 | - $trans[$charset][chr($key)] = '&#' . $val . ';'; |
|
| 437 | - } |
|
| 438 | - } |
|
| 439 | - } |
|
| 440 | - if (isset($trans[$charset]) and is_countable($trans[$charset]) ? count($trans[$charset]) : 0) { |
|
| 441 | - return str_replace(array_keys($trans[$charset]), array_values($trans[$charset]), $texte); |
|
| 442 | - } |
|
| 443 | - |
|
| 444 | - // Sinon demander a iconv (malgre le fait qu'il coupe quand un |
|
| 445 | - // caractere n'appartient pas au charset, mais c'est un probleme |
|
| 446 | - // surtout en utf-8, gere ci-dessus) |
|
| 447 | - if (test_iconv()) { |
|
| 448 | - $s = iconv($charset, 'utf-32le', $texte); |
|
| 449 | - if ($s) { |
|
| 450 | - return utf_32_to_unicode($s); |
|
| 451 | - } |
|
| 452 | - } |
|
| 453 | - |
|
| 454 | - // Au pire ne rien faire |
|
| 455 | - spip_log("erreur charset '$charset' non supporte"); |
|
| 456 | - |
|
| 457 | - return $texte; |
|
| 458 | - } |
|
| 390 | + static $trans; |
|
| 391 | + |
|
| 392 | + if ($charset == 'AUTO') { |
|
| 393 | + $charset = lire_config('charset', _DEFAULT_CHARSET); |
|
| 394 | + } |
|
| 395 | + |
|
| 396 | + if ($charset == '') { |
|
| 397 | + $charset = 'iso-8859-1'; |
|
| 398 | + } |
|
| 399 | + $charset = strtolower($charset); |
|
| 400 | + |
|
| 401 | + switch ($charset) { |
|
| 402 | + case 'utf-8': |
|
| 403 | + case 'utf8': |
|
| 404 | + return utf_8_to_unicode($texte); |
|
| 405 | + |
|
| 406 | + case 'iso-8859-1': |
|
| 407 | + $texte = corriger_caracteres_windows($texte, 'iso-8859-1'); |
|
| 408 | + // pas de break; ici, on suit sur default: |
|
| 409 | + |
|
| 410 | + default: |
|
| 411 | + // mbstring presente ? |
|
| 412 | + if (init_mb_string()) { |
|
| 413 | + $order = mb_detect_order(); |
|
| 414 | + try { |
|
| 415 | + # mb_string connait-il $charset? |
|
| 416 | + if ($order and mb_detect_order($charset)) { |
|
| 417 | + $s = mb_convert_encoding($texte, 'utf-8', $charset); |
|
| 418 | + if ($s && $s != $texte) { |
|
| 419 | + return utf_8_to_unicode($s); |
|
| 420 | + } |
|
| 421 | + } |
|
| 422 | + } catch (\Error $e) { |
|
| 423 | + // Le charset n'existe probablement pas |
|
| 424 | + } finally { |
|
| 425 | + mb_detect_order($order); # remettre comme precedemment |
|
| 426 | + } |
|
| 427 | + } |
|
| 428 | + |
|
| 429 | + // Sinon, peut-etre connaissons-nous ce charset ? |
|
| 430 | + if (!isset($trans[$charset])) { |
|
| 431 | + if ( |
|
| 432 | + $cset = load_charset($charset) |
|
| 433 | + and is_array($GLOBALS['CHARSET'][$cset]) |
|
| 434 | + ) { |
|
| 435 | + foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) { |
|
| 436 | + $trans[$charset][chr($key)] = '&#' . $val . ';'; |
|
| 437 | + } |
|
| 438 | + } |
|
| 439 | + } |
|
| 440 | + if (isset($trans[$charset]) and is_countable($trans[$charset]) ? count($trans[$charset]) : 0) { |
|
| 441 | + return str_replace(array_keys($trans[$charset]), array_values($trans[$charset]), $texte); |
|
| 442 | + } |
|
| 443 | + |
|
| 444 | + // Sinon demander a iconv (malgre le fait qu'il coupe quand un |
|
| 445 | + // caractere n'appartient pas au charset, mais c'est un probleme |
|
| 446 | + // surtout en utf-8, gere ci-dessus) |
|
| 447 | + if (test_iconv()) { |
|
| 448 | + $s = iconv($charset, 'utf-32le', $texte); |
|
| 449 | + if ($s) { |
|
| 450 | + return utf_32_to_unicode($s); |
|
| 451 | + } |
|
| 452 | + } |
|
| 453 | + |
|
| 454 | + // Au pire ne rien faire |
|
| 455 | + spip_log("erreur charset '$charset' non supporte"); |
|
| 456 | + |
|
| 457 | + return $texte; |
|
| 458 | + } |
|
| 459 | 459 | } |
| 460 | 460 | |
| 461 | 461 | |
@@ -474,43 +474,43 @@ discard block |
||
| 474 | 474 | * Texte transformé dans le charset souhaité |
| 475 | 475 | **/ |
| 476 | 476 | function unicode2charset($texte, $charset = 'AUTO') { |
| 477 | - static $CHARSET_REVERSE = []; |
|
| 478 | - static $trans = []; |
|
| 479 | - |
|
| 480 | - if ($charset == 'AUTO') { |
|
| 481 | - $charset = lire_config('charset', _DEFAULT_CHARSET); |
|
| 482 | - } |
|
| 483 | - |
|
| 484 | - switch ($charset) { |
|
| 485 | - case 'utf-8': |
|
| 486 | - return unicode_to_utf_8($texte); |
|
| 487 | - |
|
| 488 | - default: |
|
| 489 | - $charset = load_charset($charset); |
|
| 490 | - |
|
| 491 | - if (empty($CHARSET_REVERSE[$charset])) { |
|
| 492 | - $CHARSET_REVERSE[$charset] = array_flip($GLOBALS['CHARSET'][$charset]); |
|
| 493 | - } |
|
| 494 | - |
|
| 495 | - if (!isset($trans[$charset])) { |
|
| 496 | - $trans[$charset] = []; |
|
| 497 | - $t = &$trans[$charset]; |
|
| 498 | - for ($e = 128; $e < 255; $e++) { |
|
| 499 | - $h = dechex($e); |
|
| 500 | - if ($s = isset($CHARSET_REVERSE[$charset][$e])) { |
|
| 501 | - $s = $CHARSET_REVERSE[$charset][$e]; |
|
| 502 | - $t['&#' . $e . ';'] = $t['�' . $e . ';'] = $t['�' . $e . ';'] = chr($s); |
|
| 503 | - $t['&#x' . $h . ';'] = $t['�' . $h . ';'] = $t['�' . $h . ';'] = chr($s); |
|
| 504 | - } else { |
|
| 505 | - $t['&#' . $e . ';'] = $t['�' . $e . ';'] = $t['�' . $e . ';'] = chr($e); |
|
| 506 | - $t['&#x' . $h . ';'] = $t['�' . $h . ';'] = $t['�' . $h . ';'] = chr($e); |
|
| 507 | - } |
|
| 508 | - } |
|
| 509 | - } |
|
| 510 | - $texte = str_replace(array_keys($trans[$charset]), array_values($trans[$charset]), $texte); |
|
| 511 | - |
|
| 512 | - return $texte; |
|
| 513 | - } |
|
| 477 | + static $CHARSET_REVERSE = []; |
|
| 478 | + static $trans = []; |
|
| 479 | + |
|
| 480 | + if ($charset == 'AUTO') { |
|
| 481 | + $charset = lire_config('charset', _DEFAULT_CHARSET); |
|
| 482 | + } |
|
| 483 | + |
|
| 484 | + switch ($charset) { |
|
| 485 | + case 'utf-8': |
|
| 486 | + return unicode_to_utf_8($texte); |
|
| 487 | + |
|
| 488 | + default: |
|
| 489 | + $charset = load_charset($charset); |
|
| 490 | + |
|
| 491 | + if (empty($CHARSET_REVERSE[$charset])) { |
|
| 492 | + $CHARSET_REVERSE[$charset] = array_flip($GLOBALS['CHARSET'][$charset]); |
|
| 493 | + } |
|
| 494 | + |
|
| 495 | + if (!isset($trans[$charset])) { |
|
| 496 | + $trans[$charset] = []; |
|
| 497 | + $t = &$trans[$charset]; |
|
| 498 | + for ($e = 128; $e < 255; $e++) { |
|
| 499 | + $h = dechex($e); |
|
| 500 | + if ($s = isset($CHARSET_REVERSE[$charset][$e])) { |
|
| 501 | + $s = $CHARSET_REVERSE[$charset][$e]; |
|
| 502 | + $t['&#' . $e . ';'] = $t['�' . $e . ';'] = $t['�' . $e . ';'] = chr($s); |
|
| 503 | + $t['&#x' . $h . ';'] = $t['�' . $h . ';'] = $t['�' . $h . ';'] = chr($s); |
|
| 504 | + } else { |
|
| 505 | + $t['&#' . $e . ';'] = $t['�' . $e . ';'] = $t['�' . $e . ';'] = chr($e); |
|
| 506 | + $t['&#x' . $h . ';'] = $t['�' . $h . ';'] = $t['�' . $h . ';'] = chr($e); |
|
| 507 | + } |
|
| 508 | + } |
|
| 509 | + } |
|
| 510 | + $texte = str_replace(array_keys($trans[$charset]), array_values($trans[$charset]), $texte); |
|
| 511 | + |
|
| 512 | + return $texte; |
|
| 513 | + } |
|
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | |
@@ -528,40 +528,40 @@ discard block |
||
| 528 | 528 | * Texte transformé dans le charset site |
| 529 | 529 | **/ |
| 530 | 530 | function importer_charset($texte, $charset = 'AUTO') { |
| 531 | - $s = null; |
|
| 532 | - static $trans = []; |
|
| 533 | - // on traite le cas le plus frequent iso-8859-1 vers utf directement pour aller plus vite ! |
|
| 534 | - if (($charset == 'iso-8859-1') && ($GLOBALS['meta']['charset'] == 'utf-8')) { |
|
| 535 | - $texte = corriger_caracteres_windows($texte, 'iso-8859-1', $GLOBALS['meta']['charset']); |
|
| 536 | - if (init_mb_string()) { |
|
| 537 | - if ( |
|
| 538 | - $order = mb_detect_order() # mb_string connait-il $charset? |
|
| 539 | - and mb_detect_order($charset) |
|
| 540 | - ) { |
|
| 541 | - $s = mb_convert_encoding($texte, 'utf-8', $charset); |
|
| 542 | - } |
|
| 543 | - mb_detect_order($order); # remettre comme precedemment |
|
| 544 | - return $s; |
|
| 545 | - } |
|
| 546 | - // Sinon, peut-etre connaissons-nous ce charset ? |
|
| 547 | - if (!isset($trans[$charset])) { |
|
| 548 | - if ( |
|
| 549 | - $cset = load_charset($charset) |
|
| 550 | - and is_array($GLOBALS['CHARSET'][$cset]) |
|
| 551 | - ) { |
|
| 552 | - foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) { |
|
| 553 | - $trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';'); |
|
| 554 | - } |
|
| 555 | - } |
|
| 556 | - } |
|
| 557 | - if (is_countable($trans[$charset]) ? count($trans[$charset]) : 0) { |
|
| 558 | - return str_replace(array_keys($trans[$charset]), array_values($trans[$charset]), $texte); |
|
| 559 | - } |
|
| 560 | - |
|
| 561 | - return $texte; |
|
| 562 | - } |
|
| 563 | - |
|
| 564 | - return unicode2charset(charset2unicode($texte, $charset)); |
|
| 531 | + $s = null; |
|
| 532 | + static $trans = []; |
|
| 533 | + // on traite le cas le plus frequent iso-8859-1 vers utf directement pour aller plus vite ! |
|
| 534 | + if (($charset == 'iso-8859-1') && ($GLOBALS['meta']['charset'] == 'utf-8')) { |
|
| 535 | + $texte = corriger_caracteres_windows($texte, 'iso-8859-1', $GLOBALS['meta']['charset']); |
|
| 536 | + if (init_mb_string()) { |
|
| 537 | + if ( |
|
| 538 | + $order = mb_detect_order() # mb_string connait-il $charset? |
|
| 539 | + and mb_detect_order($charset) |
|
| 540 | + ) { |
|
| 541 | + $s = mb_convert_encoding($texte, 'utf-8', $charset); |
|
| 542 | + } |
|
| 543 | + mb_detect_order($order); # remettre comme precedemment |
|
| 544 | + return $s; |
|
| 545 | + } |
|
| 546 | + // Sinon, peut-etre connaissons-nous ce charset ? |
|
| 547 | + if (!isset($trans[$charset])) { |
|
| 548 | + if ( |
|
| 549 | + $cset = load_charset($charset) |
|
| 550 | + and is_array($GLOBALS['CHARSET'][$cset]) |
|
| 551 | + ) { |
|
| 552 | + foreach ($GLOBALS['CHARSET'][$cset] as $key => $val) { |
|
| 553 | + $trans[$charset][chr($key)] = unicode2charset('&#' . $val . ';'); |
|
| 554 | + } |
|
| 555 | + } |
|
| 556 | + } |
|
| 557 | + if (is_countable($trans[$charset]) ? count($trans[$charset]) : 0) { |
|
| 558 | + return str_replace(array_keys($trans[$charset]), array_values($trans[$charset]), $texte); |
|
| 559 | + } |
|
| 560 | + |
|
| 561 | + return $texte; |
|
| 562 | + } |
|
| 563 | + |
|
| 564 | + return unicode2charset(charset2unicode($texte, $charset)); |
|
| 565 | 565 | } |
| 566 | 566 | |
| 567 | 567 | |
@@ -577,92 +577,92 @@ discard block |
||
| 577 | 577 | **/ |
| 578 | 578 | function utf_8_to_unicode($source) { |
| 579 | 579 | |
| 580 | - // mb_string : methode rapide |
|
| 581 | - if (init_mb_string()) { |
|
| 582 | - $convmap = [0x7F, 0xFFFFFF, 0x0, 0xFFFFFF]; |
|
| 583 | - |
|
| 584 | - return mb_encode_numericentity($source, $convmap, 'UTF-8'); |
|
| 585 | - } |
|
| 586 | - |
|
| 587 | - // Sinon methode pas a pas |
|
| 588 | - static $decrement; |
|
| 589 | - static $shift; |
|
| 590 | - |
|
| 591 | - // Cf. php.net, par Ronen. Adapte pour compatibilite < php4 |
|
| 592 | - if (!is_array($decrement)) { |
|
| 593 | - // array used to figure what number to decrement from character order value |
|
| 594 | - // according to number of characters used to map unicode to ascii by utf-8 |
|
| 595 | - $decrement[4] = 240; |
|
| 596 | - $decrement[3] = 224; |
|
| 597 | - $decrement[2] = 192; |
|
| 598 | - $decrement[1] = 0; |
|
| 599 | - // the number of bits to shift each charNum by |
|
| 600 | - $shift[1][0] = 0; |
|
| 601 | - $shift[2][0] = 6; |
|
| 602 | - $shift[2][1] = 0; |
|
| 603 | - $shift[3][0] = 12; |
|
| 604 | - $shift[3][1] = 6; |
|
| 605 | - $shift[3][2] = 0; |
|
| 606 | - $shift[4][0] = 18; |
|
| 607 | - $shift[4][1] = 12; |
|
| 608 | - $shift[4][2] = 6; |
|
| 609 | - $shift[4][3] = 0; |
|
| 610 | - } |
|
| 611 | - |
|
| 612 | - $pos = 0; |
|
| 613 | - $len = strlen($source); |
|
| 614 | - $encodedString = ''; |
|
| 615 | - while ($pos < $len) { |
|
| 616 | - $char = ''; |
|
| 617 | - $ischar = false; |
|
| 618 | - $asciiPos = ord(substr($source, $pos, 1)); |
|
| 619 | - if (($asciiPos >= 240) && ($asciiPos <= 255)) { |
|
| 620 | - // 4 chars representing one unicode character |
|
| 621 | - $thisLetter = substr($source, $pos, 4); |
|
| 622 | - $pos += 4; |
|
| 623 | - } else { |
|
| 624 | - if (($asciiPos >= 224) && ($asciiPos <= 239)) { |
|
| 625 | - // 3 chars representing one unicode character |
|
| 626 | - $thisLetter = substr($source, $pos, 3); |
|
| 627 | - $pos += 3; |
|
| 628 | - } else { |
|
| 629 | - if (($asciiPos >= 192) && ($asciiPos <= 223)) { |
|
| 630 | - // 2 chars representing one unicode character |
|
| 631 | - $thisLetter = substr($source, $pos, 2); |
|
| 632 | - $pos += 2; |
|
| 633 | - } else { |
|
| 634 | - // 1 char (lower ascii) |
|
| 635 | - $thisLetter = substr($source, $pos, 1); |
|
| 636 | - $pos += 1; |
|
| 637 | - $char = $thisLetter; |
|
| 638 | - $ischar = true; |
|
| 639 | - } |
|
| 640 | - } |
|
| 641 | - } |
|
| 642 | - |
|
| 643 | - if ($ischar) { |
|
| 644 | - $encodedString .= $char; |
|
| 645 | - } else { // process the string representing the letter to a unicode entity |
|
| 646 | - $thisLen = strlen($thisLetter); |
|
| 647 | - $thisPos = 0; |
|
| 648 | - $decimalCode = 0; |
|
| 649 | - while ($thisPos < $thisLen) { |
|
| 650 | - $thisCharOrd = ord(substr($thisLetter, $thisPos, 1)); |
|
| 651 | - if ($thisPos == 0) { |
|
| 652 | - $charNum = intval($thisCharOrd - $decrement[$thisLen]); |
|
| 653 | - $decimalCode += ($charNum << $shift[$thisLen][$thisPos]); |
|
| 654 | - } else { |
|
| 655 | - $charNum = intval($thisCharOrd - 128); |
|
| 656 | - $decimalCode += ($charNum << $shift[$thisLen][$thisPos]); |
|
| 657 | - } |
|
| 658 | - $thisPos++; |
|
| 659 | - } |
|
| 660 | - $encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';'; |
|
| 661 | - $encodedString .= $encodedLetter; |
|
| 662 | - } |
|
| 663 | - } |
|
| 664 | - |
|
| 665 | - return $encodedString; |
|
| 580 | + // mb_string : methode rapide |
|
| 581 | + if (init_mb_string()) { |
|
| 582 | + $convmap = [0x7F, 0xFFFFFF, 0x0, 0xFFFFFF]; |
|
| 583 | + |
|
| 584 | + return mb_encode_numericentity($source, $convmap, 'UTF-8'); |
|
| 585 | + } |
|
| 586 | + |
|
| 587 | + // Sinon methode pas a pas |
|
| 588 | + static $decrement; |
|
| 589 | + static $shift; |
|
| 590 | + |
|
| 591 | + // Cf. php.net, par Ronen. Adapte pour compatibilite < php4 |
|
| 592 | + if (!is_array($decrement)) { |
|
| 593 | + // array used to figure what number to decrement from character order value |
|
| 594 | + // according to number of characters used to map unicode to ascii by utf-8 |
|
| 595 | + $decrement[4] = 240; |
|
| 596 | + $decrement[3] = 224; |
|
| 597 | + $decrement[2] = 192; |
|
| 598 | + $decrement[1] = 0; |
|
| 599 | + // the number of bits to shift each charNum by |
|
| 600 | + $shift[1][0] = 0; |
|
| 601 | + $shift[2][0] = 6; |
|
| 602 | + $shift[2][1] = 0; |
|
| 603 | + $shift[3][0] = 12; |
|
| 604 | + $shift[3][1] = 6; |
|
| 605 | + $shift[3][2] = 0; |
|
| 606 | + $shift[4][0] = 18; |
|
| 607 | + $shift[4][1] = 12; |
|
| 608 | + $shift[4][2] = 6; |
|
| 609 | + $shift[4][3] = 0; |
|
| 610 | + } |
|
| 611 | + |
|
| 612 | + $pos = 0; |
|
| 613 | + $len = strlen($source); |
|
| 614 | + $encodedString = ''; |
|
| 615 | + while ($pos < $len) { |
|
| 616 | + $char = ''; |
|
| 617 | + $ischar = false; |
|
| 618 | + $asciiPos = ord(substr($source, $pos, 1)); |
|
| 619 | + if (($asciiPos >= 240) && ($asciiPos <= 255)) { |
|
| 620 | + // 4 chars representing one unicode character |
|
| 621 | + $thisLetter = substr($source, $pos, 4); |
|
| 622 | + $pos += 4; |
|
| 623 | + } else { |
|
| 624 | + if (($asciiPos >= 224) && ($asciiPos <= 239)) { |
|
| 625 | + // 3 chars representing one unicode character |
|
| 626 | + $thisLetter = substr($source, $pos, 3); |
|
| 627 | + $pos += 3; |
|
| 628 | + } else { |
|
| 629 | + if (($asciiPos >= 192) && ($asciiPos <= 223)) { |
|
| 630 | + // 2 chars representing one unicode character |
|
| 631 | + $thisLetter = substr($source, $pos, 2); |
|
| 632 | + $pos += 2; |
|
| 633 | + } else { |
|
| 634 | + // 1 char (lower ascii) |
|
| 635 | + $thisLetter = substr($source, $pos, 1); |
|
| 636 | + $pos += 1; |
|
| 637 | + $char = $thisLetter; |
|
| 638 | + $ischar = true; |
|
| 639 | + } |
|
| 640 | + } |
|
| 641 | + } |
|
| 642 | + |
|
| 643 | + if ($ischar) { |
|
| 644 | + $encodedString .= $char; |
|
| 645 | + } else { // process the string representing the letter to a unicode entity |
|
| 646 | + $thisLen = strlen($thisLetter); |
|
| 647 | + $thisPos = 0; |
|
| 648 | + $decimalCode = 0; |
|
| 649 | + while ($thisPos < $thisLen) { |
|
| 650 | + $thisCharOrd = ord(substr($thisLetter, $thisPos, 1)); |
|
| 651 | + if ($thisPos == 0) { |
|
| 652 | + $charNum = intval($thisCharOrd - $decrement[$thisLen]); |
|
| 653 | + $decimalCode += ($charNum << $shift[$thisLen][$thisPos]); |
|
| 654 | + } else { |
|
| 655 | + $charNum = intval($thisCharOrd - 128); |
|
| 656 | + $decimalCode += ($charNum << $shift[$thisLen][$thisPos]); |
|
| 657 | + } |
|
| 658 | + $thisPos++; |
|
| 659 | + } |
|
| 660 | + $encodedLetter = '&#' . preg_replace('/^0+/', '', $decimalCode) . ';'; |
|
| 661 | + $encodedString .= $encodedLetter; |
|
| 662 | + } |
|
| 663 | + } |
|
| 664 | + |
|
| 665 | + return $encodedString; |
|
| 666 | 666 | } |
| 667 | 667 | |
| 668 | 668 | /** |
@@ -681,32 +681,32 @@ discard block |
||
| 681 | 681 | **/ |
| 682 | 682 | function utf_32_to_unicode($source) { |
| 683 | 683 | |
| 684 | - // mb_string : methode rapide |
|
| 685 | - if (init_mb_string()) { |
|
| 686 | - $convmap = [0x7F, 0xFFFFFF, 0x0, 0xFFFFFF]; |
|
| 687 | - $source = mb_encode_numericentity($source, $convmap, 'UTF-32LE'); |
|
| 688 | - |
|
| 689 | - return str_replace(chr(0), '', $source); |
|
| 690 | - } |
|
| 691 | - |
|
| 692 | - // Sinon methode lente |
|
| 693 | - $texte = ''; |
|
| 694 | - while ($source) { |
|
| 695 | - $words = unpack('V*', substr($source, 0, 1024)); |
|
| 696 | - $source = substr($source, 1024); |
|
| 697 | - foreach ($words as $word) { |
|
| 698 | - if ($word < 128) { |
|
| 699 | - $texte .= chr($word); |
|
| 700 | - } // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html |
|
| 701 | - else { |
|
| 702 | - if ($word != 65279) { |
|
| 703 | - $texte .= '&#' . $word . ';'; |
|
| 704 | - } |
|
| 705 | - } |
|
| 706 | - } |
|
| 707 | - } |
|
| 708 | - |
|
| 709 | - return $texte; |
|
| 684 | + // mb_string : methode rapide |
|
| 685 | + if (init_mb_string()) { |
|
| 686 | + $convmap = [0x7F, 0xFFFFFF, 0x0, 0xFFFFFF]; |
|
| 687 | + $source = mb_encode_numericentity($source, $convmap, 'UTF-32LE'); |
|
| 688 | + |
|
| 689 | + return str_replace(chr(0), '', $source); |
|
| 690 | + } |
|
| 691 | + |
|
| 692 | + // Sinon methode lente |
|
| 693 | + $texte = ''; |
|
| 694 | + while ($source) { |
|
| 695 | + $words = unpack('V*', substr($source, 0, 1024)); |
|
| 696 | + $source = substr($source, 1024); |
|
| 697 | + foreach ($words as $word) { |
|
| 698 | + if ($word < 128) { |
|
| 699 | + $texte .= chr($word); |
|
| 700 | + } // ignorer le BOM - http://www.unicode.org/faq/utf_bom.html |
|
| 701 | + else { |
|
| 702 | + if ($word != 65279) { |
|
| 703 | + $texte .= '&#' . $word . ';'; |
|
| 704 | + } |
|
| 705 | + } |
|
| 706 | + } |
|
| 707 | + } |
|
| 708 | + |
|
| 709 | + return $texte; |
|
| 710 | 710 | } |
| 711 | 711 | |
| 712 | 712 | |
@@ -723,21 +723,21 @@ discard block |
||
| 723 | 723 | * Caractère utf8 si trouvé, '' sinon |
| 724 | 724 | **/ |
| 725 | 725 | function caractere_utf_8($num) { |
| 726 | - $num = intval($num); |
|
| 727 | - if ($num < 128) { |
|
| 728 | - return chr($num); |
|
| 729 | - } |
|
| 730 | - if ($num < 2048) { |
|
| 731 | - return chr(($num >> 6) + 192) . chr(($num & 63) + 128); |
|
| 732 | - } |
|
| 733 | - if ($num < 65536) { |
|
| 734 | - return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); |
|
| 735 | - } |
|
| 736 | - if ($num < 1_114_112) { |
|
| 737 | - return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); |
|
| 738 | - } |
|
| 739 | - |
|
| 740 | - return ''; |
|
| 726 | + $num = intval($num); |
|
| 727 | + if ($num < 128) { |
|
| 728 | + return chr($num); |
|
| 729 | + } |
|
| 730 | + if ($num < 2048) { |
|
| 731 | + return chr(($num >> 6) + 192) . chr(($num & 63) + 128); |
|
| 732 | + } |
|
| 733 | + if ($num < 65536) { |
|
| 734 | + return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); |
|
| 735 | + } |
|
| 736 | + if ($num < 1_114_112) { |
|
| 737 | + return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); |
|
| 738 | + } |
|
| 739 | + |
|
| 740 | + return ''; |
|
| 741 | 741 | } |
| 742 | 742 | |
| 743 | 743 | /** |
@@ -750,42 +750,42 @@ discard block |
||
| 750 | 750 | **/ |
| 751 | 751 | function unicode_to_utf_8($texte) { |
| 752 | 752 | |
| 753 | - // 1. Entites € et suivantes |
|
| 754 | - $vu = []; |
|
| 755 | - if ( |
|
| 756 | - preg_match_all( |
|
| 757 | - ',�*([1-9][0-9][0-9]+);,S', |
|
| 758 | - $texte, |
|
| 759 | - $regs, |
|
| 760 | - PREG_SET_ORDER |
|
| 761 | - ) |
|
| 762 | - ) { |
|
| 763 | - foreach ($regs as $reg) { |
|
| 764 | - if ($reg[1] > 127 and !isset($vu[$reg[0]])) { |
|
| 765 | - $vu[$reg[0]] = caractere_utf_8($reg[1]); |
|
| 766 | - } |
|
| 767 | - } |
|
| 768 | - } |
|
| 769 | - //$texte = str_replace(array_keys($vu), array_values($vu), $texte); |
|
| 770 | - |
|
| 771 | - // 2. Entites > ÿ |
|
| 772 | - //$vu = array(); |
|
| 773 | - if ( |
|
| 774 | - preg_match_all( |
|
| 775 | - ',�*([1-9a-f][0-9a-f][0-9a-f]+);,iS', |
|
| 776 | - $texte, |
|
| 777 | - $regs, |
|
| 778 | - PREG_SET_ORDER |
|
| 779 | - ) |
|
| 780 | - ) { |
|
| 781 | - foreach ($regs as $reg) { |
|
| 782 | - if (!isset($vu[$reg[0]])) { |
|
| 783 | - $vu[$reg[0]] = caractere_utf_8(hexdec($reg[1])); |
|
| 784 | - } |
|
| 785 | - } |
|
| 786 | - } |
|
| 787 | - |
|
| 788 | - return str_replace(array_keys($vu), array_values($vu), $texte); |
|
| 753 | + // 1. Entites € et suivantes |
|
| 754 | + $vu = []; |
|
| 755 | + if ( |
|
| 756 | + preg_match_all( |
|
| 757 | + ',�*([1-9][0-9][0-9]+);,S', |
|
| 758 | + $texte, |
|
| 759 | + $regs, |
|
| 760 | + PREG_SET_ORDER |
|
| 761 | + ) |
|
| 762 | + ) { |
|
| 763 | + foreach ($regs as $reg) { |
|
| 764 | + if ($reg[1] > 127 and !isset($vu[$reg[0]])) { |
|
| 765 | + $vu[$reg[0]] = caractere_utf_8($reg[1]); |
|
| 766 | + } |
|
| 767 | + } |
|
| 768 | + } |
|
| 769 | + //$texte = str_replace(array_keys($vu), array_values($vu), $texte); |
|
| 770 | + |
|
| 771 | + // 2. Entites > ÿ |
|
| 772 | + //$vu = array(); |
|
| 773 | + if ( |
|
| 774 | + preg_match_all( |
|
| 775 | + ',�*([1-9a-f][0-9a-f][0-9a-f]+);,iS', |
|
| 776 | + $texte, |
|
| 777 | + $regs, |
|
| 778 | + PREG_SET_ORDER |
|
| 779 | + ) |
|
| 780 | + ) { |
|
| 781 | + foreach ($regs as $reg) { |
|
| 782 | + if (!isset($vu[$reg[0]])) { |
|
| 783 | + $vu[$reg[0]] = caractere_utf_8(hexdec($reg[1])); |
|
| 784 | + } |
|
| 785 | + } |
|
| 786 | + } |
|
| 787 | + |
|
| 788 | + return str_replace(array_keys($vu), array_values($vu), $texte); |
|
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | /** |
@@ -797,15 +797,15 @@ discard block |
||
| 797 | 797 | * Texte converti |
| 798 | 798 | **/ |
| 799 | 799 | function unicode_to_javascript($texte) { |
| 800 | - $vu = []; |
|
| 801 | - while (preg_match(',�*([0-9]+);,S', $texte, $regs) and !isset($vu[$regs[1]])) { |
|
| 802 | - $num = $regs[1]; |
|
| 803 | - $vu[$num] = true; |
|
| 804 | - $s = '\u' . sprintf('%04x', $num); |
|
| 805 | - $texte = str_replace($regs[0], $s, $texte); |
|
| 806 | - } |
|
| 807 | - |
|
| 808 | - return $texte; |
|
| 800 | + $vu = []; |
|
| 801 | + while (preg_match(',�*([0-9]+);,S', $texte, $regs) and !isset($vu[$regs[1]])) { |
|
| 802 | + $num = $regs[1]; |
|
| 803 | + $vu[$num] = true; |
|
| 804 | + $s = '\u' . sprintf('%04x', $num); |
|
| 805 | + $texte = str_replace($regs[0], $s, $texte); |
|
| 806 | + } |
|
| 807 | + |
|
| 808 | + return $texte; |
|
| 809 | 809 | } |
| 810 | 810 | |
| 811 | 811 | /** |
@@ -817,11 +817,11 @@ discard block |
||
| 817 | 817 | * Texte converti |
| 818 | 818 | **/ |
| 819 | 819 | function javascript_to_unicode($texte) { |
| 820 | - while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) { |
|
| 821 | - $texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte); |
|
| 822 | - } |
|
| 820 | + while (preg_match(',%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]),', $texte, $regs)) { |
|
| 821 | + $texte = str_replace($regs[0], '&#' . hexdec($regs[1]) . ';', $texte); |
|
| 822 | + } |
|
| 823 | 823 | |
| 824 | - return $texte; |
|
| 824 | + return $texte; |
|
| 825 | 825 | } |
| 826 | 826 | |
| 827 | 827 | /** |
@@ -833,11 +833,11 @@ discard block |
||
| 833 | 833 | * Texte converti |
| 834 | 834 | **/ |
| 835 | 835 | function javascript_to_binary($texte) { |
| 836 | - while (preg_match(',%([0-9A-F][0-9A-F]),', $texte, $regs)) { |
|
| 837 | - $texte = str_replace($regs[0], chr(hexdec($regs[1])), $texte); |
|
| 838 | - } |
|
| 836 | + while (preg_match(',%([0-9A-F][0-9A-F]),', $texte, $regs)) { |
|
| 837 | + $texte = str_replace($regs[0], chr(hexdec($regs[1])), $texte); |
|
| 838 | + } |
|
| 839 | 839 | |
| 840 | - return $texte; |
|
| 840 | + return $texte; |
|
| 841 | 841 | } |
| 842 | 842 | |
| 843 | 843 | |
@@ -855,26 +855,26 @@ discard block |
||
| 855 | 855 | * @return string |
| 856 | 856 | */ |
| 857 | 857 | function translitteration_rapide($texte, $charset = 'AUTO', $complexe = '') { |
| 858 | - static $trans = []; |
|
| 859 | - if ($charset == 'AUTO') { |
|
| 860 | - $charset = $GLOBALS['meta']['charset']; |
|
| 861 | - } |
|
| 862 | - if (!strlen($texte)) { |
|
| 863 | - return $texte; |
|
| 864 | - } |
|
| 865 | - |
|
| 866 | - $table_translit = 'translit' . $complexe; |
|
| 867 | - |
|
| 868 | - // 2. Translitterer grace a la table predefinie |
|
| 869 | - if (!isset($trans[$complexe])) { |
|
| 870 | - $trans[$complexe] = []; |
|
| 871 | - load_charset($table_translit); |
|
| 872 | - foreach ($GLOBALS['CHARSET'][$table_translit] as $key => $val) { |
|
| 873 | - $trans[$complexe][caractere_utf_8($key)] = $val; |
|
| 874 | - } |
|
| 875 | - } |
|
| 876 | - |
|
| 877 | - return str_replace(array_keys($trans[$complexe]), array_values($trans[$complexe]), $texte); |
|
| 858 | + static $trans = []; |
|
| 859 | + if ($charset == 'AUTO') { |
|
| 860 | + $charset = $GLOBALS['meta']['charset']; |
|
| 861 | + } |
|
| 862 | + if (!strlen($texte)) { |
|
| 863 | + return $texte; |
|
| 864 | + } |
|
| 865 | + |
|
| 866 | + $table_translit = 'translit' . $complexe; |
|
| 867 | + |
|
| 868 | + // 2. Translitterer grace a la table predefinie |
|
| 869 | + if (!isset($trans[$complexe])) { |
|
| 870 | + $trans[$complexe] = []; |
|
| 871 | + load_charset($table_translit); |
|
| 872 | + foreach ($GLOBALS['CHARSET'][$table_translit] as $key => $val) { |
|
| 873 | + $trans[$complexe][caractere_utf_8($key)] = $val; |
|
| 874 | + } |
|
| 875 | + } |
|
| 876 | + |
|
| 877 | + return str_replace(array_keys($trans[$complexe]), array_values($trans[$complexe]), $texte); |
|
| 878 | 878 | } |
| 879 | 879 | |
| 880 | 880 | /** |
@@ -897,14 +897,14 @@ discard block |
||
| 897 | 897 | * @return string |
| 898 | 898 | */ |
| 899 | 899 | function translitteration($texte, $charset = 'AUTO', $complexe = '') { |
| 900 | - // 0. Supprimer les caracteres illegaux |
|
| 901 | - include_spip('inc/filtres'); |
|
| 902 | - $texte = corriger_caracteres($texte); |
|
| 900 | + // 0. Supprimer les caracteres illegaux |
|
| 901 | + include_spip('inc/filtres'); |
|
| 902 | + $texte = corriger_caracteres($texte); |
|
| 903 | 903 | |
| 904 | - // 1. Passer le charset et les é en utf-8 |
|
| 905 | - $texte = unicode_to_utf_8(html2unicode(charset2unicode($texte, $charset))); |
|
| 904 | + // 1. Passer le charset et les é en utf-8 |
|
| 905 | + $texte = unicode_to_utf_8(html2unicode(charset2unicode($texte, $charset))); |
|
| 906 | 906 | |
| 907 | - return translitteration_rapide($texte, $charset, $complexe); |
|
| 907 | + return translitteration_rapide($texte, $charset, $complexe); |
|
| 908 | 908 | } |
| 909 | 909 | |
| 910 | 910 | /** |
@@ -919,17 +919,17 @@ discard block |
||
| 919 | 919 | * @return string |
| 920 | 920 | */ |
| 921 | 921 | function translitteration_complexe($texte, $chiffres = false) { |
| 922 | - $texte = translitteration($texte, 'AUTO', 'complexe'); |
|
| 922 | + $texte = translitteration($texte, 'AUTO', 'complexe'); |
|
| 923 | 923 | |
| 924 | - if ($chiffres) { |
|
| 925 | - $texte = preg_replace_callback( |
|
| 926 | - "/[aeiuoyd]['`?~.^+(-]{1,2}/S", |
|
| 927 | - fn($m) => translitteration_chiffree($m[0]), |
|
| 928 | - $texte |
|
| 929 | - ); |
|
| 930 | - } |
|
| 924 | + if ($chiffres) { |
|
| 925 | + $texte = preg_replace_callback( |
|
| 926 | + "/[aeiuoyd]['`?~.^+(-]{1,2}/S", |
|
| 927 | + fn($m) => translitteration_chiffree($m[0]), |
|
| 928 | + $texte |
|
| 929 | + ); |
|
| 930 | + } |
|
| 931 | 931 | |
| 932 | - return $texte; |
|
| 932 | + return $texte; |
|
| 933 | 933 | } |
| 934 | 934 | |
| 935 | 935 | /** |
@@ -941,7 +941,7 @@ discard block |
||
| 941 | 941 | * @return string |
| 942 | 942 | */ |
| 943 | 943 | function translitteration_chiffree($car) { |
| 944 | - return strtr($car, "'`?~.^+(-", '123456789'); |
|
| 944 | + return strtr($car, "'`?~.^+(-", '123456789'); |
|
| 945 | 945 | } |
| 946 | 946 | |
| 947 | 947 | |
@@ -954,7 +954,7 @@ discard block |
||
| 954 | 954 | * true s'il a un BOM |
| 955 | 955 | **/ |
| 956 | 956 | function bom_utf8($texte) { |
| 957 | - return (substr($texte, 0, 3) == chr(0xEF) . chr(0xBB) . chr(0xBF)); |
|
| 957 | + return (substr($texte, 0, 3) == chr(0xEF) . chr(0xBB) . chr(0xBF)); |
|
| 958 | 958 | } |
| 959 | 959 | |
| 960 | 960 | /** |
@@ -971,21 +971,21 @@ discard block |
||
| 971 | 971 | * true si c'est le cas |
| 972 | 972 | **/ |
| 973 | 973 | function is_utf8($string) { |
| 974 | - return !strlen( |
|
| 975 | - preg_replace( |
|
| 976 | - ',[\x09\x0A\x0D\x20-\x7E]' # ASCII |
|
| 977 | - . '|[\xC2-\xDF][\x80-\xBF]' # non-overlong 2-byte |
|
| 978 | - . '|\xE0[\xA0-\xBF][\x80-\xBF]' # excluding overlongs |
|
| 979 | - . '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}' # straight 3-byte |
|
| 980 | - . '|\xED[\x80-\x9F][\x80-\xBF]' # excluding surrogates |
|
| 981 | - . '|\xF0[\x90-\xBF][\x80-\xBF]{2}' # planes 1-3 |
|
| 982 | - . '|[\xF1-\xF3][\x80-\xBF]{3}' # planes 4-15 |
|
| 983 | - . '|\xF4[\x80-\x8F][\x80-\xBF]{2}' # plane 16 |
|
| 984 | - . ',sS', |
|
| 985 | - '', |
|
| 986 | - $string |
|
| 987 | - ) |
|
| 988 | - ); |
|
| 974 | + return !strlen( |
|
| 975 | + preg_replace( |
|
| 976 | + ',[\x09\x0A\x0D\x20-\x7E]' # ASCII |
|
| 977 | + . '|[\xC2-\xDF][\x80-\xBF]' # non-overlong 2-byte |
|
| 978 | + . '|\xE0[\xA0-\xBF][\x80-\xBF]' # excluding overlongs |
|
| 979 | + . '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}' # straight 3-byte |
|
| 980 | + . '|\xED[\x80-\x9F][\x80-\xBF]' # excluding surrogates |
|
| 981 | + . '|\xF0[\x90-\xBF][\x80-\xBF]{2}' # planes 1-3 |
|
| 982 | + . '|[\xF1-\xF3][\x80-\xBF]{3}' # planes 4-15 |
|
| 983 | + . '|\xF4[\x80-\x8F][\x80-\xBF]{2}' # plane 16 |
|
| 984 | + . ',sS', |
|
| 985 | + '', |
|
| 986 | + $string |
|
| 987 | + ) |
|
| 988 | + ); |
|
| 989 | 989 | } |
| 990 | 990 | |
| 991 | 991 | /** |
@@ -997,13 +997,13 @@ discard block |
||
| 997 | 997 | * true si c'est le cas |
| 998 | 998 | **/ |
| 999 | 999 | function is_ascii($string) { |
| 1000 | - return !strlen( |
|
| 1001 | - preg_replace( |
|
| 1002 | - ',[\x09\x0A\x0D\x20-\x7E],sS', |
|
| 1003 | - '', |
|
| 1004 | - $string |
|
| 1005 | - ) |
|
| 1006 | - ); |
|
| 1000 | + return !strlen( |
|
| 1001 | + preg_replace( |
|
| 1002 | + ',[\x09\x0A\x0D\x20-\x7E],sS', |
|
| 1003 | + '', |
|
| 1004 | + $string |
|
| 1005 | + ) |
|
| 1006 | + ); |
|
| 1007 | 1007 | } |
| 1008 | 1008 | |
| 1009 | 1009 | /** |
@@ -1022,53 +1022,53 @@ discard block |
||
| 1022 | 1022 | **/ |
| 1023 | 1023 | function transcoder_page($texte, $headers = '') { |
| 1024 | 1024 | |
| 1025 | - // Si tout est < 128 pas la peine d'aller plus loin |
|
| 1026 | - if (is_ascii($texte)) { |
|
| 1027 | - #spip_log('charset: ascii'); |
|
| 1028 | - return $texte; |
|
| 1029 | - } |
|
| 1030 | - |
|
| 1031 | - if (bom_utf8($texte)) { |
|
| 1032 | - // Reconnaitre le BOM utf-8 (0xEFBBBF) |
|
| 1033 | - $charset = 'utf-8'; |
|
| 1034 | - $texte = substr($texte, 3); |
|
| 1035 | - } elseif (preg_match(',<[?]xml[^>]*encoding[^>]*=[^>]*([-_a-z0-9]+?),UimsS', $texte, $regs)) { |
|
| 1036 | - // charset precise par le contenu (xml) |
|
| 1037 | - $charset = trim(strtolower($regs[1])); |
|
| 1038 | - } elseif ( |
|
| 1039 | - // charset precise par le contenu (html) |
|
| 1040 | - preg_match(',<(meta|html|body)[^>]*charset[^>]*=[^>]*([#-_a-z0-9]+?),UimsS', $texte, $regs) |
|
| 1041 | - # eviter toute balise SPIP tel que #CHARSET ou #CONFIG d'un squelette |
|
| 1042 | - and false === strpos($regs[2], '#') |
|
| 1043 | - and $tmp = trim(strtolower($regs[2])) |
|
| 1044 | - ) { |
|
| 1045 | - $charset = $tmp; |
|
| 1046 | - } elseif (preg_match(',charset=([-_a-z0-9]+),i', $headers, $regs)) { |
|
| 1047 | - // charset de la reponse http |
|
| 1048 | - $charset = trim(strtolower($regs[1])); |
|
| 1049 | - } else { |
|
| 1050 | - $charset = ''; |
|
| 1051 | - } |
|
| 1052 | - |
|
| 1053 | - |
|
| 1054 | - // normaliser les noms du shif-jis japonais |
|
| 1055 | - if (preg_match(',^(x|shift)[_-]s?jis$,i', $charset)) { |
|
| 1056 | - $charset = 'shift-jis'; |
|
| 1057 | - } |
|
| 1058 | - |
|
| 1059 | - if ($charset) { |
|
| 1060 | - spip_log("charset: $charset"); |
|
| 1061 | - } else { |
|
| 1062 | - // valeur par defaut |
|
| 1063 | - if (is_utf8($texte)) { |
|
| 1064 | - $charset = 'utf-8'; |
|
| 1065 | - } else { |
|
| 1066 | - $charset = 'iso-8859-1'; |
|
| 1067 | - } |
|
| 1068 | - spip_log("charset probable: $charset"); |
|
| 1069 | - } |
|
| 1070 | - |
|
| 1071 | - return importer_charset($texte, $charset); |
|
| 1025 | + // Si tout est < 128 pas la peine d'aller plus loin |
|
| 1026 | + if (is_ascii($texte)) { |
|
| 1027 | + #spip_log('charset: ascii'); |
|
| 1028 | + return $texte; |
|
| 1029 | + } |
|
| 1030 | + |
|
| 1031 | + if (bom_utf8($texte)) { |
|
| 1032 | + // Reconnaitre le BOM utf-8 (0xEFBBBF) |
|
| 1033 | + $charset = 'utf-8'; |
|
| 1034 | + $texte = substr($texte, 3); |
|
| 1035 | + } elseif (preg_match(',<[?]xml[^>]*encoding[^>]*=[^>]*([-_a-z0-9]+?),UimsS', $texte, $regs)) { |
|
| 1036 | + // charset precise par le contenu (xml) |
|
| 1037 | + $charset = trim(strtolower($regs[1])); |
|
| 1038 | + } elseif ( |
|
| 1039 | + // charset precise par le contenu (html) |
|
| 1040 | + preg_match(',<(meta|html|body)[^>]*charset[^>]*=[^>]*([#-_a-z0-9]+?),UimsS', $texte, $regs) |
|
| 1041 | + # eviter toute balise SPIP tel que #CHARSET ou #CONFIG d'un squelette |
|
| 1042 | + and false === strpos($regs[2], '#') |
|
| 1043 | + and $tmp = trim(strtolower($regs[2])) |
|
| 1044 | + ) { |
|
| 1045 | + $charset = $tmp; |
|
| 1046 | + } elseif (preg_match(',charset=([-_a-z0-9]+),i', $headers, $regs)) { |
|
| 1047 | + // charset de la reponse http |
|
| 1048 | + $charset = trim(strtolower($regs[1])); |
|
| 1049 | + } else { |
|
| 1050 | + $charset = ''; |
|
| 1051 | + } |
|
| 1052 | + |
|
| 1053 | + |
|
| 1054 | + // normaliser les noms du shif-jis japonais |
|
| 1055 | + if (preg_match(',^(x|shift)[_-]s?jis$,i', $charset)) { |
|
| 1056 | + $charset = 'shift-jis'; |
|
| 1057 | + } |
|
| 1058 | + |
|
| 1059 | + if ($charset) { |
|
| 1060 | + spip_log("charset: $charset"); |
|
| 1061 | + } else { |
|
| 1062 | + // valeur par defaut |
|
| 1063 | + if (is_utf8($texte)) { |
|
| 1064 | + $charset = 'utf-8'; |
|
| 1065 | + } else { |
|
| 1066 | + $charset = 'iso-8859-1'; |
|
| 1067 | + } |
|
| 1068 | + spip_log("charset probable: $charset"); |
|
| 1069 | + } |
|
| 1070 | + |
|
| 1071 | + return importer_charset($texte, $charset); |
|
| 1072 | 1072 | } |
| 1073 | 1073 | |
| 1074 | 1074 | |
@@ -1092,26 +1092,26 @@ discard block |
||
| 1092 | 1092 | * Le texte coupé |
| 1093 | 1093 | **/ |
| 1094 | 1094 | function spip_substr($c, $start = 0, $length = null) { |
| 1095 | - // Si ce n'est pas utf-8, utiliser substr |
|
| 1096 | - if ($GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1097 | - if ($length) { |
|
| 1098 | - return substr($c, $start, $length); |
|
| 1099 | - } else { |
|
| 1100 | - return substr($c, $start); |
|
| 1101 | - } |
|
| 1102 | - } |
|
| 1103 | - |
|
| 1104 | - // Si utf-8, voir si on dispose de mb_string |
|
| 1105 | - if (init_mb_string()) { |
|
| 1106 | - if ($length) { |
|
| 1107 | - return mb_substr($c, $start, $length); |
|
| 1108 | - } else { |
|
| 1109 | - return mb_substr($c, $start); |
|
| 1110 | - } |
|
| 1111 | - } |
|
| 1112 | - |
|
| 1113 | - // Version manuelle (cf. ci-dessous) |
|
| 1114 | - return spip_substr_manuelle($c, $start, $length); |
|
| 1095 | + // Si ce n'est pas utf-8, utiliser substr |
|
| 1096 | + if ($GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1097 | + if ($length) { |
|
| 1098 | + return substr($c, $start, $length); |
|
| 1099 | + } else { |
|
| 1100 | + return substr($c, $start); |
|
| 1101 | + } |
|
| 1102 | + } |
|
| 1103 | + |
|
| 1104 | + // Si utf-8, voir si on dispose de mb_string |
|
| 1105 | + if (init_mb_string()) { |
|
| 1106 | + if ($length) { |
|
| 1107 | + return mb_substr($c, $start, $length); |
|
| 1108 | + } else { |
|
| 1109 | + return mb_substr($c, $start); |
|
| 1110 | + } |
|
| 1111 | + } |
|
| 1112 | + |
|
| 1113 | + // Version manuelle (cf. ci-dessous) |
|
| 1114 | + return spip_substr_manuelle($c, $start, $length); |
|
| 1115 | 1115 | } |
| 1116 | 1116 | |
| 1117 | 1117 | |
@@ -1130,40 +1130,40 @@ discard block |
||
| 1130 | 1130 | **/ |
| 1131 | 1131 | function spip_substr_manuelle($c, $start, $length = null) { |
| 1132 | 1132 | |
| 1133 | - // Cas pathologique |
|
| 1134 | - if ($length === 0) { |
|
| 1135 | - return ''; |
|
| 1136 | - } |
|
| 1137 | - |
|
| 1138 | - // S'il y a un demarrage, on se positionne |
|
| 1139 | - if ($start > 0) { |
|
| 1140 | - $c = substr($c, strlen(spip_substr_manuelle($c, 0, $start))); |
|
| 1141 | - } elseif ($start < 0) { |
|
| 1142 | - return spip_substr_manuelle($c, spip_strlen($c) + $start, $length); |
|
| 1143 | - } |
|
| 1144 | - |
|
| 1145 | - if (!$length) { |
|
| 1146 | - return $c; |
|
| 1147 | - } |
|
| 1148 | - |
|
| 1149 | - if ($length > 0) { |
|
| 1150 | - // on prend n fois la longueur desiree, pour etre surs d'avoir tout |
|
| 1151 | - // (un caractere utf-8 prenant au maximum n bytes) |
|
| 1152 | - $n = 0; |
|
| 1153 | - while (preg_match(',[\x80-\xBF]{' . (++$n) . '},', $c)) { |
|
| 1154 | - ; |
|
| 1155 | - } |
|
| 1156 | - $c = substr($c, 0, $n * $length); |
|
| 1157 | - // puis, tant qu'on est trop long, on coupe... |
|
| 1158 | - while (($l = spip_strlen($c)) > $length) { |
|
| 1159 | - $c = substr($c, 0, $length - $l); |
|
| 1160 | - } |
|
| 1161 | - |
|
| 1162 | - return $c; |
|
| 1163 | - } |
|
| 1164 | - |
|
| 1165 | - // $length < 0 |
|
| 1166 | - return spip_substr_manuelle($c, 0, spip_strlen($c) + $length); |
|
| 1133 | + // Cas pathologique |
|
| 1134 | + if ($length === 0) { |
|
| 1135 | + return ''; |
|
| 1136 | + } |
|
| 1137 | + |
|
| 1138 | + // S'il y a un demarrage, on se positionne |
|
| 1139 | + if ($start > 0) { |
|
| 1140 | + $c = substr($c, strlen(spip_substr_manuelle($c, 0, $start))); |
|
| 1141 | + } elseif ($start < 0) { |
|
| 1142 | + return spip_substr_manuelle($c, spip_strlen($c) + $start, $length); |
|
| 1143 | + } |
|
| 1144 | + |
|
| 1145 | + if (!$length) { |
|
| 1146 | + return $c; |
|
| 1147 | + } |
|
| 1148 | + |
|
| 1149 | + if ($length > 0) { |
|
| 1150 | + // on prend n fois la longueur desiree, pour etre surs d'avoir tout |
|
| 1151 | + // (un caractere utf-8 prenant au maximum n bytes) |
|
| 1152 | + $n = 0; |
|
| 1153 | + while (preg_match(',[\x80-\xBF]{' . (++$n) . '},', $c)) { |
|
| 1154 | + ; |
|
| 1155 | + } |
|
| 1156 | + $c = substr($c, 0, $n * $length); |
|
| 1157 | + // puis, tant qu'on est trop long, on coupe... |
|
| 1158 | + while (($l = spip_strlen($c)) > $length) { |
|
| 1159 | + $c = substr($c, 0, $length - $l); |
|
| 1160 | + } |
|
| 1161 | + |
|
| 1162 | + return $c; |
|
| 1163 | + } |
|
| 1164 | + |
|
| 1165 | + // $length < 0 |
|
| 1166 | + return spip_substr_manuelle($c, 0, spip_strlen($c) + $length); |
|
| 1167 | 1167 | } |
| 1168 | 1168 | |
| 1169 | 1169 | /** |
@@ -1177,14 +1177,14 @@ discard block |
||
| 1177 | 1177 | * La chaîne avec une majuscule sur le premier mot |
| 1178 | 1178 | */ |
| 1179 | 1179 | function spip_ucfirst($c) { |
| 1180 | - // Si on n'a pas mb_* ou si ce n'est pas utf-8, utiliser ucfirst |
|
| 1181 | - if (!init_mb_string() or $GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1182 | - return ucfirst($c); |
|
| 1183 | - } |
|
| 1180 | + // Si on n'a pas mb_* ou si ce n'est pas utf-8, utiliser ucfirst |
|
| 1181 | + if (!init_mb_string() or $GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1182 | + return ucfirst($c); |
|
| 1183 | + } |
|
| 1184 | 1184 | |
| 1185 | - $lettre1 = mb_strtoupper(spip_substr($c, 0, 1)); |
|
| 1185 | + $lettre1 = mb_strtoupper(spip_substr($c, 0, 1)); |
|
| 1186 | 1186 | |
| 1187 | - return $lettre1 . spip_substr($c, 1); |
|
| 1187 | + return $lettre1 . spip_substr($c, 1); |
|
| 1188 | 1188 | } |
| 1189 | 1189 | |
| 1190 | 1190 | /** |
@@ -1198,12 +1198,12 @@ discard block |
||
| 1198 | 1198 | * La chaîne en minuscules |
| 1199 | 1199 | */ |
| 1200 | 1200 | function spip_strtolower($c) { |
| 1201 | - // Si on n'a pas mb_* ou si ce n'est pas utf-8, utiliser strtolower |
|
| 1202 | - if (!init_mb_string() or $GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1203 | - return strtolower($c); |
|
| 1204 | - } |
|
| 1201 | + // Si on n'a pas mb_* ou si ce n'est pas utf-8, utiliser strtolower |
|
| 1202 | + if (!init_mb_string() or $GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1203 | + return strtolower($c); |
|
| 1204 | + } |
|
| 1205 | 1205 | |
| 1206 | - return mb_strtolower($c); |
|
| 1206 | + return mb_strtolower($c); |
|
| 1207 | 1207 | } |
| 1208 | 1208 | |
| 1209 | 1209 | /** |
@@ -1217,23 +1217,23 @@ discard block |
||
| 1217 | 1217 | * Longueur de la chaîne |
| 1218 | 1218 | */ |
| 1219 | 1219 | function spip_strlen($c) { |
| 1220 | - // On transforme les sauts de ligne pour ne pas compter deux caractères |
|
| 1221 | - $c = str_replace("\r\n", "\n", $c); |
|
| 1222 | - |
|
| 1223 | - // Si ce n'est pas utf-8, utiliser strlen |
|
| 1224 | - if ($GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1225 | - return strlen($c); |
|
| 1226 | - } |
|
| 1227 | - |
|
| 1228 | - // Sinon, utiliser mb_strlen() si disponible |
|
| 1229 | - if (init_mb_string()) { |
|
| 1230 | - return mb_strlen($c); |
|
| 1231 | - } |
|
| 1232 | - |
|
| 1233 | - // Methode manuelle : on supprime les bytes 10......, |
|
| 1234 | - // on compte donc les ascii (0.......) et les demarrages |
|
| 1235 | - // de caracteres utf-8 (11......) |
|
| 1236 | - return strlen(preg_replace(',[\x80-\xBF],S', '', $c)); |
|
| 1220 | + // On transforme les sauts de ligne pour ne pas compter deux caractères |
|
| 1221 | + $c = str_replace("\r\n", "\n", $c); |
|
| 1222 | + |
|
| 1223 | + // Si ce n'est pas utf-8, utiliser strlen |
|
| 1224 | + if ($GLOBALS['meta']['charset'] != 'utf-8') { |
|
| 1225 | + return strlen($c); |
|
| 1226 | + } |
|
| 1227 | + |
|
| 1228 | + // Sinon, utiliser mb_strlen() si disponible |
|
| 1229 | + if (init_mb_string()) { |
|
| 1230 | + return mb_strlen($c); |
|
| 1231 | + } |
|
| 1232 | + |
|
| 1233 | + // Methode manuelle : on supprime les bytes 10......, |
|
| 1234 | + // on compte donc les ascii (0.......) et les demarrages |
|
| 1235 | + // de caracteres utf-8 (11......) |
|
| 1236 | + return strlen(preg_replace(',[\x80-\xBF],S', '', $c)); |
|
| 1237 | 1237 | } |
| 1238 | 1238 | |
| 1239 | 1239 | // Initialisation |
@@ -1243,16 +1243,16 @@ discard block |
||
| 1243 | 1243 | // dans les preg_replace pour ne pas casser certaines lettres accentuees : |
| 1244 | 1244 | // en utf-8 chr(195).chr(160) = a` alors qu'en iso-latin chr(160) = nbsp |
| 1245 | 1245 | if ( |
| 1246 | - !isset($GLOBALS['meta']['pcre_u']) |
|
| 1247 | - or (isset($_GET['var_mode']) and !isset($_GET['var_profile'])) |
|
| 1246 | + !isset($GLOBALS['meta']['pcre_u']) |
|
| 1247 | + or (isset($_GET['var_mode']) and !isset($_GET['var_profile'])) |
|
| 1248 | 1248 | ) { |
| 1249 | - include_spip('inc/meta'); |
|
| 1250 | - ecrire_meta( |
|
| 1251 | - 'pcre_u', |
|
| 1252 | - $u = (lire_config('charset', _DEFAULT_CHARSET) == 'utf-8' |
|
| 1253 | - and test_pcre_unicode()) |
|
| 1254 | - ? 'u' : '' |
|
| 1255 | - ); |
|
| 1249 | + include_spip('inc/meta'); |
|
| 1250 | + ecrire_meta( |
|
| 1251 | + 'pcre_u', |
|
| 1252 | + $u = (lire_config('charset', _DEFAULT_CHARSET) == 'utf-8' |
|
| 1253 | + and test_pcre_unicode()) |
|
| 1254 | + ? 'u' : '' |
|
| 1255 | + ); |
|
| 1256 | 1256 | } |
| 1257 | 1257 | |
| 1258 | 1258 | |
@@ -1268,17 +1268,17 @@ discard block |
||
| 1268 | 1268 | * en unicode : 💩 |
| 1269 | 1269 | */ |
| 1270 | 1270 | function utf8_noplanes($x) { |
| 1271 | - $regexp_utf8_4bytes = '/( |
|
| 1271 | + $regexp_utf8_4bytes = '/( |
|
| 1272 | 1272 | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 |
| 1273 | 1273 | | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 |
| 1274 | 1274 | | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 |
| 1275 | 1275 | )/xS'; |
| 1276 | - if (preg_match_all($regexp_utf8_4bytes, $x, $z, PREG_PATTERN_ORDER)) { |
|
| 1277 | - foreach ($z[0] as $k) { |
|
| 1278 | - $ku = utf_8_to_unicode($k); |
|
| 1279 | - $x = str_replace($k, $ku, $x); |
|
| 1280 | - } |
|
| 1281 | - } |
|
| 1282 | - |
|
| 1283 | - return $x; |
|
| 1276 | + if (preg_match_all($regexp_utf8_4bytes, $x, $z, PREG_PATTERN_ORDER)) { |
|
| 1277 | + foreach ($z[0] as $k) { |
|
| 1278 | + $ku = utf_8_to_unicode($k); |
|
| 1279 | + $x = str_replace($k, $ku, $x); |
|
| 1280 | + } |
|
| 1281 | + } |
|
| 1282 | + |
|
| 1283 | + return $x; |
|
| 1284 | 1284 | } |
@@ -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 | } |
@@ -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 | /** |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | * URL, code HTML du formulaire ou tableau (action, arg, hash) |
| 44 | 44 | */ |
| 45 | 45 | function generer_action_auteur($action, $arg = '', $redirect = '', $mode = false, $att = '', $public = false) { |
| 46 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 46 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 47 | 47 | |
| 48 | - return $securiser_action($action, $arg, $redirect, $mode, $att, $public); |
|
| 48 | + return $securiser_action($action, $arg, $redirect, $mode, $att, $public); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | * Code HTML du formulaire |
| 79 | 79 | */ |
| 80 | 80 | function redirige_action_auteur($action, $arg, $ret, $gra = '', $mode = false, $atts = '', $public = false) { |
| 81 | - $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT) . generer_url_ecrire($ret, $gra, true, true); |
|
| 81 | + $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT) . generer_url_ecrire($ret, $gra, true, true); |
|
| 82 | 82 | |
| 83 | - return generer_action_auteur($action, $arg, $r, $mode, $atts, $public); |
|
| 83 | + return generer_action_auteur($action, $arg, $r, $mode, $atts, $public); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | * URL, code HTML du formulaire ou tableau (action, arg, hash) |
| 106 | 106 | */ |
| 107 | 107 | function redirige_action_post($action, $arg, $ret, $gra, $corps, $att = '') { |
| 108 | - $r = _DIR_RESTREINT . generer_url_ecrire($ret, $gra, false, true); |
|
| 108 | + $r = _DIR_RESTREINT . generer_url_ecrire($ret, $gra, false, true); |
|
| 109 | 109 | |
| 110 | - return generer_action_auteur($action, $arg, $r, $corps, $att . " method='post'"); |
|
| 110 | + return generer_action_auteur($action, $arg, $r, $corps, $att . " method='post'"); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | |
@@ -124,26 +124,26 @@ discard block |
||
| 124 | 124 | * passer "text/html" comme $content_type |
| 125 | 125 | */ |
| 126 | 126 | function ajax_retour($corps, $content_type = null): void { |
| 127 | - $xml = false; |
|
| 128 | - if (is_null($content_type) or $content_type === true) { |
|
| 129 | - $xml = true; |
|
| 130 | - $content_type = 'text/html'; |
|
| 131 | - } elseif (!$content_type or !is_string($content_type) or strpos($content_type, '/') === false) { |
|
| 132 | - $content_type = 'text/html'; |
|
| 133 | - } |
|
| 127 | + $xml = false; |
|
| 128 | + if (is_null($content_type) or $content_type === true) { |
|
| 129 | + $xml = true; |
|
| 130 | + $content_type = 'text/html'; |
|
| 131 | + } elseif (!$content_type or !is_string($content_type) or strpos($content_type, '/') === false) { |
|
| 132 | + $content_type = 'text/html'; |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | - $e = ''; |
|
| 136 | - if ( |
|
| 137 | - isset($_COOKIE['spip_admin']) |
|
| 138 | - and ((_request('var_mode') == 'debug') or !empty($GLOBALS['tableau_des_temps'])) |
|
| 139 | - ) { |
|
| 140 | - $e = erreur_squelette(); |
|
| 141 | - } |
|
| 135 | + $e = ''; |
|
| 136 | + if ( |
|
| 137 | + isset($_COOKIE['spip_admin']) |
|
| 138 | + and ((_request('var_mode') == 'debug') or !empty($GLOBALS['tableau_des_temps'])) |
|
| 139 | + ) { |
|
| 140 | + $e = erreur_squelette(); |
|
| 141 | + } |
|
| 142 | 142 | |
| 143 | - $c = $GLOBALS['meta']['charset']; |
|
| 144 | - header('Content-Type: ' . $content_type . '; charset=' . $c); |
|
| 145 | - $debut = (($xml and strlen(trim($corps))) ? '<' . "?xml version='1.0' encoding='" . $c . "'?" . ">\n" : ''); |
|
| 146 | - $fin = ''; |
|
| 143 | + $c = $GLOBALS['meta']['charset']; |
|
| 144 | + header('Content-Type: ' . $content_type . '; charset=' . $c); |
|
| 145 | + $debut = (($xml and strlen(trim($corps))) ? '<' . "?xml version='1.0' encoding='" . $c . "'?" . ">\n" : ''); |
|
| 146 | + $fin = ''; |
|
| 147 | 147 | |
| 148 | - echo $debut, $corps, $fin, $e; |
|
| 148 | + echo $debut, $corps, $fin, $e; |
|
| 149 | 149 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\SQL |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | require_once _ROOT_RESTREINT . 'base/objets.php'; |
| 22 | 22 | |
@@ -42,118 +42,118 @@ discard block |
||
| 42 | 42 | **/ |
| 43 | 43 | function spip_connect($serveur = '', $version = '') { |
| 44 | 44 | |
| 45 | - $serveur = !is_string($serveur) ? '' : strtolower($serveur); |
|
| 46 | - $index = $serveur ?: 0; |
|
| 47 | - if (!$version) { |
|
| 48 | - $version = $GLOBALS['spip_sql_version']; |
|
| 49 | - } |
|
| 50 | - if (isset($GLOBALS['connexions'][$index][$version])) { |
|
| 51 | - return $GLOBALS['connexions'][$index]; |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - include_spip('base/abstract_sql'); |
|
| 55 | - $install = (_request('exec') == 'install'); |
|
| 56 | - |
|
| 57 | - // Premiere connexion ? |
|
| 58 | - if (!($old = isset($GLOBALS['connexions'][$index]))) { |
|
| 59 | - $f = (!preg_match('/^[\w\.]*$/', $serveur)) |
|
| 60 | - ? '' // nom de serveur mal ecrit |
|
| 61 | - : ($serveur ? |
|
| 62 | - (_DIR_CONNECT . $serveur . '.php') // serveur externe |
|
| 63 | - : (_FILE_CONNECT ?: ($install ? _FILE_CONNECT_TMP // init du serveur principal |
|
| 64 | - : ''))); // installation pas faite |
|
| 65 | - |
|
| 66 | - unset($GLOBALS['db_ok']); |
|
| 67 | - unset($GLOBALS['spip_connect_version']); |
|
| 68 | - if ($f) { |
|
| 69 | - if (is_readable($f)) { |
|
| 70 | - include($f); |
|
| 71 | - } elseif ($serveur and !$install) { |
|
| 72 | - // chercher une declaration de serveur dans le path |
|
| 73 | - // qui pourra un jour servir a declarer des bases sqlite |
|
| 74 | - // par des plugins. Et sert aussi aux boucles POUR. |
|
| 75 | - find_in_path("$serveur.php", 'connect/', true); |
|
| 76 | - } |
|
| 77 | - } |
|
| 78 | - if (!isset($GLOBALS['db_ok'])) { |
|
| 79 | - // fera mieux la prochaine fois |
|
| 80 | - if ($install) { |
|
| 81 | - return false; |
|
| 82 | - } |
|
| 83 | - if ($f and is_readable($f)) { |
|
| 84 | - spip_log("spip_connect: fichier de connexion '$f' OK.", _LOG_INFO_IMPORTANTE); |
|
| 85 | - } else { |
|
| 86 | - spip_log("spip_connect: fichier de connexion '$f' non trouve", _LOG_INFO_IMPORTANTE); |
|
| 87 | - } |
|
| 88 | - spip_log("spip_connect: echec connexion ou serveur $index mal defini dans '$f'.", _LOG_HS); |
|
| 89 | - |
|
| 90 | - // ne plus reessayer si ce n'est pas l'install |
|
| 91 | - return $GLOBALS['connexions'][$index] = false; |
|
| 92 | - } |
|
| 93 | - $GLOBALS['connexions'][$index] = $GLOBALS['db_ok']; |
|
| 94 | - } |
|
| 95 | - // si la connexion a deja ete tentee mais a echoue, le dire! |
|
| 96 | - if (!$GLOBALS['connexions'][$index]) { |
|
| 97 | - return false; |
|
| 98 | - } |
|
| 99 | - |
|
| 100 | - // la connexion a reussi ou etait deja faite. |
|
| 101 | - // chargement de la version du jeu de fonctions |
|
| 102 | - // si pas dans le fichier par defaut |
|
| 103 | - $type = $GLOBALS['db_ok']['type']; |
|
| 104 | - $jeu = 'spip_' . $type . '_functions_' . $version; |
|
| 105 | - if (!isset($GLOBALS[$jeu])) { |
|
| 106 | - if (!find_in_path($type . '_' . $version . '.php', 'req/', true)) { |
|
| 107 | - spip_log("spip_connect: serveur $index version '$version' non defini pour '$type'", _LOG_HS); |
|
| 108 | - |
|
| 109 | - // ne plus reessayer |
|
| 110 | - return $GLOBALS['connexions'][$index][$version] = []; |
|
| 111 | - } |
|
| 112 | - } |
|
| 113 | - $GLOBALS['connexions'][$index][$version] = $GLOBALS[$jeu]; |
|
| 114 | - if ($old) { |
|
| 115 | - return $GLOBALS['connexions'][$index]; |
|
| 116 | - } |
|
| 117 | - |
|
| 118 | - $GLOBALS['connexions'][$index]['spip_connect_version'] = $GLOBALS['spip_connect_version'] ?? 0; |
|
| 119 | - |
|
| 120 | - // initialisation de l'alphabet utilise dans les connexions SQL |
|
| 121 | - // si l'installation l'a determine. |
|
| 122 | - // Celui du serveur principal l'impose aux serveurs secondaires |
|
| 123 | - // s'ils le connaissent |
|
| 124 | - |
|
| 125 | - if (!$serveur) { |
|
| 126 | - $charset = spip_connect_main($GLOBALS[$jeu], $GLOBALS['db_ok']['charset']); |
|
| 127 | - if (!$charset) { |
|
| 128 | - unset($GLOBALS['connexions'][$index]); |
|
| 129 | - spip_log('spip_connect: absence de charset', _LOG_AVERTISSEMENT); |
|
| 130 | - |
|
| 131 | - return false; |
|
| 132 | - } |
|
| 133 | - } else { |
|
| 134 | - if ($GLOBALS['db_ok']['charset']) { |
|
| 135 | - $charset = $GLOBALS['db_ok']['charset']; |
|
| 136 | - } |
|
| 137 | - // spip_meta n'existe pas toujours dans la base |
|
| 138 | - // C'est le cas d'un dump sqlite par exemple |
|
| 139 | - elseif ( |
|
| 140 | - $GLOBALS['connexions'][$index]['spip_connect_version'] |
|
| 141 | - and sql_showtable('spip_meta', true, $serveur) |
|
| 142 | - and $r = sql_getfetsel('valeur', 'spip_meta', "nom='charset_sql_connexion'", '', '', '', '', $serveur) |
|
| 143 | - ) { |
|
| 144 | - $charset = $r; |
|
| 145 | - } else { |
|
| 146 | - $charset = -1; |
|
| 147 | - } |
|
| 148 | - } |
|
| 149 | - if ($charset != -1) { |
|
| 150 | - $f = $GLOBALS[$jeu]['set_charset']; |
|
| 151 | - if (function_exists($f)) { |
|
| 152 | - $f($charset, $serveur); |
|
| 153 | - } |
|
| 154 | - } |
|
| 155 | - |
|
| 156 | - return $GLOBALS['connexions'][$index]; |
|
| 45 | + $serveur = !is_string($serveur) ? '' : strtolower($serveur); |
|
| 46 | + $index = $serveur ?: 0; |
|
| 47 | + if (!$version) { |
|
| 48 | + $version = $GLOBALS['spip_sql_version']; |
|
| 49 | + } |
|
| 50 | + if (isset($GLOBALS['connexions'][$index][$version])) { |
|
| 51 | + return $GLOBALS['connexions'][$index]; |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + include_spip('base/abstract_sql'); |
|
| 55 | + $install = (_request('exec') == 'install'); |
|
| 56 | + |
|
| 57 | + // Premiere connexion ? |
|
| 58 | + if (!($old = isset($GLOBALS['connexions'][$index]))) { |
|
| 59 | + $f = (!preg_match('/^[\w\.]*$/', $serveur)) |
|
| 60 | + ? '' // nom de serveur mal ecrit |
|
| 61 | + : ($serveur ? |
|
| 62 | + (_DIR_CONNECT . $serveur . '.php') // serveur externe |
|
| 63 | + : (_FILE_CONNECT ?: ($install ? _FILE_CONNECT_TMP // init du serveur principal |
|
| 64 | + : ''))); // installation pas faite |
|
| 65 | + |
|
| 66 | + unset($GLOBALS['db_ok']); |
|
| 67 | + unset($GLOBALS['spip_connect_version']); |
|
| 68 | + if ($f) { |
|
| 69 | + if (is_readable($f)) { |
|
| 70 | + include($f); |
|
| 71 | + } elseif ($serveur and !$install) { |
|
| 72 | + // chercher une declaration de serveur dans le path |
|
| 73 | + // qui pourra un jour servir a declarer des bases sqlite |
|
| 74 | + // par des plugins. Et sert aussi aux boucles POUR. |
|
| 75 | + find_in_path("$serveur.php", 'connect/', true); |
|
| 76 | + } |
|
| 77 | + } |
|
| 78 | + if (!isset($GLOBALS['db_ok'])) { |
|
| 79 | + // fera mieux la prochaine fois |
|
| 80 | + if ($install) { |
|
| 81 | + return false; |
|
| 82 | + } |
|
| 83 | + if ($f and is_readable($f)) { |
|
| 84 | + spip_log("spip_connect: fichier de connexion '$f' OK.", _LOG_INFO_IMPORTANTE); |
|
| 85 | + } else { |
|
| 86 | + spip_log("spip_connect: fichier de connexion '$f' non trouve", _LOG_INFO_IMPORTANTE); |
|
| 87 | + } |
|
| 88 | + spip_log("spip_connect: echec connexion ou serveur $index mal defini dans '$f'.", _LOG_HS); |
|
| 89 | + |
|
| 90 | + // ne plus reessayer si ce n'est pas l'install |
|
| 91 | + return $GLOBALS['connexions'][$index] = false; |
|
| 92 | + } |
|
| 93 | + $GLOBALS['connexions'][$index] = $GLOBALS['db_ok']; |
|
| 94 | + } |
|
| 95 | + // si la connexion a deja ete tentee mais a echoue, le dire! |
|
| 96 | + if (!$GLOBALS['connexions'][$index]) { |
|
| 97 | + return false; |
|
| 98 | + } |
|
| 99 | + |
|
| 100 | + // la connexion a reussi ou etait deja faite. |
|
| 101 | + // chargement de la version du jeu de fonctions |
|
| 102 | + // si pas dans le fichier par defaut |
|
| 103 | + $type = $GLOBALS['db_ok']['type']; |
|
| 104 | + $jeu = 'spip_' . $type . '_functions_' . $version; |
|
| 105 | + if (!isset($GLOBALS[$jeu])) { |
|
| 106 | + if (!find_in_path($type . '_' . $version . '.php', 'req/', true)) { |
|
| 107 | + spip_log("spip_connect: serveur $index version '$version' non defini pour '$type'", _LOG_HS); |
|
| 108 | + |
|
| 109 | + // ne plus reessayer |
|
| 110 | + return $GLOBALS['connexions'][$index][$version] = []; |
|
| 111 | + } |
|
| 112 | + } |
|
| 113 | + $GLOBALS['connexions'][$index][$version] = $GLOBALS[$jeu]; |
|
| 114 | + if ($old) { |
|
| 115 | + return $GLOBALS['connexions'][$index]; |
|
| 116 | + } |
|
| 117 | + |
|
| 118 | + $GLOBALS['connexions'][$index]['spip_connect_version'] = $GLOBALS['spip_connect_version'] ?? 0; |
|
| 119 | + |
|
| 120 | + // initialisation de l'alphabet utilise dans les connexions SQL |
|
| 121 | + // si l'installation l'a determine. |
|
| 122 | + // Celui du serveur principal l'impose aux serveurs secondaires |
|
| 123 | + // s'ils le connaissent |
|
| 124 | + |
|
| 125 | + if (!$serveur) { |
|
| 126 | + $charset = spip_connect_main($GLOBALS[$jeu], $GLOBALS['db_ok']['charset']); |
|
| 127 | + if (!$charset) { |
|
| 128 | + unset($GLOBALS['connexions'][$index]); |
|
| 129 | + spip_log('spip_connect: absence de charset', _LOG_AVERTISSEMENT); |
|
| 130 | + |
|
| 131 | + return false; |
|
| 132 | + } |
|
| 133 | + } else { |
|
| 134 | + if ($GLOBALS['db_ok']['charset']) { |
|
| 135 | + $charset = $GLOBALS['db_ok']['charset']; |
|
| 136 | + } |
|
| 137 | + // spip_meta n'existe pas toujours dans la base |
|
| 138 | + // C'est le cas d'un dump sqlite par exemple |
|
| 139 | + elseif ( |
|
| 140 | + $GLOBALS['connexions'][$index]['spip_connect_version'] |
|
| 141 | + and sql_showtable('spip_meta', true, $serveur) |
|
| 142 | + and $r = sql_getfetsel('valeur', 'spip_meta', "nom='charset_sql_connexion'", '', '', '', '', $serveur) |
|
| 143 | + ) { |
|
| 144 | + $charset = $r; |
|
| 145 | + } else { |
|
| 146 | + $charset = -1; |
|
| 147 | + } |
|
| 148 | + } |
|
| 149 | + if ($charset != -1) { |
|
| 150 | + $f = $GLOBALS[$jeu]['set_charset']; |
|
| 151 | + if (function_exists($f)) { |
|
| 152 | + $f($charset, $serveur); |
|
| 153 | + } |
|
| 154 | + } |
|
| 155 | + |
|
| 156 | + return $GLOBALS['connexions'][$index]; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -162,12 +162,12 @@ discard block |
||
| 162 | 162 | * @param string $serveur Nom du connecteur de bdd utilisé |
| 163 | 163 | **/ |
| 164 | 164 | function spip_sql_erreur($serveur = '') { |
| 165 | - $connexion = spip_connect($serveur); |
|
| 166 | - $e = sql_errno($serveur); |
|
| 167 | - $t = ($connexion['type'] ?? 'sql'); |
|
| 168 | - $m = "Erreur $e de $t: " . sql_error($serveur) . "\nin " . sql_error_backtrace() . "\n" . trim($connexion['last']); |
|
| 169 | - $f = $t . $serveur; |
|
| 170 | - spip_log($m, $f . '.' . _LOG_ERREUR); |
|
| 165 | + $connexion = spip_connect($serveur); |
|
| 166 | + $e = sql_errno($serveur); |
|
| 167 | + $t = ($connexion['type'] ?? 'sql'); |
|
| 168 | + $m = "Erreur $e de $t: " . sql_error($serveur) . "\nin " . sql_error_backtrace() . "\n" . trim($connexion['last']); |
|
| 169 | + $f = $t . $serveur; |
|
| 170 | + spip_log($m, $f . '.' . _LOG_ERREUR); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -189,23 +189,23 @@ discard block |
||
| 189 | 189 | * - array : description de la connexion, si l'instruction sql est indisponible pour cette connexion |
| 190 | 190 | **/ |
| 191 | 191 | function spip_connect_sql($version, $ins = '', $serveur = '', $continue = false) { |
| 192 | - $desc = spip_connect($serveur, $version); |
|
| 193 | - if ( |
|
| 194 | - $desc |
|
| 195 | - and $f = ($desc[$version][$ins] ?? '') |
|
| 196 | - and function_exists($f) |
|
| 197 | - ) { |
|
| 198 | - return $f; |
|
| 199 | - } |
|
| 200 | - if ($continue) { |
|
| 201 | - return $desc; |
|
| 202 | - } |
|
| 203 | - if ($ins) { |
|
| 204 | - spip_log("Le serveur '$serveur' version $version n'a pas '$ins'", _LOG_ERREUR); |
|
| 205 | - } |
|
| 206 | - include_spip('inc/minipres'); |
|
| 207 | - echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique'), ['status' => 503]); |
|
| 208 | - exit; |
|
| 192 | + $desc = spip_connect($serveur, $version); |
|
| 193 | + if ( |
|
| 194 | + $desc |
|
| 195 | + and $f = ($desc[$version][$ins] ?? '') |
|
| 196 | + and function_exists($f) |
|
| 197 | + ) { |
|
| 198 | + return $f; |
|
| 199 | + } |
|
| 200 | + if ($continue) { |
|
| 201 | + return $desc; |
|
| 202 | + } |
|
| 203 | + if ($ins) { |
|
| 204 | + spip_log("Le serveur '$serveur' version $version n'a pas '$ins'", _LOG_ERREUR); |
|
| 205 | + } |
|
| 206 | + include_spip('inc/minipres'); |
|
| 207 | + echo minipres(_T('info_travaux_titre'), _T('titre_probleme_technique'), ['status' => 503]); |
|
| 208 | + exit; |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
@@ -231,70 +231,70 @@ discard block |
||
| 231 | 231 | * @return array|null Description de la connexion |
| 232 | 232 | */ |
| 233 | 233 | function spip_connect_db( |
| 234 | - $host, |
|
| 235 | - $port, |
|
| 236 | - $login, |
|
| 237 | - $pass, |
|
| 238 | - $db = '', |
|
| 239 | - $type = 'mysql', |
|
| 240 | - $prefixe = '', |
|
| 241 | - $auth = '', |
|
| 242 | - $charset = '' |
|
| 234 | + $host, |
|
| 235 | + $port, |
|
| 236 | + $login, |
|
| 237 | + $pass, |
|
| 238 | + $db = '', |
|
| 239 | + $type = 'mysql', |
|
| 240 | + $prefixe = '', |
|
| 241 | + $auth = '', |
|
| 242 | + $charset = '' |
|
| 243 | 243 | ) { |
| 244 | - // temps avant nouvelle tentative de connexion |
|
| 245 | - // suite a une connection echouee |
|
| 246 | - if (!defined('_CONNECT_RETRY_DELAY')) { |
|
| 247 | - define('_CONNECT_RETRY_DELAY', 30); |
|
| 248 | - } |
|
| 249 | - |
|
| 250 | - $f = ''; |
|
| 251 | - // un fichier de identifiant par combinaison (type,host,port,db) |
|
| 252 | - // pour ne pas declarer tout indisponible d'un coup |
|
| 253 | - // si en cours d'installation ou si db=@test@ on ne pose rien |
|
| 254 | - // car c'est un test de connexion |
|
| 255 | - if (!defined('_ECRIRE_INSTALL') and $db !== '@test@') { |
|
| 256 | - $f = _DIR_TMP . $type . '.' . substr(md5($host . $port . $db), 0, 8) . '.out'; |
|
| 257 | - } elseif ($db == '@test@') { |
|
| 258 | - $db = ''; |
|
| 259 | - } |
|
| 260 | - |
|
| 261 | - if ( |
|
| 262 | - $f |
|
| 263 | - and @file_exists($f) |
|
| 264 | - and (time() - @filemtime($f) < _CONNECT_RETRY_DELAY) |
|
| 265 | - ) { |
|
| 266 | - spip_log("Echec : $f recent. Pas de tentative de connexion", _LOG_HS); |
|
| 267 | - |
|
| 268 | - return null; |
|
| 269 | - } |
|
| 270 | - |
|
| 271 | - if (!$prefixe) { |
|
| 272 | - $prefixe = $GLOBALS['table_prefix'] ?? $db; |
|
| 273 | - } |
|
| 274 | - $h = charger_fonction($type, 'req', true); |
|
| 275 | - if (!$h) { |
|
| 276 | - spip_log("les requetes $type ne sont pas fournies", _LOG_HS); |
|
| 277 | - |
|
| 278 | - return null; |
|
| 279 | - } |
|
| 280 | - if ($g = $h($host, $port, $login, $pass, $db, $prefixe)) { |
|
| 281 | - if (!is_array($auth)) { |
|
| 282 | - // compatibilite version 0.7 initiale |
|
| 283 | - $g['ldap'] = $auth; |
|
| 284 | - $auth = ['ldap' => $auth]; |
|
| 285 | - } |
|
| 286 | - $g['authentification'] = $auth; |
|
| 287 | - $g['type'] = $type; |
|
| 288 | - $g['charset'] = $charset; |
|
| 289 | - |
|
| 290 | - return $GLOBALS['db_ok'] = $g; |
|
| 291 | - } |
|
| 292 | - // En cas d'indisponibilite du serveur, eviter de le bombarder |
|
| 293 | - if ($f) { |
|
| 294 | - @touch($f); |
|
| 295 | - spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type . '.' . _LOG_HS); |
|
| 296 | - } |
|
| 297 | - return null; |
|
| 244 | + // temps avant nouvelle tentative de connexion |
|
| 245 | + // suite a une connection echouee |
|
| 246 | + if (!defined('_CONNECT_RETRY_DELAY')) { |
|
| 247 | + define('_CONNECT_RETRY_DELAY', 30); |
|
| 248 | + } |
|
| 249 | + |
|
| 250 | + $f = ''; |
|
| 251 | + // un fichier de identifiant par combinaison (type,host,port,db) |
|
| 252 | + // pour ne pas declarer tout indisponible d'un coup |
|
| 253 | + // si en cours d'installation ou si db=@test@ on ne pose rien |
|
| 254 | + // car c'est un test de connexion |
|
| 255 | + if (!defined('_ECRIRE_INSTALL') and $db !== '@test@') { |
|
| 256 | + $f = _DIR_TMP . $type . '.' . substr(md5($host . $port . $db), 0, 8) . '.out'; |
|
| 257 | + } elseif ($db == '@test@') { |
|
| 258 | + $db = ''; |
|
| 259 | + } |
|
| 260 | + |
|
| 261 | + if ( |
|
| 262 | + $f |
|
| 263 | + and @file_exists($f) |
|
| 264 | + and (time() - @filemtime($f) < _CONNECT_RETRY_DELAY) |
|
| 265 | + ) { |
|
| 266 | + spip_log("Echec : $f recent. Pas de tentative de connexion", _LOG_HS); |
|
| 267 | + |
|
| 268 | + return null; |
|
| 269 | + } |
|
| 270 | + |
|
| 271 | + if (!$prefixe) { |
|
| 272 | + $prefixe = $GLOBALS['table_prefix'] ?? $db; |
|
| 273 | + } |
|
| 274 | + $h = charger_fonction($type, 'req', true); |
|
| 275 | + if (!$h) { |
|
| 276 | + spip_log("les requetes $type ne sont pas fournies", _LOG_HS); |
|
| 277 | + |
|
| 278 | + return null; |
|
| 279 | + } |
|
| 280 | + if ($g = $h($host, $port, $login, $pass, $db, $prefixe)) { |
|
| 281 | + if (!is_array($auth)) { |
|
| 282 | + // compatibilite version 0.7 initiale |
|
| 283 | + $g['ldap'] = $auth; |
|
| 284 | + $auth = ['ldap' => $auth]; |
|
| 285 | + } |
|
| 286 | + $g['authentification'] = $auth; |
|
| 287 | + $g['type'] = $type; |
|
| 288 | + $g['charset'] = $charset; |
|
| 289 | + |
|
| 290 | + return $GLOBALS['db_ok'] = $g; |
|
| 291 | + } |
|
| 292 | + // En cas d'indisponibilite du serveur, eviter de le bombarder |
|
| 293 | + if ($f) { |
|
| 294 | + @touch($f); |
|
| 295 | + spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type . '.' . _LOG_HS); |
|
| 296 | + } |
|
| 297 | + return null; |
|
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | |
@@ -326,32 +326,32 @@ discard block |
||
| 326 | 326 | * - nom du charset sinon |
| 327 | 327 | **/ |
| 328 | 328 | function spip_connect_main($connexion, $charset_sql_connexion = '') { |
| 329 | - if ($GLOBALS['spip_connect_version'] < 0.1 and _DIR_RESTREINT) { |
|
| 330 | - include_spip('inc/headers'); |
|
| 331 | - redirige_url_ecrire('upgrade', 'reinstall=oui'); |
|
| 332 | - } |
|
| 333 | - |
|
| 334 | - if (!($f = $connexion['select'])) { |
|
| 335 | - return false; |
|
| 336 | - } |
|
| 337 | - // si le charset est fourni, l'utiliser |
|
| 338 | - if ($charset_sql_connexion) { |
|
| 339 | - return $charset_sql_connexion; |
|
| 340 | - } |
|
| 341 | - // sinon on regarde la table spip_meta |
|
| 342 | - // en cas d'erreur select retourne la requette (is_string=true donc) |
|
| 343 | - if ( |
|
| 344 | - !$r = $f('valeur', 'spip_meta', "nom='charset_sql_connexion'") |
|
| 345 | - or is_string($r) |
|
| 346 | - ) { |
|
| 347 | - return false; |
|
| 348 | - } |
|
| 349 | - if (!($f = $connexion['fetch'])) { |
|
| 350 | - return false; |
|
| 351 | - } |
|
| 352 | - $r = $f($r); |
|
| 353 | - |
|
| 354 | - return (isset($r['valeur']) && $r['valeur']) ? $r['valeur'] : -1; |
|
| 329 | + if ($GLOBALS['spip_connect_version'] < 0.1 and _DIR_RESTREINT) { |
|
| 330 | + include_spip('inc/headers'); |
|
| 331 | + redirige_url_ecrire('upgrade', 'reinstall=oui'); |
|
| 332 | + } |
|
| 333 | + |
|
| 334 | + if (!($f = $connexion['select'])) { |
|
| 335 | + return false; |
|
| 336 | + } |
|
| 337 | + // si le charset est fourni, l'utiliser |
|
| 338 | + if ($charset_sql_connexion) { |
|
| 339 | + return $charset_sql_connexion; |
|
| 340 | + } |
|
| 341 | + // sinon on regarde la table spip_meta |
|
| 342 | + // en cas d'erreur select retourne la requette (is_string=true donc) |
|
| 343 | + if ( |
|
| 344 | + !$r = $f('valeur', 'spip_meta', "nom='charset_sql_connexion'") |
|
| 345 | + or is_string($r) |
|
| 346 | + ) { |
|
| 347 | + return false; |
|
| 348 | + } |
|
| 349 | + if (!($f = $connexion['fetch'])) { |
|
| 350 | + return false; |
|
| 351 | + } |
|
| 352 | + $r = $f($r); |
|
| 353 | + |
|
| 354 | + return (isset($r['valeur']) && $r['valeur']) ? $r['valeur'] : -1; |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | /** |
@@ -367,8 +367,8 @@ discard block |
||
| 367 | 367 | * @return array |
| 368 | 368 | */ |
| 369 | 369 | function spip_connect_ldap($serveur = '') { |
| 370 | - include_spip('auth/ldap'); |
|
| 371 | - return auth_ldap_connect($serveur); |
|
| 370 | + include_spip('auth/ldap'); |
|
| 371 | + return auth_ldap_connect($serveur); |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | /** |
@@ -384,16 +384,16 @@ discard block |
||
| 384 | 384 | * @return string Valeur échappée. |
| 385 | 385 | **/ |
| 386 | 386 | function _q($a): string { |
| 387 | - if (is_numeric($a)) { |
|
| 388 | - return strval($a); |
|
| 389 | - } elseif (is_array($a)) { |
|
| 390 | - return join(',', array_map('_q', $a)); |
|
| 391 | - } elseif (is_scalar($a)) { |
|
| 392 | - return ("'" . addslashes($a) . "'"); |
|
| 393 | - } elseif ($a === null) { |
|
| 394 | - return "''"; |
|
| 395 | - } |
|
| 396 | - throw new \RuntimeException('Can’t use _q with ' . gettype($a)); |
|
| 387 | + if (is_numeric($a)) { |
|
| 388 | + return strval($a); |
|
| 389 | + } elseif (is_array($a)) { |
|
| 390 | + return join(',', array_map('_q', $a)); |
|
| 391 | + } elseif (is_scalar($a)) { |
|
| 392 | + return ("'" . addslashes($a) . "'"); |
|
| 393 | + } elseif ($a === null) { |
|
| 394 | + return "''"; |
|
| 395 | + } |
|
| 396 | + throw new \RuntimeException('Can’t use _q with ' . gettype($a)); |
|
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | /** |
@@ -409,75 +409,75 @@ discard block |
||
| 409 | 409 | * @return array |
| 410 | 410 | */ |
| 411 | 411 | function query_echappe_textes($query, $uniqid = null) { |
| 412 | - static $codeEchappements = null; |
|
| 413 | - if (is_null($codeEchappements) or $uniqid) { |
|
| 414 | - if (is_null($uniqid)) { |
|
| 415 | - $uniqid = uniqid(); |
|
| 416 | - } |
|
| 417 | - $uniqid = substr(md5($uniqid), 0, 4); |
|
| 418 | - $codeEchappements = ['\\\\' => "\x1@#{$uniqid}#@\x1", "\\'" => "\x2@#{$uniqid}#@\x2", '\\"' => "\x3@#{$uniqid}#@\x3", '%' => "\x4@#{$uniqid}#@\x4"]; |
|
| 419 | - } |
|
| 420 | - if ($query === null) { |
|
| 421 | - return $codeEchappements; |
|
| 422 | - } |
|
| 423 | - |
|
| 424 | - // si la query contient deja des codes d'echappement on va s'emmeler les pinceaux et donc on ne touche a rien |
|
| 425 | - // ce n'est pas un cas legitime |
|
| 426 | - foreach ($codeEchappements as $codeEchappement) { |
|
| 427 | - if (strpos($query, (string) $codeEchappement) !== false) { |
|
| 428 | - return [$query, []]; |
|
| 429 | - } |
|
| 430 | - } |
|
| 431 | - |
|
| 432 | - $query_echappees = str_replace(array_keys($codeEchappements), array_values($codeEchappements), $query); |
|
| 433 | - if (preg_match_all("/('[^']*')|(\"[^\"]*\")/S", $query_echappees, $textes)) { |
|
| 434 | - $textes = reset($textes); |
|
| 435 | - |
|
| 436 | - $parts = []; |
|
| 437 | - $currentpos = 0; |
|
| 438 | - $k = 0; |
|
| 439 | - while (count($textes)) { |
|
| 440 | - $part = array_shift($textes); |
|
| 441 | - $nextpos = strpos($query_echappees, $part, $currentpos); |
|
| 442 | - // si besoin recoller ensemble les doubles '' de sqlite (echappement des ') |
|
| 443 | - while (count($textes) and substr($part, -1) === "'") { |
|
| 444 | - $next = reset($textes); |
|
| 445 | - if ( |
|
| 446 | - strpos($next, "'") === 0 |
|
| 447 | - and strpos($query_echappees, $part . $next, $currentpos) === $nextpos |
|
| 448 | - ) { |
|
| 449 | - $part .= array_shift($textes); |
|
| 450 | - } |
|
| 451 | - else { |
|
| 452 | - break; |
|
| 453 | - } |
|
| 454 | - } |
|
| 455 | - $k++; |
|
| 456 | - $parts[$k] = [ |
|
| 457 | - 'texte' => $part, |
|
| 458 | - 'position' => $nextpos, |
|
| 459 | - 'placeholder' => '%' . $k . '$s', |
|
| 460 | - ]; |
|
| 461 | - $currentpos = $nextpos + strlen($part); |
|
| 462 | - } |
|
| 463 | - |
|
| 464 | - // et on replace les parts une par une en commencant par la fin |
|
| 465 | - while ($k > 0) { |
|
| 466 | - $query_echappees = substr_replace($query_echappees, $parts[$k]['placeholder'], $parts[$k]['position'], strlen($parts[$k]['texte'])); |
|
| 467 | - $k--; |
|
| 468 | - } |
|
| 469 | - $textes = array_column($parts, 'texte'); |
|
| 470 | - } else { |
|
| 471 | - $textes = []; |
|
| 472 | - } |
|
| 473 | - |
|
| 474 | - // si il reste des quotes simples ou doubles, c'est qu'on s'est emmelle les pinceaux |
|
| 475 | - // dans le doute on ne touche a rien |
|
| 476 | - if (strpbrk($query_echappees, "'\"") !== false) { |
|
| 477 | - return [$query, []]; |
|
| 478 | - } |
|
| 479 | - |
|
| 480 | - return [$query_echappees, $textes]; |
|
| 412 | + static $codeEchappements = null; |
|
| 413 | + if (is_null($codeEchappements) or $uniqid) { |
|
| 414 | + if (is_null($uniqid)) { |
|
| 415 | + $uniqid = uniqid(); |
|
| 416 | + } |
|
| 417 | + $uniqid = substr(md5($uniqid), 0, 4); |
|
| 418 | + $codeEchappements = ['\\\\' => "\x1@#{$uniqid}#@\x1", "\\'" => "\x2@#{$uniqid}#@\x2", '\\"' => "\x3@#{$uniqid}#@\x3", '%' => "\x4@#{$uniqid}#@\x4"]; |
|
| 419 | + } |
|
| 420 | + if ($query === null) { |
|
| 421 | + return $codeEchappements; |
|
| 422 | + } |
|
| 423 | + |
|
| 424 | + // si la query contient deja des codes d'echappement on va s'emmeler les pinceaux et donc on ne touche a rien |
|
| 425 | + // ce n'est pas un cas legitime |
|
| 426 | + foreach ($codeEchappements as $codeEchappement) { |
|
| 427 | + if (strpos($query, (string) $codeEchappement) !== false) { |
|
| 428 | + return [$query, []]; |
|
| 429 | + } |
|
| 430 | + } |
|
| 431 | + |
|
| 432 | + $query_echappees = str_replace(array_keys($codeEchappements), array_values($codeEchappements), $query); |
|
| 433 | + if (preg_match_all("/('[^']*')|(\"[^\"]*\")/S", $query_echappees, $textes)) { |
|
| 434 | + $textes = reset($textes); |
|
| 435 | + |
|
| 436 | + $parts = []; |
|
| 437 | + $currentpos = 0; |
|
| 438 | + $k = 0; |
|
| 439 | + while (count($textes)) { |
|
| 440 | + $part = array_shift($textes); |
|
| 441 | + $nextpos = strpos($query_echappees, $part, $currentpos); |
|
| 442 | + // si besoin recoller ensemble les doubles '' de sqlite (echappement des ') |
|
| 443 | + while (count($textes) and substr($part, -1) === "'") { |
|
| 444 | + $next = reset($textes); |
|
| 445 | + if ( |
|
| 446 | + strpos($next, "'") === 0 |
|
| 447 | + and strpos($query_echappees, $part . $next, $currentpos) === $nextpos |
|
| 448 | + ) { |
|
| 449 | + $part .= array_shift($textes); |
|
| 450 | + } |
|
| 451 | + else { |
|
| 452 | + break; |
|
| 453 | + } |
|
| 454 | + } |
|
| 455 | + $k++; |
|
| 456 | + $parts[$k] = [ |
|
| 457 | + 'texte' => $part, |
|
| 458 | + 'position' => $nextpos, |
|
| 459 | + 'placeholder' => '%' . $k . '$s', |
|
| 460 | + ]; |
|
| 461 | + $currentpos = $nextpos + strlen($part); |
|
| 462 | + } |
|
| 463 | + |
|
| 464 | + // et on replace les parts une par une en commencant par la fin |
|
| 465 | + while ($k > 0) { |
|
| 466 | + $query_echappees = substr_replace($query_echappees, $parts[$k]['placeholder'], $parts[$k]['position'], strlen($parts[$k]['texte'])); |
|
| 467 | + $k--; |
|
| 468 | + } |
|
| 469 | + $textes = array_column($parts, 'texte'); |
|
| 470 | + } else { |
|
| 471 | + $textes = []; |
|
| 472 | + } |
|
| 473 | + |
|
| 474 | + // si il reste des quotes simples ou doubles, c'est qu'on s'est emmelle les pinceaux |
|
| 475 | + // dans le doute on ne touche a rien |
|
| 476 | + if (strpbrk($query_echappees, "'\"") !== false) { |
|
| 477 | + return [$query, []]; |
|
| 478 | + } |
|
| 479 | + |
|
| 480 | + return [$query_echappees, $textes]; |
|
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | /** |
@@ -491,16 +491,16 @@ discard block |
||
| 491 | 491 | * @return string |
| 492 | 492 | */ |
| 493 | 493 | function query_reinjecte_textes($query, $textes) { |
| 494 | - // recuperer les codes echappements |
|
| 495 | - $codeEchappements = query_echappe_textes(null); |
|
| 494 | + // recuperer les codes echappements |
|
| 495 | + $codeEchappements = query_echappe_textes(null); |
|
| 496 | 496 | |
| 497 | - if (!empty($textes)) { |
|
| 498 | - $query = sprintf($query, ...$textes); |
|
| 499 | - } |
|
| 497 | + if (!empty($textes)) { |
|
| 498 | + $query = sprintf($query, ...$textes); |
|
| 499 | + } |
|
| 500 | 500 | |
| 501 | - $query = str_replace(array_values($codeEchappements), array_keys($codeEchappements), $query); |
|
| 501 | + $query = str_replace(array_values($codeEchappements), array_keys($codeEchappements), $query); |
|
| 502 | 502 | |
| 503 | - return $query; |
|
| 503 | + return $query; |
|
| 504 | 504 | } |
| 505 | 505 | |
| 506 | 506 | |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | **/ |
| 520 | 520 | function spip_query($query, $serveur = '') { |
| 521 | 521 | |
| 522 | - $f = spip_connect_sql($GLOBALS['spip_sql_version'], 'query', $serveur, true); |
|
| 522 | + $f = spip_connect_sql($GLOBALS['spip_sql_version'], 'query', $serveur, true); |
|
| 523 | 523 | |
| 524 | - return function_exists($f) ? $f($query, $serveur) : false; |
|
| 524 | + return function_exists($f) ? $f($query, $serveur) : false; |
|
| 525 | 525 | } |
@@ -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 | /** |
@@ -35,18 +35,18 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | function genie_maintenance_dist($t) { |
| 37 | 37 | |
| 38 | - // (re)mettre .htaccess avec deny from all |
|
| 39 | - // dans les deux repertoires dits inaccessibles par http |
|
| 40 | - include_spip('inc/acces'); |
|
| 41 | - verifier_htaccess(_DIR_ETC); |
|
| 42 | - verifier_htaccess(_DIR_TMP); |
|
| 38 | + // (re)mettre .htaccess avec deny from all |
|
| 39 | + // dans les deux repertoires dits inaccessibles par http |
|
| 40 | + include_spip('inc/acces'); |
|
| 41 | + verifier_htaccess(_DIR_ETC); |
|
| 42 | + verifier_htaccess(_DIR_TMP); |
|
| 43 | 43 | |
| 44 | - // Verifier qu'aucune table n'est crashee |
|
| 45 | - if (!_request('reinstall')) { |
|
| 46 | - verifier_crash_tables(); |
|
| 47 | - } |
|
| 44 | + // Verifier qu'aucune table n'est crashee |
|
| 45 | + if (!_request('reinstall')) { |
|
| 46 | + verifier_crash_tables(); |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - return 1; |
|
| 49 | + return 1; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | |
@@ -63,33 +63,33 @@ discard block |
||
| 63 | 63 | * des tables qui ont crashé. |
| 64 | 64 | */ |
| 65 | 65 | function verifier_crash_tables() { |
| 66 | - if (spip_connect()) { |
|
| 67 | - include_spip('base/serial'); |
|
| 68 | - include_spip('base/auxiliaires'); |
|
| 69 | - $crash = []; |
|
| 70 | - foreach (['tables_principales', 'tables_auxiliaires'] as $com) { |
|
| 71 | - foreach ($GLOBALS[$com] as $table => $desc) { |
|
| 72 | - if ( |
|
| 73 | - !sql_select('*', $table, '', '', '', 1) |
|
| 74 | - and !defined('spip_interdire_cache') |
|
| 75 | - ) { # cas "LOST CONNECTION" |
|
| 76 | - $crash[] = $table; |
|
| 77 | - } |
|
| 78 | - } |
|
| 79 | - } |
|
| 80 | - #$crash[] = 'test'; |
|
| 81 | - if ($crash) { |
|
| 82 | - ecrire_meta('message_crash_tables', serialize($crash)); |
|
| 83 | - spip_log('crash des tables', 'err'); |
|
| 84 | - spip_log($crash, 'err'); |
|
| 85 | - } else { |
|
| 86 | - effacer_meta('message_crash_tables'); |
|
| 87 | - } |
|
| 66 | + if (spip_connect()) { |
|
| 67 | + include_spip('base/serial'); |
|
| 68 | + include_spip('base/auxiliaires'); |
|
| 69 | + $crash = []; |
|
| 70 | + foreach (['tables_principales', 'tables_auxiliaires'] as $com) { |
|
| 71 | + foreach ($GLOBALS[$com] as $table => $desc) { |
|
| 72 | + if ( |
|
| 73 | + !sql_select('*', $table, '', '', '', 1) |
|
| 74 | + and !defined('spip_interdire_cache') |
|
| 75 | + ) { # cas "LOST CONNECTION" |
|
| 76 | + $crash[] = $table; |
|
| 77 | + } |
|
| 78 | + } |
|
| 79 | + } |
|
| 80 | + #$crash[] = 'test'; |
|
| 81 | + if ($crash) { |
|
| 82 | + ecrire_meta('message_crash_tables', serialize($crash)); |
|
| 83 | + spip_log('crash des tables', 'err'); |
|
| 84 | + spip_log($crash, 'err'); |
|
| 85 | + } else { |
|
| 86 | + effacer_meta('message_crash_tables'); |
|
| 87 | + } |
|
| 88 | 88 | |
| 89 | - return $crash; |
|
| 90 | - } |
|
| 89 | + return $crash; |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | - return false; |
|
| 92 | + return false; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -105,16 +105,16 @@ discard block |
||
| 105 | 105 | * @return string |
| 106 | 106 | */ |
| 107 | 107 | function message_crash_tables() { |
| 108 | - if ($crash = verifier_crash_tables()) { |
|
| 109 | - return |
|
| 110 | - '<strong>' . _T('texte_recuperer_base') . '</strong><br />' |
|
| 111 | - . ' <tt>' . join(', ', $crash) . '</tt><br />' |
|
| 112 | - . generer_form_ecrire( |
|
| 113 | - 'base_repair', |
|
| 114 | - _T('texte_crash_base'), |
|
| 115 | - '', |
|
| 116 | - _T('bouton_tenter_recuperation') |
|
| 117 | - ); |
|
| 118 | - } |
|
| 119 | - return ''; |
|
| 108 | + if ($crash = verifier_crash_tables()) { |
|
| 109 | + return |
|
| 110 | + '<strong>' . _T('texte_recuperer_base') . '</strong><br />' |
|
| 111 | + . ' <tt>' . join(', ', $crash) . '</tt><br />' |
|
| 112 | + . generer_form_ecrire( |
|
| 113 | + 'base_repair', |
|
| 114 | + _T('texte_crash_base'), |
|
| 115 | + '', |
|
| 116 | + _T('bouton_tenter_recuperation') |
|
| 117 | + ); |
|
| 118 | + } |
|
| 119 | + return ''; |
|
| 120 | 120 | } |
@@ -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 | ]; |
@@ -4,582 +4,582 @@ discard block |
||
| 4 | 4 | // ** ne pas modifier le fichier ** |
| 5 | 5 | |
| 6 | 6 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 7 | - return; |
|
| 7 | + return; |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | $GLOBALS[$GLOBALS['idx_lang']] = array( |
| 11 | 11 | |
| 12 | - // A |
|
| 13 | - 'access_interface_graphique' => 'Voltar para a interface gráfica completa', |
|
| 14 | - 'access_mode_texte' => 'Exibir a interface textual simplificada', |
|
| 15 | - 'admin_debug' => 'depurar', |
|
| 16 | - 'admin_modifier_article' => 'Editar esta matéria', |
|
| 17 | - 'admin_modifier_auteur' => 'Editar este autor', |
|
| 18 | - 'admin_modifier_breve' => 'Editar esta nota', |
|
| 19 | - 'admin_modifier_mot' => 'Editar esta palavra-chave', |
|
| 20 | - 'admin_modifier_rubrique' => 'Editar esta seção', |
|
| 21 | - 'admin_recalculer' => 'Atualizar esta página', |
|
| 22 | - 'afficher_calendrier' => 'Exibir o calendário', |
|
| 23 | - 'afficher_trad' => 'exibir as traduções', |
|
| 24 | - 'alerte_maj_impossible' => '<b>Atenção!</b> A atualização da base de dados SQL para a versão @version@ não é possível, provavelmente por problema de direitos de edição na base de dados. Por favor, contate o seu provedor de hospedagem.', |
|
| 25 | - 'alerte_modif_info_concourante' => 'ATENÇÃO: Esta informação foi alterada por outra pessoa. O valor atual é:', |
|
| 26 | - 'analyse_xml' => 'Analisar XML', |
|
| 27 | - 'annuler' => 'Cancelar', |
|
| 28 | - 'antispam_champ_vide' => 'Por favor, deixe este campo vazio:', |
|
| 29 | - 'articles_recents' => 'Matérias mais recentes', |
|
| 30 | - 'attention_champ_mini_nb_caractères' => 'Atenção! Mínimo de @nb@ caracteres', |
|
| 31 | - 'avis_1_erreur_saisie' => 'Há um erro nos dados informados. Por favor, verifique.', |
|
| 32 | - 'avis_archive_incorrect' => 'a cópia de segurança não é um arquivo do SPIP', |
|
| 33 | - 'avis_archive_invalide' => 'a cópia de segurança não é válida', |
|
| 34 | - 'avis_attention' => 'ATENÇÃO!', |
|
| 35 | - 'avis_champ_incorrect_type_objet' => 'Nome de campo @name@ incorreto para objeto do tipo @type@', |
|
| 36 | - 'avis_colonne_inexistante' => 'A coluna @col@ não existe', |
|
| 37 | - 'avis_erreur' => 'Erro: ver abaixo', |
|
| 38 | - 'avis_erreur_connexion' => 'Erro de conexão', |
|
| 39 | - 'avis_erreur_cookie' => 'problema de cookie', |
|
| 40 | - 'avis_erreur_fonction_contexte' => 'Erro de programação. Esta função não deve ser chamada neste contexto.', |
|
| 41 | - 'avis_erreur_mysql' => 'Erro SQL', |
|
| 42 | - 'avis_erreur_sauvegarde' => 'Erro na cópia de segurança (@type@ @id_objet@) !', |
|
| 43 | - 'avis_erreur_visiteur' => 'Problema de acesso ao espaço privado', |
|
| 44 | - 'avis_nb_erreurs_saisie' => 'Há @nb@ erros nos dados informados. Por favor, verifique.', |
|
| 12 | + // A |
|
| 13 | + 'access_interface_graphique' => 'Voltar para a interface gráfica completa', |
|
| 14 | + 'access_mode_texte' => 'Exibir a interface textual simplificada', |
|
| 15 | + 'admin_debug' => 'depurar', |
|
| 16 | + 'admin_modifier_article' => 'Editar esta matéria', |
|
| 17 | + 'admin_modifier_auteur' => 'Editar este autor', |
|
| 18 | + 'admin_modifier_breve' => 'Editar esta nota', |
|
| 19 | + 'admin_modifier_mot' => 'Editar esta palavra-chave', |
|
| 20 | + 'admin_modifier_rubrique' => 'Editar esta seção', |
|
| 21 | + 'admin_recalculer' => 'Atualizar esta página', |
|
| 22 | + 'afficher_calendrier' => 'Exibir o calendário', |
|
| 23 | + 'afficher_trad' => 'exibir as traduções', |
|
| 24 | + 'alerte_maj_impossible' => '<b>Atenção!</b> A atualização da base de dados SQL para a versão @version@ não é possível, provavelmente por problema de direitos de edição na base de dados. Por favor, contate o seu provedor de hospedagem.', |
|
| 25 | + 'alerte_modif_info_concourante' => 'ATENÇÃO: Esta informação foi alterada por outra pessoa. O valor atual é:', |
|
| 26 | + 'analyse_xml' => 'Analisar XML', |
|
| 27 | + 'annuler' => 'Cancelar', |
|
| 28 | + 'antispam_champ_vide' => 'Por favor, deixe este campo vazio:', |
|
| 29 | + 'articles_recents' => 'Matérias mais recentes', |
|
| 30 | + 'attention_champ_mini_nb_caractères' => 'Atenção! Mínimo de @nb@ caracteres', |
|
| 31 | + 'avis_1_erreur_saisie' => 'Há um erro nos dados informados. Por favor, verifique.', |
|
| 32 | + 'avis_archive_incorrect' => 'a cópia de segurança não é um arquivo do SPIP', |
|
| 33 | + 'avis_archive_invalide' => 'a cópia de segurança não é válida', |
|
| 34 | + 'avis_attention' => 'ATENÇÃO!', |
|
| 35 | + 'avis_champ_incorrect_type_objet' => 'Nome de campo @name@ incorreto para objeto do tipo @type@', |
|
| 36 | + 'avis_colonne_inexistante' => 'A coluna @col@ não existe', |
|
| 37 | + 'avis_erreur' => 'Erro: ver abaixo', |
|
| 38 | + 'avis_erreur_connexion' => 'Erro de conexão', |
|
| 39 | + 'avis_erreur_cookie' => 'problema de cookie', |
|
| 40 | + 'avis_erreur_fonction_contexte' => 'Erro de programação. Esta função não deve ser chamada neste contexto.', |
|
| 41 | + 'avis_erreur_mysql' => 'Erro SQL', |
|
| 42 | + 'avis_erreur_sauvegarde' => 'Erro na cópia de segurança (@type@ @id_objet@) !', |
|
| 43 | + 'avis_erreur_visiteur' => 'Problema de acesso ao espaço privado', |
|
| 44 | + 'avis_nb_erreurs_saisie' => 'Há @nb@ erros nos dados informados. Por favor, verifique.', |
|
| 45 | 45 | |
| 46 | - // B |
|
| 47 | - 'barre_a_accent_grave' => 'Inserir um A maiúsculo com acento grave', |
|
| 48 | - 'barre_aide' => 'utilize os atalhos tipográficos para enriquecer o seu layout', |
|
| 49 | - 'barre_e_accent_aigu' => 'Inserir um E maiúsculo com acento agudo', |
|
| 50 | - 'barre_eo' => 'Inserir um OE contraído', |
|
| 51 | - 'barre_eo_maj' => 'Inserir um OE contraído maiúsculo', |
|
| 52 | - 'barre_euro' => 'Inserir o símbolo € (euro)', |
|
| 53 | - 'barre_gras' => 'Escrever em {{negrito}}', |
|
| 54 | - 'barre_guillemets' => 'envolver em "aspas"', |
|
| 55 | - 'barre_guillemets_simples' => 'Envolver em ’plicas’', |
|
| 56 | - 'barre_intertitre' => 'Transformar em {{{entretítulo}}}', |
|
| 57 | - 'barre_italic' => 'Escrever em {itálico}', |
|
| 58 | - 'barre_lien' => 'Transformar em [link hipertexto->http://...]', |
|
| 59 | - 'barre_lien_input' => 'Informe o endereço do seu link (você pode informar um endereço web do tipo http://www.monsite/com ou simplesmente informar o número de uma matéria deste site.', |
|
| 60 | - 'barre_note' => 'Transformar em [[Nota de pé de página]]', |
|
| 61 | - 'barre_paragraphe' => 'Criar um parágrafo', |
|
| 62 | - 'barre_quote' => '<quote>Citar uma mensagem</quote>', |
|
| 63 | - 'bouton_changer' => 'Alterar', |
|
| 64 | - 'bouton_chercher' => 'Procurar', |
|
| 65 | - 'bouton_choisir' => 'Escolher', |
|
| 66 | - 'bouton_deplacer' => 'Deslocar', |
|
| 67 | - 'bouton_download' => 'Baixar', |
|
| 68 | - 'bouton_enregistrer' => 'Gravar', |
|
| 69 | - 'bouton_radio_desactiver_messagerie_interne' => 'Desativar o sistema interno de mensagens', |
|
| 70 | - 'bouton_radio_envoi_annonces' => 'Enviar os avisos editoriais', |
|
| 71 | - 'bouton_radio_non_envoi_annonces' => 'Não enviar os avisos', |
|
| 72 | - 'bouton_radio_non_envoi_liste_nouveautes' => 'Não enviar a lista de novidades', |
|
| 73 | - 'bouton_recharger_page' => 'atualizar esta página', |
|
| 74 | - 'bouton_telecharger' => 'Transferir', |
|
| 75 | - 'bouton_upload' => 'Upload', |
|
| 76 | - 'bouton_valider' => 'Validar', |
|
| 46 | + // B |
|
| 47 | + 'barre_a_accent_grave' => 'Inserir um A maiúsculo com acento grave', |
|
| 48 | + 'barre_aide' => 'utilize os atalhos tipográficos para enriquecer o seu layout', |
|
| 49 | + 'barre_e_accent_aigu' => 'Inserir um E maiúsculo com acento agudo', |
|
| 50 | + 'barre_eo' => 'Inserir um OE contraído', |
|
| 51 | + 'barre_eo_maj' => 'Inserir um OE contraído maiúsculo', |
|
| 52 | + 'barre_euro' => 'Inserir o símbolo € (euro)', |
|
| 53 | + 'barre_gras' => 'Escrever em {{negrito}}', |
|
| 54 | + 'barre_guillemets' => 'envolver em "aspas"', |
|
| 55 | + 'barre_guillemets_simples' => 'Envolver em ’plicas’', |
|
| 56 | + 'barre_intertitre' => 'Transformar em {{{entretítulo}}}', |
|
| 57 | + 'barre_italic' => 'Escrever em {itálico}', |
|
| 58 | + 'barre_lien' => 'Transformar em [link hipertexto->http://...]', |
|
| 59 | + 'barre_lien_input' => 'Informe o endereço do seu link (você pode informar um endereço web do tipo http://www.monsite/com ou simplesmente informar o número de uma matéria deste site.', |
|
| 60 | + 'barre_note' => 'Transformar em [[Nota de pé de página]]', |
|
| 61 | + 'barre_paragraphe' => 'Criar um parágrafo', |
|
| 62 | + 'barre_quote' => '<quote>Citar uma mensagem</quote>', |
|
| 63 | + 'bouton_changer' => 'Alterar', |
|
| 64 | + 'bouton_chercher' => 'Procurar', |
|
| 65 | + 'bouton_choisir' => 'Escolher', |
|
| 66 | + 'bouton_deplacer' => 'Deslocar', |
|
| 67 | + 'bouton_download' => 'Baixar', |
|
| 68 | + 'bouton_enregistrer' => 'Gravar', |
|
| 69 | + 'bouton_radio_desactiver_messagerie_interne' => 'Desativar o sistema interno de mensagens', |
|
| 70 | + 'bouton_radio_envoi_annonces' => 'Enviar os avisos editoriais', |
|
| 71 | + 'bouton_radio_non_envoi_annonces' => 'Não enviar os avisos', |
|
| 72 | + 'bouton_radio_non_envoi_liste_nouveautes' => 'Não enviar a lista de novidades', |
|
| 73 | + 'bouton_recharger_page' => 'atualizar esta página', |
|
| 74 | + 'bouton_telecharger' => 'Transferir', |
|
| 75 | + 'bouton_upload' => 'Upload', |
|
| 76 | + 'bouton_valider' => 'Validar', |
|
| 77 | 77 | |
| 78 | - // C |
|
| 79 | - 'cal_apresmidi' => 'tarde', |
|
| 80 | - 'cal_jour_entier' => 'dia todo', |
|
| 81 | - 'cal_matin' => 'manhã', |
|
| 82 | - 'cal_par_jour' => 'calendário por dia', |
|
| 83 | - 'cal_par_mois' => 'calendário por mês', |
|
| 84 | - 'cal_par_semaine' => 'calendário por semana', |
|
| 85 | - 'choix_couleur_interface' => 'côr', |
|
| 86 | - 'choix_interface' => 'escolha da interface', |
|
| 87 | - 'colonne' => 'Coluna', |
|
| 88 | - 'confirm_changer_statut' => 'Atenção, você solicitou a alteração de status deste elemento. Deseja continuar?', |
|
| 89 | - 'correcte' => 'correta', |
|
| 78 | + // C |
|
| 79 | + 'cal_apresmidi' => 'tarde', |
|
| 80 | + 'cal_jour_entier' => 'dia todo', |
|
| 81 | + 'cal_matin' => 'manhã', |
|
| 82 | + 'cal_par_jour' => 'calendário por dia', |
|
| 83 | + 'cal_par_mois' => 'calendário por mês', |
|
| 84 | + 'cal_par_semaine' => 'calendário por semana', |
|
| 85 | + 'choix_couleur_interface' => 'côr', |
|
| 86 | + 'choix_interface' => 'escolha da interface', |
|
| 87 | + 'colonne' => 'Coluna', |
|
| 88 | + 'confirm_changer_statut' => 'Atenção, você solicitou a alteração de status deste elemento. Deseja continuar?', |
|
| 89 | + 'correcte' => 'correta', |
|
| 90 | 90 | |
| 91 | - // D |
|
| 92 | - 'date_aujourdhui' => 'hoje', |
|
| 93 | - 'date_avant_jc' => 'a.C.', |
|
| 94 | - 'date_dans' => 'entre @delai@', |
|
| 95 | - 'date_de_mois_1' => '@j@ de @nommois@', |
|
| 96 | - 'date_de_mois_10' => '@j@ de @nommois@', |
|
| 97 | - 'date_de_mois_11' => '@j@ de @nommois@', |
|
| 98 | - 'date_de_mois_12' => '@j@ de @nommois@', |
|
| 99 | - 'date_de_mois_2' => '@j@ de @nommois@', |
|
| 100 | - 'date_de_mois_3' => '@j@ de @nommois@', |
|
| 101 | - 'date_de_mois_4' => '@j@ de @nommois@', |
|
| 102 | - 'date_de_mois_5' => '@j@ de @nommois@', |
|
| 103 | - 'date_de_mois_6' => '@j@ de @nommois@', |
|
| 104 | - 'date_de_mois_7' => '@j@ de @nommois@', |
|
| 105 | - 'date_de_mois_8' => '@j@ de @nommois@', |
|
| 106 | - 'date_de_mois_9' => '@j@ de @nommois@', |
|
| 107 | - 'date_demain' => 'amanhã', |
|
| 108 | - 'date_fmt_heures_minutes' => '@h@h@m@min', |
|
| 109 | - 'date_fmt_heures_minutes_court' => '@h@h@m@', |
|
| 110 | - 'date_fmt_jour' => '@nomjour@ @jour@', |
|
| 111 | - 'date_fmt_jour_heure' => '@jour@ - @heure@', |
|
| 112 | - 'date_fmt_jour_heure_debut_fin' => 'dia @jour@ de @heure_debut@ a @heure_fin@', |
|
| 113 | - 'date_fmt_jour_heure_debut_fin_abbr' => 'dia @dtstart@@jour@ de @heure_debut@@dtabbr@ a @dtstart@@heure_fin@@dtend@', |
|
| 114 | - 'date_fmt_jour_mois' => '@jour@ de @nommois@', |
|
| 115 | - 'date_fmt_jour_mois_annee' => '@jour@ de @nommois@ de @annee@', |
|
| 116 | - 'date_fmt_mois_annee' => '@nommois@ de @annee@', |
|
| 117 | - 'date_fmt_nomjour' => '@nomjour@ @date@', |
|
| 118 | - 'date_fmt_nomjour_date' => '@nomjour@ de @date@', |
|
| 119 | - 'date_fmt_periode' => 'De @date_debut@ a @date_fin@', |
|
| 120 | - 'date_fmt_periode_abbr' => 'De @dtart@@date_debut@@dtabbr@ a @dtend@@date_fin@@dtabbr@', |
|
| 121 | - 'date_fmt_periode_from' => 'De', |
|
| 122 | - 'date_fmt_periode_to' => 'para', |
|
| 123 | - 'date_fmt_saison_annee' => '@saison@ @annee@', |
|
| 124 | - 'date_heures' => 'horas', |
|
| 125 | - 'date_hier' => 'ontem', |
|
| 126 | - 'date_il_y_a' => 'há @delai@', |
|
| 127 | - 'date_jnum1' => '1º', |
|
| 128 | - 'date_jnum10' => '10', |
|
| 129 | - 'date_jnum11' => '11', |
|
| 130 | - 'date_jnum12' => '12', |
|
| 131 | - 'date_jnum13' => '13', |
|
| 132 | - 'date_jnum14' => '14', |
|
| 133 | - 'date_jnum15' => '15', |
|
| 134 | - 'date_jnum16' => '16', |
|
| 135 | - 'date_jnum17' => '17', |
|
| 136 | - 'date_jnum18' => '18', |
|
| 137 | - 'date_jnum19' => '19', |
|
| 138 | - 'date_jnum2' => '2', |
|
| 139 | - 'date_jnum20' => '20', |
|
| 140 | - 'date_jnum21' => '21', |
|
| 141 | - 'date_jnum22' => '22', |
|
| 142 | - 'date_jnum23' => '23', |
|
| 143 | - 'date_jnum24' => '24', |
|
| 144 | - 'date_jnum25' => '25', |
|
| 145 | - 'date_jnum26' => '26', |
|
| 146 | - 'date_jnum27' => '27', |
|
| 147 | - 'date_jnum28' => '28', |
|
| 148 | - 'date_jnum29' => '29', |
|
| 149 | - 'date_jnum3' => '3', |
|
| 150 | - 'date_jnum30' => '30', |
|
| 151 | - 'date_jnum31' => '31', |
|
| 152 | - 'date_jnum4' => '4', |
|
| 153 | - 'date_jnum5' => '5', |
|
| 154 | - 'date_jnum6' => '6', |
|
| 155 | - 'date_jnum7' => '7', |
|
| 156 | - 'date_jnum8' => '8', |
|
| 157 | - 'date_jnum9' => '9', |
|
| 158 | - 'date_jour_1' => 'domingo', |
|
| 159 | - 'date_jour_1_abbr' => 'dom.', |
|
| 160 | - 'date_jour_1_initiale' => 'd.', |
|
| 161 | - 'date_jour_2' => 'segunda-feira', |
|
| 162 | - 'date_jour_2_abbr' => 'seg.', |
|
| 163 | - 'date_jour_2_initiale' => 's.', |
|
| 164 | - 'date_jour_3' => 'terça-feira', |
|
| 165 | - 'date_jour_3_abbr' => 'ter.', |
|
| 166 | - 'date_jour_3_initiale' => 't.', |
|
| 167 | - 'date_jour_4' => 'quarta-feira', |
|
| 168 | - 'date_jour_4_abbr' => 'quar.', |
|
| 169 | - 'date_jour_4_initiale' => 'q.', |
|
| 170 | - 'date_jour_5' => 'quinta-feira', |
|
| 171 | - 'date_jour_5_abbr' => 'quin.', |
|
| 172 | - 'date_jour_5_initiale' => 'q.', |
|
| 173 | - 'date_jour_6' => 'sexta-feira', |
|
| 174 | - 'date_jour_6_abbr' => 'sex.', |
|
| 175 | - 'date_jour_6_initiale' => 's.', |
|
| 176 | - 'date_jour_7' => 'sábado', |
|
| 177 | - 'date_jour_7_abbr' => 'sáb.', |
|
| 178 | - 'date_jour_7_initiale' => 's.', |
|
| 179 | - 'date_jours' => 'dias', |
|
| 180 | - 'date_minutes' => 'minutos', |
|
| 181 | - 'date_mois' => 'meses', |
|
| 182 | - 'date_mois_1' => 'janeiro', |
|
| 183 | - 'date_mois_10' => 'outubro', |
|
| 184 | - 'date_mois_10_abbr' => 'out.', |
|
| 185 | - 'date_mois_11' => 'novembro', |
|
| 186 | - 'date_mois_11_abbr' => 'nov.', |
|
| 187 | - 'date_mois_12' => 'dezembro', |
|
| 188 | - 'date_mois_12_abbr' => 'dez.', |
|
| 189 | - 'date_mois_1_abbr' => 'jan.', |
|
| 190 | - 'date_mois_2' => 'fevereiro', |
|
| 191 | - 'date_mois_2_abbr' => 'fev.', |
|
| 192 | - 'date_mois_3' => 'março', |
|
| 193 | - 'date_mois_3_abbr' => 'mar.', |
|
| 194 | - 'date_mois_4' => 'abril', |
|
| 195 | - 'date_mois_4_abbr' => 'abr.', |
|
| 196 | - 'date_mois_5' => 'maio', |
|
| 197 | - 'date_mois_5_abbr' => 'mai.', |
|
| 198 | - 'date_mois_6' => 'junho', |
|
| 199 | - 'date_mois_6_abbr' => 'jun.', |
|
| 200 | - 'date_mois_7' => 'julho', |
|
| 201 | - 'date_mois_7_abbr' => 'jul.', |
|
| 202 | - 'date_mois_8' => 'agosto', |
|
| 203 | - 'date_mois_8_abbr' => 'ago.', |
|
| 204 | - 'date_mois_9' => 'setembro', |
|
| 205 | - 'date_mois_9_abbr' => 'set.', |
|
| 206 | - 'date_saison_1' => 'inverno', |
|
| 207 | - 'date_saison_2' => 'primavera', |
|
| 208 | - 'date_saison_3' => 'verão', |
|
| 209 | - 'date_saison_4' => 'outono', |
|
| 210 | - 'date_secondes' => 'segundos', |
|
| 211 | - 'date_semaines' => 'semanas', |
|
| 212 | - 'date_un_mois' => 'mês', |
|
| 213 | - 'date_une_heure' => 'hora', |
|
| 214 | - 'date_une_minute' => 'minuto', |
|
| 215 | - 'date_une_seconde' => 'segundo', |
|
| 216 | - 'date_une_semaine' => 'semana', |
|
| 217 | - 'dirs_commencer' => 'Para começar realmente a instalação', |
|
| 218 | - 'dirs_preliminaire' => 'Preliminar: <b>Configurar os direitos de acesso</b>', |
|
| 219 | - 'dirs_probleme_droits' => 'Problema com as permissões de acesso', |
|
| 220 | - 'dirs_repertoires_absents' => '<p><b>Os diretórios a seguir não foram encontrados:</b></p><ul>@bad_dirs@.</ul> |
|
| 91 | + // D |
|
| 92 | + 'date_aujourdhui' => 'hoje', |
|
| 93 | + 'date_avant_jc' => 'a.C.', |
|
| 94 | + 'date_dans' => 'entre @delai@', |
|
| 95 | + 'date_de_mois_1' => '@j@ de @nommois@', |
|
| 96 | + 'date_de_mois_10' => '@j@ de @nommois@', |
|
| 97 | + 'date_de_mois_11' => '@j@ de @nommois@', |
|
| 98 | + 'date_de_mois_12' => '@j@ de @nommois@', |
|
| 99 | + 'date_de_mois_2' => '@j@ de @nommois@', |
|
| 100 | + 'date_de_mois_3' => '@j@ de @nommois@', |
|
| 101 | + 'date_de_mois_4' => '@j@ de @nommois@', |
|
| 102 | + 'date_de_mois_5' => '@j@ de @nommois@', |
|
| 103 | + 'date_de_mois_6' => '@j@ de @nommois@', |
|
| 104 | + 'date_de_mois_7' => '@j@ de @nommois@', |
|
| 105 | + 'date_de_mois_8' => '@j@ de @nommois@', |
|
| 106 | + 'date_de_mois_9' => '@j@ de @nommois@', |
|
| 107 | + 'date_demain' => 'amanhã', |
|
| 108 | + 'date_fmt_heures_minutes' => '@h@h@m@min', |
|
| 109 | + 'date_fmt_heures_minutes_court' => '@h@h@m@', |
|
| 110 | + 'date_fmt_jour' => '@nomjour@ @jour@', |
|
| 111 | + 'date_fmt_jour_heure' => '@jour@ - @heure@', |
|
| 112 | + 'date_fmt_jour_heure_debut_fin' => 'dia @jour@ de @heure_debut@ a @heure_fin@', |
|
| 113 | + 'date_fmt_jour_heure_debut_fin_abbr' => 'dia @dtstart@@jour@ de @heure_debut@@dtabbr@ a @dtstart@@heure_fin@@dtend@', |
|
| 114 | + 'date_fmt_jour_mois' => '@jour@ de @nommois@', |
|
| 115 | + 'date_fmt_jour_mois_annee' => '@jour@ de @nommois@ de @annee@', |
|
| 116 | + 'date_fmt_mois_annee' => '@nommois@ de @annee@', |
|
| 117 | + 'date_fmt_nomjour' => '@nomjour@ @date@', |
|
| 118 | + 'date_fmt_nomjour_date' => '@nomjour@ de @date@', |
|
| 119 | + 'date_fmt_periode' => 'De @date_debut@ a @date_fin@', |
|
| 120 | + 'date_fmt_periode_abbr' => 'De @dtart@@date_debut@@dtabbr@ a @dtend@@date_fin@@dtabbr@', |
|
| 121 | + 'date_fmt_periode_from' => 'De', |
|
| 122 | + 'date_fmt_periode_to' => 'para', |
|
| 123 | + 'date_fmt_saison_annee' => '@saison@ @annee@', |
|
| 124 | + 'date_heures' => 'horas', |
|
| 125 | + 'date_hier' => 'ontem', |
|
| 126 | + 'date_il_y_a' => 'há @delai@', |
|
| 127 | + 'date_jnum1' => '1º', |
|
| 128 | + 'date_jnum10' => '10', |
|
| 129 | + 'date_jnum11' => '11', |
|
| 130 | + 'date_jnum12' => '12', |
|
| 131 | + 'date_jnum13' => '13', |
|
| 132 | + 'date_jnum14' => '14', |
|
| 133 | + 'date_jnum15' => '15', |
|
| 134 | + 'date_jnum16' => '16', |
|
| 135 | + 'date_jnum17' => '17', |
|
| 136 | + 'date_jnum18' => '18', |
|
| 137 | + 'date_jnum19' => '19', |
|
| 138 | + 'date_jnum2' => '2', |
|
| 139 | + 'date_jnum20' => '20', |
|
| 140 | + 'date_jnum21' => '21', |
|
| 141 | + 'date_jnum22' => '22', |
|
| 142 | + 'date_jnum23' => '23', |
|
| 143 | + 'date_jnum24' => '24', |
|
| 144 | + 'date_jnum25' => '25', |
|
| 145 | + 'date_jnum26' => '26', |
|
| 146 | + 'date_jnum27' => '27', |
|
| 147 | + 'date_jnum28' => '28', |
|
| 148 | + 'date_jnum29' => '29', |
|
| 149 | + 'date_jnum3' => '3', |
|
| 150 | + 'date_jnum30' => '30', |
|
| 151 | + 'date_jnum31' => '31', |
|
| 152 | + 'date_jnum4' => '4', |
|
| 153 | + 'date_jnum5' => '5', |
|
| 154 | + 'date_jnum6' => '6', |
|
| 155 | + 'date_jnum7' => '7', |
|
| 156 | + 'date_jnum8' => '8', |
|
| 157 | + 'date_jnum9' => '9', |
|
| 158 | + 'date_jour_1' => 'domingo', |
|
| 159 | + 'date_jour_1_abbr' => 'dom.', |
|
| 160 | + 'date_jour_1_initiale' => 'd.', |
|
| 161 | + 'date_jour_2' => 'segunda-feira', |
|
| 162 | + 'date_jour_2_abbr' => 'seg.', |
|
| 163 | + 'date_jour_2_initiale' => 's.', |
|
| 164 | + 'date_jour_3' => 'terça-feira', |
|
| 165 | + 'date_jour_3_abbr' => 'ter.', |
|
| 166 | + 'date_jour_3_initiale' => 't.', |
|
| 167 | + 'date_jour_4' => 'quarta-feira', |
|
| 168 | + 'date_jour_4_abbr' => 'quar.', |
|
| 169 | + 'date_jour_4_initiale' => 'q.', |
|
| 170 | + 'date_jour_5' => 'quinta-feira', |
|
| 171 | + 'date_jour_5_abbr' => 'quin.', |
|
| 172 | + 'date_jour_5_initiale' => 'q.', |
|
| 173 | + 'date_jour_6' => 'sexta-feira', |
|
| 174 | + 'date_jour_6_abbr' => 'sex.', |
|
| 175 | + 'date_jour_6_initiale' => 's.', |
|
| 176 | + 'date_jour_7' => 'sábado', |
|
| 177 | + 'date_jour_7_abbr' => 'sáb.', |
|
| 178 | + 'date_jour_7_initiale' => 's.', |
|
| 179 | + 'date_jours' => 'dias', |
|
| 180 | + 'date_minutes' => 'minutos', |
|
| 181 | + 'date_mois' => 'meses', |
|
| 182 | + 'date_mois_1' => 'janeiro', |
|
| 183 | + 'date_mois_10' => 'outubro', |
|
| 184 | + 'date_mois_10_abbr' => 'out.', |
|
| 185 | + 'date_mois_11' => 'novembro', |
|
| 186 | + 'date_mois_11_abbr' => 'nov.', |
|
| 187 | + 'date_mois_12' => 'dezembro', |
|
| 188 | + 'date_mois_12_abbr' => 'dez.', |
|
| 189 | + 'date_mois_1_abbr' => 'jan.', |
|
| 190 | + 'date_mois_2' => 'fevereiro', |
|
| 191 | + 'date_mois_2_abbr' => 'fev.', |
|
| 192 | + 'date_mois_3' => 'março', |
|
| 193 | + 'date_mois_3_abbr' => 'mar.', |
|
| 194 | + 'date_mois_4' => 'abril', |
|
| 195 | + 'date_mois_4_abbr' => 'abr.', |
|
| 196 | + 'date_mois_5' => 'maio', |
|
| 197 | + 'date_mois_5_abbr' => 'mai.', |
|
| 198 | + 'date_mois_6' => 'junho', |
|
| 199 | + 'date_mois_6_abbr' => 'jun.', |
|
| 200 | + 'date_mois_7' => 'julho', |
|
| 201 | + 'date_mois_7_abbr' => 'jul.', |
|
| 202 | + 'date_mois_8' => 'agosto', |
|
| 203 | + 'date_mois_8_abbr' => 'ago.', |
|
| 204 | + 'date_mois_9' => 'setembro', |
|
| 205 | + 'date_mois_9_abbr' => 'set.', |
|
| 206 | + 'date_saison_1' => 'inverno', |
|
| 207 | + 'date_saison_2' => 'primavera', |
|
| 208 | + 'date_saison_3' => 'verão', |
|
| 209 | + 'date_saison_4' => 'outono', |
|
| 210 | + 'date_secondes' => 'segundos', |
|
| 211 | + 'date_semaines' => 'semanas', |
|
| 212 | + 'date_un_mois' => 'mês', |
|
| 213 | + 'date_une_heure' => 'hora', |
|
| 214 | + 'date_une_minute' => 'minuto', |
|
| 215 | + 'date_une_seconde' => 'segundo', |
|
| 216 | + 'date_une_semaine' => 'semana', |
|
| 217 | + 'dirs_commencer' => 'Para começar realmente a instalação', |
|
| 218 | + 'dirs_preliminaire' => 'Preliminar: <b>Configurar os direitos de acesso</b>', |
|
| 219 | + 'dirs_probleme_droits' => 'Problema com as permissões de acesso', |
|
| 220 | + 'dirs_repertoires_absents' => '<p><b>Os diretórios a seguir não foram encontrados:</b></p><ul>@bad_dirs@.</ul> |
|
| 221 | 221 | <p>É provável que isto se deva a um problema de letras em maiúsculas e minúsculas. |
| 222 | 222 | Verifique se as maiúsculas e minúsuculas destes diretórios coincidem exatamente com o que está sendo exibido abaixo; se este não for o caso, renomeie os diretórios com o seu programa de FTP de modo a corrigir o erro. |
| 223 | 223 | <p>Uma vêz feita esta manipulação, você poderá ', |
| 224 | - 'dirs_repertoires_suivants' => '<p><b>Os diretórios a seguir não estão acessiveis para leitura:</b></p><ul>@bad_dirs@.</ul> |
|
| 224 | + 'dirs_repertoires_suivants' => '<p><b>Os diretórios a seguir não estão acessiveis para leitura:</b></p><ul>@bad_dirs@.</ul> |
|
| 225 | 225 | <p>Para corrigir, utilize o seu programa de FTP para configurar os direitos de acesso de cada um destes diretórios. O procedimento está explicado em detalhes no guia de instalação.</p> |
| 226 | 226 | <p>Uma vêz feita esta alteração, você poderá ', |
| 227 | - 'double_occurrence' => 'Ocorrência dupla de @balise@', |
|
| 227 | + 'double_occurrence' => 'Ocorrência dupla de @balise@', |
|
| 228 | 228 | |
| 229 | - // E |
|
| 230 | - 'en_cours' => 'em curso', |
|
| 231 | - 'envoi_via_le_site' => 'Envio pelo site', |
|
| 232 | - 'erreur' => 'Erro', |
|
| 233 | - 'erreur_balise_non_fermee' => 'Última tag em aberto:', |
|
| 234 | - 'erreur_technique_ajaxform' => 'Ooops. Um erro inesperado impediu o envio do formulário. Você pode tentar novamente.', |
|
| 235 | - 'erreur_technique_enregistrement_champs' => 'Um erro técnico impediu a gravação correta do campo @champs@.', |
|
| 236 | - 'erreur_technique_enregistrement_impossible' => 'Um erro técnico impediu a gravação.', |
|
| 237 | - 'erreur_texte' => 'erro(s)', |
|
| 238 | - 'etape' => 'Etapa', |
|
| 229 | + // E |
|
| 230 | + 'en_cours' => 'em curso', |
|
| 231 | + 'envoi_via_le_site' => 'Envio pelo site', |
|
| 232 | + 'erreur' => 'Erro', |
|
| 233 | + 'erreur_balise_non_fermee' => 'Última tag em aberto:', |
|
| 234 | + 'erreur_technique_ajaxform' => 'Ooops. Um erro inesperado impediu o envio do formulário. Você pode tentar novamente.', |
|
| 235 | + 'erreur_technique_enregistrement_champs' => 'Um erro técnico impediu a gravação correta do campo @champs@.', |
|
| 236 | + 'erreur_technique_enregistrement_impossible' => 'Um erro técnico impediu a gravação.', |
|
| 237 | + 'erreur_texte' => 'erro(s)', |
|
| 238 | + 'etape' => 'Etapa', |
|
| 239 | 239 | |
| 240 | - // F |
|
| 241 | - 'fichier_introuvable' => 'Arquivo @fichier@ não encontrado.', |
|
| 242 | - 'fonction_introuvable' => 'Função @fonction@() não encontrada.', |
|
| 243 | - 'form_auteur_confirmation' => 'Confirme o seu endereço de e-mail', |
|
| 244 | - 'form_auteur_email_modifie' => 'O seu endereço de e-mail foi alterado.', |
|
| 245 | - 'form_auteur_envoi_mail_confirmation' => 'Uma mensagem de confirmação acabou de ser enviada para @email@. Você precisa entrar no endereço web mencionado na mensagem para validar o seu endereço de e-mail.', |
|
| 246 | - 'form_auteur_mail_confirmation' => 'Olá, |
|
| 240 | + // F |
|
| 241 | + 'fichier_introuvable' => 'Arquivo @fichier@ não encontrado.', |
|
| 242 | + 'fonction_introuvable' => 'Função @fonction@() não encontrada.', |
|
| 243 | + 'form_auteur_confirmation' => 'Confirme o seu endereço de e-mail', |
|
| 244 | + 'form_auteur_email_modifie' => 'O seu endereço de e-mail foi alterado.', |
|
| 245 | + 'form_auteur_envoi_mail_confirmation' => 'Uma mensagem de confirmação acabou de ser enviada para @email@. Você precisa entrar no endereço web mencionado na mensagem para validar o seu endereço de e-mail.', |
|
| 246 | + 'form_auteur_mail_confirmation' => 'Olá, |
|
| 247 | 247 | |
| 248 | 248 | Você pediu para alterar o seu endereço de e-mail |
| 249 | 249 | Para confirmar o seu novo endereço, basta acessar o endereço abaixo (cas contrário, a sua solicitação será ignorada): |
| 250 | 250 | |
| 251 | 251 | @url@ |
| 252 | 252 | ', |
| 253 | - 'form_deja_inscrit' => 'Você já está inscrito.', |
|
| 254 | - 'form_email_non_valide' => 'Seu endereço de e-mail não é válido.', |
|
| 255 | - 'form_forum_access_refuse' => 'Você não tem mais acesso a este site.', |
|
| 256 | - 'form_forum_bonjour' => 'Bom dia @nom@,', |
|
| 257 | - 'form_forum_confirmer_email' => 'Para confirmar o seu endereço de e-mail, clique neste link: @url_confirm@', |
|
| 258 | - 'form_forum_email_deja_enregistre' => 'Este endereço de e-mail já está cadastrado, você pode usar a sua senha habitual.', |
|
| 259 | - 'form_forum_identifiant_mail' => 'Seu novo login foi enviado por e-mail.', |
|
| 260 | - 'form_forum_identifiants' => 'Identificadores pessoais', |
|
| 261 | - 'form_forum_indiquer_nom_email' => 'Informe aqui o seu nome endereço de e-mail. O seu identificador pessoal será enviado de imediato por correio eletrônico.', |
|
| 262 | - 'form_forum_login' => 'login:', |
|
| 263 | - 'form_forum_message_auto' => '(esta é uma mensagem automática)', |
|
| 264 | - 'form_forum_pass' => 'senha:', |
|
| 265 | - 'form_forum_probleme_mail' => 'Problema de e-mail: o identificador não pôde ser enviado.', |
|
| 266 | - 'form_forum_voici1' => 'Estes são os seus identificadores para que você possa participar da vida do site "@nom_site_spip@" (@adresse_site@):', |
|
| 267 | - 'form_forum_voici2' => 'Estes são os seus identificadores para que você possa propor matérias ao site "@nom_site_spip@" (@adresse_login@):', |
|
| 268 | - 'form_indiquer_email' => 'Por favor, informe o seu endereço de e-mail.', |
|
| 269 | - 'form_indiquer_nom' => 'Por favor, informe o seu nome.', |
|
| 270 | - 'form_indiquer_nom_site' => 'Por favor, informe o nome do seu site.', |
|
| 271 | - 'form_pet_deja_enregistre' => 'Este site já está cadastrado', |
|
| 272 | - 'form_pet_signature_pasprise' => 'Sua assinatura não foi computada.', |
|
| 273 | - 'form_prop_confirmer_envoi' => 'Confirmar o envio', |
|
| 274 | - 'form_prop_description' => 'Descrição / comentário', |
|
| 275 | - 'form_prop_enregistre' => 'Sua proposta foi cadastrada, ela aparecerá online após ser validada pelos responsáveis deste site.', |
|
| 276 | - 'form_prop_envoyer' => 'Enviar uma mensagem', |
|
| 277 | - 'form_prop_indiquer_email' => 'Por favor, indique um endereço de e-mail válido', |
|
| 278 | - 'form_prop_indiquer_nom_site' => 'Por favor, informe o nome do site.', |
|
| 279 | - 'form_prop_indiquer_sujet' => 'Por favor, informe um assunto', |
|
| 280 | - 'form_prop_message_envoye' => 'Mensagem enviada', |
|
| 281 | - 'form_prop_non_enregistre' => 'Sua proposta não foi cadastrada.', |
|
| 282 | - 'form_prop_sujet' => 'Assunto', |
|
| 283 | - 'form_prop_url_site' => 'Endereço URL do site', |
|
| 284 | - 'format_date_attendu' => 'Inserir uma data no formato dd/mm/aaaa.', |
|
| 285 | - 'format_date_incorrecte' => 'A data e o seu formato está incorreta', |
|
| 286 | - 'format_heure_attendu' => 'Inserir uma hora no formato hh:mm.', |
|
| 287 | - 'format_heure_incorrecte' => 'A hora e o seu formato está incorreta', |
|
| 288 | - 'forum_non_inscrit' => 'Você não está inscrito, ou o endereço ou a senha estão errados.', |
|
| 289 | - 'forum_par_auteur' => 'por @auteur@', |
|
| 290 | - 'forum_titre_erreur' => 'Erro...', |
|
| 253 | + 'form_deja_inscrit' => 'Você já está inscrito.', |
|
| 254 | + 'form_email_non_valide' => 'Seu endereço de e-mail não é válido.', |
|
| 255 | + 'form_forum_access_refuse' => 'Você não tem mais acesso a este site.', |
|
| 256 | + 'form_forum_bonjour' => 'Bom dia @nom@,', |
|
| 257 | + 'form_forum_confirmer_email' => 'Para confirmar o seu endereço de e-mail, clique neste link: @url_confirm@', |
|
| 258 | + 'form_forum_email_deja_enregistre' => 'Este endereço de e-mail já está cadastrado, você pode usar a sua senha habitual.', |
|
| 259 | + 'form_forum_identifiant_mail' => 'Seu novo login foi enviado por e-mail.', |
|
| 260 | + 'form_forum_identifiants' => 'Identificadores pessoais', |
|
| 261 | + 'form_forum_indiquer_nom_email' => 'Informe aqui o seu nome endereço de e-mail. O seu identificador pessoal será enviado de imediato por correio eletrônico.', |
|
| 262 | + 'form_forum_login' => 'login:', |
|
| 263 | + 'form_forum_message_auto' => '(esta é uma mensagem automática)', |
|
| 264 | + 'form_forum_pass' => 'senha:', |
|
| 265 | + 'form_forum_probleme_mail' => 'Problema de e-mail: o identificador não pôde ser enviado.', |
|
| 266 | + 'form_forum_voici1' => 'Estes são os seus identificadores para que você possa participar da vida do site "@nom_site_spip@" (@adresse_site@):', |
|
| 267 | + 'form_forum_voici2' => 'Estes são os seus identificadores para que você possa propor matérias ao site "@nom_site_spip@" (@adresse_login@):', |
|
| 268 | + 'form_indiquer_email' => 'Por favor, informe o seu endereço de e-mail.', |
|
| 269 | + 'form_indiquer_nom' => 'Por favor, informe o seu nome.', |
|
| 270 | + 'form_indiquer_nom_site' => 'Por favor, informe o nome do seu site.', |
|
| 271 | + 'form_pet_deja_enregistre' => 'Este site já está cadastrado', |
|
| 272 | + 'form_pet_signature_pasprise' => 'Sua assinatura não foi computada.', |
|
| 273 | + 'form_prop_confirmer_envoi' => 'Confirmar o envio', |
|
| 274 | + 'form_prop_description' => 'Descrição / comentário', |
|
| 275 | + 'form_prop_enregistre' => 'Sua proposta foi cadastrada, ela aparecerá online após ser validada pelos responsáveis deste site.', |
|
| 276 | + 'form_prop_envoyer' => 'Enviar uma mensagem', |
|
| 277 | + 'form_prop_indiquer_email' => 'Por favor, indique um endereço de e-mail válido', |
|
| 278 | + 'form_prop_indiquer_nom_site' => 'Por favor, informe o nome do site.', |
|
| 279 | + 'form_prop_indiquer_sujet' => 'Por favor, informe um assunto', |
|
| 280 | + 'form_prop_message_envoye' => 'Mensagem enviada', |
|
| 281 | + 'form_prop_non_enregistre' => 'Sua proposta não foi cadastrada.', |
|
| 282 | + 'form_prop_sujet' => 'Assunto', |
|
| 283 | + 'form_prop_url_site' => 'Endereço URL do site', |
|
| 284 | + 'format_date_attendu' => 'Inserir uma data no formato dd/mm/aaaa.', |
|
| 285 | + 'format_date_incorrecte' => 'A data e o seu formato está incorreta', |
|
| 286 | + 'format_heure_attendu' => 'Inserir uma hora no formato hh:mm.', |
|
| 287 | + 'format_heure_incorrecte' => 'A hora e o seu formato está incorreta', |
|
| 288 | + 'forum_non_inscrit' => 'Você não está inscrito, ou o endereço ou a senha estão errados.', |
|
| 289 | + 'forum_par_auteur' => 'por @auteur@', |
|
| 290 | + 'forum_titre_erreur' => 'Erro...', |
|
| 291 | 291 | |
| 292 | - // I |
|
| 293 | - 'ical_texte_rss_articles' => 'O arquivo «backend» das matérias deste site encontra-se no endereço:', |
|
| 294 | - 'ical_texte_rss_articles2' => 'Você pode também obter os arquivos «backend» para as matérias de cada seção do site:', |
|
| 295 | - 'ical_texte_rss_breves' => 'Existe também um arquivo contendo as notas do site. Ao especificar um número de seção, você obterá unicamente as natos dessa seção.', |
|
| 296 | - 'icone_a_suivre' => 'Acompanhar', |
|
| 297 | - 'icone_admin_site' => 'Administração do site', |
|
| 298 | - 'icone_agenda' => 'Agenda', |
|
| 299 | - 'icone_aide_ligne' => 'Ajuda', |
|
| 300 | - 'icone_articles' => 'Matérias', |
|
| 301 | - 'icone_auteurs' => 'Autores', |
|
| 302 | - 'icone_brouteur' => 'Navegação rápida', |
|
| 303 | - 'icone_configuration_site' => 'Configuração', |
|
| 304 | - 'icone_configurer_site' => 'Configurar o seu site', |
|
| 305 | - 'icone_creer_nouvel_auteur' => 'Criar um novo autor', |
|
| 306 | - 'icone_creer_rubrique' => 'Criar uma seção', |
|
| 307 | - 'icone_creer_sous_rubrique' => 'Criar uma subseção', |
|
| 308 | - 'icone_deconnecter' => 'Desconectar-se', |
|
| 309 | - 'icone_discussions' => 'Discussões', |
|
| 310 | - 'icone_doc_rubrique' => 'Documentos das seções', |
|
| 311 | - 'icone_ecrire_article' => 'Escrever uma nova matéria', |
|
| 312 | - 'icone_edition_site' => 'Edição', |
|
| 313 | - 'icone_gestion_langues' => 'Gerenciamento de idiomas', |
|
| 314 | - 'icone_informations_personnelles' => 'Informações pessoais', |
|
| 315 | - 'icone_interface_complet' => 'interface completa', |
|
| 316 | - 'icone_interface_simple' => 'Interface simplificada', |
|
| 317 | - 'icone_maintenance_site' => 'Manutenção do site', |
|
| 318 | - 'icone_messagerie_personnelle' => 'Mensagens pessoais', |
|
| 319 | - 'icone_repartition_debut' => 'Exibir a repartição após o início', |
|
| 320 | - 'icone_rubriques' => 'Seções', |
|
| 321 | - 'icone_sauver_site' => 'Backup do site', |
|
| 322 | - 'icone_site_entier' => 'Todo o site', |
|
| 323 | - 'icone_sites_references' => 'Sites referenciados', |
|
| 324 | - 'icone_statistiques' => 'Estatísticas do site', |
|
| 325 | - 'icone_suivi_activite' => 'Acompanhar a vida do site', |
|
| 326 | - 'icone_suivi_actualite' => 'Evolução do site', |
|
| 327 | - 'icone_suivi_pettions' => 'Acompanhar / gerenciar as petições', |
|
| 328 | - 'icone_suivi_revisions' => 'Modificações das matérias', |
|
| 329 | - 'icone_supprimer_document' => 'Suprimir este documento', |
|
| 330 | - 'icone_supprimer_image' => 'Suprimir esta imagem', |
|
| 331 | - 'icone_tous_articles' => 'Todas as suas matérias', |
|
| 332 | - 'icone_tous_auteur' => 'Todos os autores', |
|
| 333 | - 'icone_tous_visiteur' => 'Todos os visitantes', |
|
| 334 | - 'icone_visiter_site' => 'Ver o site público', |
|
| 335 | - 'icone_voir_en_ligne' => 'Ver online', |
|
| 336 | - 'img_indisponible' => 'imagem indisponível', |
|
| 337 | - 'impossible' => 'impossível', |
|
| 338 | - 'info_a_suivre' => 'ACOMPANHAR»', |
|
| 339 | - 'info_acces_interdit' => 'Acesso interdito', |
|
| 340 | - 'info_acces_refuse' => 'Acesso recusado', |
|
| 341 | - 'info_action' => 'Ação: @action@', |
|
| 342 | - 'info_administrer_rubriques' => 'Você pode administrar esta seção e suas subseções', |
|
| 343 | - 'info_adresse_non_indiquee' => 'Você não informou o endereço a testar!', |
|
| 344 | - 'info_aide' => 'AJUDA:', |
|
| 345 | - 'info_ajouter_mot' => 'Incluir esta palavra', |
|
| 346 | - 'info_annonce' => 'AVISO', |
|
| 347 | - 'info_annonces_generales' => 'Avisos gerais:', |
|
| 348 | - 'info_article_propose' => 'Matéria proposta', |
|
| 349 | - 'info_article_publie' => 'Matéria publicada', |
|
| 350 | - 'info_article_redaction' => 'Matéria em fase de redação', |
|
| 351 | - 'info_article_refuse' => 'Matéria recusada', |
|
| 352 | - 'info_article_supprime' => 'Matéria suprimida', |
|
| 353 | - 'info_articles' => 'Matérias', |
|
| 354 | - 'info_articles_a_valider' => 'As matérias para validar', |
|
| 355 | - 'info_articles_nb' => '@nb@ matérias', |
|
| 356 | - 'info_articles_proposes' => 'Matérias propostas', |
|
| 357 | - 'info_articles_un' => '1 matéria', |
|
| 358 | - 'info_auteurs_nombre' => 'autor(es):', |
|
| 359 | - 'info_authentification_ftp' => 'Autenticação (por FTP).', |
|
| 360 | - 'info_breves_2' => 'notas', |
|
| 361 | - 'info_breves_nb' => '@nb@ notas', |
|
| 362 | - 'info_breves_un' => '1 nota', |
|
| 363 | - 'info_connexion_refusee' => 'Conexão recusada', |
|
| 364 | - 'info_contact_developpeur' => 'Por favor, contate um desenvolvedor.', |
|
| 365 | - 'info_contenance' => 'Este site contém:', |
|
| 366 | - 'info_contribution' => 'contribuições', |
|
| 367 | - 'info_copyright' => '@spip@ é um software livre distribuído @lien_gpl@.', |
|
| 368 | - 'info_copyright_doc' => 'Para mais informações, veja o site <a href="@spipnet@">@spipnet_affiche@</a>.', |
|
| 369 | - 'info_copyright_gpl' => 'sob licença GPL', |
|
| 370 | - 'info_cours_edition' => 'Em edição', |
|
| 371 | - 'info_creer_repertoire' => 'Por favor, crie um arquivo ou diretório com o nome:', |
|
| 372 | - 'info_creer_repertoire_2' => 'dentro do subdiretório <b>@repertoire@</b>, e depois:', |
|
| 373 | - 'info_creer_vignette' => 'criação automática do ícone', |
|
| 374 | - 'info_creerdansrubrique_non_autorise' => 'Você não tem permissão para criar um conteúdo nesta seção', |
|
| 375 | - 'info_deplier' => 'Expandir', |
|
| 376 | - 'info_descriptif_nombre' => 'descrição(ões):', |
|
| 377 | - 'info_description' => 'Resumo:', |
|
| 378 | - 'info_description_2' => 'Resumo:', |
|
| 379 | - 'info_dimension' => 'Dimensões:', |
|
| 380 | - 'info_documents_nb' => '@nb@ documentos', |
|
| 381 | - 'info_documents_un' => '1 documento', |
|
| 382 | - 'info_ecire_message_prive' => 'Escrever uma mensagem privada', |
|
| 383 | - 'info_email_invalide' => 'Endereço de e-mail inválido.', |
|
| 384 | - 'info_en_cours_validation' => 'Suas matérias em fase de redação', |
|
| 385 | - 'info_en_ligne' => 'Atualmente online:', |
|
| 386 | - 'info_envoyer_message_prive' => 'Enviar uma mensagem privada a este autor', |
|
| 387 | - 'info_erreur_requete' => 'Erro na requisição:', |
|
| 388 | - 'info_erreur_squelette2' => 'Nenhum template <b>@fichier@</b> está disponível...', |
|
| 389 | - 'info_erreur_systeme' => 'Erro do sistema (errno @errsys@)', |
|
| 390 | - 'info_erreur_systeme2' => 'É possível que não haja espaço livre em disco, ou que a base de dados esteja corrompida.<br /> |
|
| 292 | + // I |
|
| 293 | + 'ical_texte_rss_articles' => 'O arquivo «backend» das matérias deste site encontra-se no endereço:', |
|
| 294 | + 'ical_texte_rss_articles2' => 'Você pode também obter os arquivos «backend» para as matérias de cada seção do site:', |
|
| 295 | + 'ical_texte_rss_breves' => 'Existe também um arquivo contendo as notas do site. Ao especificar um número de seção, você obterá unicamente as natos dessa seção.', |
|
| 296 | + 'icone_a_suivre' => 'Acompanhar', |
|
| 297 | + 'icone_admin_site' => 'Administração do site', |
|
| 298 | + 'icone_agenda' => 'Agenda', |
|
| 299 | + 'icone_aide_ligne' => 'Ajuda', |
|
| 300 | + 'icone_articles' => 'Matérias', |
|
| 301 | + 'icone_auteurs' => 'Autores', |
|
| 302 | + 'icone_brouteur' => 'Navegação rápida', |
|
| 303 | + 'icone_configuration_site' => 'Configuração', |
|
| 304 | + 'icone_configurer_site' => 'Configurar o seu site', |
|
| 305 | + 'icone_creer_nouvel_auteur' => 'Criar um novo autor', |
|
| 306 | + 'icone_creer_rubrique' => 'Criar uma seção', |
|
| 307 | + 'icone_creer_sous_rubrique' => 'Criar uma subseção', |
|
| 308 | + 'icone_deconnecter' => 'Desconectar-se', |
|
| 309 | + 'icone_discussions' => 'Discussões', |
|
| 310 | + 'icone_doc_rubrique' => 'Documentos das seções', |
|
| 311 | + 'icone_ecrire_article' => 'Escrever uma nova matéria', |
|
| 312 | + 'icone_edition_site' => 'Edição', |
|
| 313 | + 'icone_gestion_langues' => 'Gerenciamento de idiomas', |
|
| 314 | + 'icone_informations_personnelles' => 'Informações pessoais', |
|
| 315 | + 'icone_interface_complet' => 'interface completa', |
|
| 316 | + 'icone_interface_simple' => 'Interface simplificada', |
|
| 317 | + 'icone_maintenance_site' => 'Manutenção do site', |
|
| 318 | + 'icone_messagerie_personnelle' => 'Mensagens pessoais', |
|
| 319 | + 'icone_repartition_debut' => 'Exibir a repartição após o início', |
|
| 320 | + 'icone_rubriques' => 'Seções', |
|
| 321 | + 'icone_sauver_site' => 'Backup do site', |
|
| 322 | + 'icone_site_entier' => 'Todo o site', |
|
| 323 | + 'icone_sites_references' => 'Sites referenciados', |
|
| 324 | + 'icone_statistiques' => 'Estatísticas do site', |
|
| 325 | + 'icone_suivi_activite' => 'Acompanhar a vida do site', |
|
| 326 | + 'icone_suivi_actualite' => 'Evolução do site', |
|
| 327 | + 'icone_suivi_pettions' => 'Acompanhar / gerenciar as petições', |
|
| 328 | + 'icone_suivi_revisions' => 'Modificações das matérias', |
|
| 329 | + 'icone_supprimer_document' => 'Suprimir este documento', |
|
| 330 | + 'icone_supprimer_image' => 'Suprimir esta imagem', |
|
| 331 | + 'icone_tous_articles' => 'Todas as suas matérias', |
|
| 332 | + 'icone_tous_auteur' => 'Todos os autores', |
|
| 333 | + 'icone_tous_visiteur' => 'Todos os visitantes', |
|
| 334 | + 'icone_visiter_site' => 'Ver o site público', |
|
| 335 | + 'icone_voir_en_ligne' => 'Ver online', |
|
| 336 | + 'img_indisponible' => 'imagem indisponível', |
|
| 337 | + 'impossible' => 'impossível', |
|
| 338 | + 'info_a_suivre' => 'ACOMPANHAR»', |
|
| 339 | + 'info_acces_interdit' => 'Acesso interdito', |
|
| 340 | + 'info_acces_refuse' => 'Acesso recusado', |
|
| 341 | + 'info_action' => 'Ação: @action@', |
|
| 342 | + 'info_administrer_rubriques' => 'Você pode administrar esta seção e suas subseções', |
|
| 343 | + 'info_adresse_non_indiquee' => 'Você não informou o endereço a testar!', |
|
| 344 | + 'info_aide' => 'AJUDA:', |
|
| 345 | + 'info_ajouter_mot' => 'Incluir esta palavra', |
|
| 346 | + 'info_annonce' => 'AVISO', |
|
| 347 | + 'info_annonces_generales' => 'Avisos gerais:', |
|
| 348 | + 'info_article_propose' => 'Matéria proposta', |
|
| 349 | + 'info_article_publie' => 'Matéria publicada', |
|
| 350 | + 'info_article_redaction' => 'Matéria em fase de redação', |
|
| 351 | + 'info_article_refuse' => 'Matéria recusada', |
|
| 352 | + 'info_article_supprime' => 'Matéria suprimida', |
|
| 353 | + 'info_articles' => 'Matérias', |
|
| 354 | + 'info_articles_a_valider' => 'As matérias para validar', |
|
| 355 | + 'info_articles_nb' => '@nb@ matérias', |
|
| 356 | + 'info_articles_proposes' => 'Matérias propostas', |
|
| 357 | + 'info_articles_un' => '1 matéria', |
|
| 358 | + 'info_auteurs_nombre' => 'autor(es):', |
|
| 359 | + 'info_authentification_ftp' => 'Autenticação (por FTP).', |
|
| 360 | + 'info_breves_2' => 'notas', |
|
| 361 | + 'info_breves_nb' => '@nb@ notas', |
|
| 362 | + 'info_breves_un' => '1 nota', |
|
| 363 | + 'info_connexion_refusee' => 'Conexão recusada', |
|
| 364 | + 'info_contact_developpeur' => 'Por favor, contate um desenvolvedor.', |
|
| 365 | + 'info_contenance' => 'Este site contém:', |
|
| 366 | + 'info_contribution' => 'contribuições', |
|
| 367 | + 'info_copyright' => '@spip@ é um software livre distribuído @lien_gpl@.', |
|
| 368 | + 'info_copyright_doc' => 'Para mais informações, veja o site <a href="@spipnet@">@spipnet_affiche@</a>.', |
|
| 369 | + 'info_copyright_gpl' => 'sob licença GPL', |
|
| 370 | + 'info_cours_edition' => 'Em edição', |
|
| 371 | + 'info_creer_repertoire' => 'Por favor, crie um arquivo ou diretório com o nome:', |
|
| 372 | + 'info_creer_repertoire_2' => 'dentro do subdiretório <b>@repertoire@</b>, e depois:', |
|
| 373 | + 'info_creer_vignette' => 'criação automática do ícone', |
|
| 374 | + 'info_creerdansrubrique_non_autorise' => 'Você não tem permissão para criar um conteúdo nesta seção', |
|
| 375 | + 'info_deplier' => 'Expandir', |
|
| 376 | + 'info_descriptif_nombre' => 'descrição(ões):', |
|
| 377 | + 'info_description' => 'Resumo:', |
|
| 378 | + 'info_description_2' => 'Resumo:', |
|
| 379 | + 'info_dimension' => 'Dimensões:', |
|
| 380 | + 'info_documents_nb' => '@nb@ documentos', |
|
| 381 | + 'info_documents_un' => '1 documento', |
|
| 382 | + 'info_ecire_message_prive' => 'Escrever uma mensagem privada', |
|
| 383 | + 'info_email_invalide' => 'Endereço de e-mail inválido.', |
|
| 384 | + 'info_en_cours_validation' => 'Suas matérias em fase de redação', |
|
| 385 | + 'info_en_ligne' => 'Atualmente online:', |
|
| 386 | + 'info_envoyer_message_prive' => 'Enviar uma mensagem privada a este autor', |
|
| 387 | + 'info_erreur_requete' => 'Erro na requisição:', |
|
| 388 | + 'info_erreur_squelette2' => 'Nenhum template <b>@fichier@</b> está disponível...', |
|
| 389 | + 'info_erreur_systeme' => 'Erro do sistema (errno @errsys@)', |
|
| 390 | + 'info_erreur_systeme2' => 'É possível que não haja espaço livre em disco, ou que a base de dados esteja corrompida.<br /> |
|
| 391 | 391 | <span style="color:red;">Tente <a href=\'@script@\'>reparar a base</a>, ou contate o seu serviço de hospedagem.</span>', |
| 392 | - 'info_fini' => 'Terminou!', |
|
| 393 | - 'info_format_image' => 'Formatos das imagens que podem ser utilizados para criar os ícones @gd_formats@.', |
|
| 394 | - 'info_format_non_defini' => 'formato não definido', |
|
| 395 | - 'info_grand_ecran' => 'Alta resolução', |
|
| 396 | - 'info_image_aide' => 'AJUDA', |
|
| 397 | - 'info_image_process_titre' => 'Método de criação dos ícones', |
|
| 398 | - 'info_impossible_lire_page' => '<b>Erro!</b> Impossível ler a página <tt><html>@test_proxy@</html></tt> via proxy', |
|
| 399 | - 'info_installation_systeme_publication' => 'Instalação do sistema de publicação...', |
|
| 400 | - 'info_installer_documents' => 'Você pode instalar automaticamente todos os documentos contídos no diretório @upload@.', |
|
| 401 | - 'info_installer_ftp' => 'Como administrador, você pode transferir (por FTP) arquivos para o diretório @upload@ para, em seguida, selecioná-los aqui diretamente.', |
|
| 402 | - 'info_installer_images' => 'Você pode transferir imagens nos formatos JPEG, GIF e PNG.', |
|
| 403 | - 'info_installer_images_dossier' => 'Transferir as imagens para o diretório @upload@ para poder selecioná-las aqui.', |
|
| 404 | - 'info_interface_complete' => 'interface completa', |
|
| 405 | - 'info_interface_simple' => 'Interface simplificada', |
|
| 406 | - 'info_joindre_document_article' => 'Você pode anexar a esta matéria documentos dos tipos a seguir', |
|
| 407 | - 'info_joindre_document_rubrique' => 'Você pode anexar a esta seção documentos dos tipos a seguir', |
|
| 408 | - 'info_joindre_documents_article' => 'Você pode anexar à sua matéria documentos dos tipos a seguir:', |
|
| 409 | - 'info_l_article' => 'a matéria', |
|
| 410 | - 'info_la_breve' => 'a nota', |
|
| 411 | - 'info_la_rubrique' => 'a seção', |
|
| 412 | - 'info_langue_principale' => 'Idioma principal do site', |
|
| 413 | - 'info_largeur_vignette' => '@largeur_vignette@ × @hauteur_vignette@ pixels', |
|
| 414 | - 'info_les_auteurs_1' => 'por @les_auteurs@', |
|
| 415 | - 'info_logo_format_interdit' => 'Apenas os ícones nos formatos @formats@ estão autorizados.', |
|
| 416 | - 'info_logo_max_poids' => 'Os ícones devem obrigatoriamente ter menos de @maxi@ (este arquivo tem @actuel@).', |
|
| 417 | - 'info_mail_fournisseur' => '[email protected]', |
|
| 418 | - 'info_message_2' => 'MENSAGEM', |
|
| 419 | - 'info_message_supprime' => 'MENSAGEM EXCLUÍDA', |
|
| 420 | - 'info_messages_nb' => '@nb@ mensagens', |
|
| 421 | - 'info_messages_un' => '1 mensagem', |
|
| 422 | - 'info_mise_en_ligne' => 'Data de publicação online:', |
|
| 423 | - 'info_modification_parametres_securite' => 'modificações dos parâmetros de segurança', |
|
| 424 | - 'info_mois_courant' => 'No mês corrente:', |
|
| 425 | - 'info_mot_cle_ajoute' => 'A palavra-chave a seguir foi associada a', |
|
| 426 | - 'info_multi_herit' => 'Idioma padrão', |
|
| 427 | - 'info_multi_langues_soulignees' => 'Os <u>idiomas sublinhados</u> dispõem de tradução total ou parcial dos textos da interface. Se você escolher esses idiomas, diversos elementos do site público (datas, formulários) são traduzidos automaticamente. Para os idiomas não sublinhados, estes elementos aparecerão no idioma principal do site.', |
|
| 428 | - 'info_multilinguisme' => 'Multilinguismo', |
|
| 429 | - 'info_nom_non_utilisateurs_connectes' => 'Seu nome não aparece na relação de usuários conectados.', |
|
| 430 | - 'info_nom_utilisateurs_connectes' => 'Seu nome aparecerá na relação de usuários conectados.', |
|
| 431 | - 'info_nombre_en_ligne' => 'Online neste momento:', |
|
| 432 | - 'info_non_resultat' => 'Nenhum resultados para "@cherche_mot@"', |
|
| 433 | - 'info_non_utilisation_messagerie' => 'Você não utiliza o sistema de mensagens deste site.', |
|
| 434 | - 'info_nouveau_message' => 'VOCÊ TEM UMA NOVA MENSAGEM', |
|
| 435 | - 'info_nouveaux_messages' => 'VOCÊ TEM @total_messages@ MENSAGENS NOVAS', |
|
| 436 | - 'info_numero_abbreviation' => 'N° ', |
|
| 437 | - 'info_obligatoire' => 'Esta informação é obrigatória', |
|
| 438 | - 'info_page_actuelle' => 'Página atual', |
|
| 439 | - 'info_pense_bete' => 'LEMBRETE', |
|
| 440 | - 'info_petit_ecran' => 'Baixa resolução', |
|
| 441 | - 'info_petition_close' => 'Petição fechada', |
|
| 442 | - 'info_pixels' => 'pixels', |
|
| 443 | - 'info_plusieurs_mots_trouves' => 'Várias palavras-chave encontradas para "@cherche_mot@":', |
|
| 444 | - 'info_portfolio_automatique' => 'Portfólio automático:', |
|
| 445 | - 'info_premier_resultat' => '[@debut_limit@ primeiros resultados de @total@]', |
|
| 446 | - 'info_premier_resultat_sur' => '[@debut_limit@ primeiros resultados de @total@]', |
|
| 447 | - 'info_propose_1' => '[@nom_site_spip@] Propõe: @titre@', |
|
| 448 | - 'info_propose_2' => 'Matéria proposta |
|
| 392 | + 'info_fini' => 'Terminou!', |
|
| 393 | + 'info_format_image' => 'Formatos das imagens que podem ser utilizados para criar os ícones @gd_formats@.', |
|
| 394 | + 'info_format_non_defini' => 'formato não definido', |
|
| 395 | + 'info_grand_ecran' => 'Alta resolução', |
|
| 396 | + 'info_image_aide' => 'AJUDA', |
|
| 397 | + 'info_image_process_titre' => 'Método de criação dos ícones', |
|
| 398 | + 'info_impossible_lire_page' => '<b>Erro!</b> Impossível ler a página <tt><html>@test_proxy@</html></tt> via proxy', |
|
| 399 | + 'info_installation_systeme_publication' => 'Instalação do sistema de publicação...', |
|
| 400 | + 'info_installer_documents' => 'Você pode instalar automaticamente todos os documentos contídos no diretório @upload@.', |
|
| 401 | + 'info_installer_ftp' => 'Como administrador, você pode transferir (por FTP) arquivos para o diretório @upload@ para, em seguida, selecioná-los aqui diretamente.', |
|
| 402 | + 'info_installer_images' => 'Você pode transferir imagens nos formatos JPEG, GIF e PNG.', |
|
| 403 | + 'info_installer_images_dossier' => 'Transferir as imagens para o diretório @upload@ para poder selecioná-las aqui.', |
|
| 404 | + 'info_interface_complete' => 'interface completa', |
|
| 405 | + 'info_interface_simple' => 'Interface simplificada', |
|
| 406 | + 'info_joindre_document_article' => 'Você pode anexar a esta matéria documentos dos tipos a seguir', |
|
| 407 | + 'info_joindre_document_rubrique' => 'Você pode anexar a esta seção documentos dos tipos a seguir', |
|
| 408 | + 'info_joindre_documents_article' => 'Você pode anexar à sua matéria documentos dos tipos a seguir:', |
|
| 409 | + 'info_l_article' => 'a matéria', |
|
| 410 | + 'info_la_breve' => 'a nota', |
|
| 411 | + 'info_la_rubrique' => 'a seção', |
|
| 412 | + 'info_langue_principale' => 'Idioma principal do site', |
|
| 413 | + 'info_largeur_vignette' => '@largeur_vignette@ × @hauteur_vignette@ pixels', |
|
| 414 | + 'info_les_auteurs_1' => 'por @les_auteurs@', |
|
| 415 | + 'info_logo_format_interdit' => 'Apenas os ícones nos formatos @formats@ estão autorizados.', |
|
| 416 | + 'info_logo_max_poids' => 'Os ícones devem obrigatoriamente ter menos de @maxi@ (este arquivo tem @actuel@).', |
|
| 417 | + 'info_mail_fournisseur' => '[email protected]', |
|
| 418 | + 'info_message_2' => 'MENSAGEM', |
|
| 419 | + 'info_message_supprime' => 'MENSAGEM EXCLUÍDA', |
|
| 420 | + 'info_messages_nb' => '@nb@ mensagens', |
|
| 421 | + 'info_messages_un' => '1 mensagem', |
|
| 422 | + 'info_mise_en_ligne' => 'Data de publicação online:', |
|
| 423 | + 'info_modification_parametres_securite' => 'modificações dos parâmetros de segurança', |
|
| 424 | + 'info_mois_courant' => 'No mês corrente:', |
|
| 425 | + 'info_mot_cle_ajoute' => 'A palavra-chave a seguir foi associada a', |
|
| 426 | + 'info_multi_herit' => 'Idioma padrão', |
|
| 427 | + 'info_multi_langues_soulignees' => 'Os <u>idiomas sublinhados</u> dispõem de tradução total ou parcial dos textos da interface. Se você escolher esses idiomas, diversos elementos do site público (datas, formulários) são traduzidos automaticamente. Para os idiomas não sublinhados, estes elementos aparecerão no idioma principal do site.', |
|
| 428 | + 'info_multilinguisme' => 'Multilinguismo', |
|
| 429 | + 'info_nom_non_utilisateurs_connectes' => 'Seu nome não aparece na relação de usuários conectados.', |
|
| 430 | + 'info_nom_utilisateurs_connectes' => 'Seu nome aparecerá na relação de usuários conectados.', |
|
| 431 | + 'info_nombre_en_ligne' => 'Online neste momento:', |
|
| 432 | + 'info_non_resultat' => 'Nenhum resultados para "@cherche_mot@"', |
|
| 433 | + 'info_non_utilisation_messagerie' => 'Você não utiliza o sistema de mensagens deste site.', |
|
| 434 | + 'info_nouveau_message' => 'VOCÊ TEM UMA NOVA MENSAGEM', |
|
| 435 | + 'info_nouveaux_messages' => 'VOCÊ TEM @total_messages@ MENSAGENS NOVAS', |
|
| 436 | + 'info_numero_abbreviation' => 'N° ', |
|
| 437 | + 'info_obligatoire' => 'Esta informação é obrigatória', |
|
| 438 | + 'info_page_actuelle' => 'Página atual', |
|
| 439 | + 'info_pense_bete' => 'LEMBRETE', |
|
| 440 | + 'info_petit_ecran' => 'Baixa resolução', |
|
| 441 | + 'info_petition_close' => 'Petição fechada', |
|
| 442 | + 'info_pixels' => 'pixels', |
|
| 443 | + 'info_plusieurs_mots_trouves' => 'Várias palavras-chave encontradas para "@cherche_mot@":', |
|
| 444 | + 'info_portfolio_automatique' => 'Portfólio automático:', |
|
| 445 | + 'info_premier_resultat' => '[@debut_limit@ primeiros resultados de @total@]', |
|
| 446 | + 'info_premier_resultat_sur' => '[@debut_limit@ primeiros resultados de @total@]', |
|
| 447 | + 'info_propose_1' => '[@nom_site_spip@] Propõe: @titre@', |
|
| 448 | + 'info_propose_2' => 'Matéria proposta |
|
| 449 | 449 | ----------------', |
| 450 | - 'info_propose_3' => 'A matéria "@titre@" foi proposta para publicação.', |
|
| 451 | - 'info_propose_4' => 'Você está convidado a consultá-la e dar sua opinião', |
|
| 452 | - 'info_propose_5' => 'no fórum a ela anexado. Ela está disponível no endereço:', |
|
| 453 | - 'info_publie_01' => 'A matéria "@titre@" foi validada por @connect_nom@.', |
|
| 454 | - 'info_publie_1' => '[@nom_site_spip@] PUBLICADO: @titre@', |
|
| 455 | - 'info_publie_2' => 'Matéria publicada |
|
| 450 | + 'info_propose_3' => 'A matéria "@titre@" foi proposta para publicação.', |
|
| 451 | + 'info_propose_4' => 'Você está convidado a consultá-la e dar sua opinião', |
|
| 452 | + 'info_propose_5' => 'no fórum a ela anexado. Ela está disponível no endereço:', |
|
| 453 | + 'info_publie_01' => 'A matéria "@titre@" foi validada por @connect_nom@.', |
|
| 454 | + 'info_publie_1' => '[@nom_site_spip@] PUBLICADO: @titre@', |
|
| 455 | + 'info_publie_2' => 'Matéria publicada |
|
| 456 | 456 | -----------------', |
| 457 | - 'info_rechercher' => 'Procurar', |
|
| 458 | - 'info_rechercher_02' => 'Procurar:', |
|
| 459 | - 'info_remplacer_vignette' => 'Substituir o ícone padrão por um logo personalizado:', |
|
| 460 | - 'info_rubriques_nb' => '@nb@ seções', |
|
| 461 | - 'info_rubriques_un' => '1 seção', |
|
| 462 | - 'info_sans_titre_2' => 'sem título', |
|
| 463 | - 'info_selectionner_fichier' => 'Você pode escolher um arquivo do diretório @upload@', |
|
| 464 | - 'info_selectionner_fichier_2' => 'Selecionar um arquivo:', |
|
| 465 | - 'info_sites_nb' => '@nb@ sites', |
|
| 466 | - 'info_sites_un' => '1 site', |
|
| 467 | - 'info_supprimer_vignette' => 'excluir o ícone', |
|
| 468 | - 'info_symbole_bleu' => 'O ícone <b>azul</b> indica um <b>lembrete</b>: ou seja, uma mensagem para seu uso pessoal.', |
|
| 469 | - 'info_symbole_jaune' => 'O ícone <b>amarelo</b> indica um <b>anúncio para todos os redatores</b>: modificável por todos os administradores, e visível por todos os redatores.', |
|
| 470 | - 'info_symbole_vert' => 'O ícone <b>verde</b> indica as <b>mensagens trocadas com outros usuários</b> do site.', |
|
| 471 | - 'info_telecharger_nouveau_logo' => 'Transferir um novo logo:', |
|
| 472 | - 'info_telecharger_ordinateur' => 'Tranferir do seu computador:', |
|
| 473 | - 'info_tous_resultats_enregistres' => '[todos os resultados são gravados]', |
|
| 474 | - 'info_tout_afficher' => 'Mostrar todas', |
|
| 475 | - 'info_travaux_texte' => 'Este site ainda não está configurado. Volte mais tarde...', |
|
| 476 | - 'info_travaux_titre' => 'Site em manutenção', |
|
| 477 | - 'info_trop_resultat' => 'Resultados de mais para "@cherche_mot@"; por favor, refine a busca.', |
|
| 478 | - 'info_utilisation_messagerie_interne' => 'Você usa o sistema interno de mensagens deste site.', |
|
| 479 | - 'info_valider_lien' => 'validar este link', |
|
| 480 | - 'info_verifier_image' => ', verifique se as suas imagens foram transferidas corretamente.', |
|
| 481 | - 'info_vignette_defaut' => 'Ícone padrão', |
|
| 482 | - 'info_vignette_personnalisee' => 'Ícone personalizado', |
|
| 483 | - 'info_visite' => 'visita:', |
|
| 484 | - 'info_vos_rendez_vous' => 'Seus encontros futuros', |
|
| 485 | - 'infos_vos_pense_bete' => 'Seus lembretes', |
|
| 457 | + 'info_rechercher' => 'Procurar', |
|
| 458 | + 'info_rechercher_02' => 'Procurar:', |
|
| 459 | + 'info_remplacer_vignette' => 'Substituir o ícone padrão por um logo personalizado:', |
|
| 460 | + 'info_rubriques_nb' => '@nb@ seções', |
|
| 461 | + 'info_rubriques_un' => '1 seção', |
|
| 462 | + 'info_sans_titre_2' => 'sem título', |
|
| 463 | + 'info_selectionner_fichier' => 'Você pode escolher um arquivo do diretório @upload@', |
|
| 464 | + 'info_selectionner_fichier_2' => 'Selecionar um arquivo:', |
|
| 465 | + 'info_sites_nb' => '@nb@ sites', |
|
| 466 | + 'info_sites_un' => '1 site', |
|
| 467 | + 'info_supprimer_vignette' => 'excluir o ícone', |
|
| 468 | + 'info_symbole_bleu' => 'O ícone <b>azul</b> indica um <b>lembrete</b>: ou seja, uma mensagem para seu uso pessoal.', |
|
| 469 | + 'info_symbole_jaune' => 'O ícone <b>amarelo</b> indica um <b>anúncio para todos os redatores</b>: modificável por todos os administradores, e visível por todos os redatores.', |
|
| 470 | + 'info_symbole_vert' => 'O ícone <b>verde</b> indica as <b>mensagens trocadas com outros usuários</b> do site.', |
|
| 471 | + 'info_telecharger_nouveau_logo' => 'Transferir um novo logo:', |
|
| 472 | + 'info_telecharger_ordinateur' => 'Tranferir do seu computador:', |
|
| 473 | + 'info_tous_resultats_enregistres' => '[todos os resultados são gravados]', |
|
| 474 | + 'info_tout_afficher' => 'Mostrar todas', |
|
| 475 | + 'info_travaux_texte' => 'Este site ainda não está configurado. Volte mais tarde...', |
|
| 476 | + 'info_travaux_titre' => 'Site em manutenção', |
|
| 477 | + 'info_trop_resultat' => 'Resultados de mais para "@cherche_mot@"; por favor, refine a busca.', |
|
| 478 | + 'info_utilisation_messagerie_interne' => 'Você usa o sistema interno de mensagens deste site.', |
|
| 479 | + 'info_valider_lien' => 'validar este link', |
|
| 480 | + 'info_verifier_image' => ', verifique se as suas imagens foram transferidas corretamente.', |
|
| 481 | + 'info_vignette_defaut' => 'Ícone padrão', |
|
| 482 | + 'info_vignette_personnalisee' => 'Ícone personalizado', |
|
| 483 | + 'info_visite' => 'visita:', |
|
| 484 | + 'info_vos_rendez_vous' => 'Seus encontros futuros', |
|
| 485 | + 'infos_vos_pense_bete' => 'Seus lembretes', |
|
| 486 | 486 | |
| 487 | - // L |
|
| 488 | - 'label_ajout_id_rapide' => 'Ajuda rápida', |
|
| 489 | - 'label_poids_fichier' => 'Tamanho', |
|
| 490 | - 'label_ponctuer' => '@label@:', |
|
| 491 | - 'lien_afficher_icones_seuls' => 'Exibir apenas os ícones', |
|
| 492 | - 'lien_afficher_texte_icones' => 'Exibir ícones e texto', |
|
| 493 | - 'lien_afficher_texte_seul' => 'Exibir apenas o texto', |
|
| 494 | - 'lien_aller_a_la_derniere_page' => 'Ir para a última página', |
|
| 495 | - 'lien_aller_a_la_page_nb' => 'Ir para a página @nb@', |
|
| 496 | - 'lien_aller_a_la_page_precedente' => 'Ir para a página anterior', |
|
| 497 | - 'lien_aller_a_la_page_suivante' => 'Ir para a página seguinte', |
|
| 498 | - 'lien_aller_a_la_premiere_page' => 'Ir para a primeira página', |
|
| 499 | - 'lien_liberer' => 'liberar', |
|
| 500 | - 'lien_liberer_tous' => 'liberar todas', |
|
| 501 | - 'lien_nouvea_pense_bete' => 'NOVO LEMBRETE', |
|
| 502 | - 'lien_nouveau_message' => 'NOVA MENSAGEM', |
|
| 503 | - 'lien_nouvelle_annonce' => 'NOVO ANÚNCIO', |
|
| 504 | - 'lien_petitions' => 'PETIÇÃO', |
|
| 505 | - 'lien_popularite' => 'popularidade: @popularite@%', |
|
| 506 | - 'lien_racine_site' => 'RAIZ DO SITE', |
|
| 507 | - 'lien_reessayer' => 'tente novamente', |
|
| 508 | - 'lien_repondre_message' => 'Responder a esta mensagem', |
|
| 509 | - 'lien_supprimer' => 'excluir', |
|
| 510 | - 'lien_tout_afficher' => 'Mostrar tudo', |
|
| 511 | - 'lien_visite_site' => 'visitar este site', |
|
| 512 | - 'lien_visites' => '@visites@ visitas', |
|
| 513 | - 'lien_voir_auteur' => 'Ver este autor', |
|
| 514 | - 'ligne' => 'Linha', |
|
| 515 | - 'login' => 'Conexão', |
|
| 516 | - 'login_acces_prive' => 'acesso ao espaço privado', |
|
| 517 | - 'login_autre_identifiant' => 'conectar-se com outra identificação', |
|
| 518 | - 'login_cookie_accepte' => 'Por favor, configure o seu navegador para aceitá-los (pelo menos para este site).', |
|
| 519 | - 'login_cookie_oblige' => 'Para você se identificar de modo seguro neste site, você precisa aceitar cookies.', |
|
| 520 | - 'login_deconnexion_ok' => 'Desconexão efetuada.', |
|
| 521 | - 'login_erreur_pass' => 'Erro de senha.', |
|
| 522 | - 'login_espace_prive' => 'espaço privado', |
|
| 523 | - 'login_identifiant_inconnu' => 'O identificador «@login@» não está cadastrado.', |
|
| 524 | - 'login_login' => 'Login:', |
|
| 525 | - 'login_login2' => 'Login', |
|
| 526 | - 'login_login_pass_incorrect' => '(Login ou senha incorreta.)', |
|
| 527 | - 'login_motpasseoublie' => 'esqueceu sua senha?', |
|
| 528 | - 'login_non_securise' => 'Atenção, este formulário não é seguro. |
|
| 487 | + // L |
|
| 488 | + 'label_ajout_id_rapide' => 'Ajuda rápida', |
|
| 489 | + 'label_poids_fichier' => 'Tamanho', |
|
| 490 | + 'label_ponctuer' => '@label@:', |
|
| 491 | + 'lien_afficher_icones_seuls' => 'Exibir apenas os ícones', |
|
| 492 | + 'lien_afficher_texte_icones' => 'Exibir ícones e texto', |
|
| 493 | + 'lien_afficher_texte_seul' => 'Exibir apenas o texto', |
|
| 494 | + 'lien_aller_a_la_derniere_page' => 'Ir para a última página', |
|
| 495 | + 'lien_aller_a_la_page_nb' => 'Ir para a página @nb@', |
|
| 496 | + 'lien_aller_a_la_page_precedente' => 'Ir para a página anterior', |
|
| 497 | + 'lien_aller_a_la_page_suivante' => 'Ir para a página seguinte', |
|
| 498 | + 'lien_aller_a_la_premiere_page' => 'Ir para a primeira página', |
|
| 499 | + 'lien_liberer' => 'liberar', |
|
| 500 | + 'lien_liberer_tous' => 'liberar todas', |
|
| 501 | + 'lien_nouvea_pense_bete' => 'NOVO LEMBRETE', |
|
| 502 | + 'lien_nouveau_message' => 'NOVA MENSAGEM', |
|
| 503 | + 'lien_nouvelle_annonce' => 'NOVO ANÚNCIO', |
|
| 504 | + 'lien_petitions' => 'PETIÇÃO', |
|
| 505 | + 'lien_popularite' => 'popularidade: @popularite@%', |
|
| 506 | + 'lien_racine_site' => 'RAIZ DO SITE', |
|
| 507 | + 'lien_reessayer' => 'tente novamente', |
|
| 508 | + 'lien_repondre_message' => 'Responder a esta mensagem', |
|
| 509 | + 'lien_supprimer' => 'excluir', |
|
| 510 | + 'lien_tout_afficher' => 'Mostrar tudo', |
|
| 511 | + 'lien_visite_site' => 'visitar este site', |
|
| 512 | + 'lien_visites' => '@visites@ visitas', |
|
| 513 | + 'lien_voir_auteur' => 'Ver este autor', |
|
| 514 | + 'ligne' => 'Linha', |
|
| 515 | + 'login' => 'Conexão', |
|
| 516 | + 'login_acces_prive' => 'acesso ao espaço privado', |
|
| 517 | + 'login_autre_identifiant' => 'conectar-se com outra identificação', |
|
| 518 | + 'login_cookie_accepte' => 'Por favor, configure o seu navegador para aceitá-los (pelo menos para este site).', |
|
| 519 | + 'login_cookie_oblige' => 'Para você se identificar de modo seguro neste site, você precisa aceitar cookies.', |
|
| 520 | + 'login_deconnexion_ok' => 'Desconexão efetuada.', |
|
| 521 | + 'login_erreur_pass' => 'Erro de senha.', |
|
| 522 | + 'login_espace_prive' => 'espaço privado', |
|
| 523 | + 'login_identifiant_inconnu' => 'O identificador «@login@» não está cadastrado.', |
|
| 524 | + 'login_login' => 'Login:', |
|
| 525 | + 'login_login2' => 'Login', |
|
| 526 | + 'login_login_pass_incorrect' => '(Login ou senha incorreta.)', |
|
| 527 | + 'login_motpasseoublie' => 'esqueceu sua senha?', |
|
| 528 | + 'login_non_securise' => 'Atenção, este formulário não é seguro. |
|
| 529 | 529 | Se você não quiser que a sua senha possa ser interceptada na rede, por favor ative o Javascript no seu navegador e', |
| 530 | - 'login_nouvelle_tentative' => 'Tentar novamente', |
|
| 531 | - 'login_par_ici' => 'VocÊ está registrado... por aqui...', |
|
| 532 | - 'login_pass2' => 'Senha:', |
|
| 533 | - 'login_preferez_refuser' => '<b>Se você prefere recusar os cookies</b>, um outro método de conexão (menos seguro) está disponível:', |
|
| 534 | - 'login_recharger' => 'atualizar esta página', |
|
| 535 | - 'login_rester_identifie' => 'Manter-se identificado', |
|
| 536 | - 'login_retour_public' => 'Voltar ao site público', |
|
| 537 | - 'login_retour_site' => 'Voltar ao site público', |
|
| 538 | - 'login_retoursitepublic' => 'voltar ao site público', |
|
| 539 | - 'login_sans_cookie' => 'Identificação sem cookie', |
|
| 540 | - 'login_securise' => 'Login seguro', |
|
| 541 | - 'login_sinscrire' => 'cadastrar-se', |
|
| 542 | - 'login_test_navigateur' => 'testar navegador/reconexão', |
|
| 543 | - 'login_verifiez_navigateur' => '(Verifique sempre se o seu navegador não está memorizando a sua senha...)', |
|
| 530 | + 'login_nouvelle_tentative' => 'Tentar novamente', |
|
| 531 | + 'login_par_ici' => 'VocÊ está registrado... por aqui...', |
|
| 532 | + 'login_pass2' => 'Senha:', |
|
| 533 | + 'login_preferez_refuser' => '<b>Se você prefere recusar os cookies</b>, um outro método de conexão (menos seguro) está disponível:', |
|
| 534 | + 'login_recharger' => 'atualizar esta página', |
|
| 535 | + 'login_rester_identifie' => 'Manter-se identificado', |
|
| 536 | + 'login_retour_public' => 'Voltar ao site público', |
|
| 537 | + 'login_retour_site' => 'Voltar ao site público', |
|
| 538 | + 'login_retoursitepublic' => 'voltar ao site público', |
|
| 539 | + 'login_sans_cookie' => 'Identificação sem cookie', |
|
| 540 | + 'login_securise' => 'Login seguro', |
|
| 541 | + 'login_sinscrire' => 'cadastrar-se', |
|
| 542 | + 'login_test_navigateur' => 'testar navegador/reconexão', |
|
| 543 | + 'login_verifiez_navigateur' => '(Verifique sempre se o seu navegador não está memorizando a sua senha...)', |
|
| 544 | 544 | |
| 545 | - // M |
|
| 546 | - 'masquer_colonne' => 'Ocultar esta coluna', |
|
| 547 | - 'masquer_trad' => 'esconder as traduções', |
|
| 548 | - 'message_nouveaux_identifiants_echec' => 'Impossível criar novos logins.', |
|
| 549 | - 'message_nouveaux_identifiants_echec_envoi' => 'Os novos logins de conexão não puderam ser enviados.', |
|
| 550 | - 'message_nouveaux_identifiants_ok' => 'Os novos logins de conexão foram enviados para @email@.', |
|
| 551 | - 'module_fichiers_langues' => 'Arquivos de idioma', |
|
| 545 | + // M |
|
| 546 | + 'masquer_colonne' => 'Ocultar esta coluna', |
|
| 547 | + 'masquer_trad' => 'esconder as traduções', |
|
| 548 | + 'message_nouveaux_identifiants_echec' => 'Impossível criar novos logins.', |
|
| 549 | + 'message_nouveaux_identifiants_echec_envoi' => 'Os novos logins de conexão não puderam ser enviados.', |
|
| 550 | + 'message_nouveaux_identifiants_ok' => 'Os novos logins de conexão foram enviados para @email@.', |
|
| 551 | + 'module_fichiers_langues' => 'Arquivos de idioma', |
|
| 552 | 552 | |
| 553 | - // N |
|
| 554 | - 'navigateur_pas_redirige' => 'Se o seu navegador não o redirecionar, clique aqui para continuar.', |
|
| 555 | - 'numero' => 'Número', |
|
| 553 | + // N |
|
| 554 | + 'navigateur_pas_redirige' => 'Se o seu navegador não o redirecionar, clique aqui para continuar.', |
|
| 555 | + 'numero' => 'Número', |
|
| 556 | 556 | |
| 557 | - // O |
|
| 558 | - 'occurence' => 'Ocorrência', |
|
| 559 | - 'onglet_affacer_base' => 'Apagar a base', |
|
| 560 | - 'onglet_auteur' => 'O autor', |
|
| 561 | - 'onglet_contenu_site' => 'Conteúdo do site', |
|
| 562 | - 'onglet_evolution_visite_mod' => 'Evolução', |
|
| 563 | - 'onglet_fonctions_avances' => 'Funções avançadas', |
|
| 564 | - 'onglet_informations_personnelles' => 'Informações pessoais', |
|
| 565 | - 'onglet_interactivite' => 'Interatividade', |
|
| 566 | - 'onglet_messagerie' => 'Sistema de mensagens', |
|
| 567 | - 'onglet_repartition_rubrique' => 'Repartição por seções', |
|
| 568 | - 'onglet_save_restaur_base' => 'Fazer cópia de segurança/restaurar a base', |
|
| 569 | - 'onglet_vider_cache' => 'Esvaziar o cache', |
|
| 557 | + // O |
|
| 558 | + 'occurence' => 'Ocorrência', |
|
| 559 | + 'onglet_affacer_base' => 'Apagar a base', |
|
| 560 | + 'onglet_auteur' => 'O autor', |
|
| 561 | + 'onglet_contenu_site' => 'Conteúdo do site', |
|
| 562 | + 'onglet_evolution_visite_mod' => 'Evolução', |
|
| 563 | + 'onglet_fonctions_avances' => 'Funções avançadas', |
|
| 564 | + 'onglet_informations_personnelles' => 'Informações pessoais', |
|
| 565 | + 'onglet_interactivite' => 'Interatividade', |
|
| 566 | + 'onglet_messagerie' => 'Sistema de mensagens', |
|
| 567 | + 'onglet_repartition_rubrique' => 'Repartição por seções', |
|
| 568 | + 'onglet_save_restaur_base' => 'Fazer cópia de segurança/restaurar a base', |
|
| 569 | + 'onglet_vider_cache' => 'Esvaziar o cache', |
|
| 570 | 570 | |
| 571 | - // P |
|
| 572 | - 'pass_choix_pass' => 'Por favor, escolha a sua nova senha:', |
|
| 573 | - 'pass_erreur' => 'Erro', |
|
| 574 | - 'pass_erreur_acces_refuse' => '<b>Erro:</b> você não tem mais acesso a este site.', |
|
| 575 | - 'pass_erreur_code_inconnu' => '<b>Erro:</b> este login não corresponde a nenhum visitante com permissão de acesso a este site.', |
|
| 576 | - 'pass_erreur_non_enregistre' => '<b>Erro:</b> o e-mail <tt>@email_oubli@</tt> não está cadastrado neste site.', |
|
| 577 | - 'pass_erreur_non_valide' => '<b>Erro:</b> o e-mail <tt>@email_oubli@</tt> não é válido!', |
|
| 578 | - 'pass_erreur_probleme_technique' => '<b>Erro:</b> este e-mail não pôde ser enviado devido a um problema técnico.', |
|
| 579 | - 'pass_espace_prive_bla' => 'O espaço privado deste site é aberto aos visitantes, após inscrição. Uma vez cadastrado, você poderá consultar as matérias em fase de redação, propor a publicação de novas matérias e participar de todos os fóruns.', |
|
| 580 | - 'pass_forum_bla' => 'Você soliciou a participação num fórum reservado a visitantes registrados.', |
|
| 581 | - 'pass_indiquez_cidessous' => 'Informe abaixo o endereço de e-mail com o qual você se cadastrou anteriormente. Você receberá um e-mail lhe indicando os procedimentos a seguir para recuperar o seu acesso.', |
|
| 582 | - 'pass_mail_passcookie' => '(esta é uma mensagem automática) |
|
| 571 | + // P |
|
| 572 | + 'pass_choix_pass' => 'Por favor, escolha a sua nova senha:', |
|
| 573 | + 'pass_erreur' => 'Erro', |
|
| 574 | + 'pass_erreur_acces_refuse' => '<b>Erro:</b> você não tem mais acesso a este site.', |
|
| 575 | + 'pass_erreur_code_inconnu' => '<b>Erro:</b> este login não corresponde a nenhum visitante com permissão de acesso a este site.', |
|
| 576 | + 'pass_erreur_non_enregistre' => '<b>Erro:</b> o e-mail <tt>@email_oubli@</tt> não está cadastrado neste site.', |
|
| 577 | + 'pass_erreur_non_valide' => '<b>Erro:</b> o e-mail <tt>@email_oubli@</tt> não é válido!', |
|
| 578 | + 'pass_erreur_probleme_technique' => '<b>Erro:</b> este e-mail não pôde ser enviado devido a um problema técnico.', |
|
| 579 | + 'pass_espace_prive_bla' => 'O espaço privado deste site é aberto aos visitantes, após inscrição. Uma vez cadastrado, você poderá consultar as matérias em fase de redação, propor a publicação de novas matérias e participar de todos os fóruns.', |
|
| 580 | + 'pass_forum_bla' => 'Você soliciou a participação num fórum reservado a visitantes registrados.', |
|
| 581 | + 'pass_indiquez_cidessous' => 'Informe abaixo o endereço de e-mail com o qual você se cadastrou anteriormente. Você receberá um e-mail lhe indicando os procedimentos a seguir para recuperar o seu acesso.', |
|
| 582 | + 'pass_mail_passcookie' => '(esta é uma mensagem automática) |
|
| 583 | 583 | Para recuperar o seu acesso ao site |
| 584 | 584 | @nom_site_spip@ (@adresse_site@) |
| 585 | 585 | |
@@ -591,136 +591,136 @@ discard block |
||
| 591 | 591 | e reconectar-se com o site. |
| 592 | 592 | |
| 593 | 593 | ', |
| 594 | - 'pass_mot_oublie' => 'Senha esquecida', |
|
| 595 | - 'pass_nouveau_enregistre' => 'Sua nova senha foi cadastrada.', |
|
| 596 | - 'pass_nouveau_pass' => 'Nova senha', |
|
| 597 | - 'pass_ok' => 'OK', |
|
| 598 | - 'pass_oubli_mot' => 'Esquecimento de senha', |
|
| 599 | - 'pass_procedure_changer' => 'Para alterar a sua senha, por favor informe o endereço de e-mail associado à sua conta.', |
|
| 600 | - 'pass_quitter_fenetre' => 'Fechar esta janela', |
|
| 601 | - 'pass_rappel_login' => 'Lembrete: seu login é «@login@».', |
|
| 602 | - 'pass_recevoir_mail' => 'Um link para redefinição da sua senha foi enviado para o seu endereço de e-mail (se ele for válido).', |
|
| 603 | - 'pass_retour_public' => 'Voltar para o site público', |
|
| 604 | - 'pass_rien_a_faire_ici' => 'Nada a fazer aqui.', |
|
| 605 | - 'pass_vousinscrire' => 'Cadastrar-se neste site', |
|
| 606 | - 'precedent' => 'precedente', |
|
| 607 | - 'previsualisation' => 'Visualização', |
|
| 608 | - 'previsualiser' => 'Visualizar', |
|
| 594 | + 'pass_mot_oublie' => 'Senha esquecida', |
|
| 595 | + 'pass_nouveau_enregistre' => 'Sua nova senha foi cadastrada.', |
|
| 596 | + 'pass_nouveau_pass' => 'Nova senha', |
|
| 597 | + 'pass_ok' => 'OK', |
|
| 598 | + 'pass_oubli_mot' => 'Esquecimento de senha', |
|
| 599 | + 'pass_procedure_changer' => 'Para alterar a sua senha, por favor informe o endereço de e-mail associado à sua conta.', |
|
| 600 | + 'pass_quitter_fenetre' => 'Fechar esta janela', |
|
| 601 | + 'pass_rappel_login' => 'Lembrete: seu login é «@login@».', |
|
| 602 | + 'pass_recevoir_mail' => 'Um link para redefinição da sua senha foi enviado para o seu endereço de e-mail (se ele for válido).', |
|
| 603 | + 'pass_retour_public' => 'Voltar para o site público', |
|
| 604 | + 'pass_rien_a_faire_ici' => 'Nada a fazer aqui.', |
|
| 605 | + 'pass_vousinscrire' => 'Cadastrar-se neste site', |
|
| 606 | + 'precedent' => 'precedente', |
|
| 607 | + 'previsualisation' => 'Visualização', |
|
| 608 | + 'previsualiser' => 'Visualizar', |
|
| 609 | 609 | |
| 610 | - // R |
|
| 611 | - 'retour' => 'Voltar', |
|
| 610 | + // R |
|
| 611 | + 'retour' => 'Voltar', |
|
| 612 | 612 | |
| 613 | - // S |
|
| 614 | - 'spip_conforme_dtd' => 'O SPIP considera este documento de acordo com o seu DOCTYPE:', |
|
| 615 | - 'squelette' => 'template', |
|
| 616 | - 'squelette_inclus_ligne' => 'template incluído, linha', |
|
| 617 | - 'squelette_ligne' => 'template, linha', |
|
| 618 | - 'stats_visites_et_popularite' => '@visites@ visitas; popularidade: @popularite@', |
|
| 619 | - 'suivant' => 'seguinte', |
|
| 613 | + // S |
|
| 614 | + 'spip_conforme_dtd' => 'O SPIP considera este documento de acordo com o seu DOCTYPE:', |
|
| 615 | + 'squelette' => 'template', |
|
| 616 | + 'squelette_inclus_ligne' => 'template incluído, linha', |
|
| 617 | + 'squelette_ligne' => 'template, linha', |
|
| 618 | + 'stats_visites_et_popularite' => '@visites@ visitas; popularidade: @popularite@', |
|
| 619 | + 'suivant' => 'seguinte', |
|
| 620 | 620 | |
| 621 | - // T |
|
| 622 | - 'taille_go' => '@taille@ GB', |
|
| 623 | - 'taille_ko' => '@taille@ KB', |
|
| 624 | - 'taille_mo' => '@taille@ MB', |
|
| 625 | - 'taille_octets' => ' @taille@ bytes', |
|
| 626 | - 'texte_actualite_site_1' => 'Quando você estiver mais familiarizado com a interface, clique em «', |
|
| 627 | - 'texte_actualite_site_2' => 'interface completa', |
|
| 628 | - 'texte_actualite_site_3' => '» para abrir mais possibilidades.', |
|
| 629 | - 'texte_creation_automatique_vignette' => 'A criação automática de ícones de visualização está ativada neste site. Se você transferir por este formulário imagens no(s) formato(s) @gd_formats@, elas serão acompanhadas de um ícone com o tamanho máximo de @taille_preview@ pixels.', |
|
| 630 | - 'texte_documents_associes' => 'Os documentos a seguir estão associados à matéria, |
|
| 621 | + // T |
|
| 622 | + 'taille_go' => '@taille@ GB', |
|
| 623 | + 'taille_ko' => '@taille@ KB', |
|
| 624 | + 'taille_mo' => '@taille@ MB', |
|
| 625 | + 'taille_octets' => ' @taille@ bytes', |
|
| 626 | + 'texte_actualite_site_1' => 'Quando você estiver mais familiarizado com a interface, clique em «', |
|
| 627 | + 'texte_actualite_site_2' => 'interface completa', |
|
| 628 | + 'texte_actualite_site_3' => '» para abrir mais possibilidades.', |
|
| 629 | + 'texte_creation_automatique_vignette' => 'A criação automática de ícones de visualização está ativada neste site. Se você transferir por este formulário imagens no(s) formato(s) @gd_formats@, elas serão acompanhadas de um ícone com o tamanho máximo de @taille_preview@ pixels.', |
|
| 630 | + 'texte_documents_associes' => 'Os documentos a seguir estão associados à matéria, |
|
| 631 | 631 | mas eles não foram inseridos diretamente. Dependendo da elaboração dos templates do site público, eles podem aparecer como documentos anexados.', |
| 632 | - 'texte_erreur_mise_niveau_base' => 'Erro da base de dados durante a atualização. |
|
| 632 | + 'texte_erreur_mise_niveau_base' => 'Erro da base de dados durante a atualização. |
|
| 633 | 633 | A imagem <b>@fichier@</b> não passou (matéria @id_article@). |
| 634 | 634 | Anote esta referência, tente novamente a atualização e, finalmente, verifique se as imagens aparecem nas matérias.', |
| 635 | - 'texte_erreur_visiteur' => 'Você tentou acessar o espaço restrito com um login que não tem a permissão necessária.', |
|
| 636 | - 'texte_inc_auth_1' => 'Você se identificou com o login <b>@auth_login@</b>, mas ele não consta (mais) na base. |
|
| 635 | + 'texte_erreur_visiteur' => 'Você tentou acessar o espaço restrito com um login que não tem a permissão necessária.', |
|
| 636 | + 'texte_inc_auth_1' => 'Você se identificou com o login <b>@auth_login@</b>, mas ele não consta (mais) na base. |
|
| 637 | 637 | Tente se', |
| 638 | - 'texte_inc_auth_2' => 'reconectar', |
|
| 639 | - 'texte_inc_auth_3' => ', após ter eventualmente saído e reiniciado o seu navegador.', |
|
| 640 | - 'texte_inc_config' => 'As modificações efetuadas nestas páginas influem consideravelmente no funcionamento do seu site. É recomendável não intervir enquanto você não estiver familiarizado com o funcionamento do sistema SPIP.<br /><br /><b>Geralmente, é fortemente aconselhável deixar a carga destas páginas para o webmaster principal do seu site.</b>', |
|
| 641 | - 'texte_inc_meta_1' => 'O sistema encontrou um erro durante a escrita do arquivo <code>@fichier@</code>. Como administrador do site, queira por favor,', |
|
| 642 | - 'texte_inc_meta_2' => 'Verificar os direitos de escrita', |
|
| 643 | - 'texte_inc_meta_3' => 'no diretório <code>@repertoire@</code>.', |
|
| 644 | - 'texte_statut_en_cours_redaction' => 'em fase de redação', |
|
| 645 | - 'texte_statut_poubelle' => 'na lixeira', |
|
| 646 | - 'texte_statut_propose_evaluation' => 'proposto para avaliação', |
|
| 647 | - 'texte_statut_publie' => 'publicado online', |
|
| 648 | - 'texte_statut_refuse' => 'recusado', |
|
| 649 | - 'titre_ajouter_mot_cle' => 'INCLUIR UMA PALAVRA-CHAVE:', |
|
| 650 | - 'titre_cadre_raccourcis' => 'ATALHOS:', |
|
| 651 | - 'titre_changer_couleur_interface' => 'Alterar a côr da interface', |
|
| 652 | - 'titre_image_admin_article' => 'Você pode administrar esta matéria', |
|
| 653 | - 'titre_image_administrateur' => 'Administrador', |
|
| 654 | - 'titre_image_aide' => 'Ajuda sobre este elemento', |
|
| 655 | - 'titre_image_auteur_supprime' => 'Autor excluído', |
|
| 656 | - 'titre_image_redacteur' => 'Redator sem acesso', |
|
| 657 | - 'titre_image_redacteur_02' => 'Redator', |
|
| 658 | - 'titre_image_selecteur' => 'Ver a lista', |
|
| 659 | - 'titre_image_visiteur' => 'Visitante', |
|
| 660 | - 'titre_joindre_document' => 'INCLUIR UM DOCUMENTO', |
|
| 661 | - 'titre_mots_cles' => 'PALAVRAS-CHAVE', |
|
| 662 | - 'titre_probleme_technique' => 'Atenção: um problema técnico (servidor SQL) impede o acesso a esta parte do site. Agradecemos sua compreensão.', |
|
| 663 | - 'titre_publier_document' => 'PUBLICAR UM DOCUMENTO NESTA SEÇÃO', |
|
| 664 | - 'titre_signatures_attente' => 'Assinaturas aguardando validação', |
|
| 665 | - 'titre_signatures_confirmees' => 'Assinaturas confirmadas', |
|
| 666 | - 'titre_statistiques' => 'Estatísticas do site', |
|
| 667 | - 'titre_titre_document' => 'Título do documento:', |
|
| 668 | - 'todo' => 'breve', |
|
| 669 | - 'trad_definir_reference' => 'Escolher "@titre@" como referência das traduções', |
|
| 670 | - 'trad_reference' => '(matéria das traduções)', |
|
| 638 | + 'texte_inc_auth_2' => 'reconectar', |
|
| 639 | + 'texte_inc_auth_3' => ', após ter eventualmente saído e reiniciado o seu navegador.', |
|
| 640 | + 'texte_inc_config' => 'As modificações efetuadas nestas páginas influem consideravelmente no funcionamento do seu site. É recomendável não intervir enquanto você não estiver familiarizado com o funcionamento do sistema SPIP.<br /><br /><b>Geralmente, é fortemente aconselhável deixar a carga destas páginas para o webmaster principal do seu site.</b>', |
|
| 641 | + 'texte_inc_meta_1' => 'O sistema encontrou um erro durante a escrita do arquivo <code>@fichier@</code>. Como administrador do site, queira por favor,', |
|
| 642 | + 'texte_inc_meta_2' => 'Verificar os direitos de escrita', |
|
| 643 | + 'texte_inc_meta_3' => 'no diretório <code>@repertoire@</code>.', |
|
| 644 | + 'texte_statut_en_cours_redaction' => 'em fase de redação', |
|
| 645 | + 'texte_statut_poubelle' => 'na lixeira', |
|
| 646 | + 'texte_statut_propose_evaluation' => 'proposto para avaliação', |
|
| 647 | + 'texte_statut_publie' => 'publicado online', |
|
| 648 | + 'texte_statut_refuse' => 'recusado', |
|
| 649 | + 'titre_ajouter_mot_cle' => 'INCLUIR UMA PALAVRA-CHAVE:', |
|
| 650 | + 'titre_cadre_raccourcis' => 'ATALHOS:', |
|
| 651 | + 'titre_changer_couleur_interface' => 'Alterar a côr da interface', |
|
| 652 | + 'titre_image_admin_article' => 'Você pode administrar esta matéria', |
|
| 653 | + 'titre_image_administrateur' => 'Administrador', |
|
| 654 | + 'titre_image_aide' => 'Ajuda sobre este elemento', |
|
| 655 | + 'titre_image_auteur_supprime' => 'Autor excluído', |
|
| 656 | + 'titre_image_redacteur' => 'Redator sem acesso', |
|
| 657 | + 'titre_image_redacteur_02' => 'Redator', |
|
| 658 | + 'titre_image_selecteur' => 'Ver a lista', |
|
| 659 | + 'titre_image_visiteur' => 'Visitante', |
|
| 660 | + 'titre_joindre_document' => 'INCLUIR UM DOCUMENTO', |
|
| 661 | + 'titre_mots_cles' => 'PALAVRAS-CHAVE', |
|
| 662 | + 'titre_probleme_technique' => 'Atenção: um problema técnico (servidor SQL) impede o acesso a esta parte do site. Agradecemos sua compreensão.', |
|
| 663 | + 'titre_publier_document' => 'PUBLICAR UM DOCUMENTO NESTA SEÇÃO', |
|
| 664 | + 'titre_signatures_attente' => 'Assinaturas aguardando validação', |
|
| 665 | + 'titre_signatures_confirmees' => 'Assinaturas confirmadas', |
|
| 666 | + 'titre_statistiques' => 'Estatísticas do site', |
|
| 667 | + 'titre_titre_document' => 'Título do documento:', |
|
| 668 | + 'todo' => 'breve', |
|
| 669 | + 'trad_definir_reference' => 'Escolher "@titre@" como referência das traduções', |
|
| 670 | + 'trad_reference' => '(matéria das traduções)', |
|
| 671 | 671 | |
| 672 | - // U |
|
| 673 | - 'upload_limit' => 'Este arquivo é grande demais para o servidor; o tamanho máximo autorizado para <i>upload</i> é de @max@.', |
|
| 672 | + // U |
|
| 673 | + 'upload_limit' => 'Este arquivo é grande demais para o servidor; o tamanho máximo autorizado para <i>upload</i> é de @max@.', |
|
| 674 | 674 | |
| 675 | - // Z |
|
| 676 | - 'zbug_balise_b_aval' => ': tag B colocada após BOUCLE', |
|
| 677 | - 'zbug_balise_inexistante' => 'Tag @balise@ mal declarada para @from@', |
|
| 678 | - 'zbug_balise_sans_argument' => 'Falta um arqumento na tag @balise@', |
|
| 679 | - 'zbug_boucle' => 'laço', |
|
| 680 | - 'zbug_boucle_recursive_undef' => 'Laço recursivo não definido: @nom@', |
|
| 681 | - 'zbug_calcul' => 'cálculo', |
|
| 682 | - 'zbug_champ_hors_boucle' => 'Campo @champ@ fora do laço', |
|
| 683 | - 'zbug_champ_hors_critere' => 'Campo @champ@ fora do critério @critere@', |
|
| 684 | - 'zbug_champ_hors_motif' => 'Campo @champ@ fora de um contexto @motif@', |
|
| 685 | - 'zbug_code' => 'código', |
|
| 686 | - 'zbug_critere_inconnu' => 'Critério @critere@ desconhecido', |
|
| 687 | - 'zbug_critere_sur_table_sans_cle_primaire' => '{@critere@} em uma tabela sem chave primária atômica', |
|
| 688 | - 'zbug_distant_interdit' => 'Externa interdita', |
|
| 689 | - 'zbug_doublon_table_sans_cle_primaire' => 'Duplicação em tabela sem chave primária atômica', |
|
| 690 | - 'zbug_doublon_table_sans_index' => 'Doublons em uma tabela sem index', |
|
| 691 | - 'zbug_erreur_boucle_double' => 'Dupla definição do laço @id@', |
|
| 692 | - 'zbug_erreur_boucle_fermant' => 'Laço @id@ não fechado', |
|
| 693 | - 'zbug_erreur_boucle_syntaxe' => 'Sintaxe do laço @id@ está incorreta', |
|
| 694 | - 'zbug_erreur_compilation' => 'Erro de compilação', |
|
| 695 | - 'zbug_erreur_execution_page' => 'Erro de execução', |
|
| 696 | - 'zbug_erreur_filtre' => 'Filtro @filtre@ não definido', |
|
| 697 | - 'zbug_erreur_filtre_nbarg_min' => 'Filtro @filtre@: falta(m) @nb@ argumento(s)', |
|
| 698 | - 'zbug_erreur_meme_parent' => 'O critério {meme_parent} aplica-se exclusivamente aos laços (FORUMS) ou (RUBRIQUES)', |
|
| 699 | - 'zbug_erreur_squelette' => 'Erro(s) no template', |
|
| 700 | - 'zbug_hors_compilation' => 'Fora de Compilação', |
|
| 701 | - 'zbug_info_erreur_squelette' => 'Erro no site', |
|
| 702 | - 'zbug_inversion_ordre_inexistant' => 'Inversão de uma ordem inexistente', |
|
| 703 | - 'zbug_pagination_sans_critere' => 'Tag #PAGINATION sem critério {pagination} ou usada dentro de uma boucle recursiva', |
|
| 704 | - 'zbug_parametres_inclus_incorrects' => 'Parâmetro de inclusão incorreto: @param@', |
|
| 705 | - 'zbug_profile' => 'Tempo de processamento: @time@', |
|
| 706 | - 'zbug_resultat' => 'resultado', |
|
| 707 | - 'zbug_serveur_indefini' => 'Sevidor SQL não definido', |
|
| 708 | - 'zbug_statistiques' => 'Estatísticas das requisições SQL classificadas por duração', |
|
| 709 | - 'zbug_table_inconnue' => 'Tabela SQL «@table@» desconhecida', |
|
| 710 | - 'zxml_connus_attributs' => 'atributos conhecidos', |
|
| 711 | - 'zxml_de' => 'de', |
|
| 712 | - 'zxml_inconnu_attribut' => 'atributo desconhecido', |
|
| 713 | - 'zxml_inconnu_balise' => 'tag desconhecida', |
|
| 714 | - 'zxml_inconnu_entite' => 'entidade desconhecida', |
|
| 715 | - 'zxml_inconnu_id' => 'ID desconhecida', |
|
| 716 | - 'zxml_mais_de' => 'mas de', |
|
| 717 | - 'zxml_non_conforme' => 'não está de acordo com o motivo', |
|
| 718 | - 'zxml_non_fils' => 'não é filho de', |
|
| 719 | - 'zxml_nonvide_balise' => 'tag não vazia', |
|
| 720 | - 'zxml_obligatoire_attribut' => 'atributo obrigatório mas ausente em', |
|
| 721 | - 'zxml_succession_fils_incorrecte' => 'sucessão de filhos incorreta', |
|
| 722 | - 'zxml_survoler' => 'sobrepor para ver os corretos', |
|
| 723 | - 'zxml_valeur_attribut' => 'valor do atributo', |
|
| 724 | - 'zxml_vide_balise' => 'tag vazia', |
|
| 725 | - 'zxml_vu' => 'previsualização' |
|
| 675 | + // Z |
|
| 676 | + 'zbug_balise_b_aval' => ': tag B colocada após BOUCLE', |
|
| 677 | + 'zbug_balise_inexistante' => 'Tag @balise@ mal declarada para @from@', |
|
| 678 | + 'zbug_balise_sans_argument' => 'Falta um arqumento na tag @balise@', |
|
| 679 | + 'zbug_boucle' => 'laço', |
|
| 680 | + 'zbug_boucle_recursive_undef' => 'Laço recursivo não definido: @nom@', |
|
| 681 | + 'zbug_calcul' => 'cálculo', |
|
| 682 | + 'zbug_champ_hors_boucle' => 'Campo @champ@ fora do laço', |
|
| 683 | + 'zbug_champ_hors_critere' => 'Campo @champ@ fora do critério @critere@', |
|
| 684 | + 'zbug_champ_hors_motif' => 'Campo @champ@ fora de um contexto @motif@', |
|
| 685 | + 'zbug_code' => 'código', |
|
| 686 | + 'zbug_critere_inconnu' => 'Critério @critere@ desconhecido', |
|
| 687 | + 'zbug_critere_sur_table_sans_cle_primaire' => '{@critere@} em uma tabela sem chave primária atômica', |
|
| 688 | + 'zbug_distant_interdit' => 'Externa interdita', |
|
| 689 | + 'zbug_doublon_table_sans_cle_primaire' => 'Duplicação em tabela sem chave primária atômica', |
|
| 690 | + 'zbug_doublon_table_sans_index' => 'Doublons em uma tabela sem index', |
|
| 691 | + 'zbug_erreur_boucle_double' => 'Dupla definição do laço @id@', |
|
| 692 | + 'zbug_erreur_boucle_fermant' => 'Laço @id@ não fechado', |
|
| 693 | + 'zbug_erreur_boucle_syntaxe' => 'Sintaxe do laço @id@ está incorreta', |
|
| 694 | + 'zbug_erreur_compilation' => 'Erro de compilação', |
|
| 695 | + 'zbug_erreur_execution_page' => 'Erro de execução', |
|
| 696 | + 'zbug_erreur_filtre' => 'Filtro @filtre@ não definido', |
|
| 697 | + 'zbug_erreur_filtre_nbarg_min' => 'Filtro @filtre@: falta(m) @nb@ argumento(s)', |
|
| 698 | + 'zbug_erreur_meme_parent' => 'O critério {meme_parent} aplica-se exclusivamente aos laços (FORUMS) ou (RUBRIQUES)', |
|
| 699 | + 'zbug_erreur_squelette' => 'Erro(s) no template', |
|
| 700 | + 'zbug_hors_compilation' => 'Fora de Compilação', |
|
| 701 | + 'zbug_info_erreur_squelette' => 'Erro no site', |
|
| 702 | + 'zbug_inversion_ordre_inexistant' => 'Inversão de uma ordem inexistente', |
|
| 703 | + 'zbug_pagination_sans_critere' => 'Tag #PAGINATION sem critério {pagination} ou usada dentro de uma boucle recursiva', |
|
| 704 | + 'zbug_parametres_inclus_incorrects' => 'Parâmetro de inclusão incorreto: @param@', |
|
| 705 | + 'zbug_profile' => 'Tempo de processamento: @time@', |
|
| 706 | + 'zbug_resultat' => 'resultado', |
|
| 707 | + 'zbug_serveur_indefini' => 'Sevidor SQL não definido', |
|
| 708 | + 'zbug_statistiques' => 'Estatísticas das requisições SQL classificadas por duração', |
|
| 709 | + 'zbug_table_inconnue' => 'Tabela SQL «@table@» desconhecida', |
|
| 710 | + 'zxml_connus_attributs' => 'atributos conhecidos', |
|
| 711 | + 'zxml_de' => 'de', |
|
| 712 | + 'zxml_inconnu_attribut' => 'atributo desconhecido', |
|
| 713 | + 'zxml_inconnu_balise' => 'tag desconhecida', |
|
| 714 | + 'zxml_inconnu_entite' => 'entidade desconhecida', |
|
| 715 | + 'zxml_inconnu_id' => 'ID desconhecida', |
|
| 716 | + 'zxml_mais_de' => 'mas de', |
|
| 717 | + 'zxml_non_conforme' => 'não está de acordo com o motivo', |
|
| 718 | + 'zxml_non_fils' => 'não é filho de', |
|
| 719 | + 'zxml_nonvide_balise' => 'tag não vazia', |
|
| 720 | + 'zxml_obligatoire_attribut' => 'atributo obrigatório mas ausente em', |
|
| 721 | + 'zxml_succession_fils_incorrecte' => 'sucessão de filhos incorreta', |
|
| 722 | + 'zxml_survoler' => 'sobrepor para ver os corretos', |
|
| 723 | + 'zxml_valeur_attribut' => 'valor do atributo', |
|
| 724 | + 'zxml_vide_balise' => 'tag vazia', |
|
| 725 | + 'zxml_vu' => 'previsualização' |
|
| 726 | 726 | ); |