@@ -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 | /** |
@@ -33,36 +33,36 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | function action_editer_objet_dist($id = null, $objet = null, $set = null) { |
| 35 | 35 | |
| 36 | - // appel direct depuis une url avec arg = "objet/id" |
|
| 37 | - if (is_null($id) or is_null($objet)) { |
|
| 38 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 39 | - $arg = $securiser_action(); |
|
| 40 | - [$objet, $id] = array_pad(explode('/', $arg, 2), 2, null); |
|
| 41 | - } |
|
| 42 | - |
|
| 43 | - // appel incorrect ou depuis une url erronnée interdit |
|
| 44 | - if (is_null($id) or is_null($objet)) { |
|
| 45 | - include_spip('inc/minipres'); |
|
| 46 | - echo minipres(_T('info_acces_interdit')); |
|
| 47 | - die(); |
|
| 48 | - } |
|
| 49 | - |
|
| 50 | - // si id n'est pas un nombre, c'est une creation |
|
| 51 | - // mais on verifie qu'on a toutes les donnees qu'il faut. |
|
| 52 | - if (!$id = intval($id)) { |
|
| 53 | - // on ne sait pas si un parent existe mais on essaye |
|
| 54 | - $id_parent = _request('id_parent'); |
|
| 55 | - $id = objet_inserer($objet, $id_parent); |
|
| 56 | - } |
|
| 57 | - |
|
| 58 | - if (!($id = intval($id)) > 0) { |
|
| 59 | - return [$id, _L('echec enregistrement en base')]; |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - // Enregistre l'envoi dans la BD |
|
| 63 | - $err = objet_modifier($objet, $id, $set); |
|
| 64 | - |
|
| 65 | - return [$id, $err]; |
|
| 36 | + // appel direct depuis une url avec arg = "objet/id" |
|
| 37 | + if (is_null($id) or is_null($objet)) { |
|
| 38 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 39 | + $arg = $securiser_action(); |
|
| 40 | + [$objet, $id] = array_pad(explode('/', $arg, 2), 2, null); |
|
| 41 | + } |
|
| 42 | + |
|
| 43 | + // appel incorrect ou depuis une url erronnée interdit |
|
| 44 | + if (is_null($id) or is_null($objet)) { |
|
| 45 | + include_spip('inc/minipres'); |
|
| 46 | + echo minipres(_T('info_acces_interdit')); |
|
| 47 | + die(); |
|
| 48 | + } |
|
| 49 | + |
|
| 50 | + // si id n'est pas un nombre, c'est une creation |
|
| 51 | + // mais on verifie qu'on a toutes les donnees qu'il faut. |
|
| 52 | + if (!$id = intval($id)) { |
|
| 53 | + // on ne sait pas si un parent existe mais on essaye |
|
| 54 | + $id_parent = _request('id_parent'); |
|
| 55 | + $id = objet_inserer($objet, $id_parent); |
|
| 56 | + } |
|
| 57 | + |
|
| 58 | + if (!($id = intval($id)) > 0) { |
|
| 59 | + return [$id, _L('echec enregistrement en base')]; |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + // Enregistre l'envoi dans la BD |
|
| 63 | + $err = objet_modifier($objet, $id, $set); |
|
| 64 | + |
|
| 65 | + return [$id, $err]; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -75,85 +75,85 @@ discard block |
||
| 75 | 75 | * @return mixed|string |
| 76 | 76 | */ |
| 77 | 77 | function objet_modifier($objet, $id, $set = null) { |
| 78 | - if (($t = objet_type($objet)) !== $objet) { |
|
| 79 | - spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 80 | - $objet = $t; |
|
| 81 | - } |
|
| 82 | - if ( |
|
| 83 | - include_spip('action/editer_' . $objet) |
|
| 84 | - and function_exists($modifier = $objet . '_modifier') |
|
| 85 | - ) { |
|
| 86 | - return $modifier($id, $set); |
|
| 87 | - } |
|
| 88 | - |
|
| 89 | - $table_sql = table_objet_sql($objet); |
|
| 90 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 91 | - $desc = $trouver_table($table_sql); |
|
| 92 | - if (!$desc or !isset($desc['field'])) { |
|
| 93 | - spip_log("Objet $objet inconnu dans objet_modifier", 'editer' . _LOG_ERREUR); |
|
| 94 | - |
|
| 95 | - return _L("Erreur objet $objet inconnu"); |
|
| 96 | - } |
|
| 97 | - include_spip('inc/modifier'); |
|
| 98 | - |
|
| 99 | - $champ_date = ''; |
|
| 100 | - if (isset($desc['date']) and $desc['date']) { |
|
| 101 | - $champ_date = $desc['date']; |
|
| 102 | - } elseif (isset($desc['field']['date'])) { |
|
| 103 | - $champ_date = 'date'; |
|
| 104 | - } |
|
| 105 | - |
|
| 106 | - $include_list = array_keys($desc['field']); |
|
| 107 | - // on ne traite pas la cle primaire par defaut, notamment car |
|
| 108 | - // sur une creation, id_x vaut 'oui', et serait enregistre en id_x=0 dans la base |
|
| 109 | - $include_list = array_diff($include_list, [$desc['key']['PRIMARY KEY']]); |
|
| 110 | - |
|
| 111 | - if (isset($desc['champs_editables']) and is_array($desc['champs_editables'])) { |
|
| 112 | - $include_list = $desc['champs_editables']; |
|
| 113 | - } |
|
| 114 | - $c = collecter_requests( |
|
| 115 | - // include list |
|
| 116 | - $include_list, |
|
| 117 | - // exclude list |
|
| 118 | - [$champ_date, 'statut', 'id_parent', 'id_secteur'], |
|
| 119 | - // donnees eventuellement fournies |
|
| 120 | - $set |
|
| 121 | - ); |
|
| 122 | - |
|
| 123 | - // Si l'objet est publie, invalider les caches et demander sa reindexation |
|
| 124 | - if (objet_test_si_publie($objet, $id)) { |
|
| 125 | - $invalideur = "id='$objet/$id'"; |
|
| 126 | - $indexation = true; |
|
| 127 | - } else { |
|
| 128 | - $invalideur = ''; |
|
| 129 | - $indexation = false; |
|
| 130 | - } |
|
| 131 | - |
|
| 132 | - if ( |
|
| 133 | - $err = objet_modifier_champs( |
|
| 134 | - $objet, |
|
| 135 | - $id, |
|
| 136 | - [ |
|
| 137 | - 'data' => $set, |
|
| 138 | - 'nonvide' => '', |
|
| 139 | - 'invalideur' => $invalideur, |
|
| 140 | - 'indexation' => $indexation, |
|
| 141 | - // champ a mettre a date('Y-m-d H:i:s') s'il y a modif |
|
| 142 | - 'date_modif' => (isset($desc['field']['date_modif']) ? 'date_modif' : '') |
|
| 143 | - ], |
|
| 144 | - $c |
|
| 145 | - ) |
|
| 146 | - ) { |
|
| 147 | - return $err; |
|
| 148 | - } |
|
| 149 | - |
|
| 150 | - // Modification de statut, changement de rubrique ? |
|
| 151 | - // FIXME: Ici lorsqu'un $set est passé, la fonction collecter_requests() retourne tout |
|
| 152 | - // le tableau $set hors liste d’exclusion, mais du coup on a possiblement des champs en trop. |
|
| 153 | - $c = collecter_requests([$champ_date, 'statut', 'id_parent'], [], $set); |
|
| 154 | - $err = objet_instituer($objet, $id, $c); |
|
| 155 | - |
|
| 156 | - return $err; |
|
| 78 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 79 | + spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 80 | + $objet = $t; |
|
| 81 | + } |
|
| 82 | + if ( |
|
| 83 | + include_spip('action/editer_' . $objet) |
|
| 84 | + and function_exists($modifier = $objet . '_modifier') |
|
| 85 | + ) { |
|
| 86 | + return $modifier($id, $set); |
|
| 87 | + } |
|
| 88 | + |
|
| 89 | + $table_sql = table_objet_sql($objet); |
|
| 90 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 91 | + $desc = $trouver_table($table_sql); |
|
| 92 | + if (!$desc or !isset($desc['field'])) { |
|
| 93 | + spip_log("Objet $objet inconnu dans objet_modifier", 'editer' . _LOG_ERREUR); |
|
| 94 | + |
|
| 95 | + return _L("Erreur objet $objet inconnu"); |
|
| 96 | + } |
|
| 97 | + include_spip('inc/modifier'); |
|
| 98 | + |
|
| 99 | + $champ_date = ''; |
|
| 100 | + if (isset($desc['date']) and $desc['date']) { |
|
| 101 | + $champ_date = $desc['date']; |
|
| 102 | + } elseif (isset($desc['field']['date'])) { |
|
| 103 | + $champ_date = 'date'; |
|
| 104 | + } |
|
| 105 | + |
|
| 106 | + $include_list = array_keys($desc['field']); |
|
| 107 | + // on ne traite pas la cle primaire par defaut, notamment car |
|
| 108 | + // sur une creation, id_x vaut 'oui', et serait enregistre en id_x=0 dans la base |
|
| 109 | + $include_list = array_diff($include_list, [$desc['key']['PRIMARY KEY']]); |
|
| 110 | + |
|
| 111 | + if (isset($desc['champs_editables']) and is_array($desc['champs_editables'])) { |
|
| 112 | + $include_list = $desc['champs_editables']; |
|
| 113 | + } |
|
| 114 | + $c = collecter_requests( |
|
| 115 | + // include list |
|
| 116 | + $include_list, |
|
| 117 | + // exclude list |
|
| 118 | + [$champ_date, 'statut', 'id_parent', 'id_secteur'], |
|
| 119 | + // donnees eventuellement fournies |
|
| 120 | + $set |
|
| 121 | + ); |
|
| 122 | + |
|
| 123 | + // Si l'objet est publie, invalider les caches et demander sa reindexation |
|
| 124 | + if (objet_test_si_publie($objet, $id)) { |
|
| 125 | + $invalideur = "id='$objet/$id'"; |
|
| 126 | + $indexation = true; |
|
| 127 | + } else { |
|
| 128 | + $invalideur = ''; |
|
| 129 | + $indexation = false; |
|
| 130 | + } |
|
| 131 | + |
|
| 132 | + if ( |
|
| 133 | + $err = objet_modifier_champs( |
|
| 134 | + $objet, |
|
| 135 | + $id, |
|
| 136 | + [ |
|
| 137 | + 'data' => $set, |
|
| 138 | + 'nonvide' => '', |
|
| 139 | + 'invalideur' => $invalideur, |
|
| 140 | + 'indexation' => $indexation, |
|
| 141 | + // champ a mettre a date('Y-m-d H:i:s') s'il y a modif |
|
| 142 | + 'date_modif' => (isset($desc['field']['date_modif']) ? 'date_modif' : '') |
|
| 143 | + ], |
|
| 144 | + $c |
|
| 145 | + ) |
|
| 146 | + ) { |
|
| 147 | + return $err; |
|
| 148 | + } |
|
| 149 | + |
|
| 150 | + // Modification de statut, changement de rubrique ? |
|
| 151 | + // FIXME: Ici lorsqu'un $set est passé, la fonction collecter_requests() retourne tout |
|
| 152 | + // le tableau $set hors liste d’exclusion, mais du coup on a possiblement des champs en trop. |
|
| 153 | + $c = collecter_requests([$champ_date, 'statut', 'id_parent'], [], $set); |
|
| 154 | + $err = objet_instituer($objet, $id, $c); |
|
| 155 | + |
|
| 156 | + return $err; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -168,135 +168,135 @@ discard block |
||
| 168 | 168 | * @return bool|int |
| 169 | 169 | */ |
| 170 | 170 | function objet_inserer($objet, $id_parent = null, $set = null) { |
| 171 | - $d = null; |
|
| 172 | - if (($t = objet_type($objet)) !== $objet) { |
|
| 173 | - spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 174 | - $objet = $t; |
|
| 175 | - } |
|
| 176 | - if ( |
|
| 177 | - include_spip('action/editer_' . $objet) |
|
| 178 | - and function_exists($inserer = $objet . '_inserer') |
|
| 179 | - ) { |
|
| 180 | - return $inserer($id_parent, $set); |
|
| 181 | - } |
|
| 182 | - |
|
| 183 | - $table_sql = table_objet_sql($objet); |
|
| 184 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 185 | - $desc = $trouver_table($table_sql); |
|
| 186 | - if (!$desc or !isset($desc['field'])) { |
|
| 187 | - return 0; |
|
| 188 | - } |
|
| 189 | - |
|
| 190 | - $lang_rub = ''; |
|
| 191 | - $champs = []; |
|
| 192 | - if (isset($desc['field']['id_rubrique'])) { |
|
| 193 | - // Si id_rubrique vaut 0 ou n'est pas definie, creer l'objet |
|
| 194 | - // dans la premiere rubrique racine |
|
| 195 | - if (!$id_rubrique = intval($id_parent)) { |
|
| 196 | - $row = sql_fetsel('id_rubrique, id_secteur, lang', 'spip_rubriques', 'id_parent=0', '', '0+titre,titre', '1'); |
|
| 197 | - $id_rubrique = $row['id_rubrique']; |
|
| 198 | - } else { |
|
| 199 | - $row = sql_fetsel('lang, id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 200 | - } |
|
| 201 | - |
|
| 202 | - $champs['id_rubrique'] = $id_rubrique; |
|
| 203 | - if (isset($desc['field']['id_secteur'])) { |
|
| 204 | - $champs['id_secteur'] = $row['id_secteur']; |
|
| 205 | - } |
|
| 206 | - $lang_rub = $row['lang']; |
|
| 207 | - } |
|
| 208 | - |
|
| 209 | - // La langue a la creation : si les liens de traduction sont autorises |
|
| 210 | - // dans les rubriques, on essaie avec la langue de l'auteur, |
|
| 211 | - // ou a defaut celle de la rubrique |
|
| 212 | - // Sinon c'est la langue de la rubrique qui est choisie + heritee |
|
| 213 | - if ( |
|
| 214 | - isset($desc['field']['lang']) and !empty($GLOBALS['meta']['multi_objets']) and in_array( |
|
| 215 | - $table_sql, |
|
| 216 | - explode(',', $GLOBALS['meta']['multi_objets']) |
|
| 217 | - ) |
|
| 218 | - ) { |
|
| 219 | - lang_select($GLOBALS['visiteur_session']['lang']); |
|
| 220 | - if ( |
|
| 221 | - in_array( |
|
| 222 | - $GLOBALS['spip_lang'], |
|
| 223 | - explode(',', $GLOBALS['meta']['langues_multilingue']) |
|
| 224 | - ) |
|
| 225 | - ) { |
|
| 226 | - $champs['lang'] = $GLOBALS['spip_lang']; |
|
| 227 | - if (isset($desc['field']['langue_choisie'])) { |
|
| 228 | - $champs['langue_choisie'] = 'oui'; |
|
| 229 | - } |
|
| 230 | - } |
|
| 231 | - } elseif (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) { |
|
| 232 | - $champs['lang'] = ($lang_rub ?: $GLOBALS['meta']['langue_site']); |
|
| 233 | - $champs['langue_choisie'] = 'non'; |
|
| 234 | - } |
|
| 235 | - |
|
| 236 | - if (isset($desc['field']['statut'])) { |
|
| 237 | - if (isset($desc['statut_textes_instituer'])) { |
|
| 238 | - $cles_statut = array_keys($desc['statut_textes_instituer']); |
|
| 239 | - $champs['statut'] = reset($cles_statut); |
|
| 240 | - } else { |
|
| 241 | - $champs['statut'] = 'prepa'; |
|
| 242 | - } |
|
| 243 | - } |
|
| 244 | - |
|
| 245 | - |
|
| 246 | - if ((isset($desc['date']) and $d = $desc['date']) or isset($desc['field'][$d = 'date'])) { |
|
| 247 | - $champs[$d] = date('Y-m-d H:i:s'); |
|
| 248 | - } |
|
| 249 | - |
|
| 250 | - if ($set) { |
|
| 251 | - $champs = array_merge($champs, $set); |
|
| 252 | - } |
|
| 253 | - |
|
| 254 | - // Envoyer aux plugins |
|
| 255 | - $champs = pipeline( |
|
| 256 | - 'pre_insertion', |
|
| 257 | - [ |
|
| 258 | - 'args' => [ |
|
| 259 | - 'table' => $table_sql, |
|
| 260 | - 'id_parent' => $id_parent, |
|
| 261 | - ], |
|
| 262 | - 'data' => $champs |
|
| 263 | - ] |
|
| 264 | - ); |
|
| 265 | - |
|
| 266 | - $id = sql_insertq($table_sql, $champs); |
|
| 267 | - |
|
| 268 | - if ($id) { |
|
| 269 | - // controler si le serveur n'a pas renvoye une erreur |
|
| 270 | - // et associer l'auteur sinon |
|
| 271 | - // si la table n'a pas deja un champ id_auteur |
|
| 272 | - // et si le form n'a pas poste un id_auteur (meme vide, ce qui sert a annuler cette auto association) |
|
| 273 | - if ( |
|
| 274 | - $id > 0 |
|
| 275 | - and !isset($desc['field']['id_auteur']) |
|
| 276 | - ) { |
|
| 277 | - $id_auteur = ((is_null(_request('id_auteur')) and isset($GLOBALS['visiteur_session']['id_auteur'])) ? |
|
| 278 | - $GLOBALS['visiteur_session']['id_auteur'] |
|
| 279 | - : _request('id_auteur')); |
|
| 280 | - if ($id_auteur) { |
|
| 281 | - include_spip('action/editer_auteur'); |
|
| 282 | - auteur_associer($id_auteur, [$objet => $id]); |
|
| 283 | - } |
|
| 284 | - } |
|
| 285 | - |
|
| 286 | - pipeline( |
|
| 287 | - 'post_insertion', |
|
| 288 | - [ |
|
| 289 | - 'args' => [ |
|
| 290 | - 'table' => $table_sql, |
|
| 291 | - 'id_parent' => $id_parent, |
|
| 292 | - 'id_objet' => $id, |
|
| 293 | - ], |
|
| 294 | - 'data' => $champs |
|
| 295 | - ] |
|
| 296 | - ); |
|
| 297 | - } |
|
| 298 | - |
|
| 299 | - return $id; |
|
| 171 | + $d = null; |
|
| 172 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 173 | + spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 174 | + $objet = $t; |
|
| 175 | + } |
|
| 176 | + if ( |
|
| 177 | + include_spip('action/editer_' . $objet) |
|
| 178 | + and function_exists($inserer = $objet . '_inserer') |
|
| 179 | + ) { |
|
| 180 | + return $inserer($id_parent, $set); |
|
| 181 | + } |
|
| 182 | + |
|
| 183 | + $table_sql = table_objet_sql($objet); |
|
| 184 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 185 | + $desc = $trouver_table($table_sql); |
|
| 186 | + if (!$desc or !isset($desc['field'])) { |
|
| 187 | + return 0; |
|
| 188 | + } |
|
| 189 | + |
|
| 190 | + $lang_rub = ''; |
|
| 191 | + $champs = []; |
|
| 192 | + if (isset($desc['field']['id_rubrique'])) { |
|
| 193 | + // Si id_rubrique vaut 0 ou n'est pas definie, creer l'objet |
|
| 194 | + // dans la premiere rubrique racine |
|
| 195 | + if (!$id_rubrique = intval($id_parent)) { |
|
| 196 | + $row = sql_fetsel('id_rubrique, id_secteur, lang', 'spip_rubriques', 'id_parent=0', '', '0+titre,titre', '1'); |
|
| 197 | + $id_rubrique = $row['id_rubrique']; |
|
| 198 | + } else { |
|
| 199 | + $row = sql_fetsel('lang, id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 200 | + } |
|
| 201 | + |
|
| 202 | + $champs['id_rubrique'] = $id_rubrique; |
|
| 203 | + if (isset($desc['field']['id_secteur'])) { |
|
| 204 | + $champs['id_secteur'] = $row['id_secteur']; |
|
| 205 | + } |
|
| 206 | + $lang_rub = $row['lang']; |
|
| 207 | + } |
|
| 208 | + |
|
| 209 | + // La langue a la creation : si les liens de traduction sont autorises |
|
| 210 | + // dans les rubriques, on essaie avec la langue de l'auteur, |
|
| 211 | + // ou a defaut celle de la rubrique |
|
| 212 | + // Sinon c'est la langue de la rubrique qui est choisie + heritee |
|
| 213 | + if ( |
|
| 214 | + isset($desc['field']['lang']) and !empty($GLOBALS['meta']['multi_objets']) and in_array( |
|
| 215 | + $table_sql, |
|
| 216 | + explode(',', $GLOBALS['meta']['multi_objets']) |
|
| 217 | + ) |
|
| 218 | + ) { |
|
| 219 | + lang_select($GLOBALS['visiteur_session']['lang']); |
|
| 220 | + if ( |
|
| 221 | + in_array( |
|
| 222 | + $GLOBALS['spip_lang'], |
|
| 223 | + explode(',', $GLOBALS['meta']['langues_multilingue']) |
|
| 224 | + ) |
|
| 225 | + ) { |
|
| 226 | + $champs['lang'] = $GLOBALS['spip_lang']; |
|
| 227 | + if (isset($desc['field']['langue_choisie'])) { |
|
| 228 | + $champs['langue_choisie'] = 'oui'; |
|
| 229 | + } |
|
| 230 | + } |
|
| 231 | + } elseif (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) { |
|
| 232 | + $champs['lang'] = ($lang_rub ?: $GLOBALS['meta']['langue_site']); |
|
| 233 | + $champs['langue_choisie'] = 'non'; |
|
| 234 | + } |
|
| 235 | + |
|
| 236 | + if (isset($desc['field']['statut'])) { |
|
| 237 | + if (isset($desc['statut_textes_instituer'])) { |
|
| 238 | + $cles_statut = array_keys($desc['statut_textes_instituer']); |
|
| 239 | + $champs['statut'] = reset($cles_statut); |
|
| 240 | + } else { |
|
| 241 | + $champs['statut'] = 'prepa'; |
|
| 242 | + } |
|
| 243 | + } |
|
| 244 | + |
|
| 245 | + |
|
| 246 | + if ((isset($desc['date']) and $d = $desc['date']) or isset($desc['field'][$d = 'date'])) { |
|
| 247 | + $champs[$d] = date('Y-m-d H:i:s'); |
|
| 248 | + } |
|
| 249 | + |
|
| 250 | + if ($set) { |
|
| 251 | + $champs = array_merge($champs, $set); |
|
| 252 | + } |
|
| 253 | + |
|
| 254 | + // Envoyer aux plugins |
|
| 255 | + $champs = pipeline( |
|
| 256 | + 'pre_insertion', |
|
| 257 | + [ |
|
| 258 | + 'args' => [ |
|
| 259 | + 'table' => $table_sql, |
|
| 260 | + 'id_parent' => $id_parent, |
|
| 261 | + ], |
|
| 262 | + 'data' => $champs |
|
| 263 | + ] |
|
| 264 | + ); |
|
| 265 | + |
|
| 266 | + $id = sql_insertq($table_sql, $champs); |
|
| 267 | + |
|
| 268 | + if ($id) { |
|
| 269 | + // controler si le serveur n'a pas renvoye une erreur |
|
| 270 | + // et associer l'auteur sinon |
|
| 271 | + // si la table n'a pas deja un champ id_auteur |
|
| 272 | + // et si le form n'a pas poste un id_auteur (meme vide, ce qui sert a annuler cette auto association) |
|
| 273 | + if ( |
|
| 274 | + $id > 0 |
|
| 275 | + and !isset($desc['field']['id_auteur']) |
|
| 276 | + ) { |
|
| 277 | + $id_auteur = ((is_null(_request('id_auteur')) and isset($GLOBALS['visiteur_session']['id_auteur'])) ? |
|
| 278 | + $GLOBALS['visiteur_session']['id_auteur'] |
|
| 279 | + : _request('id_auteur')); |
|
| 280 | + if ($id_auteur) { |
|
| 281 | + include_spip('action/editer_auteur'); |
|
| 282 | + auteur_associer($id_auteur, [$objet => $id]); |
|
| 283 | + } |
|
| 284 | + } |
|
| 285 | + |
|
| 286 | + pipeline( |
|
| 287 | + 'post_insertion', |
|
| 288 | + [ |
|
| 289 | + 'args' => [ |
|
| 290 | + 'table' => $table_sql, |
|
| 291 | + 'id_parent' => $id_parent, |
|
| 292 | + 'id_objet' => $id, |
|
| 293 | + ], |
|
| 294 | + 'data' => $champs |
|
| 295 | + ] |
|
| 296 | + ); |
|
| 297 | + } |
|
| 298 | + |
|
| 299 | + return $id; |
|
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | |
@@ -313,138 +313,138 @@ discard block |
||
| 313 | 313 | * @return string |
| 314 | 314 | */ |
| 315 | 315 | function objet_instituer($objet, $id, $c, $calcul_rub = true) { |
| 316 | - if (($t = objet_type($objet)) !== $objet) { |
|
| 317 | - spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 318 | - $objet = $t; |
|
| 319 | - } |
|
| 320 | - if ( |
|
| 321 | - include_spip('action/editer_' . $objet) |
|
| 322 | - and function_exists($instituer = $objet . '_instituer') |
|
| 323 | - ) { |
|
| 324 | - return $instituer($id, $c, $calcul_rub); |
|
| 325 | - } |
|
| 326 | - |
|
| 327 | - $table_sql = table_objet_sql($objet); |
|
| 328 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 329 | - $desc = $trouver_table($table_sql); |
|
| 330 | - if (!$desc or !isset($desc['field'])) { |
|
| 331 | - return _L("Impossible d'instituer $objet : non connu en base"); |
|
| 332 | - } |
|
| 333 | - |
|
| 334 | - include_spip('inc/autoriser'); |
|
| 335 | - include_spip('inc/rubriques'); |
|
| 336 | - include_spip('inc/modifier'); |
|
| 337 | - |
|
| 338 | - $sel = []; |
|
| 339 | - $sel[] = (isset($desc['field']['statut']) ? 'statut' : "'' as statut"); |
|
| 340 | - |
|
| 341 | - $champ_date = ''; |
|
| 342 | - if (isset($desc['date']) and $desc['date']) { |
|
| 343 | - $champ_date = $desc['date']; |
|
| 344 | - } elseif (isset($desc['field']['date'])) { |
|
| 345 | - $champ_date = 'date'; |
|
| 346 | - } |
|
| 347 | - |
|
| 348 | - $sel[] = ($champ_date ? "$champ_date as date" : "'' as date"); |
|
| 349 | - $sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : '0 as id_rubrique'); |
|
| 350 | - |
|
| 351 | - $row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . intval($id)); |
|
| 352 | - |
|
| 353 | - $id_rubrique = $row['id_rubrique']; |
|
| 354 | - $statut_ancien = $statut = $row['statut']; |
|
| 355 | - $date_ancienne = $date = $row['date']; |
|
| 356 | - $champs = []; |
|
| 357 | - |
|
| 358 | - $d = ($date and isset($c[$champ_date])) ? $c[$champ_date] : null; |
|
| 359 | - $s = (isset($desc['field']['statut']) and isset($c['statut'])) ? $c['statut'] : $statut; |
|
| 360 | - |
|
| 361 | - // cf autorisations dans inc/instituer_objet |
|
| 362 | - if ($s != $statut or ($d and $d != $date)) { |
|
| 363 | - if ( |
|
| 364 | - $id_rubrique ? |
|
| 365 | - autoriser('publierdans', 'rubrique', $id_rubrique) |
|
| 366 | - : |
|
| 367 | - autoriser('instituer', $objet, $id, null, ['statut' => $s]) |
|
| 368 | - ) { |
|
| 369 | - $statut = $champs['statut'] = $s; |
|
| 370 | - } else { |
|
| 371 | - if ($s != 'publie' and autoriser('modifier', $objet, $id)) { |
|
| 372 | - $statut = $champs['statut'] = $s; |
|
| 373 | - } else { |
|
| 374 | - spip_log("editer_objet $objet #$id refus " . json_encode($c, JSON_THROW_ON_ERROR), 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 375 | - } |
|
| 376 | - } |
|
| 377 | - |
|
| 378 | - // En cas de publication, fixer la date a "maintenant" |
|
| 379 | - // sauf si $c commande autre chose |
|
| 380 | - // ou si l'objet est deja date dans le futur |
|
| 381 | - // En cas de proposition d'un objet (mais pas depublication), idem |
|
| 382 | - if ($champ_date) { |
|
| 383 | - if ( |
|
| 384 | - $champs['statut'] == 'publie' |
|
| 385 | - or ($champs['statut'] == 'prop' and !in_array($statut_ancien, ['publie', 'prop'])) |
|
| 386 | - or $d |
|
| 387 | - ) { |
|
| 388 | - if ($d or strtotime($d = $date) > time()) { |
|
| 389 | - $champs[$champ_date] = $date = $d; |
|
| 390 | - } else { |
|
| 391 | - $champs[$champ_date] = $date = date('Y-m-d H:i:s'); |
|
| 392 | - } |
|
| 393 | - } |
|
| 394 | - } |
|
| 395 | - } |
|
| 396 | - |
|
| 397 | - // Verifier que la rubrique demandee existe et est differente |
|
| 398 | - // de la rubrique actuelle |
|
| 399 | - if ( |
|
| 400 | - $id_rubrique |
|
| 401 | - and isset($c['id_parent']) |
|
| 402 | - and $id_parent = $c['id_parent'] |
|
| 403 | - and $id_parent != $id_rubrique |
|
| 404 | - and (sql_fetsel('1', 'spip_rubriques', 'id_rubrique=' . intval($id_parent))) |
|
| 405 | - ) { |
|
| 406 | - $champs['id_rubrique'] = $id_parent; |
|
| 407 | - |
|
| 408 | - // si l'objet etait publie |
|
| 409 | - // et que le demandeur n'est pas admin de la rubrique |
|
| 410 | - // repasser l'objet en statut 'propose'. |
|
| 411 | - if ( |
|
| 412 | - $statut == 'publie' |
|
| 413 | - and !autoriser('publierdans', 'rubrique', $id_rubrique) |
|
| 414 | - ) { |
|
| 415 | - $champs['statut'] = 'prop'; |
|
| 416 | - } |
|
| 417 | - } |
|
| 418 | - |
|
| 419 | - |
|
| 420 | - // Envoyer aux plugins |
|
| 421 | - $champs = pipeline( |
|
| 422 | - 'pre_edition', |
|
| 423 | - [ |
|
| 424 | - 'args' => [ |
|
| 425 | - 'table' => $table_sql, |
|
| 426 | - 'id_objet' => $id, |
|
| 427 | - 'action' => 'instituer', |
|
| 428 | - 'statut_ancien' => $statut_ancien, |
|
| 429 | - 'date_ancienne' => $date_ancienne, |
|
| 430 | - 'id_parent_ancien' => $id_rubrique, |
|
| 431 | - ], |
|
| 432 | - 'data' => $champs |
|
| 433 | - ] |
|
| 434 | - ); |
|
| 435 | - |
|
| 436 | - if (!(is_countable($champs) ? count($champs) : 0)) { |
|
| 437 | - return ''; |
|
| 438 | - } |
|
| 439 | - |
|
| 440 | - // Envoyer les modifs. |
|
| 441 | - objet_editer_heritage($objet, $id, $id_rubrique, $statut_ancien, $champs, $calcul_rub); |
|
| 442 | - |
|
| 443 | - // Invalider les caches |
|
| 444 | - include_spip('inc/invalideur'); |
|
| 445 | - suivre_invalideur("id='$objet/$id'"); |
|
| 446 | - |
|
| 447 | - /* |
|
| 316 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 317 | + spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 318 | + $objet = $t; |
|
| 319 | + } |
|
| 320 | + if ( |
|
| 321 | + include_spip('action/editer_' . $objet) |
|
| 322 | + and function_exists($instituer = $objet . '_instituer') |
|
| 323 | + ) { |
|
| 324 | + return $instituer($id, $c, $calcul_rub); |
|
| 325 | + } |
|
| 326 | + |
|
| 327 | + $table_sql = table_objet_sql($objet); |
|
| 328 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 329 | + $desc = $trouver_table($table_sql); |
|
| 330 | + if (!$desc or !isset($desc['field'])) { |
|
| 331 | + return _L("Impossible d'instituer $objet : non connu en base"); |
|
| 332 | + } |
|
| 333 | + |
|
| 334 | + include_spip('inc/autoriser'); |
|
| 335 | + include_spip('inc/rubriques'); |
|
| 336 | + include_spip('inc/modifier'); |
|
| 337 | + |
|
| 338 | + $sel = []; |
|
| 339 | + $sel[] = (isset($desc['field']['statut']) ? 'statut' : "'' as statut"); |
|
| 340 | + |
|
| 341 | + $champ_date = ''; |
|
| 342 | + if (isset($desc['date']) and $desc['date']) { |
|
| 343 | + $champ_date = $desc['date']; |
|
| 344 | + } elseif (isset($desc['field']['date'])) { |
|
| 345 | + $champ_date = 'date'; |
|
| 346 | + } |
|
| 347 | + |
|
| 348 | + $sel[] = ($champ_date ? "$champ_date as date" : "'' as date"); |
|
| 349 | + $sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : '0 as id_rubrique'); |
|
| 350 | + |
|
| 351 | + $row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . intval($id)); |
|
| 352 | + |
|
| 353 | + $id_rubrique = $row['id_rubrique']; |
|
| 354 | + $statut_ancien = $statut = $row['statut']; |
|
| 355 | + $date_ancienne = $date = $row['date']; |
|
| 356 | + $champs = []; |
|
| 357 | + |
|
| 358 | + $d = ($date and isset($c[$champ_date])) ? $c[$champ_date] : null; |
|
| 359 | + $s = (isset($desc['field']['statut']) and isset($c['statut'])) ? $c['statut'] : $statut; |
|
| 360 | + |
|
| 361 | + // cf autorisations dans inc/instituer_objet |
|
| 362 | + if ($s != $statut or ($d and $d != $date)) { |
|
| 363 | + if ( |
|
| 364 | + $id_rubrique ? |
|
| 365 | + autoriser('publierdans', 'rubrique', $id_rubrique) |
|
| 366 | + : |
|
| 367 | + autoriser('instituer', $objet, $id, null, ['statut' => $s]) |
|
| 368 | + ) { |
|
| 369 | + $statut = $champs['statut'] = $s; |
|
| 370 | + } else { |
|
| 371 | + if ($s != 'publie' and autoriser('modifier', $objet, $id)) { |
|
| 372 | + $statut = $champs['statut'] = $s; |
|
| 373 | + } else { |
|
| 374 | + spip_log("editer_objet $objet #$id refus " . json_encode($c, JSON_THROW_ON_ERROR), 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 375 | + } |
|
| 376 | + } |
|
| 377 | + |
|
| 378 | + // En cas de publication, fixer la date a "maintenant" |
|
| 379 | + // sauf si $c commande autre chose |
|
| 380 | + // ou si l'objet est deja date dans le futur |
|
| 381 | + // En cas de proposition d'un objet (mais pas depublication), idem |
|
| 382 | + if ($champ_date) { |
|
| 383 | + if ( |
|
| 384 | + $champs['statut'] == 'publie' |
|
| 385 | + or ($champs['statut'] == 'prop' and !in_array($statut_ancien, ['publie', 'prop'])) |
|
| 386 | + or $d |
|
| 387 | + ) { |
|
| 388 | + if ($d or strtotime($d = $date) > time()) { |
|
| 389 | + $champs[$champ_date] = $date = $d; |
|
| 390 | + } else { |
|
| 391 | + $champs[$champ_date] = $date = date('Y-m-d H:i:s'); |
|
| 392 | + } |
|
| 393 | + } |
|
| 394 | + } |
|
| 395 | + } |
|
| 396 | + |
|
| 397 | + // Verifier que la rubrique demandee existe et est differente |
|
| 398 | + // de la rubrique actuelle |
|
| 399 | + if ( |
|
| 400 | + $id_rubrique |
|
| 401 | + and isset($c['id_parent']) |
|
| 402 | + and $id_parent = $c['id_parent'] |
|
| 403 | + and $id_parent != $id_rubrique |
|
| 404 | + and (sql_fetsel('1', 'spip_rubriques', 'id_rubrique=' . intval($id_parent))) |
|
| 405 | + ) { |
|
| 406 | + $champs['id_rubrique'] = $id_parent; |
|
| 407 | + |
|
| 408 | + // si l'objet etait publie |
|
| 409 | + // et que le demandeur n'est pas admin de la rubrique |
|
| 410 | + // repasser l'objet en statut 'propose'. |
|
| 411 | + if ( |
|
| 412 | + $statut == 'publie' |
|
| 413 | + and !autoriser('publierdans', 'rubrique', $id_rubrique) |
|
| 414 | + ) { |
|
| 415 | + $champs['statut'] = 'prop'; |
|
| 416 | + } |
|
| 417 | + } |
|
| 418 | + |
|
| 419 | + |
|
| 420 | + // Envoyer aux plugins |
|
| 421 | + $champs = pipeline( |
|
| 422 | + 'pre_edition', |
|
| 423 | + [ |
|
| 424 | + 'args' => [ |
|
| 425 | + 'table' => $table_sql, |
|
| 426 | + 'id_objet' => $id, |
|
| 427 | + 'action' => 'instituer', |
|
| 428 | + 'statut_ancien' => $statut_ancien, |
|
| 429 | + 'date_ancienne' => $date_ancienne, |
|
| 430 | + 'id_parent_ancien' => $id_rubrique, |
|
| 431 | + ], |
|
| 432 | + 'data' => $champs |
|
| 433 | + ] |
|
| 434 | + ); |
|
| 435 | + |
|
| 436 | + if (!(is_countable($champs) ? count($champs) : 0)) { |
|
| 437 | + return ''; |
|
| 438 | + } |
|
| 439 | + |
|
| 440 | + // Envoyer les modifs. |
|
| 441 | + objet_editer_heritage($objet, $id, $id_rubrique, $statut_ancien, $champs, $calcul_rub); |
|
| 442 | + |
|
| 443 | + // Invalider les caches |
|
| 444 | + include_spip('inc/invalideur'); |
|
| 445 | + suivre_invalideur("id='$objet/$id'"); |
|
| 446 | + |
|
| 447 | + /* |
|
| 448 | 448 | if ($date) { |
| 449 | 449 | $t = strtotime($date); |
| 450 | 450 | $p = @$GLOBALS['meta']['date_prochain_postdate']; |
@@ -453,32 +453,32 @@ discard block |
||
| 453 | 453 | } |
| 454 | 454 | }*/ |
| 455 | 455 | |
| 456 | - // Pipeline |
|
| 457 | - pipeline( |
|
| 458 | - 'post_edition', |
|
| 459 | - [ |
|
| 460 | - 'args' => [ |
|
| 461 | - 'table' => $table_sql, |
|
| 462 | - 'id_objet' => $id, |
|
| 463 | - 'action' => 'instituer', |
|
| 464 | - 'statut_ancien' => $statut_ancien, |
|
| 465 | - 'date_ancienne' => $date_ancienne, |
|
| 466 | - 'id_parent_ancien' => $id_rubrique, |
|
| 467 | - ], |
|
| 468 | - 'data' => $champs |
|
| 469 | - ] |
|
| 470 | - ); |
|
| 471 | - |
|
| 472 | - // Notifications |
|
| 473 | - if ($notifications = charger_fonction('notifications', 'inc')) { |
|
| 474 | - $notifications( |
|
| 475 | - "instituer$objet", |
|
| 476 | - $id, |
|
| 477 | - ['statut' => $statut, 'statut_ancien' => $statut_ancien, 'date' => $date, 'date_ancienne' => $date_ancienne] |
|
| 478 | - ); |
|
| 479 | - } |
|
| 480 | - |
|
| 481 | - return ''; // pas d'erreur |
|
| 456 | + // Pipeline |
|
| 457 | + pipeline( |
|
| 458 | + 'post_edition', |
|
| 459 | + [ |
|
| 460 | + 'args' => [ |
|
| 461 | + 'table' => $table_sql, |
|
| 462 | + 'id_objet' => $id, |
|
| 463 | + 'action' => 'instituer', |
|
| 464 | + 'statut_ancien' => $statut_ancien, |
|
| 465 | + 'date_ancienne' => $date_ancienne, |
|
| 466 | + 'id_parent_ancien' => $id_rubrique, |
|
| 467 | + ], |
|
| 468 | + 'data' => $champs |
|
| 469 | + ] |
|
| 470 | + ); |
|
| 471 | + |
|
| 472 | + // Notifications |
|
| 473 | + if ($notifications = charger_fonction('notifications', 'inc')) { |
|
| 474 | + $notifications( |
|
| 475 | + "instituer$objet", |
|
| 476 | + $id, |
|
| 477 | + ['statut' => $statut, 'statut_ancien' => $statut_ancien, 'date' => $date, 'date_ancienne' => $date_ancienne] |
|
| 478 | + ); |
|
| 479 | + } |
|
| 480 | + |
|
| 481 | + return ''; // pas d'erreur |
|
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | /** |
@@ -493,51 +493,51 @@ discard block |
||
| 493 | 493 | * @return void |
| 494 | 494 | */ |
| 495 | 495 | function objet_editer_heritage($objet, $id, $id_rubrique, $statut, $champs, $cond = true) { |
| 496 | - $table_sql = table_objet_sql($objet); |
|
| 497 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 498 | - $desc = $trouver_table($table_sql); |
|
| 499 | - |
|
| 500 | - // Si on deplace l'objet |
|
| 501 | - // changer aussi son secteur et sa langue (si heritee) |
|
| 502 | - if (isset($champs['id_rubrique'])) { |
|
| 503 | - $row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique=' . sql_quote($champs['id_rubrique'])); |
|
| 504 | - $langue = $row_rub['lang']; |
|
| 505 | - |
|
| 506 | - if (isset($desc['field']['id_secteur'])) { |
|
| 507 | - $champs['id_secteur'] = $row_rub['id_secteur']; |
|
| 508 | - } |
|
| 509 | - |
|
| 510 | - if (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) { |
|
| 511 | - if ( |
|
| 512 | - sql_fetsel( |
|
| 513 | - '1', |
|
| 514 | - $table_sql, |
|
| 515 | - id_table_objet($objet) . '=' . intval($id) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue) |
|
| 516 | - ) |
|
| 517 | - ) { |
|
| 518 | - $champs['lang'] = $langue; |
|
| 519 | - } |
|
| 520 | - } |
|
| 521 | - } |
|
| 522 | - |
|
| 523 | - if (!$champs) { |
|
| 524 | - return; |
|
| 525 | - } |
|
| 526 | - sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . intval($id)); |
|
| 527 | - |
|
| 528 | - // Changer le statut des rubriques concernees |
|
| 529 | - if ($cond) { |
|
| 530 | - include_spip('inc/rubriques'); |
|
| 531 | - //$postdate = ($GLOBALS['meta']["post_dates"] == "non" AND isset($champs['date']) AND (strtotime($champs['date']) < time()))?$champs['date']:false; |
|
| 532 | - $postdate = false; |
|
| 533 | - // On rajoute les infos de l'objet |
|
| 534 | - $infos = [ |
|
| 535 | - 'objet' => $objet, |
|
| 536 | - 'id_objet' => $id, |
|
| 537 | - 'statut_ancien' => $statut, |
|
| 538 | - ]; |
|
| 539 | - calculer_rubriques_if($id_rubrique, $champs, $infos, $postdate); |
|
| 540 | - } |
|
| 496 | + $table_sql = table_objet_sql($objet); |
|
| 497 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 498 | + $desc = $trouver_table($table_sql); |
|
| 499 | + |
|
| 500 | + // Si on deplace l'objet |
|
| 501 | + // changer aussi son secteur et sa langue (si heritee) |
|
| 502 | + if (isset($champs['id_rubrique'])) { |
|
| 503 | + $row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique=' . sql_quote($champs['id_rubrique'])); |
|
| 504 | + $langue = $row_rub['lang']; |
|
| 505 | + |
|
| 506 | + if (isset($desc['field']['id_secteur'])) { |
|
| 507 | + $champs['id_secteur'] = $row_rub['id_secteur']; |
|
| 508 | + } |
|
| 509 | + |
|
| 510 | + if (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) { |
|
| 511 | + if ( |
|
| 512 | + sql_fetsel( |
|
| 513 | + '1', |
|
| 514 | + $table_sql, |
|
| 515 | + id_table_objet($objet) . '=' . intval($id) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue) |
|
| 516 | + ) |
|
| 517 | + ) { |
|
| 518 | + $champs['lang'] = $langue; |
|
| 519 | + } |
|
| 520 | + } |
|
| 521 | + } |
|
| 522 | + |
|
| 523 | + if (!$champs) { |
|
| 524 | + return; |
|
| 525 | + } |
|
| 526 | + sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . intval($id)); |
|
| 527 | + |
|
| 528 | + // Changer le statut des rubriques concernees |
|
| 529 | + if ($cond) { |
|
| 530 | + include_spip('inc/rubriques'); |
|
| 531 | + //$postdate = ($GLOBALS['meta']["post_dates"] == "non" AND isset($champs['date']) AND (strtotime($champs['date']) < time()))?$champs['date']:false; |
|
| 532 | + $postdate = false; |
|
| 533 | + // On rajoute les infos de l'objet |
|
| 534 | + $infos = [ |
|
| 535 | + 'objet' => $objet, |
|
| 536 | + 'id_objet' => $id, |
|
| 537 | + 'statut_ancien' => $statut, |
|
| 538 | + ]; |
|
| 539 | + calculer_rubriques_if($id_rubrique, $champs, $infos, $postdate); |
|
| 540 | + } |
|
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | |
@@ -566,75 +566,75 @@ discard block |
||
| 566 | 566 | * string|int : valeur du champ demande pour l'objet demande |
| 567 | 567 | */ |
| 568 | 568 | function objet_lire($objet, $valeur_id, $options = []) { |
| 569 | - if (($t = objet_type($objet)) !== $objet) { |
|
| 570 | - spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 571 | - $objet = $t; |
|
| 572 | - } |
|
| 573 | - |
|
| 574 | - // tableau du cache des descriptions et des id d'objet (au sens id_xxx). |
|
| 575 | - // Les tableaux sont toujours indexés par le trio [objet][cle][valeur_cle] |
|
| 576 | - static $descriptions = []; |
|
| 577 | - |
|
| 578 | - // On détermine le nom du champ id de la table. |
|
| 579 | - include_spip('base/objets'); |
|
| 580 | - $primary = id_table_objet($objet); |
|
| 581 | - |
|
| 582 | - // On détermine l'id à utiliser. |
|
| 583 | - $champ_id = (!empty($options['champ_id']) ? $options['champ_id'] : $primary); |
|
| 584 | - |
|
| 585 | - // Si l'objet n'a pas encore été stocké, il faut récupérer sa description complète. |
|
| 586 | - if ( |
|
| 587 | - !isset($descriptions[$objet][$champ_id][$valeur_id]) |
|
| 588 | - or (isset($options['force']) and $options['force']) |
|
| 589 | - ) { |
|
| 590 | - // Il est possible pour un type d'objet de fournir une fonction de lecture de tous les champs d'un objet. |
|
| 591 | - if ( |
|
| 592 | - include_spip('action/editer_' . $objet) |
|
| 593 | - and function_exists($lire = "${objet}_lire_champs") |
|
| 594 | - ) { |
|
| 595 | - $valeurs = $lire($objet, $valeur_id, $champ_id); |
|
| 596 | - } else { |
|
| 597 | - // On récupère la table SQL à partir du type d'objet. |
|
| 598 | - $table = table_objet_sql($objet); |
|
| 599 | - |
|
| 600 | - // La condition est appliquée sur le champ désigné par l'utilisateur. |
|
| 601 | - $where = [ |
|
| 602 | - "${champ_id}=" . sql_quote($valeur_id) |
|
| 603 | - ]; |
|
| 604 | - |
|
| 605 | - // Acquisition de tous les champs de l'objet : si l'accès SQL retourne une erreur on renvoie un tableau vide. |
|
| 606 | - $valeurs = sql_fetsel('*', $table, $where); |
|
| 607 | - } |
|
| 608 | - |
|
| 609 | - if (!$valeurs) { |
|
| 610 | - $valeurs = false; |
|
| 611 | - } |
|
| 612 | - |
|
| 613 | - $descriptions[$objet][$champ_id][$valeur_id] = $valeurs; |
|
| 614 | - |
|
| 615 | - if ($champ_id !== $primary and isset($valeurs[$primary])) { |
|
| 616 | - $descriptions[$objet][$primary][$valeurs[$primary]] = $valeurs; |
|
| 617 | - $descriptions[$objet][$champ_id][$valeur_id] = &$descriptions[$objet][$primary][$valeurs[$primary]]; |
|
| 618 | - } |
|
| 619 | - } |
|
| 620 | - |
|
| 621 | - $retour = $descriptions[$objet][$champ_id][$valeur_id]; |
|
| 622 | - |
|
| 623 | - // On ne retourne maintenant que les champs demandés. |
|
| 624 | - // - on détermine les informations à renvoyer. |
|
| 625 | - if ($retour and !empty($options['champs'])) { |
|
| 626 | - $champs = $options['champs']; |
|
| 627 | - // Extraction des seules informations demandées. |
|
| 628 | - // -- si on demande une information unique on renvoie la valeur simple, sinon on renvoie un tableau. |
|
| 629 | - // -- si une information n'est pas un champ valide elle n'est pas renvoyée sans renvoyer d'erreur. |
|
| 630 | - if (is_array($champs)) { |
|
| 631 | - // Tableau des informations valides |
|
| 632 | - $retour = array_intersect_key($retour, array_flip($champs)); |
|
| 633 | - } else { |
|
| 634 | - // Valeur unique demandée. |
|
| 635 | - $retour = ($retour[$champs] ?? false); |
|
| 636 | - } |
|
| 637 | - } |
|
| 638 | - |
|
| 639 | - return $retour; |
|
| 569 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 570 | + spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 571 | + $objet = $t; |
|
| 572 | + } |
|
| 573 | + |
|
| 574 | + // tableau du cache des descriptions et des id d'objet (au sens id_xxx). |
|
| 575 | + // Les tableaux sont toujours indexés par le trio [objet][cle][valeur_cle] |
|
| 576 | + static $descriptions = []; |
|
| 577 | + |
|
| 578 | + // On détermine le nom du champ id de la table. |
|
| 579 | + include_spip('base/objets'); |
|
| 580 | + $primary = id_table_objet($objet); |
|
| 581 | + |
|
| 582 | + // On détermine l'id à utiliser. |
|
| 583 | + $champ_id = (!empty($options['champ_id']) ? $options['champ_id'] : $primary); |
|
| 584 | + |
|
| 585 | + // Si l'objet n'a pas encore été stocké, il faut récupérer sa description complète. |
|
| 586 | + if ( |
|
| 587 | + !isset($descriptions[$objet][$champ_id][$valeur_id]) |
|
| 588 | + or (isset($options['force']) and $options['force']) |
|
| 589 | + ) { |
|
| 590 | + // Il est possible pour un type d'objet de fournir une fonction de lecture de tous les champs d'un objet. |
|
| 591 | + if ( |
|
| 592 | + include_spip('action/editer_' . $objet) |
|
| 593 | + and function_exists($lire = "${objet}_lire_champs") |
|
| 594 | + ) { |
|
| 595 | + $valeurs = $lire($objet, $valeur_id, $champ_id); |
|
| 596 | + } else { |
|
| 597 | + // On récupère la table SQL à partir du type d'objet. |
|
| 598 | + $table = table_objet_sql($objet); |
|
| 599 | + |
|
| 600 | + // La condition est appliquée sur le champ désigné par l'utilisateur. |
|
| 601 | + $where = [ |
|
| 602 | + "${champ_id}=" . sql_quote($valeur_id) |
|
| 603 | + ]; |
|
| 604 | + |
|
| 605 | + // Acquisition de tous les champs de l'objet : si l'accès SQL retourne une erreur on renvoie un tableau vide. |
|
| 606 | + $valeurs = sql_fetsel('*', $table, $where); |
|
| 607 | + } |
|
| 608 | + |
|
| 609 | + if (!$valeurs) { |
|
| 610 | + $valeurs = false; |
|
| 611 | + } |
|
| 612 | + |
|
| 613 | + $descriptions[$objet][$champ_id][$valeur_id] = $valeurs; |
|
| 614 | + |
|
| 615 | + if ($champ_id !== $primary and isset($valeurs[$primary])) { |
|
| 616 | + $descriptions[$objet][$primary][$valeurs[$primary]] = $valeurs; |
|
| 617 | + $descriptions[$objet][$champ_id][$valeur_id] = &$descriptions[$objet][$primary][$valeurs[$primary]]; |
|
| 618 | + } |
|
| 619 | + } |
|
| 620 | + |
|
| 621 | + $retour = $descriptions[$objet][$champ_id][$valeur_id]; |
|
| 622 | + |
|
| 623 | + // On ne retourne maintenant que les champs demandés. |
|
| 624 | + // - on détermine les informations à renvoyer. |
|
| 625 | + if ($retour and !empty($options['champs'])) { |
|
| 626 | + $champs = $options['champs']; |
|
| 627 | + // Extraction des seules informations demandées. |
|
| 628 | + // -- si on demande une information unique on renvoie la valeur simple, sinon on renvoie un tableau. |
|
| 629 | + // -- si une information n'est pas un champ valide elle n'est pas renvoyée sans renvoyer d'erreur. |
|
| 630 | + if (is_array($champs)) { |
|
| 631 | + // Tableau des informations valides |
|
| 632 | + $retour = array_intersect_key($retour, array_flip($champs)); |
|
| 633 | + } else { |
|
| 634 | + // Valeur unique demandée. |
|
| 635 | + $retour = ($retour[$champs] ?? false); |
|
| 636 | + } |
|
| 637 | + } |
|
| 638 | + |
|
| 639 | + return $retour; |
|
| 640 | 640 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -37,41 +37,41 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | function action_editer_auteur_dist($arg = null) { |
| 39 | 39 | |
| 40 | - if (is_null($arg)) { |
|
| 41 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 42 | - $arg = $securiser_action(); |
|
| 43 | - } |
|
| 44 | - |
|
| 45 | - |
|
| 46 | - // si id_auteur n'est pas un nombre, c'est une creation |
|
| 47 | - if (!$id_auteur = intval($arg)) { |
|
| 48 | - if (($id_auteur = auteur_inserer()) > 0) { |
|
| 49 | - # cf. GROS HACK |
|
| 50 | - # recuperer l'eventuel logo charge avant la creation |
|
| 51 | - # ils ont un id = 0-id_auteur de la session |
|
| 52 | - $id_hack = 0 - $GLOBALS['visiteur_session']['id_auteur']; |
|
| 53 | - $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 54 | - foreach (['on', 'off'] as $type) { |
|
| 55 | - if ($logo = $chercher_logo($id_hack, 'id_auteur', $type)) { |
|
| 56 | - if ($logo = reset($logo)) { |
|
| 57 | - rename($logo, str_replace($id_hack, $id_auteur, $logo)); |
|
| 58 | - } |
|
| 59 | - } |
|
| 60 | - } |
|
| 61 | - } |
|
| 62 | - } |
|
| 63 | - |
|
| 64 | - // Enregistre l'envoi dans la BD |
|
| 65 | - $err = ''; |
|
| 66 | - if ($id_auteur > 0) { |
|
| 67 | - $err = auteur_modifier($id_auteur); |
|
| 68 | - } |
|
| 69 | - |
|
| 70 | - if ($err) { |
|
| 71 | - spip_log("echec editeur auteur: $err", _LOG_ERREUR); |
|
| 72 | - } |
|
| 73 | - |
|
| 74 | - return [$id_auteur, $err]; |
|
| 40 | + if (is_null($arg)) { |
|
| 41 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 42 | + $arg = $securiser_action(); |
|
| 43 | + } |
|
| 44 | + |
|
| 45 | + |
|
| 46 | + // si id_auteur n'est pas un nombre, c'est une creation |
|
| 47 | + if (!$id_auteur = intval($arg)) { |
|
| 48 | + if (($id_auteur = auteur_inserer()) > 0) { |
|
| 49 | + # cf. GROS HACK |
|
| 50 | + # recuperer l'eventuel logo charge avant la creation |
|
| 51 | + # ils ont un id = 0-id_auteur de la session |
|
| 52 | + $id_hack = 0 - $GLOBALS['visiteur_session']['id_auteur']; |
|
| 53 | + $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 54 | + foreach (['on', 'off'] as $type) { |
|
| 55 | + if ($logo = $chercher_logo($id_hack, 'id_auteur', $type)) { |
|
| 56 | + if ($logo = reset($logo)) { |
|
| 57 | + rename($logo, str_replace($id_hack, $id_auteur, $logo)); |
|
| 58 | + } |
|
| 59 | + } |
|
| 60 | + } |
|
| 61 | + } |
|
| 62 | + } |
|
| 63 | + |
|
| 64 | + // Enregistre l'envoi dans la BD |
|
| 65 | + $err = ''; |
|
| 66 | + if ($id_auteur > 0) { |
|
| 67 | + $err = auteur_modifier($id_auteur); |
|
| 68 | + } |
|
| 69 | + |
|
| 70 | + if ($err) { |
|
| 71 | + spip_log("echec editeur auteur: $err", _LOG_ERREUR); |
|
| 72 | + } |
|
| 73 | + |
|
| 74 | + return [$id_auteur, $err]; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -88,44 +88,44 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | function auteur_inserer($source = null, $set = null) { |
| 90 | 90 | |
| 91 | - // Ce qu'on va demander comme modifications |
|
| 92 | - $champs = []; |
|
| 93 | - $champs['source'] = $source ?: 'spip'; |
|
| 94 | - |
|
| 95 | - $champs['login'] = ''; |
|
| 96 | - $champs['statut'] = '5poubelle'; // inutilisable tant qu'il n'a pas ete renseigne et institue |
|
| 97 | - $champs['webmestre'] = 'non'; |
|
| 98 | - if (empty($champs['imessage'])) { |
|
| 99 | - $champs['imessage'] = 'oui'; |
|
| 100 | - } |
|
| 101 | - |
|
| 102 | - if ($set) { |
|
| 103 | - $champs = array_merge($champs, $set); |
|
| 104 | - } |
|
| 105 | - |
|
| 106 | - // Envoyer aux plugins |
|
| 107 | - $champs = pipeline( |
|
| 108 | - 'pre_insertion', |
|
| 109 | - [ |
|
| 110 | - 'args' => [ |
|
| 111 | - 'table' => 'spip_auteurs', |
|
| 112 | - ], |
|
| 113 | - 'data' => $champs |
|
| 114 | - ] |
|
| 115 | - ); |
|
| 116 | - $id_auteur = sql_insertq('spip_auteurs', $champs); |
|
| 117 | - pipeline( |
|
| 118 | - 'post_insertion', |
|
| 119 | - [ |
|
| 120 | - 'args' => [ |
|
| 121 | - 'table' => 'spip_auteurs', |
|
| 122 | - 'id_objet' => $id_auteur |
|
| 123 | - ], |
|
| 124 | - 'data' => $champs |
|
| 125 | - ] |
|
| 126 | - ); |
|
| 127 | - |
|
| 128 | - return $id_auteur; |
|
| 91 | + // Ce qu'on va demander comme modifications |
|
| 92 | + $champs = []; |
|
| 93 | + $champs['source'] = $source ?: 'spip'; |
|
| 94 | + |
|
| 95 | + $champs['login'] = ''; |
|
| 96 | + $champs['statut'] = '5poubelle'; // inutilisable tant qu'il n'a pas ete renseigne et institue |
|
| 97 | + $champs['webmestre'] = 'non'; |
|
| 98 | + if (empty($champs['imessage'])) { |
|
| 99 | + $champs['imessage'] = 'oui'; |
|
| 100 | + } |
|
| 101 | + |
|
| 102 | + if ($set) { |
|
| 103 | + $champs = array_merge($champs, $set); |
|
| 104 | + } |
|
| 105 | + |
|
| 106 | + // Envoyer aux plugins |
|
| 107 | + $champs = pipeline( |
|
| 108 | + 'pre_insertion', |
|
| 109 | + [ |
|
| 110 | + 'args' => [ |
|
| 111 | + 'table' => 'spip_auteurs', |
|
| 112 | + ], |
|
| 113 | + 'data' => $champs |
|
| 114 | + ] |
|
| 115 | + ); |
|
| 116 | + $id_auteur = sql_insertq('spip_auteurs', $champs); |
|
| 117 | + pipeline( |
|
| 118 | + 'post_insertion', |
|
| 119 | + [ |
|
| 120 | + 'args' => [ |
|
| 121 | + 'table' => 'spip_auteurs', |
|
| 122 | + 'id_objet' => $id_auteur |
|
| 123 | + ], |
|
| 124 | + 'data' => $champs |
|
| 125 | + ] |
|
| 126 | + ); |
|
| 127 | + |
|
| 128 | + return $id_auteur; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | |
@@ -150,70 +150,70 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | function auteur_modifier($id_auteur, $set = null, $force_update = false) { |
| 152 | 152 | |
| 153 | - include_spip('inc/modifier'); |
|
| 154 | - include_spip('inc/filtres'); |
|
| 155 | - $c = collecter_requests( |
|
| 156 | - // include list |
|
| 157 | - objet_info('auteur', 'champs_editables'), |
|
| 158 | - // exclude list |
|
| 159 | - $force_update ? [] : ['webmestre', 'pass', 'login'], |
|
| 160 | - // donnees eventuellement fournies |
|
| 161 | - $set |
|
| 162 | - ); |
|
| 163 | - |
|
| 164 | - if ( |
|
| 165 | - $err = objet_modifier_champs( |
|
| 166 | - 'auteur', |
|
| 167 | - $id_auteur, |
|
| 168 | - [ |
|
| 169 | - 'data' => $set, |
|
| 170 | - 'nonvide' => ['nom' => _T('ecrire:item_nouvel_auteur')] |
|
| 171 | - ], |
|
| 172 | - $c |
|
| 173 | - ) |
|
| 174 | - ) { |
|
| 175 | - return $err; |
|
| 176 | - } |
|
| 177 | - $session = $c; |
|
| 178 | - |
|
| 179 | - $err = ''; |
|
| 180 | - if (!$force_update) { |
|
| 181 | - // Modification de statut, changement de rubrique ? |
|
| 182 | - $c = collecter_requests( |
|
| 183 | - // include list |
|
| 184 | - [ |
|
| 185 | - 'statut', |
|
| 186 | - 'new_login', |
|
| 187 | - 'new_pass', |
|
| 188 | - 'login', |
|
| 189 | - 'pass', |
|
| 190 | - 'webmestre', |
|
| 191 | - 'restreintes', |
|
| 192 | - 'id_parent' |
|
| 193 | - ], |
|
| 194 | - // exclude list |
|
| 195 | - [], |
|
| 196 | - // donnees eventuellement fournies |
|
| 197 | - $set |
|
| 198 | - ); |
|
| 199 | - if (isset($c['new_login']) and !isset($c['login'])) { |
|
| 200 | - $c['login'] = $c['new_login']; |
|
| 201 | - } |
|
| 202 | - if (isset($c['new_pass']) and !isset($c['pass'])) { |
|
| 203 | - $c['pass'] = $c['new_pass']; |
|
| 204 | - } |
|
| 205 | - $err = auteur_instituer($id_auteur, $c); |
|
| 206 | - $session = array_merge($session, $c); |
|
| 207 | - } |
|
| 208 | - |
|
| 209 | - // .. mettre a jour les sessions de cet auteur |
|
| 210 | - include_spip('inc/session'); |
|
| 211 | - $session['id_auteur'] = $id_auteur; |
|
| 212 | - unset($session['new_login']); |
|
| 213 | - unset($session['new_pass']); |
|
| 214 | - actualiser_sessions($session); |
|
| 215 | - |
|
| 216 | - return $err; |
|
| 153 | + include_spip('inc/modifier'); |
|
| 154 | + include_spip('inc/filtres'); |
|
| 155 | + $c = collecter_requests( |
|
| 156 | + // include list |
|
| 157 | + objet_info('auteur', 'champs_editables'), |
|
| 158 | + // exclude list |
|
| 159 | + $force_update ? [] : ['webmestre', 'pass', 'login'], |
|
| 160 | + // donnees eventuellement fournies |
|
| 161 | + $set |
|
| 162 | + ); |
|
| 163 | + |
|
| 164 | + if ( |
|
| 165 | + $err = objet_modifier_champs( |
|
| 166 | + 'auteur', |
|
| 167 | + $id_auteur, |
|
| 168 | + [ |
|
| 169 | + 'data' => $set, |
|
| 170 | + 'nonvide' => ['nom' => _T('ecrire:item_nouvel_auteur')] |
|
| 171 | + ], |
|
| 172 | + $c |
|
| 173 | + ) |
|
| 174 | + ) { |
|
| 175 | + return $err; |
|
| 176 | + } |
|
| 177 | + $session = $c; |
|
| 178 | + |
|
| 179 | + $err = ''; |
|
| 180 | + if (!$force_update) { |
|
| 181 | + // Modification de statut, changement de rubrique ? |
|
| 182 | + $c = collecter_requests( |
|
| 183 | + // include list |
|
| 184 | + [ |
|
| 185 | + 'statut', |
|
| 186 | + 'new_login', |
|
| 187 | + 'new_pass', |
|
| 188 | + 'login', |
|
| 189 | + 'pass', |
|
| 190 | + 'webmestre', |
|
| 191 | + 'restreintes', |
|
| 192 | + 'id_parent' |
|
| 193 | + ], |
|
| 194 | + // exclude list |
|
| 195 | + [], |
|
| 196 | + // donnees eventuellement fournies |
|
| 197 | + $set |
|
| 198 | + ); |
|
| 199 | + if (isset($c['new_login']) and !isset($c['login'])) { |
|
| 200 | + $c['login'] = $c['new_login']; |
|
| 201 | + } |
|
| 202 | + if (isset($c['new_pass']) and !isset($c['pass'])) { |
|
| 203 | + $c['pass'] = $c['new_pass']; |
|
| 204 | + } |
|
| 205 | + $err = auteur_instituer($id_auteur, $c); |
|
| 206 | + $session = array_merge($session, $c); |
|
| 207 | + } |
|
| 208 | + |
|
| 209 | + // .. mettre a jour les sessions de cet auteur |
|
| 210 | + include_spip('inc/session'); |
|
| 211 | + $session['id_auteur'] = $id_auteur; |
|
| 212 | + unset($session['new_login']); |
|
| 213 | + unset($session['new_pass']); |
|
| 214 | + actualiser_sessions($session); |
|
| 215 | + |
|
| 216 | + return $err; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |
@@ -234,9 +234,9 @@ discard block |
||
| 234 | 234 | * @return string |
| 235 | 235 | */ |
| 236 | 236 | function auteur_associer($id_auteur, $objets, $qualif = null) { |
| 237 | - include_spip('action/editer_liens'); |
|
| 237 | + include_spip('action/editer_liens'); |
|
| 238 | 238 | |
| 239 | - return objet_associer(['auteur' => $id_auteur], $objets, $qualif); |
|
| 239 | + return objet_associer(['auteur' => $id_auteur], $objets, $qualif); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |
@@ -255,9 +255,9 @@ discard block |
||
| 255 | 255 | * @return string |
| 256 | 256 | */ |
| 257 | 257 | function auteur_dissocier($id_auteur, $objets) { |
| 258 | - include_spip('action/editer_liens'); |
|
| 258 | + include_spip('action/editer_liens'); |
|
| 259 | 259 | |
| 260 | - return objet_dissocier(['auteur' => $id_auteur], $objets); |
|
| 260 | + return objet_dissocier(['auteur' => $id_auteur], $objets); |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /** |
@@ -278,9 +278,9 @@ discard block |
||
| 278 | 278 | * @return bool|int |
| 279 | 279 | */ |
| 280 | 280 | function auteur_qualifier($id_auteur, $objets, $qualif) { |
| 281 | - include_spip('action/editer_liens'); |
|
| 281 | + include_spip('action/editer_liens'); |
|
| 282 | 282 | |
| 283 | - return objet_qualifier_liens(['auteur' => $id_auteur], $objets, $qualif); |
|
| 283 | + return objet_qualifier_liens(['auteur' => $id_auteur], $objets, $qualif); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | |
@@ -299,139 +299,139 @@ discard block |
||
| 299 | 299 | * @return bool|string |
| 300 | 300 | */ |
| 301 | 301 | function auteur_instituer($id_auteur, $c, $force_webmestre = false) { |
| 302 | - if (!$id_auteur = intval($id_auteur)) { |
|
| 303 | - return false; |
|
| 304 | - } |
|
| 305 | - $erreurs = []; // contiendra les differentes erreurs a traduire par _T() |
|
| 306 | - $champs = []; |
|
| 307 | - |
|
| 308 | - // les memoriser pour les faire passer dans le pipeline pre_edition |
|
| 309 | - if (isset($c['login']) and strlen($c['login'])) { |
|
| 310 | - $champs['login'] = $c['login']; |
|
| 311 | - } |
|
| 312 | - if (isset($c['pass']) and strlen($c['pass'])) { |
|
| 313 | - $champs['pass'] = $c['pass']; |
|
| 314 | - } |
|
| 315 | - |
|
| 316 | - $statut = $statut_ancien = sql_getfetsel('statut', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 317 | - |
|
| 318 | - if ( |
|
| 319 | - isset($c['statut']) |
|
| 320 | - and (autoriser('modifier', 'auteur', $id_auteur, null, ['statut' => $c['statut']])) |
|
| 321 | - ) { |
|
| 322 | - $statut = $champs['statut'] = $c['statut']; |
|
| 323 | - } |
|
| 324 | - |
|
| 325 | - // Restreindre avant de declarer l'auteur |
|
| 326 | - // (section critique sur les droits) |
|
| 327 | - if (isset($c['id_parent']) and $c['id_parent']) { |
|
| 328 | - if (is_array($c['restreintes'])) { |
|
| 329 | - $c['restreintes'][] = $c['id_parent']; |
|
| 330 | - } else { |
|
| 331 | - $c['restreintes'] = [$c['id_parent']]; |
|
| 332 | - } |
|
| 333 | - } |
|
| 334 | - |
|
| 335 | - if ( |
|
| 336 | - isset($c['webmestre']) |
|
| 337 | - and ($force_webmestre or autoriser('modifier', 'auteur', $id_auteur, null, ['webmestre' => '?'])) |
|
| 338 | - ) { |
|
| 339 | - $champs['webmestre'] = $c['webmestre'] == 'oui' ? 'oui' : 'non'; |
|
| 340 | - } |
|
| 341 | - |
|
| 342 | - // si statut change et n'est pas 0minirezo, on force webmestre a non |
|
| 343 | - if (isset($c['statut']) and $c['statut'] !== '0minirezo') { |
|
| 344 | - $champs['webmestre'] = $c['webmestre'] = 'non'; |
|
| 345 | - } |
|
| 346 | - |
|
| 347 | - // Envoyer aux plugins |
|
| 348 | - $champs = pipeline( |
|
| 349 | - 'pre_edition', |
|
| 350 | - [ |
|
| 351 | - 'args' => [ |
|
| 352 | - 'table' => 'spip_auteurs', |
|
| 353 | - 'id_objet' => $id_auteur, |
|
| 354 | - 'action' => 'instituer', |
|
| 355 | - 'statut_ancien' => $statut_ancien, |
|
| 356 | - ], |
|
| 357 | - 'data' => $champs |
|
| 358 | - ] |
|
| 359 | - ); |
|
| 360 | - |
|
| 361 | - if ( |
|
| 362 | - isset($c['restreintes']) and is_array($c['restreintes']) |
|
| 363 | - and autoriser('modifier', 'auteur', $id_auteur, null, ['restreint' => $c['restreintes']]) |
|
| 364 | - ) { |
|
| 365 | - $rubriques = array_map('intval', $c['restreintes']); |
|
| 366 | - $rubriques = array_unique($rubriques); |
|
| 367 | - $rubriques = array_diff($rubriques, [0]); |
|
| 368 | - auteur_dissocier($id_auteur, ['rubrique' => '*']); |
|
| 369 | - auteur_associer($id_auteur, ['rubrique' => $rubriques]); |
|
| 370 | - } |
|
| 371 | - |
|
| 372 | - $flag_ecrire_acces = false; |
|
| 373 | - // commencer par traiter les cas particuliers des logins et pass |
|
| 374 | - // avant les autres ecritures en base |
|
| 375 | - if (isset($champs['login']) or isset($champs['pass'])) { |
|
| 376 | - $auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 377 | - include_spip('inc/auth'); |
|
| 378 | - if (isset($champs['login']) and strlen($champs['login'])) { |
|
| 379 | - if (!auth_modifier_login($auth_methode, $champs['login'], $id_auteur)) { |
|
| 380 | - $erreurs[] = 'ecrire:impossible_modifier_login_auteur'; |
|
| 381 | - } |
|
| 382 | - } |
|
| 383 | - if (isset($champs['pass']) and strlen($champs['pass'])) { |
|
| 384 | - $champs['login'] = sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 385 | - if (!auth_modifier_pass($auth_methode, $champs['login'], $champs['pass'], $id_auteur)) { |
|
| 386 | - $erreurs[] = 'ecrire:impossible_modifier_pass_auteur'; |
|
| 387 | - } |
|
| 388 | - } |
|
| 389 | - unset($champs['login']); |
|
| 390 | - unset($champs['pass']); |
|
| 391 | - $flag_ecrire_acces = true; |
|
| 392 | - } |
|
| 393 | - |
|
| 394 | - if (!(is_countable($champs) ? count($champs) : 0)) { |
|
| 395 | - return implode(' ', array_map('_T', $erreurs)); |
|
| 396 | - } |
|
| 397 | - sql_updateq('spip_auteurs', $champs, 'id_auteur=' . $id_auteur); |
|
| 398 | - |
|
| 399 | - // .. mettre a jour les fichiers .htpasswd et .htpasswd-admin |
|
| 400 | - if ( |
|
| 401 | - $flag_ecrire_acces |
|
| 402 | - or isset($champs['statut']) |
|
| 403 | - ) { |
|
| 404 | - include_spip('inc/acces'); |
|
| 405 | - ecrire_acces(); |
|
| 406 | - } |
|
| 407 | - |
|
| 408 | - // Invalider les caches |
|
| 409 | - include_spip('inc/invalideur'); |
|
| 410 | - suivre_invalideur("id='auteur/$id_auteur'"); |
|
| 411 | - |
|
| 412 | - // Pipeline |
|
| 413 | - pipeline( |
|
| 414 | - 'post_edition', |
|
| 415 | - [ |
|
| 416 | - 'args' => [ |
|
| 417 | - 'table' => 'spip_auteurs', |
|
| 418 | - 'id_objet' => $id_auteur, |
|
| 419 | - 'action' => 'instituer', |
|
| 420 | - 'statut_ancien' => $statut_ancien, |
|
| 421 | - ], |
|
| 422 | - 'data' => $champs |
|
| 423 | - ] |
|
| 424 | - ); |
|
| 425 | - |
|
| 426 | - |
|
| 427 | - // Notifications |
|
| 428 | - if ($notifications = charger_fonction('notifications', 'inc')) { |
|
| 429 | - $notifications( |
|
| 430 | - 'instituerauteur', |
|
| 431 | - $id_auteur, |
|
| 432 | - ['statut' => $statut, 'statut_ancien' => $statut_ancien] |
|
| 433 | - ); |
|
| 434 | - } |
|
| 435 | - |
|
| 436 | - return implode(' ', array_map('_T', $erreurs)); |
|
| 302 | + if (!$id_auteur = intval($id_auteur)) { |
|
| 303 | + return false; |
|
| 304 | + } |
|
| 305 | + $erreurs = []; // contiendra les differentes erreurs a traduire par _T() |
|
| 306 | + $champs = []; |
|
| 307 | + |
|
| 308 | + // les memoriser pour les faire passer dans le pipeline pre_edition |
|
| 309 | + if (isset($c['login']) and strlen($c['login'])) { |
|
| 310 | + $champs['login'] = $c['login']; |
|
| 311 | + } |
|
| 312 | + if (isset($c['pass']) and strlen($c['pass'])) { |
|
| 313 | + $champs['pass'] = $c['pass']; |
|
| 314 | + } |
|
| 315 | + |
|
| 316 | + $statut = $statut_ancien = sql_getfetsel('statut', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 317 | + |
|
| 318 | + if ( |
|
| 319 | + isset($c['statut']) |
|
| 320 | + and (autoriser('modifier', 'auteur', $id_auteur, null, ['statut' => $c['statut']])) |
|
| 321 | + ) { |
|
| 322 | + $statut = $champs['statut'] = $c['statut']; |
|
| 323 | + } |
|
| 324 | + |
|
| 325 | + // Restreindre avant de declarer l'auteur |
|
| 326 | + // (section critique sur les droits) |
|
| 327 | + if (isset($c['id_parent']) and $c['id_parent']) { |
|
| 328 | + if (is_array($c['restreintes'])) { |
|
| 329 | + $c['restreintes'][] = $c['id_parent']; |
|
| 330 | + } else { |
|
| 331 | + $c['restreintes'] = [$c['id_parent']]; |
|
| 332 | + } |
|
| 333 | + } |
|
| 334 | + |
|
| 335 | + if ( |
|
| 336 | + isset($c['webmestre']) |
|
| 337 | + and ($force_webmestre or autoriser('modifier', 'auteur', $id_auteur, null, ['webmestre' => '?'])) |
|
| 338 | + ) { |
|
| 339 | + $champs['webmestre'] = $c['webmestre'] == 'oui' ? 'oui' : 'non'; |
|
| 340 | + } |
|
| 341 | + |
|
| 342 | + // si statut change et n'est pas 0minirezo, on force webmestre a non |
|
| 343 | + if (isset($c['statut']) and $c['statut'] !== '0minirezo') { |
|
| 344 | + $champs['webmestre'] = $c['webmestre'] = 'non'; |
|
| 345 | + } |
|
| 346 | + |
|
| 347 | + // Envoyer aux plugins |
|
| 348 | + $champs = pipeline( |
|
| 349 | + 'pre_edition', |
|
| 350 | + [ |
|
| 351 | + 'args' => [ |
|
| 352 | + 'table' => 'spip_auteurs', |
|
| 353 | + 'id_objet' => $id_auteur, |
|
| 354 | + 'action' => 'instituer', |
|
| 355 | + 'statut_ancien' => $statut_ancien, |
|
| 356 | + ], |
|
| 357 | + 'data' => $champs |
|
| 358 | + ] |
|
| 359 | + ); |
|
| 360 | + |
|
| 361 | + if ( |
|
| 362 | + isset($c['restreintes']) and is_array($c['restreintes']) |
|
| 363 | + and autoriser('modifier', 'auteur', $id_auteur, null, ['restreint' => $c['restreintes']]) |
|
| 364 | + ) { |
|
| 365 | + $rubriques = array_map('intval', $c['restreintes']); |
|
| 366 | + $rubriques = array_unique($rubriques); |
|
| 367 | + $rubriques = array_diff($rubriques, [0]); |
|
| 368 | + auteur_dissocier($id_auteur, ['rubrique' => '*']); |
|
| 369 | + auteur_associer($id_auteur, ['rubrique' => $rubriques]); |
|
| 370 | + } |
|
| 371 | + |
|
| 372 | + $flag_ecrire_acces = false; |
|
| 373 | + // commencer par traiter les cas particuliers des logins et pass |
|
| 374 | + // avant les autres ecritures en base |
|
| 375 | + if (isset($champs['login']) or isset($champs['pass'])) { |
|
| 376 | + $auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 377 | + include_spip('inc/auth'); |
|
| 378 | + if (isset($champs['login']) and strlen($champs['login'])) { |
|
| 379 | + if (!auth_modifier_login($auth_methode, $champs['login'], $id_auteur)) { |
|
| 380 | + $erreurs[] = 'ecrire:impossible_modifier_login_auteur'; |
|
| 381 | + } |
|
| 382 | + } |
|
| 383 | + if (isset($champs['pass']) and strlen($champs['pass'])) { |
|
| 384 | + $champs['login'] = sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)); |
|
| 385 | + if (!auth_modifier_pass($auth_methode, $champs['login'], $champs['pass'], $id_auteur)) { |
|
| 386 | + $erreurs[] = 'ecrire:impossible_modifier_pass_auteur'; |
|
| 387 | + } |
|
| 388 | + } |
|
| 389 | + unset($champs['login']); |
|
| 390 | + unset($champs['pass']); |
|
| 391 | + $flag_ecrire_acces = true; |
|
| 392 | + } |
|
| 393 | + |
|
| 394 | + if (!(is_countable($champs) ? count($champs) : 0)) { |
|
| 395 | + return implode(' ', array_map('_T', $erreurs)); |
|
| 396 | + } |
|
| 397 | + sql_updateq('spip_auteurs', $champs, 'id_auteur=' . $id_auteur); |
|
| 398 | + |
|
| 399 | + // .. mettre a jour les fichiers .htpasswd et .htpasswd-admin |
|
| 400 | + if ( |
|
| 401 | + $flag_ecrire_acces |
|
| 402 | + or isset($champs['statut']) |
|
| 403 | + ) { |
|
| 404 | + include_spip('inc/acces'); |
|
| 405 | + ecrire_acces(); |
|
| 406 | + } |
|
| 407 | + |
|
| 408 | + // Invalider les caches |
|
| 409 | + include_spip('inc/invalideur'); |
|
| 410 | + suivre_invalideur("id='auteur/$id_auteur'"); |
|
| 411 | + |
|
| 412 | + // Pipeline |
|
| 413 | + pipeline( |
|
| 414 | + 'post_edition', |
|
| 415 | + [ |
|
| 416 | + 'args' => [ |
|
| 417 | + 'table' => 'spip_auteurs', |
|
| 418 | + 'id_objet' => $id_auteur, |
|
| 419 | + 'action' => 'instituer', |
|
| 420 | + 'statut_ancien' => $statut_ancien, |
|
| 421 | + ], |
|
| 422 | + 'data' => $champs |
|
| 423 | + ] |
|
| 424 | + ); |
|
| 425 | + |
|
| 426 | + |
|
| 427 | + // Notifications |
|
| 428 | + if ($notifications = charger_fonction('notifications', 'inc')) { |
|
| 429 | + $notifications( |
|
| 430 | + 'instituerauteur', |
|
| 431 | + $id_auteur, |
|
| 432 | + ['statut' => $statut, 'statut_ancien' => $statut_ancien] |
|
| 433 | + ); |
|
| 434 | + } |
|
| 435 | + |
|
| 436 | + return implode(' ', array_map('_T', $erreurs)); |
|
| 437 | 437 | } |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | **/ |
| 8 | 8 | |
| 9 | 9 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 10 | - return; |
|
| 10 | + return; |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -28,51 +28,51 @@ discard block |
||
| 28 | 28 | * - afficher : tableau des objets à afficher (mais pas forcément sélectionnables) |
| 29 | 29 | */ |
| 30 | 30 | function selecteur_lister_objets($includelist = [], $excludelist = []) { |
| 31 | - static $liste_selecteurs, $liste_parents; |
|
| 32 | - |
|
| 33 | - if (!$liste_selecteurs) { |
|
| 34 | - $liste_selecteurs = find_all_in_path('formulaires/selecteur/', 'hierarchie-[\w]+[.]html$'); |
|
| 35 | - } |
|
| 36 | - $objets_selectionner = []; |
|
| 37 | - foreach ($liste_selecteurs as $fichier => $chemin) { |
|
| 38 | - $objets_selectionner[] = preg_replace('/^hierarchie-([\w]+)[.]html$/', '$1', $fichier); |
|
| 39 | - } |
|
| 40 | - |
|
| 41 | - // S'il y a une whitelist on ne garde que ce qui est dedans |
|
| 42 | - if (!empty($includelist)) { |
|
| 43 | - $includelist = array_map('table_objet', $includelist); |
|
| 44 | - $objets_selectionner = array_intersect($objets_selectionner, $includelist); |
|
| 45 | - } |
|
| 46 | - // On supprime ce qui est dans la liste d’exclusion |
|
| 47 | - $excludelist = array_map('table_objet', $excludelist); |
|
| 48 | - // On enlève toujours la racine |
|
| 49 | - $excludelist[] = 'racine'; |
|
| 50 | - $objets_selectionner = array_diff($objets_selectionner, $excludelist); |
|
| 51 | - |
|
| 52 | - // Ensuite on cherche ce qu'on doit afficher : au moins ceux qu'on peut sélectionner |
|
| 53 | - $objets_afficher = $objets_selectionner; |
|
| 54 | - |
|
| 55 | - // Il faut alors chercher d'éventuels parents obligatoires en plus : |
|
| 56 | - // lister-trucs-bidules.html => on doit afficher des "trucs" pour trouver des "bidules" |
|
| 57 | - if (!$liste_parents) { |
|
| 58 | - $liste_parents = find_all_in_path('formulaires/selecteur/', 'lister-[\w]+-[\w]+[.]html$'); |
|
| 59 | - } |
|
| 60 | - foreach ($liste_parents as $fichier => $chemin) { |
|
| 61 | - preg_match('/^lister-([\w]+)-([\w]+)[.]html$/', $fichier, $captures); |
|
| 62 | - $parent = $captures[1]; |
|
| 63 | - $type = $captures[2]; |
|
| 64 | - // Si le type fait partie de ce qu'on doit afficher alors on ajoute aussi le parent à l'affichage |
|
| 65 | - if (in_array($type, $objets_afficher)) { |
|
| 66 | - $objets_afficher[] = $parent; |
|
| 67 | - } |
|
| 68 | - } |
|
| 69 | - |
|
| 70 | - $objets = [ |
|
| 71 | - 'selectionner' => array_unique($objets_selectionner), |
|
| 72 | - 'afficher' => array_unique($objets_afficher), |
|
| 73 | - ]; |
|
| 74 | - |
|
| 75 | - return $objets; |
|
| 31 | + static $liste_selecteurs, $liste_parents; |
|
| 32 | + |
|
| 33 | + if (!$liste_selecteurs) { |
|
| 34 | + $liste_selecteurs = find_all_in_path('formulaires/selecteur/', 'hierarchie-[\w]+[.]html$'); |
|
| 35 | + } |
|
| 36 | + $objets_selectionner = []; |
|
| 37 | + foreach ($liste_selecteurs as $fichier => $chemin) { |
|
| 38 | + $objets_selectionner[] = preg_replace('/^hierarchie-([\w]+)[.]html$/', '$1', $fichier); |
|
| 39 | + } |
|
| 40 | + |
|
| 41 | + // S'il y a une whitelist on ne garde que ce qui est dedans |
|
| 42 | + if (!empty($includelist)) { |
|
| 43 | + $includelist = array_map('table_objet', $includelist); |
|
| 44 | + $objets_selectionner = array_intersect($objets_selectionner, $includelist); |
|
| 45 | + } |
|
| 46 | + // On supprime ce qui est dans la liste d’exclusion |
|
| 47 | + $excludelist = array_map('table_objet', $excludelist); |
|
| 48 | + // On enlève toujours la racine |
|
| 49 | + $excludelist[] = 'racine'; |
|
| 50 | + $objets_selectionner = array_diff($objets_selectionner, $excludelist); |
|
| 51 | + |
|
| 52 | + // Ensuite on cherche ce qu'on doit afficher : au moins ceux qu'on peut sélectionner |
|
| 53 | + $objets_afficher = $objets_selectionner; |
|
| 54 | + |
|
| 55 | + // Il faut alors chercher d'éventuels parents obligatoires en plus : |
|
| 56 | + // lister-trucs-bidules.html => on doit afficher des "trucs" pour trouver des "bidules" |
|
| 57 | + if (!$liste_parents) { |
|
| 58 | + $liste_parents = find_all_in_path('formulaires/selecteur/', 'lister-[\w]+-[\w]+[.]html$'); |
|
| 59 | + } |
|
| 60 | + foreach ($liste_parents as $fichier => $chemin) { |
|
| 61 | + preg_match('/^lister-([\w]+)-([\w]+)[.]html$/', $fichier, $captures); |
|
| 62 | + $parent = $captures[1]; |
|
| 63 | + $type = $captures[2]; |
|
| 64 | + // Si le type fait partie de ce qu'on doit afficher alors on ajoute aussi le parent à l'affichage |
|
| 65 | + if (in_array($type, $objets_afficher)) { |
|
| 66 | + $objets_afficher[] = $parent; |
|
| 67 | + } |
|
| 68 | + } |
|
| 69 | + |
|
| 70 | + $objets = [ |
|
| 71 | + 'selectionner' => array_unique($objets_selectionner), |
|
| 72 | + 'afficher' => array_unique($objets_afficher), |
|
| 73 | + ]; |
|
| 74 | + |
|
| 75 | + return $objets; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -99,31 +99,31 @@ discard block |
||
| 99 | 99 | * liste des couples (objets => id_objet) ou liste des identifiants d'un type d'objet. |
| 100 | 100 | **/ |
| 101 | 101 | function picker_selected($selected, $type = '') { |
| 102 | - $select = []; |
|
| 103 | - $type = preg_replace(',\W,', '', $type); |
|
| 104 | - |
|
| 105 | - if ($selected and !is_array($selected)) { |
|
| 106 | - $selected = explode(',', $selected); |
|
| 107 | - } |
|
| 108 | - |
|
| 109 | - if (is_array($selected)) { |
|
| 110 | - foreach ($selected as $value) { |
|
| 111 | - // Si c'est le bon format déjà |
|
| 112 | - if (preg_match('/^([\w]+)[|]([0-9]+)$/', $value, $captures)) { |
|
| 113 | - $objet = $captures[1]; |
|
| 114 | - $id_objet = intval($captures[2]); |
|
| 115 | - |
|
| 116 | - // Si on cherche un type et que c'est le bon, on renvoit un tableau que d'identifiants |
|
| 117 | - if (is_string($type) and $type == $objet and ($id_objet or in_array($objet, ['racine', 'rubrique']))) { |
|
| 118 | - $select[] = $id_objet; |
|
| 119 | - } elseif (!$type and ($id_objet or in_array($objet, ['racine', 'rubrique']))) { |
|
| 120 | - $select[] = ['objet' => $objet, 'id_objet' => $id_objet]; |
|
| 121 | - } |
|
| 122 | - } |
|
| 123 | - } |
|
| 124 | - } |
|
| 125 | - |
|
| 126 | - return $select; |
|
| 102 | + $select = []; |
|
| 103 | + $type = preg_replace(',\W,', '', $type); |
|
| 104 | + |
|
| 105 | + if ($selected and !is_array($selected)) { |
|
| 106 | + $selected = explode(',', $selected); |
|
| 107 | + } |
|
| 108 | + |
|
| 109 | + if (is_array($selected)) { |
|
| 110 | + foreach ($selected as $value) { |
|
| 111 | + // Si c'est le bon format déjà |
|
| 112 | + if (preg_match('/^([\w]+)[|]([0-9]+)$/', $value, $captures)) { |
|
| 113 | + $objet = $captures[1]; |
|
| 114 | + $id_objet = intval($captures[2]); |
|
| 115 | + |
|
| 116 | + // Si on cherche un type et que c'est le bon, on renvoit un tableau que d'identifiants |
|
| 117 | + if (is_string($type) and $type == $objet and ($id_objet or in_array($objet, ['racine', 'rubrique']))) { |
|
| 118 | + $select[] = $id_objet; |
|
| 119 | + } elseif (!$type and ($id_objet or in_array($objet, ['racine', 'rubrique']))) { |
|
| 120 | + $select[] = ['objet' => $objet, 'id_objet' => $id_objet]; |
|
| 121 | + } |
|
| 122 | + } |
|
| 123 | + } |
|
| 124 | + } |
|
| 125 | + |
|
| 126 | + return $select; |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -140,49 +140,49 @@ discard block |
||
| 140 | 140 | * Booléen indiquant si les articles sont sélectionnables |
| 141 | 141 | */ |
| 142 | 142 | function picker_identifie_id_rapide($ref, $rubriques_ou_objets = false, $articles = false) { |
| 143 | - include_spip('inc/json'); |
|
| 144 | - include_spip('inc/lien'); |
|
| 145 | - |
|
| 146 | - // On construit un tableau des objets sélectionnables suivant les paramètres |
|
| 147 | - $objets = []; |
|
| 148 | - if ($rubriques_ou_objets and is_array($rubriques_ou_objets)) { |
|
| 149 | - $objets = $rubriques_ou_objets; |
|
| 150 | - } else { |
|
| 151 | - if ($rubriques_ou_objets) { |
|
| 152 | - $objets[] = 'rubriques'; |
|
| 153 | - } |
|
| 154 | - if ($articles) { |
|
| 155 | - $objets[] = 'articles'; |
|
| 156 | - } |
|
| 157 | - } |
|
| 158 | - |
|
| 159 | - // si id numerique et un seul objet possible, pas d'ambiguite |
|
| 160 | - if (is_numeric($ref) and count($objets) === 1) { |
|
| 161 | - $ref = reset($objets) . $ref; |
|
| 162 | - } |
|
| 163 | - |
|
| 164 | - // Si la référence ne correspond à rien, c'est fini |
|
| 165 | - if (!($match = typer_raccourci($ref))) { |
|
| 166 | - return json_export(false); |
|
| 167 | - } |
|
| 168 | - // Sinon on récupère les infos utiles |
|
| 169 | - [$type, , $id, , , , ] = array_pad($match, 7, null); |
|
| 170 | - |
|
| 171 | - // On regarde si le type trouvé fait partie des objets sélectionnables |
|
| 172 | - if (!in_array(table_objet($type), $objets)) { |
|
| 173 | - return json_export(false); |
|
| 174 | - } |
|
| 175 | - |
|
| 176 | - // Maintenant que tout est bon, on cherche les informations sur cet objet |
|
| 177 | - include_spip('inc/filtres'); |
|
| 178 | - if (!$titre = generer_objet_info($id, $type, 'titre')) { |
|
| 179 | - return json_export(false); |
|
| 180 | - } |
|
| 181 | - |
|
| 182 | - // On simplifie le texte |
|
| 183 | - $titre = attribut_html($titre); |
|
| 184 | - |
|
| 185 | - return json_export(['type' => $type, 'id' => "$type|$id", 'titre' => $titre]); |
|
| 143 | + include_spip('inc/json'); |
|
| 144 | + include_spip('inc/lien'); |
|
| 145 | + |
|
| 146 | + // On construit un tableau des objets sélectionnables suivant les paramètres |
|
| 147 | + $objets = []; |
|
| 148 | + if ($rubriques_ou_objets and is_array($rubriques_ou_objets)) { |
|
| 149 | + $objets = $rubriques_ou_objets; |
|
| 150 | + } else { |
|
| 151 | + if ($rubriques_ou_objets) { |
|
| 152 | + $objets[] = 'rubriques'; |
|
| 153 | + } |
|
| 154 | + if ($articles) { |
|
| 155 | + $objets[] = 'articles'; |
|
| 156 | + } |
|
| 157 | + } |
|
| 158 | + |
|
| 159 | + // si id numerique et un seul objet possible, pas d'ambiguite |
|
| 160 | + if (is_numeric($ref) and count($objets) === 1) { |
|
| 161 | + $ref = reset($objets) . $ref; |
|
| 162 | + } |
|
| 163 | + |
|
| 164 | + // Si la référence ne correspond à rien, c'est fini |
|
| 165 | + if (!($match = typer_raccourci($ref))) { |
|
| 166 | + return json_export(false); |
|
| 167 | + } |
|
| 168 | + // Sinon on récupère les infos utiles |
|
| 169 | + [$type, , $id, , , , ] = array_pad($match, 7, null); |
|
| 170 | + |
|
| 171 | + // On regarde si le type trouvé fait partie des objets sélectionnables |
|
| 172 | + if (!in_array(table_objet($type), $objets)) { |
|
| 173 | + return json_export(false); |
|
| 174 | + } |
|
| 175 | + |
|
| 176 | + // Maintenant que tout est bon, on cherche les informations sur cet objet |
|
| 177 | + include_spip('inc/filtres'); |
|
| 178 | + if (!$titre = generer_objet_info($id, $type, 'titre')) { |
|
| 179 | + return json_export(false); |
|
| 180 | + } |
|
| 181 | + |
|
| 182 | + // On simplifie le texte |
|
| 183 | + $titre = attribut_html($titre); |
|
| 184 | + |
|
| 185 | + return json_export(['type' => $type, 'id' => "$type|$id", 'titre' => $titre]); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /** |
@@ -205,34 +205,34 @@ discard block |
||
| 205 | 205 | * Comme le filtre `oui` : espace (` `) si rubrique à afficher, chaîne vide sinon. |
| 206 | 206 | */ |
| 207 | 207 | function test_enfants_rubrique($id_rubrique, $types = []) { |
| 208 | - static $has_child = []; |
|
| 209 | - |
|
| 210 | - if (!isset($has_child[$id_rubrique])) { |
|
| 211 | - $types = (is_array($types) ? array_filter($types) : []); |
|
| 212 | - |
|
| 213 | - // recuperer tous les freres et soeurs de la rubrique visee |
|
| 214 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 215 | - $fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . intval($id_parent)); |
|
| 216 | - $fratrie = array_column($fratrie, 'id_rubrique'); |
|
| 217 | - $has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie)); |
|
| 218 | - $has = array_column($has, 'id_parent'); |
|
| 219 | - $fratrie = array_diff($fratrie, $has); |
|
| 220 | - |
|
| 221 | - while (count($fratrie) and is_array($types) and count($types)) { |
|
| 222 | - $type = array_shift($types); |
|
| 223 | - $h = sql_allfetsel('DISTINCT id_rubrique', table_objet_sql($type), sql_in('id_rubrique', $fratrie)); |
|
| 224 | - $h = array_column($h, 'id_rubrique'); |
|
| 225 | - $has = array_merge($has, $h); |
|
| 226 | - $fratrie = array_diff($fratrie, $h); |
|
| 227 | - } |
|
| 228 | - |
|
| 229 | - if (count($has)) { |
|
| 230 | - $has_child = $has_child + array_combine($has, array_pad([], count($has), true)); |
|
| 231 | - } |
|
| 232 | - if (count($fratrie)) { |
|
| 233 | - $has_child = $has_child + array_combine($fratrie, array_pad([], count($fratrie), false)); |
|
| 234 | - } |
|
| 235 | - } |
|
| 236 | - |
|
| 237 | - return $has_child[$id_rubrique] ? ' ' : ''; |
|
| 208 | + static $has_child = []; |
|
| 209 | + |
|
| 210 | + if (!isset($has_child[$id_rubrique])) { |
|
| 211 | + $types = (is_array($types) ? array_filter($types) : []); |
|
| 212 | + |
|
| 213 | + // recuperer tous les freres et soeurs de la rubrique visee |
|
| 214 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 215 | + $fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . intval($id_parent)); |
|
| 216 | + $fratrie = array_column($fratrie, 'id_rubrique'); |
|
| 217 | + $has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie)); |
|
| 218 | + $has = array_column($has, 'id_parent'); |
|
| 219 | + $fratrie = array_diff($fratrie, $has); |
|
| 220 | + |
|
| 221 | + while (count($fratrie) and is_array($types) and count($types)) { |
|
| 222 | + $type = array_shift($types); |
|
| 223 | + $h = sql_allfetsel('DISTINCT id_rubrique', table_objet_sql($type), sql_in('id_rubrique', $fratrie)); |
|
| 224 | + $h = array_column($h, 'id_rubrique'); |
|
| 225 | + $has = array_merge($has, $h); |
|
| 226 | + $fratrie = array_diff($fratrie, $h); |
|
| 227 | + } |
|
| 228 | + |
|
| 229 | + if (count($has)) { |
|
| 230 | + $has_child = $has_child + array_combine($has, array_pad([], count($has), true)); |
|
| 231 | + } |
|
| 232 | + if (count($fratrie)) { |
|
| 233 | + $has_child = $has_child + array_combine($fratrie, array_pad([], count($fratrie), false)); |
|
| 234 | + } |
|
| 235 | + } |
|
| 236 | + |
|
| 237 | + return $has_child[$id_rubrique] ? ' ' : ''; |
|
| 238 | 238 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | **/ |
| 19 | 19 | |
| 20 | 20 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 21 | - return; |
|
| 21 | + return; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | include_spip('inc/texte'); |
@@ -42,234 +42,234 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | function public_composer_dist($squelette, $mime_type, $gram, $source, string $connect = '') { |
| 44 | 44 | |
| 45 | - $skel = null; |
|
| 46 | - $boucle = null; |
|
| 47 | - $nom = calculer_nom_fonction_squel($squelette, $mime_type, $connect); |
|
| 48 | - |
|
| 49 | - // si deja en memoire (INCLURE a repetition) c'est bon. |
|
| 50 | - if (function_exists($nom)) { |
|
| 51 | - return $nom; |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
|
| 55 | - $GLOBALS['debug_objets']['courant'] = $nom; |
|
| 56 | - } |
|
| 57 | - |
|
| 58 | - $phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php'; |
|
| 59 | - |
|
| 60 | - // si squelette est deja compile et perenne, le charger |
|
| 61 | - if (!squelette_obsolete($phpfile, $source)) { |
|
| 62 | - include_once $phpfile; |
|
| 63 | - #if (!squelette_obsolete($phpfile, $source) |
|
| 64 | - # AND lire_fichier ($phpfile, $skel_code, |
|
| 65 | - # array('critique' => 'oui', 'phpcheck' => 'oui'))){ |
|
| 66 | - ## eval('?'.'>'.$skel_code); |
|
| 67 | - # spip_log($skel_code, 'comp') |
|
| 68 | - #} |
|
| 69 | - } |
|
| 70 | - |
|
| 71 | - if (file_exists($lib = $squelette . '_fonctions' . '.php')) { |
|
| 72 | - include_once $lib; |
|
| 73 | - } |
|
| 74 | - |
|
| 75 | - // tester si le eval ci-dessus a mis le squelette en memoire |
|
| 76 | - |
|
| 77 | - if (function_exists($nom)) { |
|
| 78 | - return $nom; |
|
| 79 | - } |
|
| 80 | - |
|
| 81 | - // charger le source, si possible, et compiler |
|
| 82 | - $skel_code = ''; |
|
| 83 | - if (lire_fichier($source, $skel)) { |
|
| 84 | - $compiler = charger_fonction('compiler', 'public'); |
|
| 85 | - $skel_code = $compiler($skel, $nom, $gram, $source, $connect); |
|
| 86 | - } |
|
| 87 | - |
|
| 88 | - // Ne plus rien faire si le compilateur n'a pas pu operer. |
|
| 89 | - if (!$skel_code) { |
|
| 90 | - return false; |
|
| 91 | - } |
|
| 92 | - |
|
| 93 | - foreach ($skel_code as $id => $boucle) { |
|
| 94 | - $f = $boucle->return; |
|
| 95 | - try { |
|
| 96 | - eval("return true; $f ;"); |
|
| 97 | - } catch (\ParseError $e) { |
|
| 98 | - // Code syntaxiquement faux (critere etc mal programme') |
|
| 99 | - $msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 100 | - erreur_squelette($msg, $boucle); |
|
| 101 | - // continuer pour trouver d'autres fautes eventuelles |
|
| 102 | - // mais prevenir que c'est mort |
|
| 103 | - $nom = ''; |
|
| 104 | - } |
|
| 105 | - |
|
| 106 | - // Contexte de compil inutile a present |
|
| 107 | - // (mais la derniere valeur de $boucle est utilisee ci-dessous) |
|
| 108 | - $skel_code[$id] = $f; |
|
| 109 | - } |
|
| 110 | - |
|
| 111 | - $code = ''; |
|
| 112 | - if ($nom) { |
|
| 113 | - // Si le code est bon, concatener et mettre en cache |
|
| 114 | - if (function_exists($nom)) { |
|
| 115 | - $code = squelette_traduit($skel, $source, $phpfile, $skel_code); |
|
| 116 | - } else { |
|
| 117 | - // code semantiquement faux: bug du compilateur |
|
| 118 | - // $boucle est en fait ici la fct principale du squelette |
|
| 119 | - $msg = _T('zbug_erreur_compilation'); |
|
| 120 | - erreur_squelette($msg, $boucle); |
|
| 121 | - $nom = ''; |
|
| 122 | - } |
|
| 123 | - } |
|
| 124 | - |
|
| 125 | - if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
|
| 126 | - // Tracer ce qui vient d'etre compile |
|
| 127 | - $GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code; |
|
| 128 | - |
|
| 129 | - // si c'est ce que demande le debusqueur, lui passer la main |
|
| 130 | - if ( |
|
| 131 | - $GLOBALS['debug_objets']['sourcefile'] |
|
| 132 | - and (_request('var_mode_objet') == $nom) |
|
| 133 | - and (_request('var_mode_affiche') == 'code') |
|
| 134 | - ) { |
|
| 135 | - erreur_squelette(); |
|
| 136 | - } |
|
| 137 | - } |
|
| 138 | - |
|
| 139 | - return $nom ?: false; |
|
| 45 | + $skel = null; |
|
| 46 | + $boucle = null; |
|
| 47 | + $nom = calculer_nom_fonction_squel($squelette, $mime_type, $connect); |
|
| 48 | + |
|
| 49 | + // si deja en memoire (INCLURE a repetition) c'est bon. |
|
| 50 | + if (function_exists($nom)) { |
|
| 51 | + return $nom; |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
|
| 55 | + $GLOBALS['debug_objets']['courant'] = $nom; |
|
| 56 | + } |
|
| 57 | + |
|
| 58 | + $phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php'; |
|
| 59 | + |
|
| 60 | + // si squelette est deja compile et perenne, le charger |
|
| 61 | + if (!squelette_obsolete($phpfile, $source)) { |
|
| 62 | + include_once $phpfile; |
|
| 63 | + #if (!squelette_obsolete($phpfile, $source) |
|
| 64 | + # AND lire_fichier ($phpfile, $skel_code, |
|
| 65 | + # array('critique' => 'oui', 'phpcheck' => 'oui'))){ |
|
| 66 | + ## eval('?'.'>'.$skel_code); |
|
| 67 | + # spip_log($skel_code, 'comp') |
|
| 68 | + #} |
|
| 69 | + } |
|
| 70 | + |
|
| 71 | + if (file_exists($lib = $squelette . '_fonctions' . '.php')) { |
|
| 72 | + include_once $lib; |
|
| 73 | + } |
|
| 74 | + |
|
| 75 | + // tester si le eval ci-dessus a mis le squelette en memoire |
|
| 76 | + |
|
| 77 | + if (function_exists($nom)) { |
|
| 78 | + return $nom; |
|
| 79 | + } |
|
| 80 | + |
|
| 81 | + // charger le source, si possible, et compiler |
|
| 82 | + $skel_code = ''; |
|
| 83 | + if (lire_fichier($source, $skel)) { |
|
| 84 | + $compiler = charger_fonction('compiler', 'public'); |
|
| 85 | + $skel_code = $compiler($skel, $nom, $gram, $source, $connect); |
|
| 86 | + } |
|
| 87 | + |
|
| 88 | + // Ne plus rien faire si le compilateur n'a pas pu operer. |
|
| 89 | + if (!$skel_code) { |
|
| 90 | + return false; |
|
| 91 | + } |
|
| 92 | + |
|
| 93 | + foreach ($skel_code as $id => $boucle) { |
|
| 94 | + $f = $boucle->return; |
|
| 95 | + try { |
|
| 96 | + eval("return true; $f ;"); |
|
| 97 | + } catch (\ParseError $e) { |
|
| 98 | + // Code syntaxiquement faux (critere etc mal programme') |
|
| 99 | + $msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 100 | + erreur_squelette($msg, $boucle); |
|
| 101 | + // continuer pour trouver d'autres fautes eventuelles |
|
| 102 | + // mais prevenir que c'est mort |
|
| 103 | + $nom = ''; |
|
| 104 | + } |
|
| 105 | + |
|
| 106 | + // Contexte de compil inutile a present |
|
| 107 | + // (mais la derniere valeur de $boucle est utilisee ci-dessous) |
|
| 108 | + $skel_code[$id] = $f; |
|
| 109 | + } |
|
| 110 | + |
|
| 111 | + $code = ''; |
|
| 112 | + if ($nom) { |
|
| 113 | + // Si le code est bon, concatener et mettre en cache |
|
| 114 | + if (function_exists($nom)) { |
|
| 115 | + $code = squelette_traduit($skel, $source, $phpfile, $skel_code); |
|
| 116 | + } else { |
|
| 117 | + // code semantiquement faux: bug du compilateur |
|
| 118 | + // $boucle est en fait ici la fct principale du squelette |
|
| 119 | + $msg = _T('zbug_erreur_compilation'); |
|
| 120 | + erreur_squelette($msg, $boucle); |
|
| 121 | + $nom = ''; |
|
| 122 | + } |
|
| 123 | + } |
|
| 124 | + |
|
| 125 | + if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
|
| 126 | + // Tracer ce qui vient d'etre compile |
|
| 127 | + $GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code; |
|
| 128 | + |
|
| 129 | + // si c'est ce que demande le debusqueur, lui passer la main |
|
| 130 | + if ( |
|
| 131 | + $GLOBALS['debug_objets']['sourcefile'] |
|
| 132 | + and (_request('var_mode_objet') == $nom) |
|
| 133 | + and (_request('var_mode_affiche') == 'code') |
|
| 134 | + ) { |
|
| 135 | + erreur_squelette(); |
|
| 136 | + } |
|
| 137 | + } |
|
| 138 | + |
|
| 139 | + return $nom ?: false; |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | function squelette_traduit($squelette, $sourcefile, $phpfile, $boucles) { |
| 143 | 143 | |
| 144 | - $code = null; |
|
| 145 | - // Le dernier index est '' (fonction principale) |
|
| 146 | - $noms = substr(join(', ', array_keys($boucles)), 0, -2); |
|
| 147 | - if (CODE_COMMENTE) { |
|
| 148 | - $code = " |
|
| 144 | + $code = null; |
|
| 145 | + // Le dernier index est '' (fonction principale) |
|
| 146 | + $noms = substr(join(', ', array_keys($boucles)), 0, -2); |
|
| 147 | + if (CODE_COMMENTE) { |
|
| 148 | + $code = " |
|
| 149 | 149 | /* |
| 150 | 150 | * Squelette : $sourcefile |
| 151 | 151 | * Date : " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT |
| 152 | 152 | * Compile : ' . gmdate('D, d M Y H:i:s', time()) . ' GMT |
| 153 | 153 | * ' . (!$boucles ? 'Pas de boucle' : ('Boucles : ' . $noms)) . ' |
| 154 | 154 | */ '; |
| 155 | - } |
|
| 155 | + } |
|
| 156 | 156 | |
| 157 | - $code = '<' . "?php\n" . $code . join('', $boucles) . "\n"; |
|
| 158 | - if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) { |
|
| 159 | - ecrire_fichier($phpfile, $code); |
|
| 160 | - } |
|
| 157 | + $code = '<' . "?php\n" . $code . join('', $boucles) . "\n"; |
|
| 158 | + if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) { |
|
| 159 | + ecrire_fichier($phpfile, $code); |
|
| 160 | + } |
|
| 161 | 161 | |
| 162 | - return $code; |
|
| 162 | + return $code; |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | // Le squelette compile est-il trop vieux ? |
| 166 | 166 | function squelette_obsolete($skel, $squelette) { |
| 167 | - static $date_change = null; |
|
| 168 | - // ne verifier la date de mes_fonctions et mes_options qu'une seule fois |
|
| 169 | - // par hit |
|
| 170 | - if (is_null($date_change)) { |
|
| 171 | - if (@file_exists($fonc = 'mes_fonctions.php')) { |
|
| 172 | - $date_change = @filemtime($fonc); |
|
| 173 | - } # compatibilite |
|
| 174 | - if (defined('_FILE_OPTIONS')) { |
|
| 175 | - $date_change = max($date_change, @filemtime(_FILE_OPTIONS)); |
|
| 176 | - } |
|
| 177 | - } |
|
| 178 | - |
|
| 179 | - return ( |
|
| 180 | - (defined('_VAR_MODE') and in_array(_VAR_MODE, ['recalcul', 'preview', 'debug'])) |
|
| 181 | - or !@file_exists($skel) |
|
| 182 | - or ((@file_exists($squelette) ? @filemtime($squelette) : 0) |
|
| 183 | - > ($date = @filemtime($skel))) |
|
| 184 | - or ($date_change > $date) |
|
| 185 | - ); |
|
| 167 | + static $date_change = null; |
|
| 168 | + // ne verifier la date de mes_fonctions et mes_options qu'une seule fois |
|
| 169 | + // par hit |
|
| 170 | + if (is_null($date_change)) { |
|
| 171 | + if (@file_exists($fonc = 'mes_fonctions.php')) { |
|
| 172 | + $date_change = @filemtime($fonc); |
|
| 173 | + } # compatibilite |
|
| 174 | + if (defined('_FILE_OPTIONS')) { |
|
| 175 | + $date_change = max($date_change, @filemtime(_FILE_OPTIONS)); |
|
| 176 | + } |
|
| 177 | + } |
|
| 178 | + |
|
| 179 | + return ( |
|
| 180 | + (defined('_VAR_MODE') and in_array(_VAR_MODE, ['recalcul', 'preview', 'debug'])) |
|
| 181 | + or !@file_exists($skel) |
|
| 182 | + or ((@file_exists($squelette) ? @filemtime($squelette) : 0) |
|
| 183 | + > ($date = @filemtime($skel))) |
|
| 184 | + or ($date_change > $date) |
|
| 185 | + ); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | // Activer l'invalideur de session |
| 189 | 189 | function invalideur_session(&$Cache, $code = null) { |
| 190 | - $Cache['session'] = spip_session(); |
|
| 190 | + $Cache['session'] = spip_session(); |
|
| 191 | 191 | |
| 192 | - return $code; |
|
| 192 | + return $code; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | |
| 196 | 196 | function analyse_resultat_skel($nom, $cache, $corps, $source = '') { |
| 197 | - static $filtres = []; |
|
| 198 | - $headers = []; |
|
| 199 | - $corps ??= ''; |
|
| 200 | - |
|
| 201 | - // Recupere les < ?php header('Xx: y'); ? > pour $page['headers'] |
|
| 202 | - // note: on essaie d'attrapper aussi certains de ces entetes codes |
|
| 203 | - // "a la main" dans les squelettes, mais evidemment sans exhaustivite |
|
| 204 | - if ( |
|
| 205 | - stripos($corps, 'header') !== false |
|
| 206 | - and preg_match_all( |
|
| 207 | - '/(<[?]php\s+)@?header\s*\(\s*.([^:\'"]*):?\s*([^)]*)[^)]\s*\)\s*[;]?\s*[?]>/ims', |
|
| 208 | - $corps, |
|
| 209 | - $regs, |
|
| 210 | - PREG_SET_ORDER |
|
| 211 | - ) |
|
| 212 | - ) { |
|
| 213 | - foreach ($regs as $r) { |
|
| 214 | - $corps = str_replace($r[0], '', $corps); |
|
| 215 | - # $j = Content-Type, et pas content-TYPE. |
|
| 216 | - $j = join('-', array_map('ucwords', explode('-', strtolower($r[2])))); |
|
| 217 | - |
|
| 218 | - if ($j == 'X-Spip-Filtre' and isset($headers[$j])) { |
|
| 219 | - $headers[$j] .= '|' . $r[3]; |
|
| 220 | - } else { |
|
| 221 | - $headers[$j] = $r[3]; |
|
| 222 | - } |
|
| 223 | - } |
|
| 224 | - } |
|
| 225 | - // S'agit-il d'un resultat constant ou contenant du code php |
|
| 226 | - $process_ins = ( |
|
| 227 | - strpos($corps, '<' . '?') === false |
|
| 228 | - or |
|
| 229 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 230 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 231 | - ) |
|
| 232 | - ? 'html' |
|
| 233 | - : 'php'; |
|
| 234 | - |
|
| 235 | - $skel = [ |
|
| 236 | - 'squelette' => $nom, |
|
| 237 | - 'source' => $source, |
|
| 238 | - 'process_ins' => $process_ins, |
|
| 239 | - 'invalideurs' => $cache, |
|
| 240 | - 'entetes' => $headers, |
|
| 241 | - 'duree' => isset($headers['X-Spip-Cache']) ? intval($headers['X-Spip-Cache']) : 0 |
|
| 242 | - ]; |
|
| 243 | - |
|
| 244 | - // traiter #FILTRE{} et filtres |
|
| 245 | - if (!isset($filtres[$nom])) { |
|
| 246 | - $filtres[$nom] = pipeline('declarer_filtres_squelettes', ['args' => $skel, 'data' => []]); |
|
| 247 | - } |
|
| 248 | - $filtres_headers = []; |
|
| 249 | - if (isset($headers['X-Spip-Filtre']) and strlen($headers['X-Spip-Filtre'])) { |
|
| 250 | - $filtres_headers = array_filter(explode('|', $headers['X-Spip-Filtre'])); |
|
| 251 | - unset($headers['X-Spip-Filtre']); |
|
| 252 | - } |
|
| 253 | - if (is_array($filtres[$nom]) || $filtres[$nom] instanceof \Countable ? count($filtres[$nom]) : 0 or count($filtres_headers)) { |
|
| 254 | - include_spip('public/sandbox'); |
|
| 255 | - $corps = sandbox_filtrer_squelette($skel, $corps, $filtres_headers, $filtres[$nom]); |
|
| 256 | - |
|
| 257 | - if ($process_ins == 'html') { |
|
| 258 | - $skel['process_ins'] = ( |
|
| 259 | - strpos($corps, '<' . '?') === false |
|
| 260 | - or |
|
| 261 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 262 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 263 | - ) |
|
| 264 | - ? 'html' |
|
| 265 | - : 'php'; |
|
| 266 | - } |
|
| 267 | - } |
|
| 268 | - |
|
| 269 | - $skel['entetes'] = $headers; |
|
| 270 | - $skel['texte'] = $corps; |
|
| 271 | - |
|
| 272 | - return $skel; |
|
| 197 | + static $filtres = []; |
|
| 198 | + $headers = []; |
|
| 199 | + $corps ??= ''; |
|
| 200 | + |
|
| 201 | + // Recupere les < ?php header('Xx: y'); ? > pour $page['headers'] |
|
| 202 | + // note: on essaie d'attrapper aussi certains de ces entetes codes |
|
| 203 | + // "a la main" dans les squelettes, mais evidemment sans exhaustivite |
|
| 204 | + if ( |
|
| 205 | + stripos($corps, 'header') !== false |
|
| 206 | + and preg_match_all( |
|
| 207 | + '/(<[?]php\s+)@?header\s*\(\s*.([^:\'"]*):?\s*([^)]*)[^)]\s*\)\s*[;]?\s*[?]>/ims', |
|
| 208 | + $corps, |
|
| 209 | + $regs, |
|
| 210 | + PREG_SET_ORDER |
|
| 211 | + ) |
|
| 212 | + ) { |
|
| 213 | + foreach ($regs as $r) { |
|
| 214 | + $corps = str_replace($r[0], '', $corps); |
|
| 215 | + # $j = Content-Type, et pas content-TYPE. |
|
| 216 | + $j = join('-', array_map('ucwords', explode('-', strtolower($r[2])))); |
|
| 217 | + |
|
| 218 | + if ($j == 'X-Spip-Filtre' and isset($headers[$j])) { |
|
| 219 | + $headers[$j] .= '|' . $r[3]; |
|
| 220 | + } else { |
|
| 221 | + $headers[$j] = $r[3]; |
|
| 222 | + } |
|
| 223 | + } |
|
| 224 | + } |
|
| 225 | + // S'agit-il d'un resultat constant ou contenant du code php |
|
| 226 | + $process_ins = ( |
|
| 227 | + strpos($corps, '<' . '?') === false |
|
| 228 | + or |
|
| 229 | + (strpos($corps, '<' . '?xml') !== false and |
|
| 230 | + strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 231 | + ) |
|
| 232 | + ? 'html' |
|
| 233 | + : 'php'; |
|
| 234 | + |
|
| 235 | + $skel = [ |
|
| 236 | + 'squelette' => $nom, |
|
| 237 | + 'source' => $source, |
|
| 238 | + 'process_ins' => $process_ins, |
|
| 239 | + 'invalideurs' => $cache, |
|
| 240 | + 'entetes' => $headers, |
|
| 241 | + 'duree' => isset($headers['X-Spip-Cache']) ? intval($headers['X-Spip-Cache']) : 0 |
|
| 242 | + ]; |
|
| 243 | + |
|
| 244 | + // traiter #FILTRE{} et filtres |
|
| 245 | + if (!isset($filtres[$nom])) { |
|
| 246 | + $filtres[$nom] = pipeline('declarer_filtres_squelettes', ['args' => $skel, 'data' => []]); |
|
| 247 | + } |
|
| 248 | + $filtres_headers = []; |
|
| 249 | + if (isset($headers['X-Spip-Filtre']) and strlen($headers['X-Spip-Filtre'])) { |
|
| 250 | + $filtres_headers = array_filter(explode('|', $headers['X-Spip-Filtre'])); |
|
| 251 | + unset($headers['X-Spip-Filtre']); |
|
| 252 | + } |
|
| 253 | + if (is_array($filtres[$nom]) || $filtres[$nom] instanceof \Countable ? count($filtres[$nom]) : 0 or count($filtres_headers)) { |
|
| 254 | + include_spip('public/sandbox'); |
|
| 255 | + $corps = sandbox_filtrer_squelette($skel, $corps, $filtres_headers, $filtres[$nom]); |
|
| 256 | + |
|
| 257 | + if ($process_ins == 'html') { |
|
| 258 | + $skel['process_ins'] = ( |
|
| 259 | + strpos($corps, '<' . '?') === false |
|
| 260 | + or |
|
| 261 | + (strpos($corps, '<' . '?xml') !== false and |
|
| 262 | + strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 263 | + ) |
|
| 264 | + ? 'html' |
|
| 265 | + : 'php'; |
|
| 266 | + } |
|
| 267 | + } |
|
| 268 | + |
|
| 269 | + $skel['entetes'] = $headers; |
|
| 270 | + $skel['texte'] = $corps; |
|
| 271 | + |
|
| 272 | + return $skel; |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | // |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | inserer_balise_dynamique(balise_%s_dyn(%s), array(%s)); |
| 284 | 284 | if ($lang_select) lang_select(); |
| 285 | 285 | ?' |
| 286 | - . '>'); |
|
| 286 | + . '>'); |
|
| 287 | 287 | |
| 288 | 288 | /** |
| 289 | 289 | * Synthétise une balise dynamique : crée l'appel à l'inclusion |
@@ -303,35 +303,35 @@ discard block |
||
| 303 | 303 | * Code PHP pour inclure le squelette de la balise dynamique |
| 304 | 304 | **/ |
| 305 | 305 | function synthetiser_balise_dynamique($nom, $args, $file, $context_compil) { |
| 306 | - if ( |
|
| 307 | - strncmp($file, '/', 1) !== 0 |
|
| 308 | - // pas de lien symbolique sous Windows |
|
| 309 | - and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false) |
|
| 310 | - ) { |
|
| 311 | - $file = './" . _DIR_RACINE . "' . $file; |
|
| 312 | - } |
|
| 313 | - |
|
| 314 | - $lang = $context_compil[4]; |
|
| 315 | - if (preg_match(',\W,', $lang)) { |
|
| 316 | - $lang = ''; |
|
| 317 | - } |
|
| 318 | - |
|
| 319 | - $args = array_map('argumenter_squelette', $args); |
|
| 320 | - if (!empty($context_compil['appel_php_depuis_modele'])) { |
|
| 321 | - $args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')'; |
|
| 322 | - } |
|
| 323 | - $args = join(', ', $args); |
|
| 324 | - |
|
| 325 | - $r = sprintf( |
|
| 326 | - CODE_INCLURE_BALISE, |
|
| 327 | - $file, |
|
| 328 | - $lang, |
|
| 329 | - $nom, |
|
| 330 | - $args, |
|
| 331 | - join(', ', array_map('_q', $context_compil)) |
|
| 332 | - ); |
|
| 333 | - |
|
| 334 | - return $r; |
|
| 306 | + if ( |
|
| 307 | + strncmp($file, '/', 1) !== 0 |
|
| 308 | + // pas de lien symbolique sous Windows |
|
| 309 | + and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false) |
|
| 310 | + ) { |
|
| 311 | + $file = './" . _DIR_RACINE . "' . $file; |
|
| 312 | + } |
|
| 313 | + |
|
| 314 | + $lang = $context_compil[4]; |
|
| 315 | + if (preg_match(',\W,', $lang)) { |
|
| 316 | + $lang = ''; |
|
| 317 | + } |
|
| 318 | + |
|
| 319 | + $args = array_map('argumenter_squelette', $args); |
|
| 320 | + if (!empty($context_compil['appel_php_depuis_modele'])) { |
|
| 321 | + $args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')'; |
|
| 322 | + } |
|
| 323 | + $args = join(', ', $args); |
|
| 324 | + |
|
| 325 | + $r = sprintf( |
|
| 326 | + CODE_INCLURE_BALISE, |
|
| 327 | + $file, |
|
| 328 | + $lang, |
|
| 329 | + $nom, |
|
| 330 | + $args, |
|
| 331 | + join(', ', array_map('_q', $context_compil)) |
|
| 332 | + ); |
|
| 333 | + |
|
| 334 | + return $r; |
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | /** |
@@ -349,18 +349,18 @@ discard block |
||
| 349 | 349 | **/ |
| 350 | 350 | function argumenter_squelette($v) { |
| 351 | 351 | |
| 352 | - if (is_object($v)) { |
|
| 353 | - return var_export($v, true); |
|
| 354 | - } elseif (!is_array($v)) { |
|
| 355 | - return "'" . texte_script((string) $v) . "'"; |
|
| 356 | - } else { |
|
| 357 | - $out = []; |
|
| 358 | - foreach ($v as $k => $val) { |
|
| 359 | - $out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val); |
|
| 360 | - } |
|
| 361 | - |
|
| 362 | - return 'array(' . join(', ', $out) . ')'; |
|
| 363 | - } |
|
| 352 | + if (is_object($v)) { |
|
| 353 | + return var_export($v, true); |
|
| 354 | + } elseif (!is_array($v)) { |
|
| 355 | + return "'" . texte_script((string) $v) . "'"; |
|
| 356 | + } else { |
|
| 357 | + $out = []; |
|
| 358 | + foreach ($v as $k => $val) { |
|
| 359 | + $out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val); |
|
| 360 | + } |
|
| 361 | + |
|
| 362 | + return 'array(' . join(', ', $out) . ')'; |
|
| 363 | + } |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | |
@@ -391,87 +391,87 @@ discard block |
||
| 391 | 391 | * Code PHP d'exécutant l'inclusion du squelette (ou texte) de la balise dynamique |
| 392 | 392 | **/ |
| 393 | 393 | function executer_balise_dynamique($nom, $args, $context_compil) { |
| 394 | - /** @var string Nom de la balise à charger (balise demandée ou balise générique) */ |
|
| 395 | - $nom_balise = $nom; |
|
| 396 | - /** @var string Nom de la balise générique (si utilisée) */ |
|
| 397 | - $nom_balise_generique = ''; |
|
| 398 | - |
|
| 399 | - $appel_php_depuis_modele = false; |
|
| 400 | - if ( |
|
| 401 | - is_array($context_compil) |
|
| 402 | - and !is_numeric($context_compil[3]) |
|
| 403 | - and empty($context_compil[0]) |
|
| 404 | - and empty($context_compil[1]) |
|
| 405 | - and empty($context_compil[2]) |
|
| 406 | - and empty($context_compil[3]) |
|
| 407 | - ) { |
|
| 408 | - $appel_php_depuis_modele = true; |
|
| 409 | - } |
|
| 410 | - |
|
| 411 | - if (!$fonction_balise = charger_fonction($nom_balise, 'balise', true)) { |
|
| 412 | - // Calculer un nom générique (ie. 'formulaire_' dans 'formulaire_editer_article') |
|
| 413 | - if ($balise_generique = chercher_balise_generique($nom)) { |
|
| 414 | - // injecter en premier arg le nom de la balise |
|
| 415 | - array_unshift($args, $nom); |
|
| 416 | - $nom_balise_generique = $balise_generique['nom_generique']; |
|
| 417 | - $fonction_balise = $balise_generique['fonction_generique']; |
|
| 418 | - $nom_balise = $nom_balise_generique; |
|
| 419 | - } |
|
| 420 | - unset($balise_generique); |
|
| 421 | - } |
|
| 422 | - |
|
| 423 | - if (!$fonction_balise) { |
|
| 424 | - $msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]]; |
|
| 425 | - erreur_squelette($msg, $context_compil); |
|
| 426 | - |
|
| 427 | - return ''; |
|
| 428 | - } |
|
| 429 | - |
|
| 430 | - // retrouver le fichier qui a déclaré la fonction |
|
| 431 | - // même si la fonction dynamique est déclarée dans un fichier de fonctions. |
|
| 432 | - // Attention sous windows, getFileName() retourne un antislash. |
|
| 433 | - $reflector = new ReflectionFunction($fonction_balise); |
|
| 434 | - $file = str_replace('\\', '/', $reflector->getFileName()); |
|
| 435 | - if (strncmp($file, str_replace('\\', '/', _ROOT_RACINE), strlen(_ROOT_RACINE)) === 0) { |
|
| 436 | - $file = substr($file, strlen(_ROOT_RACINE)); |
|
| 437 | - } |
|
| 438 | - |
|
| 439 | - // Y a-t-il une fonction de traitement des arguments ? |
|
| 440 | - $f = 'balise_' . $nom_balise . '_stat'; |
|
| 441 | - |
|
| 442 | - $r = !function_exists($f) ? $args : $f($args, $context_compil); |
|
| 443 | - |
|
| 444 | - if (!is_array($r)) { |
|
| 445 | - return $r; |
|
| 446 | - } |
|
| 447 | - |
|
| 448 | - // verifier que la fonction dyn est la, |
|
| 449 | - // sinon se replier sur la generique si elle existe |
|
| 450 | - if (!function_exists('balise_' . $nom_balise . '_dyn')) { |
|
| 451 | - if ( |
|
| 452 | - $balise_generique = chercher_balise_generique($nom) |
|
| 453 | - and $nom_balise_generique = $balise_generique['nom_generique'] |
|
| 454 | - and $file = include_spip('balise/' . strtolower($nom_balise_generique)) |
|
| 455 | - and function_exists('balise_' . $nom_balise_generique . '_dyn') |
|
| 456 | - ) { |
|
| 457 | - // et lui injecter en premier arg le nom de la balise |
|
| 458 | - array_unshift($r, $nom); |
|
| 459 | - $nom_balise = $nom_balise_generique; |
|
| 460 | - if (!_DIR_RESTREINT) { |
|
| 461 | - $file = _DIR_RESTREINT_ABS . $file; |
|
| 462 | - } |
|
| 463 | - } else { |
|
| 464 | - $msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]]; |
|
| 465 | - erreur_squelette($msg, $context_compil); |
|
| 466 | - |
|
| 467 | - return ''; |
|
| 468 | - } |
|
| 469 | - } |
|
| 470 | - |
|
| 471 | - if ($appel_php_depuis_modele) { |
|
| 472 | - $context_compil['appel_php_depuis_modele'] = true; |
|
| 473 | - } |
|
| 474 | - return synthetiser_balise_dynamique($nom_balise, $r, $file, $context_compil); |
|
| 394 | + /** @var string Nom de la balise à charger (balise demandée ou balise générique) */ |
|
| 395 | + $nom_balise = $nom; |
|
| 396 | + /** @var string Nom de la balise générique (si utilisée) */ |
|
| 397 | + $nom_balise_generique = ''; |
|
| 398 | + |
|
| 399 | + $appel_php_depuis_modele = false; |
|
| 400 | + if ( |
|
| 401 | + is_array($context_compil) |
|
| 402 | + and !is_numeric($context_compil[3]) |
|
| 403 | + and empty($context_compil[0]) |
|
| 404 | + and empty($context_compil[1]) |
|
| 405 | + and empty($context_compil[2]) |
|
| 406 | + and empty($context_compil[3]) |
|
| 407 | + ) { |
|
| 408 | + $appel_php_depuis_modele = true; |
|
| 409 | + } |
|
| 410 | + |
|
| 411 | + if (!$fonction_balise = charger_fonction($nom_balise, 'balise', true)) { |
|
| 412 | + // Calculer un nom générique (ie. 'formulaire_' dans 'formulaire_editer_article') |
|
| 413 | + if ($balise_generique = chercher_balise_generique($nom)) { |
|
| 414 | + // injecter en premier arg le nom de la balise |
|
| 415 | + array_unshift($args, $nom); |
|
| 416 | + $nom_balise_generique = $balise_generique['nom_generique']; |
|
| 417 | + $fonction_balise = $balise_generique['fonction_generique']; |
|
| 418 | + $nom_balise = $nom_balise_generique; |
|
| 419 | + } |
|
| 420 | + unset($balise_generique); |
|
| 421 | + } |
|
| 422 | + |
|
| 423 | + if (!$fonction_balise) { |
|
| 424 | + $msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]]; |
|
| 425 | + erreur_squelette($msg, $context_compil); |
|
| 426 | + |
|
| 427 | + return ''; |
|
| 428 | + } |
|
| 429 | + |
|
| 430 | + // retrouver le fichier qui a déclaré la fonction |
|
| 431 | + // même si la fonction dynamique est déclarée dans un fichier de fonctions. |
|
| 432 | + // Attention sous windows, getFileName() retourne un antislash. |
|
| 433 | + $reflector = new ReflectionFunction($fonction_balise); |
|
| 434 | + $file = str_replace('\\', '/', $reflector->getFileName()); |
|
| 435 | + if (strncmp($file, str_replace('\\', '/', _ROOT_RACINE), strlen(_ROOT_RACINE)) === 0) { |
|
| 436 | + $file = substr($file, strlen(_ROOT_RACINE)); |
|
| 437 | + } |
|
| 438 | + |
|
| 439 | + // Y a-t-il une fonction de traitement des arguments ? |
|
| 440 | + $f = 'balise_' . $nom_balise . '_stat'; |
|
| 441 | + |
|
| 442 | + $r = !function_exists($f) ? $args : $f($args, $context_compil); |
|
| 443 | + |
|
| 444 | + if (!is_array($r)) { |
|
| 445 | + return $r; |
|
| 446 | + } |
|
| 447 | + |
|
| 448 | + // verifier que la fonction dyn est la, |
|
| 449 | + // sinon se replier sur la generique si elle existe |
|
| 450 | + if (!function_exists('balise_' . $nom_balise . '_dyn')) { |
|
| 451 | + if ( |
|
| 452 | + $balise_generique = chercher_balise_generique($nom) |
|
| 453 | + and $nom_balise_generique = $balise_generique['nom_generique'] |
|
| 454 | + and $file = include_spip('balise/' . strtolower($nom_balise_generique)) |
|
| 455 | + and function_exists('balise_' . $nom_balise_generique . '_dyn') |
|
| 456 | + ) { |
|
| 457 | + // et lui injecter en premier arg le nom de la balise |
|
| 458 | + array_unshift($r, $nom); |
|
| 459 | + $nom_balise = $nom_balise_generique; |
|
| 460 | + if (!_DIR_RESTREINT) { |
|
| 461 | + $file = _DIR_RESTREINT_ABS . $file; |
|
| 462 | + } |
|
| 463 | + } else { |
|
| 464 | + $msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]]; |
|
| 465 | + erreur_squelette($msg, $context_compil); |
|
| 466 | + |
|
| 467 | + return ''; |
|
| 468 | + } |
|
| 469 | + } |
|
| 470 | + |
|
| 471 | + if ($appel_php_depuis_modele) { |
|
| 472 | + $context_compil['appel_php_depuis_modele'] = true; |
|
| 473 | + } |
|
| 474 | + return synthetiser_balise_dynamique($nom_balise, $r, $file, $context_compil); |
|
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | /** |
@@ -486,23 +486,23 @@ discard block |
||
| 486 | 486 | * @return array|null |
| 487 | 487 | */ |
| 488 | 488 | function chercher_balise_generique($nom) { |
| 489 | - if (false === strpos($nom, '_')) { |
|
| 490 | - return null; |
|
| 491 | - } |
|
| 492 | - $nom_generique = $nom; |
|
| 493 | - while (false !== ($p = strrpos($nom_generique, '_'))) { |
|
| 494 | - $nom_generique = substr($nom_generique, 0, $p + 1); |
|
| 495 | - $fonction_generique = charger_fonction($nom_generique, 'balise', true); |
|
| 496 | - if ($fonction_generique) { |
|
| 497 | - return [ |
|
| 498 | - 'nom' => $nom, |
|
| 499 | - 'nom_generique' => $nom_generique, |
|
| 500 | - 'fonction_generique' => $fonction_generique, |
|
| 501 | - ]; |
|
| 502 | - } |
|
| 503 | - $nom_generique = substr($nom_generique, 0, -1); |
|
| 504 | - } |
|
| 505 | - return null; |
|
| 489 | + if (false === strpos($nom, '_')) { |
|
| 490 | + return null; |
|
| 491 | + } |
|
| 492 | + $nom_generique = $nom; |
|
| 493 | + while (false !== ($p = strrpos($nom_generique, '_'))) { |
|
| 494 | + $nom_generique = substr($nom_generique, 0, $p + 1); |
|
| 495 | + $fonction_generique = charger_fonction($nom_generique, 'balise', true); |
|
| 496 | + if ($fonction_generique) { |
|
| 497 | + return [ |
|
| 498 | + 'nom' => $nom, |
|
| 499 | + 'nom_generique' => $nom_generique, |
|
| 500 | + 'fonction_generique' => $fonction_generique, |
|
| 501 | + ]; |
|
| 502 | + } |
|
| 503 | + $nom_generique = substr($nom_generique, 0, -1); |
|
| 504 | + } |
|
| 505 | + return null; |
|
| 506 | 506 | } |
| 507 | 507 | |
| 508 | 508 | |
@@ -526,50 +526,50 @@ discard block |
||
| 526 | 526 | * @return null; |
| 527 | 527 | **/ |
| 528 | 528 | function lang_select_public($lang, $lang_select, $titre = null) { |
| 529 | - // Cas 1. forcer_lang = true et pas de critere {lang_select} |
|
| 530 | - if ( |
|
| 531 | - isset($GLOBALS['forcer_lang']) and $GLOBALS['forcer_lang'] |
|
| 532 | - and $lang_select !== 'oui' |
|
| 533 | - ) { |
|
| 534 | - $lang = $GLOBALS['spip_lang']; |
|
| 535 | - } // Cas 2. l'objet n'a pas de langue definie (ou definie a '') |
|
| 536 | - elseif (!strlen($lang)) { |
|
| 537 | - $lang = $GLOBALS['spip_lang']; |
|
| 538 | - } // Cas 3. l'objet est multilingue ! |
|
| 539 | - elseif ( |
|
| 540 | - $lang_select !== 'oui' |
|
| 541 | - and strlen($titre) > 10 |
|
| 542 | - and strpos($titre, '<multi>') !== false |
|
| 543 | - and strpos(echappe_html($titre), '<multi>') !== false |
|
| 544 | - ) { |
|
| 545 | - $lang = $GLOBALS['spip_lang']; |
|
| 546 | - } |
|
| 547 | - |
|
| 548 | - // faire un lang_select() eventuellement sur la langue inchangee |
|
| 549 | - lang_select($lang); |
|
| 550 | - |
|
| 551 | - return; |
|
| 529 | + // Cas 1. forcer_lang = true et pas de critere {lang_select} |
|
| 530 | + if ( |
|
| 531 | + isset($GLOBALS['forcer_lang']) and $GLOBALS['forcer_lang'] |
|
| 532 | + and $lang_select !== 'oui' |
|
| 533 | + ) { |
|
| 534 | + $lang = $GLOBALS['spip_lang']; |
|
| 535 | + } // Cas 2. l'objet n'a pas de langue definie (ou definie a '') |
|
| 536 | + elseif (!strlen($lang)) { |
|
| 537 | + $lang = $GLOBALS['spip_lang']; |
|
| 538 | + } // Cas 3. l'objet est multilingue ! |
|
| 539 | + elseif ( |
|
| 540 | + $lang_select !== 'oui' |
|
| 541 | + and strlen($titre) > 10 |
|
| 542 | + and strpos($titre, '<multi>') !== false |
|
| 543 | + and strpos(echappe_html($titre), '<multi>') !== false |
|
| 544 | + ) { |
|
| 545 | + $lang = $GLOBALS['spip_lang']; |
|
| 546 | + } |
|
| 547 | + |
|
| 548 | + // faire un lang_select() eventuellement sur la langue inchangee |
|
| 549 | + lang_select($lang); |
|
| 550 | + |
|
| 551 | + return; |
|
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | |
| 555 | 555 | // Si un tableau &doublons[articles] est passe en parametre, |
| 556 | 556 | // il faut le nettoyer car il pourrait etre injecte en SQL |
| 557 | 557 | function nettoyer_env_doublons($envd) { |
| 558 | - foreach ($envd as $table => $liste) { |
|
| 559 | - $n = ''; |
|
| 560 | - foreach (explode(',', $liste) as $val) { |
|
| 561 | - if ($a = intval($val) and $val === strval($a)) { |
|
| 562 | - $n .= ',' . $val; |
|
| 563 | - } |
|
| 564 | - } |
|
| 565 | - if (strlen($n)) { |
|
| 566 | - $envd[$table] = $n; |
|
| 567 | - } else { |
|
| 568 | - unset($envd[$table]); |
|
| 569 | - } |
|
| 570 | - } |
|
| 571 | - |
|
| 572 | - return $envd; |
|
| 558 | + foreach ($envd as $table => $liste) { |
|
| 559 | + $n = ''; |
|
| 560 | + foreach (explode(',', $liste) as $val) { |
|
| 561 | + if ($a = intval($val) and $val === strval($a)) { |
|
| 562 | + $n .= ',' . $val; |
|
| 563 | + } |
|
| 564 | + } |
|
| 565 | + if (strlen($n)) { |
|
| 566 | + $envd[$table] = $n; |
|
| 567 | + } else { |
|
| 568 | + unset($envd[$table]); |
|
| 569 | + } |
|
| 570 | + } |
|
| 571 | + |
|
| 572 | + return $envd; |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | /** |
@@ -588,21 +588,21 @@ discard block |
||
| 588 | 588 | * Opérateur trouvé (SELF ou SUBSELECT) sinon false. |
| 589 | 589 | **/ |
| 590 | 590 | function match_self($w) { |
| 591 | - if (is_string($w)) { |
|
| 592 | - return false; |
|
| 593 | - } |
|
| 594 | - if (is_array($w)) { |
|
| 595 | - if (in_array(reset($w), ['SELF', 'SUBSELECT'])) { |
|
| 596 | - return $w; |
|
| 597 | - } |
|
| 598 | - foreach (array_filter($w, 'is_array') as $sw) { |
|
| 599 | - if ($m = match_self($sw)) { |
|
| 600 | - return $m; |
|
| 601 | - } |
|
| 602 | - } |
|
| 603 | - } |
|
| 604 | - |
|
| 605 | - return false; |
|
| 591 | + if (is_string($w)) { |
|
| 592 | + return false; |
|
| 593 | + } |
|
| 594 | + if (is_array($w)) { |
|
| 595 | + if (in_array(reset($w), ['SELF', 'SUBSELECT'])) { |
|
| 596 | + return $w; |
|
| 597 | + } |
|
| 598 | + foreach (array_filter($w, 'is_array') as $sw) { |
|
| 599 | + if ($m = match_self($sw)) { |
|
| 600 | + return $m; |
|
| 601 | + } |
|
| 602 | + } |
|
| 603 | + } |
|
| 604 | + |
|
| 605 | + return false; |
|
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | /** |
@@ -618,16 +618,16 @@ discard block |
||
| 618 | 618 | * est remplacée par son code. |
| 619 | 619 | **/ |
| 620 | 620 | function remplace_sous_requete($w, $sousrequete) { |
| 621 | - if (is_array($w)) { |
|
| 622 | - if (in_array(reset($w), ['SELF', 'SUBSELECT'])) { |
|
| 623 | - return $sousrequete; |
|
| 624 | - } |
|
| 625 | - foreach ($w as $k => $sw) { |
|
| 626 | - $w[$k] = remplace_sous_requete($sw, $sousrequete); |
|
| 627 | - } |
|
| 628 | - } |
|
| 629 | - |
|
| 630 | - return $w; |
|
| 621 | + if (is_array($w)) { |
|
| 622 | + if (in_array(reset($w), ['SELF', 'SUBSELECT'])) { |
|
| 623 | + return $sousrequete; |
|
| 624 | + } |
|
| 625 | + foreach ($w as $k => $sw) { |
|
| 626 | + $w[$k] = remplace_sous_requete($sw, $sousrequete); |
|
| 627 | + } |
|
| 628 | + } |
|
| 629 | + |
|
| 630 | + return $w; |
|
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | /** |
@@ -641,17 +641,17 @@ discard block |
||
| 641 | 641 | * - Conditions avec des sous requêtes |
| 642 | 642 | **/ |
| 643 | 643 | function trouver_sous_requetes($where) { |
| 644 | - $where_simples = []; |
|
| 645 | - $where_sous = []; |
|
| 646 | - foreach ($where as $k => $w) { |
|
| 647 | - if (match_self($w)) { |
|
| 648 | - $where_sous[$k] = $w; |
|
| 649 | - } else { |
|
| 650 | - $where_simples[$k] = $w; |
|
| 651 | - } |
|
| 652 | - } |
|
| 653 | - |
|
| 654 | - return [$where_simples, $where_sous]; |
|
| 644 | + $where_simples = []; |
|
| 645 | + $where_sous = []; |
|
| 646 | + foreach ($where as $k => $w) { |
|
| 647 | + if (match_self($w)) { |
|
| 648 | + $where_sous[$k] = $w; |
|
| 649 | + } else { |
|
| 650 | + $where_simples[$k] = $w; |
|
| 651 | + } |
|
| 652 | + } |
|
| 653 | + |
|
| 654 | + return [$where_simples, $where_sous]; |
|
| 655 | 655 | } |
| 656 | 656 | |
| 657 | 657 | |
@@ -677,292 +677,292 @@ discard block |
||
| 677 | 677 | * @return resource |
| 678 | 678 | */ |
| 679 | 679 | function calculer_select( |
| 680 | - $select = [], |
|
| 681 | - $from = [], |
|
| 682 | - $from_type = [], |
|
| 683 | - $where = [], |
|
| 684 | - $join = [], |
|
| 685 | - $groupby = [], |
|
| 686 | - $orderby = [], |
|
| 687 | - $limit = '', |
|
| 688 | - $having = [], |
|
| 689 | - $table = '', |
|
| 690 | - $id = '', |
|
| 691 | - $serveur = '', |
|
| 692 | - $requeter = true |
|
| 680 | + $select = [], |
|
| 681 | + $from = [], |
|
| 682 | + $from_type = [], |
|
| 683 | + $where = [], |
|
| 684 | + $join = [], |
|
| 685 | + $groupby = [], |
|
| 686 | + $orderby = [], |
|
| 687 | + $limit = '', |
|
| 688 | + $having = [], |
|
| 689 | + $table = '', |
|
| 690 | + $id = '', |
|
| 691 | + $serveur = '', |
|
| 692 | + $requeter = true |
|
| 693 | 693 | ) { |
| 694 | 694 | |
| 695 | - // retirer les criteres vides: |
|
| 696 | - // {X ?} avec X absent de l'URL |
|
| 697 | - // {par #ENV{X}} avec X absent de l'URL |
|
| 698 | - // IN sur collection vide (ce dernier devrait pouvoir etre fait a la compil) |
|
| 699 | - $menage = false; |
|
| 700 | - foreach ($where as $k => $v) { |
|
| 701 | - if (is_array($v) and count($v)) { |
|
| 702 | - if ((count($v) >= 2) && ($v[0] == 'REGEXP') && ($v[2] == "'.*'")) { |
|
| 703 | - $op = false; |
|
| 704 | - } elseif ((count($v) >= 2) && ($v[0] == 'LIKE') && ($v[2] == "'%'")) { |
|
| 705 | - $op = false; |
|
| 706 | - } else { |
|
| 707 | - $op = $v[0] ?: $v; |
|
| 708 | - } |
|
| 709 | - } else { |
|
| 710 | - $op = $v; |
|
| 711 | - } |
|
| 712 | - if ((!$op) or ($op == 1) or ($op == '0=0')) { |
|
| 713 | - unset($where[$k]); |
|
| 714 | - $menage = true; |
|
| 715 | - } |
|
| 716 | - } |
|
| 717 | - |
|
| 718 | - // evacuer les eventuels groupby vide issus d'un calcul dynamique |
|
| 719 | - $groupby = array_diff($groupby, ['']); |
|
| 720 | - |
|
| 721 | - // remplacer les sous requetes recursives au calcul |
|
| 722 | - [$where_simples, $where_sous] = trouver_sous_requetes($where); |
|
| 723 | - foreach ($where_sous as $k => $w) { |
|
| 724 | - $menage = true; |
|
| 725 | - // on recupere la sous requete |
|
| 726 | - $sous = match_self($w); |
|
| 727 | - if ($sous[0] == 'SELF') { |
|
| 728 | - // c'est une sous requete identique a elle meme sous la forme (SELF,$select,$where) |
|
| 729 | - array_push($where_simples, $sous[2]); |
|
| 730 | - $wheresub = [ |
|
| 731 | - $sous[2], |
|
| 732 | - '0=0' |
|
| 733 | - ]; // pour accepter une string et forcer a faire le menage car on a surement simplifie select et where |
|
| 734 | - $jsub = $join; |
|
| 735 | - // trouver les jointures utiles a |
|
| 736 | - // reinjecter dans le where de la sous requete les conditions supplementaires des jointures qui y sont mentionnees |
|
| 737 | - // ie L1.objet='article' |
|
| 738 | - // on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction |
|
| 739 | - $i = 0; |
|
| 740 | - do { |
|
| 741 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 742 | - [$sous[1] . ' AS id'], |
|
| 743 | - $from, |
|
| 744 | - $from_type, |
|
| 745 | - $wheresub, |
|
| 746 | - $jsub, |
|
| 747 | - [], |
|
| 748 | - [], |
|
| 749 | - '', |
|
| 750 | - $having, |
|
| 751 | - $table, |
|
| 752 | - $id, |
|
| 753 | - $serveur, |
|
| 754 | - false |
|
| 755 | - ) . ')'); |
|
| 756 | - if (!$i) { |
|
| 757 | - $i = 1; |
|
| 758 | - $wherestring = calculer_where_to_string($where[$k]); |
|
| 759 | - foreach ($join as $cle => $wj) { |
|
| 760 | - if ( |
|
| 761 | - (is_countable($wj) ? count($wj) : 0) == 4 |
|
| 762 | - and strpos($wherestring, (string) "{$cle}.") !== false |
|
| 763 | - ) { |
|
| 764 | - $i = 0; |
|
| 765 | - $wheresub[] = $wj[3]; |
|
| 766 | - unset($jsub[$cle][3]); |
|
| 767 | - } |
|
| 768 | - } |
|
| 769 | - } |
|
| 770 | - } while ($i++ < 1); |
|
| 771 | - } |
|
| 772 | - if ($sous[0] == 'SUBSELECT') { |
|
| 773 | - // c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having) |
|
| 774 | - array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ? |
|
| 775 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 776 | - $sous[1], # select |
|
| 777 | - $sous[2], #from |
|
| 778 | - [], #from_type |
|
| 779 | - $sous[3] ? (is_array($sous[3]) ? $sous[3] : [$sous[3]]) : [], |
|
| 780 | - #where, qui peut etre de la forme string comme dans sql_select |
|
| 781 | - [], #join |
|
| 782 | - $sous[4] ?: [], #groupby |
|
| 783 | - $sous[5] ?: [], #orderby |
|
| 784 | - $sous[6], #limit |
|
| 785 | - $sous[7] ?: [], #having |
|
| 786 | - $table, |
|
| 787 | - $id, |
|
| 788 | - $serveur, |
|
| 789 | - false |
|
| 790 | - ) . ')'); |
|
| 791 | - } |
|
| 792 | - array_pop($where_simples); |
|
| 793 | - } |
|
| 794 | - |
|
| 795 | - foreach ($having as $k => $v) { |
|
| 796 | - if ((!$v) or ($v == 1) or ($v == '0=0')) { |
|
| 797 | - unset($having[$k]); |
|
| 798 | - } |
|
| 799 | - } |
|
| 800 | - |
|
| 801 | - // Installer les jointures. |
|
| 802 | - // Retirer celles seulement utiles aux criteres finalement absents mais |
|
| 803 | - // parcourir de la plus recente a la moins recente pour pouvoir eliminer Ln |
|
| 804 | - // si elle est seulement utile a Ln+1 elle meme inutile |
|
| 805 | - |
|
| 806 | - $afrom = []; |
|
| 807 | - $equiv = []; |
|
| 808 | - $k = count($join); |
|
| 809 | - foreach (array_reverse($join, true) as $cledef => $j) { |
|
| 810 | - $cle = $cledef; |
|
| 811 | - // le format de join est : |
|
| 812 | - // array(table depart, cle depart [,cle arrivee[,condition optionnelle and ...]]) |
|
| 813 | - $join[$cle] = array_values($join[$cle]); // recalculer les cles car des unset ont pu perturber |
|
| 814 | - if (count($join[$cle]) == 2) { |
|
| 815 | - $join[$cle][] = $join[$cle][1]; |
|
| 816 | - } |
|
| 817 | - if ((is_array($join[$cle]) || $join[$cle] instanceof \Countable ? count($join[$cle]) : 0) == 3) { |
|
| 818 | - $join[$cle][] = ''; |
|
| 819 | - } |
|
| 820 | - [$t, $c, $carr, $and] = $join[$cle]; |
|
| 821 | - // si le nom de la jointure n'a pas ete specifiee, on prend Lx avec x sont rang dans la liste |
|
| 822 | - // pour compat avec ancienne convention |
|
| 823 | - if (is_numeric($cle)) { |
|
| 824 | - $cle = "L$k"; |
|
| 825 | - } |
|
| 826 | - $cle_where_lie = "JOIN-$cle"; |
|
| 827 | - if ( |
|
| 828 | - !$menage |
|
| 829 | - or isset($afrom[$cle]) |
|
| 830 | - or calculer_jointnul($cle, $select) |
|
| 831 | - or calculer_jointnul($cle, array_diff_key($join, [$cle => $join[$cle]])) |
|
| 832 | - or calculer_jointnul($cle, $having) |
|
| 833 | - or calculer_jointnul($cle, array_diff_key($where_simples, [$cle_where_lie => ''])) |
|
| 834 | - ) { |
|
| 835 | - // corriger les references non explicites dans select |
|
| 836 | - // ou groupby |
|
| 837 | - foreach ($select as $i => $s) { |
|
| 838 | - if ($s == $c) { |
|
| 839 | - $select[$i] = "$cle.$c AS $c"; |
|
| 840 | - break; |
|
| 841 | - } |
|
| 842 | - } |
|
| 843 | - foreach ($groupby as $i => $g) { |
|
| 844 | - if ($g == $c) { |
|
| 845 | - $groupby[$i] = "$cle.$c"; |
|
| 846 | - break; |
|
| 847 | - } |
|
| 848 | - } |
|
| 849 | - // on garde une ecriture decomposee pour permettre une simplification ulterieure si besoin |
|
| 850 | - // sans recours a preg_match |
|
| 851 | - // un implode(' ',..) est fait dans reinjecte_joint un peu plus bas |
|
| 852 | - $afrom[$t][$cle] = [ |
|
| 853 | - "\n" . |
|
| 854 | - ($from_type[$cle] ?? 'INNER') . ' JOIN', |
|
| 855 | - $from[$cle], |
|
| 856 | - "AS $cle", |
|
| 857 | - 'ON (', |
|
| 858 | - "$cle.$c", |
|
| 859 | - '=', |
|
| 860 | - "$t.$carr", |
|
| 861 | - ($and ? 'AND ' . $and : '') . |
|
| 862 | - ')' |
|
| 863 | - ]; |
|
| 864 | - if (isset($afrom[$cle])) { |
|
| 865 | - $afrom[$t] = $afrom[$t] + $afrom[$cle]; |
|
| 866 | - unset($afrom[$cle]); |
|
| 867 | - } |
|
| 868 | - $equiv[] = $carr; |
|
| 869 | - } else { |
|
| 870 | - unset($join[$cledef]); |
|
| 871 | - if (isset($where_simples[$cle_where_lie])) { |
|
| 872 | - unset($where_simples[$cle_where_lie]); |
|
| 873 | - unset($where[$cle_where_lie]); |
|
| 874 | - } |
|
| 875 | - } |
|
| 876 | - unset($from[$cle]); |
|
| 877 | - $k--; |
|
| 878 | - } |
|
| 879 | - |
|
| 880 | - if (count($afrom)) { |
|
| 881 | - // Regarder si la table principale ne sert finalement a rien comme dans |
|
| 882 | - //<BOUCLE3(MOTS){id_article}{id_mot}> class='on'</BOUCLE3> |
|
| 883 | - //<BOUCLE2(MOTS){id_article} />#TOTAL_BOUCLE<//B2> |
|
| 884 | - //<BOUCLE5(RUBRIQUES){id_mot}{tout} />#TOTAL_BOUCLE<//B5> |
|
| 885 | - // ou dans |
|
| 886 | - //<BOUCLE8(HIERARCHIE){id_rubrique}{tout}{type='Squelette'}{inverse}{0,1}{lang_select=non} />#TOTAL_BOUCLE<//B8> |
|
| 887 | - // qui comporte plusieurs jointures |
|
| 888 | - // ou dans |
|
| 889 | - // <BOUCLE6(ARTICLES){id_mot=2}{statut==.*} />#TOTAL_BOUCLE<//B6> |
|
| 890 | - // <BOUCLE7(ARTICLES){id_mot>0}{statut?} />#TOTAL_BOUCLE<//B7> |
|
| 891 | - // penser a regarder aussi la clause orderby pour ne pas simplifier abusivement |
|
| 892 | - // <BOUCLE9(ARTICLES){recherche truc}{par titre}>#ID_ARTICLE</BOUCLE9> |
|
| 893 | - // penser a regarder aussi la clause groubpy pour ne pas simplifier abusivement |
|
| 894 | - // <BOUCLE10(EVENEMENTS){id_rubrique} />#TOTAL_BOUCLE<//B10> |
|
| 895 | - |
|
| 896 | - $t = key($from); |
|
| 897 | - $c = current($from); |
|
| 898 | - reset($from); |
|
| 899 | - $e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/'; |
|
| 900 | - if ( |
|
| 901 | - !(strpos($t, ' ') or // jointure des le depart cf boucle_doc |
|
| 902 | - calculer_jointnul($t, $select, $e) or |
|
| 903 | - calculer_jointnul($t, $join, $e) or |
|
| 904 | - calculer_jointnul($t, $where, $e) or |
|
| 905 | - calculer_jointnul($t, $orderby, $e) or |
|
| 906 | - calculer_jointnul($t, $groupby, $e) or |
|
| 907 | - calculer_jointnul($t, $having, $e)) |
|
| 908 | - && count($afrom[$t]) |
|
| 909 | - ) { |
|
| 910 | - $nfrom = reset($afrom[$t]); |
|
| 911 | - $nt = array_key_first($afrom[$t]); |
|
| 912 | - unset($from[$t]); |
|
| 913 | - $from[$nt] = $nfrom[1]; |
|
| 914 | - unset($afrom[$t][$nt]); |
|
| 915 | - $afrom[$nt] = $afrom[$t]; |
|
| 916 | - unset($afrom[$t]); |
|
| 917 | - $e = '/\b' . preg_quote($nfrom[6]) . '\b/'; |
|
| 918 | - $t = $nfrom[4]; |
|
| 919 | - $alias = ''; |
|
| 920 | - // verifier que les deux cles sont homonymes, sinon installer un alias dans le select |
|
| 921 | - $oldcle = explode('.', $nfrom[6]); |
|
| 922 | - $oldcle = end($oldcle); |
|
| 923 | - $newcle = explode('.', $nfrom[4]); |
|
| 924 | - $newcle = end($newcle); |
|
| 925 | - if ($newcle != $oldcle) { |
|
| 926 | - // si l'ancienne cle etait deja dans le select avec un AS |
|
| 927 | - // reprendre simplement ce AS |
|
| 928 | - $as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/'; |
|
| 929 | - if (preg_match($as, implode(',', $select), $m)) { |
|
| 930 | - $alias = ''; |
|
| 931 | - } else { |
|
| 932 | - $alias = ', ' . $nfrom[4] . " AS $oldcle"; |
|
| 933 | - } |
|
| 934 | - } |
|
| 935 | - $select = remplacer_jointnul($t . $alias, $select, $e); |
|
| 936 | - $join = remplacer_jointnul($t, $join, $e); |
|
| 937 | - $where = remplacer_jointnul($t, $where, $e); |
|
| 938 | - $having = remplacer_jointnul($t, $having, $e); |
|
| 939 | - $groupby = remplacer_jointnul($t, $groupby, $e); |
|
| 940 | - $orderby = remplacer_jointnul($t, $orderby, $e); |
|
| 941 | - } |
|
| 942 | - $from = reinjecte_joint($afrom, $from); |
|
| 943 | - } |
|
| 944 | - if (empty($GLOBALS['debug']) or !is_array($GLOBALS['debug'])) { |
|
| 945 | - $wasdebug = empty($GLOBALS['debug']) ? false : $GLOBALS['debug']; |
|
| 946 | - $GLOBALS['debug'] = []; |
|
| 947 | - if ($wasdebug) { |
|
| 948 | - $GLOBALS['debug']['debug'] = true; |
|
| 949 | - } |
|
| 950 | - } |
|
| 951 | - $GLOBALS['debug']['aucasou'] = [$table, $id, $serveur, $requeter]; |
|
| 952 | - $r = sql_select( |
|
| 953 | - $select, |
|
| 954 | - $from, |
|
| 955 | - $where, |
|
| 956 | - $groupby, |
|
| 957 | - array_filter($orderby), |
|
| 958 | - $limit, |
|
| 959 | - $having, |
|
| 960 | - $serveur, |
|
| 961 | - $requeter |
|
| 962 | - ); |
|
| 963 | - unset($GLOBALS['debug']['aucasou']); |
|
| 964 | - |
|
| 965 | - return $r; |
|
| 695 | + // retirer les criteres vides: |
|
| 696 | + // {X ?} avec X absent de l'URL |
|
| 697 | + // {par #ENV{X}} avec X absent de l'URL |
|
| 698 | + // IN sur collection vide (ce dernier devrait pouvoir etre fait a la compil) |
|
| 699 | + $menage = false; |
|
| 700 | + foreach ($where as $k => $v) { |
|
| 701 | + if (is_array($v) and count($v)) { |
|
| 702 | + if ((count($v) >= 2) && ($v[0] == 'REGEXP') && ($v[2] == "'.*'")) { |
|
| 703 | + $op = false; |
|
| 704 | + } elseif ((count($v) >= 2) && ($v[0] == 'LIKE') && ($v[2] == "'%'")) { |
|
| 705 | + $op = false; |
|
| 706 | + } else { |
|
| 707 | + $op = $v[0] ?: $v; |
|
| 708 | + } |
|
| 709 | + } else { |
|
| 710 | + $op = $v; |
|
| 711 | + } |
|
| 712 | + if ((!$op) or ($op == 1) or ($op == '0=0')) { |
|
| 713 | + unset($where[$k]); |
|
| 714 | + $menage = true; |
|
| 715 | + } |
|
| 716 | + } |
|
| 717 | + |
|
| 718 | + // evacuer les eventuels groupby vide issus d'un calcul dynamique |
|
| 719 | + $groupby = array_diff($groupby, ['']); |
|
| 720 | + |
|
| 721 | + // remplacer les sous requetes recursives au calcul |
|
| 722 | + [$where_simples, $where_sous] = trouver_sous_requetes($where); |
|
| 723 | + foreach ($where_sous as $k => $w) { |
|
| 724 | + $menage = true; |
|
| 725 | + // on recupere la sous requete |
|
| 726 | + $sous = match_self($w); |
|
| 727 | + if ($sous[0] == 'SELF') { |
|
| 728 | + // c'est une sous requete identique a elle meme sous la forme (SELF,$select,$where) |
|
| 729 | + array_push($where_simples, $sous[2]); |
|
| 730 | + $wheresub = [ |
|
| 731 | + $sous[2], |
|
| 732 | + '0=0' |
|
| 733 | + ]; // pour accepter une string et forcer a faire le menage car on a surement simplifie select et where |
|
| 734 | + $jsub = $join; |
|
| 735 | + // trouver les jointures utiles a |
|
| 736 | + // reinjecter dans le where de la sous requete les conditions supplementaires des jointures qui y sont mentionnees |
|
| 737 | + // ie L1.objet='article' |
|
| 738 | + // on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction |
|
| 739 | + $i = 0; |
|
| 740 | + do { |
|
| 741 | + $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 742 | + [$sous[1] . ' AS id'], |
|
| 743 | + $from, |
|
| 744 | + $from_type, |
|
| 745 | + $wheresub, |
|
| 746 | + $jsub, |
|
| 747 | + [], |
|
| 748 | + [], |
|
| 749 | + '', |
|
| 750 | + $having, |
|
| 751 | + $table, |
|
| 752 | + $id, |
|
| 753 | + $serveur, |
|
| 754 | + false |
|
| 755 | + ) . ')'); |
|
| 756 | + if (!$i) { |
|
| 757 | + $i = 1; |
|
| 758 | + $wherestring = calculer_where_to_string($where[$k]); |
|
| 759 | + foreach ($join as $cle => $wj) { |
|
| 760 | + if ( |
|
| 761 | + (is_countable($wj) ? count($wj) : 0) == 4 |
|
| 762 | + and strpos($wherestring, (string) "{$cle}.") !== false |
|
| 763 | + ) { |
|
| 764 | + $i = 0; |
|
| 765 | + $wheresub[] = $wj[3]; |
|
| 766 | + unset($jsub[$cle][3]); |
|
| 767 | + } |
|
| 768 | + } |
|
| 769 | + } |
|
| 770 | + } while ($i++ < 1); |
|
| 771 | + } |
|
| 772 | + if ($sous[0] == 'SUBSELECT') { |
|
| 773 | + // c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having) |
|
| 774 | + array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ? |
|
| 775 | + $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 776 | + $sous[1], # select |
|
| 777 | + $sous[2], #from |
|
| 778 | + [], #from_type |
|
| 779 | + $sous[3] ? (is_array($sous[3]) ? $sous[3] : [$sous[3]]) : [], |
|
| 780 | + #where, qui peut etre de la forme string comme dans sql_select |
|
| 781 | + [], #join |
|
| 782 | + $sous[4] ?: [], #groupby |
|
| 783 | + $sous[5] ?: [], #orderby |
|
| 784 | + $sous[6], #limit |
|
| 785 | + $sous[7] ?: [], #having |
|
| 786 | + $table, |
|
| 787 | + $id, |
|
| 788 | + $serveur, |
|
| 789 | + false |
|
| 790 | + ) . ')'); |
|
| 791 | + } |
|
| 792 | + array_pop($where_simples); |
|
| 793 | + } |
|
| 794 | + |
|
| 795 | + foreach ($having as $k => $v) { |
|
| 796 | + if ((!$v) or ($v == 1) or ($v == '0=0')) { |
|
| 797 | + unset($having[$k]); |
|
| 798 | + } |
|
| 799 | + } |
|
| 800 | + |
|
| 801 | + // Installer les jointures. |
|
| 802 | + // Retirer celles seulement utiles aux criteres finalement absents mais |
|
| 803 | + // parcourir de la plus recente a la moins recente pour pouvoir eliminer Ln |
|
| 804 | + // si elle est seulement utile a Ln+1 elle meme inutile |
|
| 805 | + |
|
| 806 | + $afrom = []; |
|
| 807 | + $equiv = []; |
|
| 808 | + $k = count($join); |
|
| 809 | + foreach (array_reverse($join, true) as $cledef => $j) { |
|
| 810 | + $cle = $cledef; |
|
| 811 | + // le format de join est : |
|
| 812 | + // array(table depart, cle depart [,cle arrivee[,condition optionnelle and ...]]) |
|
| 813 | + $join[$cle] = array_values($join[$cle]); // recalculer les cles car des unset ont pu perturber |
|
| 814 | + if (count($join[$cle]) == 2) { |
|
| 815 | + $join[$cle][] = $join[$cle][1]; |
|
| 816 | + } |
|
| 817 | + if ((is_array($join[$cle]) || $join[$cle] instanceof \Countable ? count($join[$cle]) : 0) == 3) { |
|
| 818 | + $join[$cle][] = ''; |
|
| 819 | + } |
|
| 820 | + [$t, $c, $carr, $and] = $join[$cle]; |
|
| 821 | + // si le nom de la jointure n'a pas ete specifiee, on prend Lx avec x sont rang dans la liste |
|
| 822 | + // pour compat avec ancienne convention |
|
| 823 | + if (is_numeric($cle)) { |
|
| 824 | + $cle = "L$k"; |
|
| 825 | + } |
|
| 826 | + $cle_where_lie = "JOIN-$cle"; |
|
| 827 | + if ( |
|
| 828 | + !$menage |
|
| 829 | + or isset($afrom[$cle]) |
|
| 830 | + or calculer_jointnul($cle, $select) |
|
| 831 | + or calculer_jointnul($cle, array_diff_key($join, [$cle => $join[$cle]])) |
|
| 832 | + or calculer_jointnul($cle, $having) |
|
| 833 | + or calculer_jointnul($cle, array_diff_key($where_simples, [$cle_where_lie => ''])) |
|
| 834 | + ) { |
|
| 835 | + // corriger les references non explicites dans select |
|
| 836 | + // ou groupby |
|
| 837 | + foreach ($select as $i => $s) { |
|
| 838 | + if ($s == $c) { |
|
| 839 | + $select[$i] = "$cle.$c AS $c"; |
|
| 840 | + break; |
|
| 841 | + } |
|
| 842 | + } |
|
| 843 | + foreach ($groupby as $i => $g) { |
|
| 844 | + if ($g == $c) { |
|
| 845 | + $groupby[$i] = "$cle.$c"; |
|
| 846 | + break; |
|
| 847 | + } |
|
| 848 | + } |
|
| 849 | + // on garde une ecriture decomposee pour permettre une simplification ulterieure si besoin |
|
| 850 | + // sans recours a preg_match |
|
| 851 | + // un implode(' ',..) est fait dans reinjecte_joint un peu plus bas |
|
| 852 | + $afrom[$t][$cle] = [ |
|
| 853 | + "\n" . |
|
| 854 | + ($from_type[$cle] ?? 'INNER') . ' JOIN', |
|
| 855 | + $from[$cle], |
|
| 856 | + "AS $cle", |
|
| 857 | + 'ON (', |
|
| 858 | + "$cle.$c", |
|
| 859 | + '=', |
|
| 860 | + "$t.$carr", |
|
| 861 | + ($and ? 'AND ' . $and : '') . |
|
| 862 | + ')' |
|
| 863 | + ]; |
|
| 864 | + if (isset($afrom[$cle])) { |
|
| 865 | + $afrom[$t] = $afrom[$t] + $afrom[$cle]; |
|
| 866 | + unset($afrom[$cle]); |
|
| 867 | + } |
|
| 868 | + $equiv[] = $carr; |
|
| 869 | + } else { |
|
| 870 | + unset($join[$cledef]); |
|
| 871 | + if (isset($where_simples[$cle_where_lie])) { |
|
| 872 | + unset($where_simples[$cle_where_lie]); |
|
| 873 | + unset($where[$cle_where_lie]); |
|
| 874 | + } |
|
| 875 | + } |
|
| 876 | + unset($from[$cle]); |
|
| 877 | + $k--; |
|
| 878 | + } |
|
| 879 | + |
|
| 880 | + if (count($afrom)) { |
|
| 881 | + // Regarder si la table principale ne sert finalement a rien comme dans |
|
| 882 | + //<BOUCLE3(MOTS){id_article}{id_mot}> class='on'</BOUCLE3> |
|
| 883 | + //<BOUCLE2(MOTS){id_article} />#TOTAL_BOUCLE<//B2> |
|
| 884 | + //<BOUCLE5(RUBRIQUES){id_mot}{tout} />#TOTAL_BOUCLE<//B5> |
|
| 885 | + // ou dans |
|
| 886 | + //<BOUCLE8(HIERARCHIE){id_rubrique}{tout}{type='Squelette'}{inverse}{0,1}{lang_select=non} />#TOTAL_BOUCLE<//B8> |
|
| 887 | + // qui comporte plusieurs jointures |
|
| 888 | + // ou dans |
|
| 889 | + // <BOUCLE6(ARTICLES){id_mot=2}{statut==.*} />#TOTAL_BOUCLE<//B6> |
|
| 890 | + // <BOUCLE7(ARTICLES){id_mot>0}{statut?} />#TOTAL_BOUCLE<//B7> |
|
| 891 | + // penser a regarder aussi la clause orderby pour ne pas simplifier abusivement |
|
| 892 | + // <BOUCLE9(ARTICLES){recherche truc}{par titre}>#ID_ARTICLE</BOUCLE9> |
|
| 893 | + // penser a regarder aussi la clause groubpy pour ne pas simplifier abusivement |
|
| 894 | + // <BOUCLE10(EVENEMENTS){id_rubrique} />#TOTAL_BOUCLE<//B10> |
|
| 895 | + |
|
| 896 | + $t = key($from); |
|
| 897 | + $c = current($from); |
|
| 898 | + reset($from); |
|
| 899 | + $e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/'; |
|
| 900 | + if ( |
|
| 901 | + !(strpos($t, ' ') or // jointure des le depart cf boucle_doc |
|
| 902 | + calculer_jointnul($t, $select, $e) or |
|
| 903 | + calculer_jointnul($t, $join, $e) or |
|
| 904 | + calculer_jointnul($t, $where, $e) or |
|
| 905 | + calculer_jointnul($t, $orderby, $e) or |
|
| 906 | + calculer_jointnul($t, $groupby, $e) or |
|
| 907 | + calculer_jointnul($t, $having, $e)) |
|
| 908 | + && count($afrom[$t]) |
|
| 909 | + ) { |
|
| 910 | + $nfrom = reset($afrom[$t]); |
|
| 911 | + $nt = array_key_first($afrom[$t]); |
|
| 912 | + unset($from[$t]); |
|
| 913 | + $from[$nt] = $nfrom[1]; |
|
| 914 | + unset($afrom[$t][$nt]); |
|
| 915 | + $afrom[$nt] = $afrom[$t]; |
|
| 916 | + unset($afrom[$t]); |
|
| 917 | + $e = '/\b' . preg_quote($nfrom[6]) . '\b/'; |
|
| 918 | + $t = $nfrom[4]; |
|
| 919 | + $alias = ''; |
|
| 920 | + // verifier que les deux cles sont homonymes, sinon installer un alias dans le select |
|
| 921 | + $oldcle = explode('.', $nfrom[6]); |
|
| 922 | + $oldcle = end($oldcle); |
|
| 923 | + $newcle = explode('.', $nfrom[4]); |
|
| 924 | + $newcle = end($newcle); |
|
| 925 | + if ($newcle != $oldcle) { |
|
| 926 | + // si l'ancienne cle etait deja dans le select avec un AS |
|
| 927 | + // reprendre simplement ce AS |
|
| 928 | + $as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/'; |
|
| 929 | + if (preg_match($as, implode(',', $select), $m)) { |
|
| 930 | + $alias = ''; |
|
| 931 | + } else { |
|
| 932 | + $alias = ', ' . $nfrom[4] . " AS $oldcle"; |
|
| 933 | + } |
|
| 934 | + } |
|
| 935 | + $select = remplacer_jointnul($t . $alias, $select, $e); |
|
| 936 | + $join = remplacer_jointnul($t, $join, $e); |
|
| 937 | + $where = remplacer_jointnul($t, $where, $e); |
|
| 938 | + $having = remplacer_jointnul($t, $having, $e); |
|
| 939 | + $groupby = remplacer_jointnul($t, $groupby, $e); |
|
| 940 | + $orderby = remplacer_jointnul($t, $orderby, $e); |
|
| 941 | + } |
|
| 942 | + $from = reinjecte_joint($afrom, $from); |
|
| 943 | + } |
|
| 944 | + if (empty($GLOBALS['debug']) or !is_array($GLOBALS['debug'])) { |
|
| 945 | + $wasdebug = empty($GLOBALS['debug']) ? false : $GLOBALS['debug']; |
|
| 946 | + $GLOBALS['debug'] = []; |
|
| 947 | + if ($wasdebug) { |
|
| 948 | + $GLOBALS['debug']['debug'] = true; |
|
| 949 | + } |
|
| 950 | + } |
|
| 951 | + $GLOBALS['debug']['aucasou'] = [$table, $id, $serveur, $requeter]; |
|
| 952 | + $r = sql_select( |
|
| 953 | + $select, |
|
| 954 | + $from, |
|
| 955 | + $where, |
|
| 956 | + $groupby, |
|
| 957 | + array_filter($orderby), |
|
| 958 | + $limit, |
|
| 959 | + $having, |
|
| 960 | + $serveur, |
|
| 961 | + $requeter |
|
| 962 | + ); |
|
| 963 | + unset($GLOBALS['debug']['aucasou']); |
|
| 964 | + |
|
| 965 | + return $r; |
|
| 966 | 966 | } |
| 967 | 967 | |
| 968 | 968 | /** |
@@ -973,79 +973,79 @@ discard block |
||
| 973 | 973 | * @return string |
| 974 | 974 | */ |
| 975 | 975 | function calculer_where_to_string($v, $join = 'AND') { |
| 976 | - if (empty($v)) { |
|
| 977 | - return ''; |
|
| 978 | - } |
|
| 979 | - |
|
| 980 | - if (!is_array($v)) { |
|
| 981 | - return $v; |
|
| 982 | - } else { |
|
| 983 | - $exp = ''; |
|
| 984 | - if (strtoupper($join) === 'AND') { |
|
| 985 | - return $exp . join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 986 | - } else { |
|
| 987 | - return $exp . join($join, $v); |
|
| 988 | - } |
|
| 989 | - } |
|
| 976 | + if (empty($v)) { |
|
| 977 | + return ''; |
|
| 978 | + } |
|
| 979 | + |
|
| 980 | + if (!is_array($v)) { |
|
| 981 | + return $v; |
|
| 982 | + } else { |
|
| 983 | + $exp = ''; |
|
| 984 | + if (strtoupper($join) === 'AND') { |
|
| 985 | + return $exp . join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 986 | + } else { |
|
| 987 | + return $exp . join($join, $v); |
|
| 988 | + } |
|
| 989 | + } |
|
| 990 | 990 | } |
| 991 | 991 | |
| 992 | 992 | |
| 993 | 993 | //condition suffisante (mais non necessaire) pour qu'une table soit utile |
| 994 | 994 | |
| 995 | 995 | function calculer_jointnul($cle, $exp, $equiv = '') { |
| 996 | - if (!is_array($exp)) { |
|
| 997 | - if ($equiv) { |
|
| 998 | - $exp = preg_replace($equiv, '', $exp); |
|
| 999 | - } |
|
| 1000 | - |
|
| 1001 | - return preg_match("/\\b$cle\\./", $exp); |
|
| 1002 | - } else { |
|
| 1003 | - foreach ($exp as $v) { |
|
| 1004 | - if (calculer_jointnul($cle, $v, $equiv)) { |
|
| 1005 | - return true; |
|
| 1006 | - } |
|
| 1007 | - } |
|
| 1008 | - |
|
| 1009 | - return false; |
|
| 1010 | - } |
|
| 996 | + if (!is_array($exp)) { |
|
| 997 | + if ($equiv) { |
|
| 998 | + $exp = preg_replace($equiv, '', $exp); |
|
| 999 | + } |
|
| 1000 | + |
|
| 1001 | + return preg_match("/\\b$cle\\./", $exp); |
|
| 1002 | + } else { |
|
| 1003 | + foreach ($exp as $v) { |
|
| 1004 | + if (calculer_jointnul($cle, $v, $equiv)) { |
|
| 1005 | + return true; |
|
| 1006 | + } |
|
| 1007 | + } |
|
| 1008 | + |
|
| 1009 | + return false; |
|
| 1010 | + } |
|
| 1011 | 1011 | } |
| 1012 | 1012 | |
| 1013 | 1013 | function reinjecte_joint($afrom, $from) { |
| 1014 | - $from_synth = []; |
|
| 1015 | - foreach ($from as $k => $v) { |
|
| 1016 | - $from_synth[$k] = $from[$k]; |
|
| 1017 | - if (isset($afrom[$k])) { |
|
| 1018 | - foreach ($afrom[$k] as $kk => $vv) { |
|
| 1019 | - $afrom[$k][$kk] = implode(' ', $afrom[$k][$kk]); |
|
| 1020 | - } |
|
| 1021 | - $from_synth["$k@"] = implode(' ', $afrom[$k]); |
|
| 1022 | - unset($afrom[$k]); |
|
| 1023 | - } |
|
| 1024 | - } |
|
| 1025 | - |
|
| 1026 | - return $from_synth; |
|
| 1014 | + $from_synth = []; |
|
| 1015 | + foreach ($from as $k => $v) { |
|
| 1016 | + $from_synth[$k] = $from[$k]; |
|
| 1017 | + if (isset($afrom[$k])) { |
|
| 1018 | + foreach ($afrom[$k] as $kk => $vv) { |
|
| 1019 | + $afrom[$k][$kk] = implode(' ', $afrom[$k][$kk]); |
|
| 1020 | + } |
|
| 1021 | + $from_synth["$k@"] = implode(' ', $afrom[$k]); |
|
| 1022 | + unset($afrom[$k]); |
|
| 1023 | + } |
|
| 1024 | + } |
|
| 1025 | + |
|
| 1026 | + return $from_synth; |
|
| 1027 | 1027 | } |
| 1028 | 1028 | |
| 1029 | 1029 | function remplacer_jointnul($cle, $exp, $equiv = '') { |
| 1030 | - if (!is_array($exp)) { |
|
| 1031 | - return preg_replace($equiv, $cle, $exp); |
|
| 1032 | - } else { |
|
| 1033 | - foreach ($exp as $k => $v) { |
|
| 1034 | - $exp[$k] = remplacer_jointnul($cle, $v, $equiv); |
|
| 1035 | - } |
|
| 1036 | - |
|
| 1037 | - return $exp; |
|
| 1038 | - } |
|
| 1030 | + if (!is_array($exp)) { |
|
| 1031 | + return preg_replace($equiv, $cle, $exp); |
|
| 1032 | + } else { |
|
| 1033 | + foreach ($exp as $k => $v) { |
|
| 1034 | + $exp[$k] = remplacer_jointnul($cle, $v, $equiv); |
|
| 1035 | + } |
|
| 1036 | + |
|
| 1037 | + return $exp; |
|
| 1038 | + } |
|
| 1039 | 1039 | } |
| 1040 | 1040 | |
| 1041 | 1041 | // calcul du nom du squelette |
| 1042 | 1042 | function calculer_nom_fonction_squel($skel, $mime_type = 'html', string $connect = '') { |
| 1043 | - // ne pas doublonner les squelette selon qu'ils sont calcules depuis ecrire/ ou depuis la racine |
|
| 1044 | - if ($l = strlen(_DIR_RACINE) and strncmp($skel, _DIR_RACINE, $l) == 0) { |
|
| 1045 | - $skel = substr($skel, strlen(_DIR_RACINE)); |
|
| 1046 | - } |
|
| 1047 | - |
|
| 1048 | - return $mime_type |
|
| 1049 | - . (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_' |
|
| 1050 | - . md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : '')); |
|
| 1043 | + // ne pas doublonner les squelette selon qu'ils sont calcules depuis ecrire/ ou depuis la racine |
|
| 1044 | + if ($l = strlen(_DIR_RACINE) and strncmp($skel, _DIR_RACINE, $l) == 0) { |
|
| 1045 | + $skel = substr($skel, strlen(_DIR_RACINE)); |
|
| 1046 | + } |
|
| 1047 | + |
|
| 1048 | + return $mime_type |
|
| 1049 | + . (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_' |
|
| 1050 | + . md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : '')); |
|
| 1051 | 1051 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -37,15 +37,15 @@ discard block |
||
| 37 | 37 | define('_PHP_MAX', '8.1.99'); |
| 38 | 38 | |
| 39 | 39 | if (!defined('_DIR_RESTREINT_ABS')) { |
| 40 | - /** le nom du repertoire ecrire/ */ |
|
| 41 | - define('_DIR_RESTREINT_ABS', 'ecrire/'); |
|
| 40 | + /** le nom du repertoire ecrire/ */ |
|
| 41 | + define('_DIR_RESTREINT_ABS', 'ecrire/'); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** Chemin relatif pour aller dans ecrire |
| 45 | 45 | * vide si on est dans ecrire, 'ecrire/' sinon */ |
| 46 | 46 | define( |
| 47 | - '_DIR_RESTREINT', |
|
| 48 | - (!is_dir(_DIR_RESTREINT_ABS) ? '' : _DIR_RESTREINT_ABS) |
|
| 47 | + '_DIR_RESTREINT', |
|
| 48 | + (!is_dir(_DIR_RESTREINT_ABS) ? '' : _DIR_RESTREINT_ABS) |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | /** Chemin relatif pour aller à la racine */ |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | // Icones |
| 62 | 62 | if (!defined('_NOM_IMG_PACK')) { |
| 63 | - /** Nom du dossier images */ |
|
| 64 | - define('_NOM_IMG_PACK', 'images/'); |
|
| 63 | + /** Nom du dossier images */ |
|
| 64 | + define('_NOM_IMG_PACK', 'images/'); |
|
| 65 | 65 | } |
| 66 | 66 | /** le chemin http (relatif) vers les images standard */ |
| 67 | 67 | define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK)); |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | define('_ROOT_IMG_PACK', dirname(__DIR__) . '/prive/' . _NOM_IMG_PACK); |
| 71 | 71 | |
| 72 | 72 | if (!defined('_JAVASCRIPT')) { |
| 73 | - /** Nom du repertoire des bibliotheques JavaScript */ |
|
| 74 | - define('_JAVASCRIPT', 'javascript/'); |
|
| 73 | + /** Nom du repertoire des bibliotheques JavaScript */ |
|
| 74 | + define('_JAVASCRIPT', 'javascript/'); |
|
| 75 | 75 | } // utilisable avec #CHEMIN et find_in_path |
| 76 | 76 | /** le nom du repertoire des bibliotheques JavaScript du prive */ |
| 77 | 77 | define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT)); |
@@ -81,47 +81,47 @@ discard block |
||
| 81 | 81 | # mais on peut les mettre ailleurs et changer completement les noms |
| 82 | 82 | |
| 83 | 83 | if (!defined('_NOM_TEMPORAIRES_INACCESSIBLES')) { |
| 84 | - /** Nom du repertoire des fichiers Temporaires Inaccessibles par http:// */ |
|
| 85 | - define('_NOM_TEMPORAIRES_INACCESSIBLES', 'tmp/'); |
|
| 84 | + /** Nom du repertoire des fichiers Temporaires Inaccessibles par http:// */ |
|
| 85 | + define('_NOM_TEMPORAIRES_INACCESSIBLES', 'tmp/'); |
|
| 86 | 86 | } |
| 87 | 87 | if (!defined('_NOM_TEMPORAIRES_ACCESSIBLES')) { |
| 88 | - /** Nom du repertoire des fichiers Temporaires Accessibles par http:// */ |
|
| 89 | - define('_NOM_TEMPORAIRES_ACCESSIBLES', 'local/'); |
|
| 88 | + /** Nom du repertoire des fichiers Temporaires Accessibles par http:// */ |
|
| 89 | + define('_NOM_TEMPORAIRES_ACCESSIBLES', 'local/'); |
|
| 90 | 90 | } |
| 91 | 91 | if (!defined('_NOM_PERMANENTS_INACCESSIBLES')) { |
| 92 | - /** Nom du repertoire des fichiers Permanents Inaccessibles par http:// */ |
|
| 93 | - define('_NOM_PERMANENTS_INACCESSIBLES', 'config/'); |
|
| 92 | + /** Nom du repertoire des fichiers Permanents Inaccessibles par http:// */ |
|
| 93 | + define('_NOM_PERMANENTS_INACCESSIBLES', 'config/'); |
|
| 94 | 94 | } |
| 95 | 95 | if (!defined('_NOM_PERMANENTS_ACCESSIBLES')) { |
| 96 | - /** Nom du repertoire des fichiers Permanents Accessibles par http:// */ |
|
| 97 | - define('_NOM_PERMANENTS_ACCESSIBLES', 'IMG/'); |
|
| 96 | + /** Nom du repertoire des fichiers Permanents Accessibles par http:// */ |
|
| 97 | + define('_NOM_PERMANENTS_ACCESSIBLES', 'IMG/'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | |
| 101 | 101 | /** Le nom du fichier de personnalisation */ |
| 102 | 102 | if (!defined('_NOM_CONFIG')) { |
| 103 | - define('_NOM_CONFIG', 'mes_options'); |
|
| 103 | + define('_NOM_CONFIG', 'mes_options'); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // Son emplacement absolu si on le trouve |
| 107 | 107 | if ( |
| 108 | - @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php') |
|
| 109 | - or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php')) |
|
| 108 | + @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php') |
|
| 109 | + or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php')) |
|
| 110 | 110 | ) { |
| 111 | - /** Emplacement absolu du fichier d'option */ |
|
| 112 | - define('_FILE_OPTIONS', $f); |
|
| 111 | + /** Emplacement absolu du fichier d'option */ |
|
| 112 | + define('_FILE_OPTIONS', $f); |
|
| 113 | 113 | } else { |
| 114 | - define('_FILE_OPTIONS', ''); |
|
| 114 | + define('_FILE_OPTIONS', ''); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | if (!defined('MODULES_IDIOMES')) { |
| 118 | - /** |
|
| 119 | - * Modules par défaut pour la traduction. |
|
| 120 | - * |
|
| 121 | - * Constante utilisée par le compilateur et le décompilateur |
|
| 122 | - * sa valeur etant traitée par inc_traduire_dist |
|
| 123 | - */ |
|
| 124 | - define('MODULES_IDIOMES', 'public|spip|ecrire'); |
|
| 118 | + /** |
|
| 119 | + * Modules par défaut pour la traduction. |
|
| 120 | + * |
|
| 121 | + * Constante utilisée par le compilateur et le décompilateur |
|
| 122 | + * sa valeur etant traitée par inc_traduire_dist |
|
| 123 | + */ |
|
| 124 | + define('MODULES_IDIOMES', 'public|spip|ecrire'); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | // *** Fin des define *** // |
@@ -129,10 +129,10 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | // Inclure l'ecran de securite |
| 131 | 131 | if ( |
| 132 | - !defined('_ECRAN_SECURITE') |
|
| 133 | - and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php') |
|
| 132 | + !defined('_ECRAN_SECURITE') |
|
| 133 | + and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php') |
|
| 134 | 134 | ) { |
| 135 | - include $f; |
|
| 135 | + include $f; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | |
@@ -140,30 +140,30 @@ discard block |
||
| 140 | 140 | * Détecteur de robot d'indexation |
| 141 | 141 | */ |
| 142 | 142 | if (!defined('_IS_BOT')) { |
| 143 | - define( |
|
| 144 | - '_IS_BOT', |
|
| 145 | - isset($_SERVER['HTTP_USER_AGENT']) |
|
| 146 | - and preg_match( |
|
| 147 | - // mots generiques |
|
| 148 | - ',bot|slurp|crawler|spider|webvac|yandex|' |
|
| 149 | - // MSIE 6.0 est un botnet 99,9% du temps, on traite donc ce USER_AGENT comme un bot |
|
| 150 | - . 'MSIE 6\.0|' |
|
| 151 | - // UA plus cibles |
|
| 152 | - . '80legs|accoona|AltaVista|ASPSeek|Baidu|Charlotte|EC2LinkFinder|eStyle|facebook|flipboard|hootsuite|FunWebProducts|Google|Genieo|INA dlweb|InfegyAtlas|Java VM|LiteFinder|Lycos|MetaURI|Moreover|Rambler|Scooter|ScrubbyBloglines|Yahoo|Yeti' |
|
| 153 | - . ',i', |
|
| 154 | - (string)$_SERVER['HTTP_USER_AGENT'] |
|
| 155 | - ) |
|
| 156 | - ); |
|
| 143 | + define( |
|
| 144 | + '_IS_BOT', |
|
| 145 | + isset($_SERVER['HTTP_USER_AGENT']) |
|
| 146 | + and preg_match( |
|
| 147 | + // mots generiques |
|
| 148 | + ',bot|slurp|crawler|spider|webvac|yandex|' |
|
| 149 | + // MSIE 6.0 est un botnet 99,9% du temps, on traite donc ce USER_AGENT comme un bot |
|
| 150 | + . 'MSIE 6\.0|' |
|
| 151 | + // UA plus cibles |
|
| 152 | + . '80legs|accoona|AltaVista|ASPSeek|Baidu|Charlotte|EC2LinkFinder|eStyle|facebook|flipboard|hootsuite|FunWebProducts|Google|Genieo|INA dlweb|InfegyAtlas|Java VM|LiteFinder|Lycos|MetaURI|Moreover|Rambler|Scooter|ScrubbyBloglines|Yahoo|Yeti' |
|
| 153 | + . ',i', |
|
| 154 | + (string)$_SERVER['HTTP_USER_AGENT'] |
|
| 155 | + ) |
|
| 156 | + ); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | if (!defined('_IS_CLI')) { |
| 160 | - define( |
|
| 161 | - '_IS_CLI', |
|
| 162 | - !isset($_SERVER['HTTP_HOST']) |
|
| 163 | - and !strlen($_SERVER['DOCUMENT_ROOT']) |
|
| 164 | - and !empty($_SERVER['argv']) |
|
| 165 | - and empty($_SERVER['REQUEST_METHOD']) |
|
| 166 | - ); |
|
| 160 | + define( |
|
| 161 | + '_IS_CLI', |
|
| 162 | + !isset($_SERVER['HTTP_HOST']) |
|
| 163 | + and !strlen($_SERVER['DOCUMENT_ROOT']) |
|
| 164 | + and !empty($_SERVER['argv']) |
|
| 165 | + and empty($_SERVER['REQUEST_METHOD']) |
|
| 166 | + ); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | // *** Parametrage par defaut de SPIP *** |
@@ -175,61 +175,61 @@ discard block |
||
| 175 | 175 | // Ne pas les rendre indefinies. |
| 176 | 176 | |
| 177 | 177 | global |
| 178 | - $nombre_de_logs, |
|
| 179 | - $taille_des_logs, |
|
| 180 | - $table_prefix, |
|
| 181 | - $cookie_prefix, |
|
| 182 | - $dossier_squelettes, |
|
| 183 | - $filtrer_javascript, |
|
| 184 | - $type_urls, |
|
| 185 | - $debut_date_publication, |
|
| 186 | - $ip, |
|
| 187 | - $mysql_rappel_connexion, |
|
| 188 | - $mysql_rappel_nom_base, |
|
| 189 | - $test_i18n, |
|
| 190 | - $ignore_auth_http, |
|
| 191 | - $ignore_remote_user, |
|
| 192 | - $derniere_modif_invalide, |
|
| 193 | - $home_server, |
|
| 194 | - $help_server, |
|
| 195 | - $url_glossaire_externe, |
|
| 196 | - $tex_server, |
|
| 197 | - $traiter_math, |
|
| 198 | - $xhtml, |
|
| 199 | - $xml_indent, |
|
| 200 | - $source_vignettes, |
|
| 201 | - $formats_logos, |
|
| 202 | - $controler_dates_rss, |
|
| 203 | - $spip_pipeline, |
|
| 204 | - $spip_matrice, |
|
| 205 | - $plugins, |
|
| 206 | - $surcharges, |
|
| 207 | - $exceptions_des_tables, |
|
| 208 | - $tables_principales, |
|
| 209 | - $table_des_tables, |
|
| 210 | - $tables_auxiliaires, |
|
| 211 | - $table_primary, |
|
| 212 | - $table_date, |
|
| 213 | - $table_titre, |
|
| 214 | - $tables_jointures, |
|
| 215 | - $liste_des_statuts, |
|
| 216 | - $liste_des_etats, |
|
| 217 | - $liste_des_authentifications, |
|
| 218 | - $spip_version_branche, |
|
| 219 | - $spip_version_code, |
|
| 220 | - $spip_version_base, |
|
| 221 | - $spip_sql_version, |
|
| 222 | - $spip_version_affichee, |
|
| 223 | - $visiteur_session, |
|
| 224 | - $auteur_session, |
|
| 225 | - $connect_statut, |
|
| 226 | - $connect_toutes_rubriques, |
|
| 227 | - $hash_recherche, |
|
| 228 | - $hash_recherche_strict, |
|
| 229 | - $ldap_present, |
|
| 230 | - $meta, |
|
| 231 | - $connect_id_rubrique, |
|
| 232 | - $puce; |
|
| 178 | + $nombre_de_logs, |
|
| 179 | + $taille_des_logs, |
|
| 180 | + $table_prefix, |
|
| 181 | + $cookie_prefix, |
|
| 182 | + $dossier_squelettes, |
|
| 183 | + $filtrer_javascript, |
|
| 184 | + $type_urls, |
|
| 185 | + $debut_date_publication, |
|
| 186 | + $ip, |
|
| 187 | + $mysql_rappel_connexion, |
|
| 188 | + $mysql_rappel_nom_base, |
|
| 189 | + $test_i18n, |
|
| 190 | + $ignore_auth_http, |
|
| 191 | + $ignore_remote_user, |
|
| 192 | + $derniere_modif_invalide, |
|
| 193 | + $home_server, |
|
| 194 | + $help_server, |
|
| 195 | + $url_glossaire_externe, |
|
| 196 | + $tex_server, |
|
| 197 | + $traiter_math, |
|
| 198 | + $xhtml, |
|
| 199 | + $xml_indent, |
|
| 200 | + $source_vignettes, |
|
| 201 | + $formats_logos, |
|
| 202 | + $controler_dates_rss, |
|
| 203 | + $spip_pipeline, |
|
| 204 | + $spip_matrice, |
|
| 205 | + $plugins, |
|
| 206 | + $surcharges, |
|
| 207 | + $exceptions_des_tables, |
|
| 208 | + $tables_principales, |
|
| 209 | + $table_des_tables, |
|
| 210 | + $tables_auxiliaires, |
|
| 211 | + $table_primary, |
|
| 212 | + $table_date, |
|
| 213 | + $table_titre, |
|
| 214 | + $tables_jointures, |
|
| 215 | + $liste_des_statuts, |
|
| 216 | + $liste_des_etats, |
|
| 217 | + $liste_des_authentifications, |
|
| 218 | + $spip_version_branche, |
|
| 219 | + $spip_version_code, |
|
| 220 | + $spip_version_base, |
|
| 221 | + $spip_sql_version, |
|
| 222 | + $spip_version_affichee, |
|
| 223 | + $visiteur_session, |
|
| 224 | + $auteur_session, |
|
| 225 | + $connect_statut, |
|
| 226 | + $connect_toutes_rubriques, |
|
| 227 | + $hash_recherche, |
|
| 228 | + $hash_recherche_strict, |
|
| 229 | + $ldap_present, |
|
| 230 | + $meta, |
|
| 231 | + $connect_id_rubrique, |
|
| 232 | + $puce; |
|
| 233 | 233 | |
| 234 | 234 | # comment on logge, defaut 4 tmp/spip.log de 100k, 0 ou 0 suppriment le log |
| 235 | 235 | $nombre_de_logs = 4; |
@@ -284,48 +284,48 @@ discard block |
||
| 284 | 284 | // Prendre en compte les entetes HTTP_X_FORWARDED_XX |
| 285 | 285 | // |
| 286 | 286 | if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { |
| 287 | - if (empty($_SERVER['HTTP_X_FORWARDED_HOST'])) { |
|
| 288 | - $_SERVER['HTTP_X_FORWARDED_HOST'] = $_SERVER['HTTP_HOST']; |
|
| 289 | - } |
|
| 290 | - if (empty($_SERVER['HTTP_X_FORWARDED_PORT'])) { |
|
| 291 | - $_SERVER['HTTP_X_FORWARDED_PORT'] = 443; |
|
| 292 | - } |
|
| 287 | + if (empty($_SERVER['HTTP_X_FORWARDED_HOST'])) { |
|
| 288 | + $_SERVER['HTTP_X_FORWARDED_HOST'] = $_SERVER['HTTP_HOST']; |
|
| 289 | + } |
|
| 290 | + if (empty($_SERVER['HTTP_X_FORWARDED_PORT'])) { |
|
| 291 | + $_SERVER['HTTP_X_FORWARDED_PORT'] = 443; |
|
| 292 | + } |
|
| 293 | 293 | } |
| 294 | 294 | if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { |
| 295 | - if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])) { |
|
| 296 | - $_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT']; |
|
| 297 | - if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { |
|
| 298 | - $_SERVER['HTTPS'] = 'on'; |
|
| 299 | - if (isset($_SERVER['REQUEST_SCHEME'])) { |
|
| 300 | - $_SERVER['REQUEST_SCHEME'] = 'https'; |
|
| 301 | - } |
|
| 302 | - } |
|
| 303 | - } |
|
| 304 | - $host = $_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 305 | - if (strpos($host, ',') !== false) { |
|
| 306 | - $h = explode(',', $host); |
|
| 307 | - $host = trim(reset($h)); |
|
| 308 | - } |
|
| 309 | - // securite sur le contenu de l'entete |
|
| 310 | - $host = strtr($host, "<>?\"\{\}\$'` \r\n", '____________'); |
|
| 311 | - $_SERVER['HTTP_HOST'] = $host; |
|
| 295 | + if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])) { |
|
| 296 | + $_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT']; |
|
| 297 | + if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { |
|
| 298 | + $_SERVER['HTTPS'] = 'on'; |
|
| 299 | + if (isset($_SERVER['REQUEST_SCHEME'])) { |
|
| 300 | + $_SERVER['REQUEST_SCHEME'] = 'https'; |
|
| 301 | + } |
|
| 302 | + } |
|
| 303 | + } |
|
| 304 | + $host = $_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 305 | + if (strpos($host, ',') !== false) { |
|
| 306 | + $h = explode(',', $host); |
|
| 307 | + $host = trim(reset($h)); |
|
| 308 | + } |
|
| 309 | + // securite sur le contenu de l'entete |
|
| 310 | + $host = strtr($host, "<>?\"\{\}\$'` \r\n", '____________'); |
|
| 311 | + $_SERVER['HTTP_HOST'] = $host; |
|
| 312 | 312 | } |
| 313 | 313 | // |
| 314 | 314 | // On note le numero IP du client dans la variable $ip |
| 315 | 315 | // |
| 316 | 316 | if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { |
| 317 | - $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
|
| 318 | - if (strpos($ip, ',') !== false) { |
|
| 319 | - $ip = explode(',', $ip); |
|
| 320 | - $ip = reset($ip); |
|
| 321 | - } |
|
| 322 | - // ecraser $_SERVER['REMOTE_ADDR'] si elle est en localhost |
|
| 323 | - if (isset($_SERVER['REMOTE_ADDR']) and $_SERVER['REMOTE_ADDR'] === '127.0.0.1') { |
|
| 324 | - $_SERVER['REMOTE_ADDR'] = $ip; |
|
| 325 | - } |
|
| 317 | + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; |
|
| 318 | + if (strpos($ip, ',') !== false) { |
|
| 319 | + $ip = explode(',', $ip); |
|
| 320 | + $ip = reset($ip); |
|
| 321 | + } |
|
| 322 | + // ecraser $_SERVER['REMOTE_ADDR'] si elle est en localhost |
|
| 323 | + if (isset($_SERVER['REMOTE_ADDR']) and $_SERVER['REMOTE_ADDR'] === '127.0.0.1') { |
|
| 324 | + $_SERVER['REMOTE_ADDR'] = $ip; |
|
| 325 | + } |
|
| 326 | 326 | } |
| 327 | 327 | if (isset($_SERVER['REMOTE_ADDR'])) { |
| 328 | - $ip = $_SERVER['REMOTE_ADDR']; |
|
| 328 | + $ip = $_SERVER['REMOTE_ADDR']; |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | // Pour renforcer la privacy, decommentez la ligne ci-dessous (ou recopiez-la |
@@ -410,24 +410,24 @@ discard block |
||
| 410 | 410 | |
| 411 | 411 | // Liste des statuts. |
| 412 | 412 | $liste_des_statuts = [ |
| 413 | - 'info_administrateurs' => '0minirezo', |
|
| 414 | - 'info_redacteurs' => '1comite', |
|
| 415 | - 'info_visiteurs' => '6forum', |
|
| 416 | - 'texte_statut_poubelle' => '5poubelle' |
|
| 413 | + 'info_administrateurs' => '0minirezo', |
|
| 414 | + 'info_redacteurs' => '1comite', |
|
| 415 | + 'info_visiteurs' => '6forum', |
|
| 416 | + 'texte_statut_poubelle' => '5poubelle' |
|
| 417 | 417 | ]; |
| 418 | 418 | |
| 419 | 419 | $liste_des_etats = [ |
| 420 | - 'texte_statut_en_cours_redaction' => 'prepa', |
|
| 421 | - 'texte_statut_propose_evaluation' => 'prop', |
|
| 422 | - 'texte_statut_publie' => 'publie', |
|
| 423 | - 'texte_statut_poubelle' => 'poubelle', |
|
| 424 | - 'texte_statut_refuse' => 'refuse' |
|
| 420 | + 'texte_statut_en_cours_redaction' => 'prepa', |
|
| 421 | + 'texte_statut_propose_evaluation' => 'prop', |
|
| 422 | + 'texte_statut_publie' => 'publie', |
|
| 423 | + 'texte_statut_poubelle' => 'poubelle', |
|
| 424 | + 'texte_statut_refuse' => 'refuse' |
|
| 425 | 425 | ]; |
| 426 | 426 | |
| 427 | 427 | // liste des methodes d'authentifications |
| 428 | 428 | $liste_des_authentifications = [ |
| 429 | - 'spip' => 'spip', |
|
| 430 | - 'ldap' => 'ldap' |
|
| 429 | + 'spip' => 'spip', |
|
| 430 | + 'ldap' => 'ldap' |
|
| 431 | 431 | ]; |
| 432 | 432 | |
| 433 | 433 | // Experimental : pour supprimer systematiquement l'affichage des numeros |
@@ -477,12 +477,12 @@ discard block |
||
| 477 | 477 | // Definition personnelles eventuelles |
| 478 | 478 | |
| 479 | 479 | if (_FILE_OPTIONS) { |
| 480 | - include_once _FILE_OPTIONS; |
|
| 480 | + include_once _FILE_OPTIONS; |
|
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | if (!defined('SPIP_ERREUR_REPORT')) { |
| 484 | - /** Masquer les warning */ |
|
| 485 | - define('SPIP_ERREUR_REPORT', E_ALL ^ E_NOTICE ^ E_DEPRECATED); |
|
| 484 | + /** Masquer les warning */ |
|
| 485 | + define('SPIP_ERREUR_REPORT', E_ALL ^ E_NOTICE ^ E_DEPRECATED); |
|
| 486 | 486 | } |
| 487 | 487 | error_reporting(SPIP_ERREUR_REPORT); |
| 488 | 488 | |
@@ -495,10 +495,10 @@ discard block |
||
| 495 | 495 | // ===> on execute en neutralisant les messages d'erreur |
| 496 | 496 | |
| 497 | 497 | spip_initialisation_core( |
| 498 | - (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 499 | - (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 500 | - (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 501 | - (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 498 | + (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 499 | + (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 500 | + (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 501 | + (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 502 | 502 | ); |
| 503 | 503 | |
| 504 | 504 | |
@@ -508,70 +508,70 @@ discard block |
||
| 508 | 508 | // donc il faut avoir tout fini ici avant de charger les plugins |
| 509 | 509 | |
| 510 | 510 | if (@is_readable(_CACHE_PLUGINS_OPT) and @is_readable(_CACHE_PLUGINS_PATH)) { |
| 511 | - // chargement optimise precompile |
|
| 512 | - include_once(_CACHE_PLUGINS_OPT); |
|
| 511 | + // chargement optimise precompile |
|
| 512 | + include_once(_CACHE_PLUGINS_OPT); |
|
| 513 | 513 | } else { |
| 514 | - spip_initialisation_suite(); |
|
| 515 | - include_spip('inc/plugin'); |
|
| 516 | - // generer les fichiers php precompiles |
|
| 517 | - // de chargement des plugins et des pipelines |
|
| 518 | - actualise_plugins_actifs(); |
|
| 514 | + spip_initialisation_suite(); |
|
| 515 | + include_spip('inc/plugin'); |
|
| 516 | + // generer les fichiers php precompiles |
|
| 517 | + // de chargement des plugins et des pipelines |
|
| 518 | + actualise_plugins_actifs(); |
|
| 519 | 519 | } |
| 520 | 520 | |
| 521 | 521 | // Initialisations non critiques surchargeables par les plugins |
| 522 | 522 | spip_initialisation_suite(); |
| 523 | 523 | |
| 524 | 524 | if (!defined('_LOG_FILTRE_GRAVITE')) { |
| 525 | - /** niveau maxi d'enregistrement des logs */ |
|
| 526 | - define('_LOG_FILTRE_GRAVITE', _LOG_INFO_IMPORTANTE); |
|
| 525 | + /** niveau maxi d'enregistrement des logs */ |
|
| 526 | + define('_LOG_FILTRE_GRAVITE', _LOG_INFO_IMPORTANTE); |
|
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | if (!defined('_OUTILS_DEVELOPPEURS')) { |
| 530 | - /** Activer des outils pour développeurs ? */ |
|
| 531 | - define('_OUTILS_DEVELOPPEURS', false); |
|
| 530 | + /** Activer des outils pour développeurs ? */ |
|
| 531 | + define('_OUTILS_DEVELOPPEURS', false); |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | // charger systematiquement inc/autoriser dans l'espace restreint |
| 535 | 535 | if (test_espace_prive()) { |
| 536 | - include_spip('inc/autoriser'); |
|
| 536 | + include_spip('inc/autoriser'); |
|
| 537 | 537 | } |
| 538 | 538 | // |
| 539 | 539 | // Installer Spip si pas installe... sauf si justement on est en train |
| 540 | 540 | // |
| 541 | 541 | if ( |
| 542 | - !(_FILE_CONNECT |
|
| 543 | - or autoriser_sans_cookie(_request('exec')) |
|
| 544 | - or _request('action') == 'cookie' |
|
| 545 | - or _request('action') == 'converser' |
|
| 546 | - or _request('action') == 'test_dirs') |
|
| 542 | + !(_FILE_CONNECT |
|
| 543 | + or autoriser_sans_cookie(_request('exec')) |
|
| 544 | + or _request('action') == 'cookie' |
|
| 545 | + or _request('action') == 'converser' |
|
| 546 | + or _request('action') == 'test_dirs') |
|
| 547 | 547 | ) { |
| 548 | - // Si on peut installer, on lance illico |
|
| 549 | - if (test_espace_prive()) { |
|
| 550 | - include_spip('inc/headers'); |
|
| 551 | - redirige_url_ecrire('install'); |
|
| 552 | - } else { |
|
| 553 | - // Si on est dans le site public, dire que qq s'en occupe |
|
| 554 | - include_spip('inc/minipres'); |
|
| 555 | - utiliser_langue_visiteur(); |
|
| 556 | - echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . '</p>', ['status' => 503]); |
|
| 557 | - exit; |
|
| 558 | - } |
|
| 559 | - // autrement c'est une install ad hoc (spikini...), on sait pas faire |
|
| 548 | + // Si on peut installer, on lance illico |
|
| 549 | + if (test_espace_prive()) { |
|
| 550 | + include_spip('inc/headers'); |
|
| 551 | + redirige_url_ecrire('install'); |
|
| 552 | + } else { |
|
| 553 | + // Si on est dans le site public, dire que qq s'en occupe |
|
| 554 | + include_spip('inc/minipres'); |
|
| 555 | + utiliser_langue_visiteur(); |
|
| 556 | + echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . '</p>', ['status' => 503]); |
|
| 557 | + exit; |
|
| 558 | + } |
|
| 559 | + // autrement c'est une install ad hoc (spikini...), on sait pas faire |
|
| 560 | 560 | } |
| 561 | 561 | |
| 562 | 562 | // memoriser un tri sessionne eventuel |
| 563 | 563 | if ( |
| 564 | - isset($_REQUEST['var_memotri']) |
|
| 565 | - and $t = $_REQUEST['var_memotri'] |
|
| 566 | - and (strncmp($t, 'trisession', 10) == 0 or strncmp($t, 'senssession', 11) == 0) |
|
| 564 | + isset($_REQUEST['var_memotri']) |
|
| 565 | + and $t = $_REQUEST['var_memotri'] |
|
| 566 | + and (strncmp($t, 'trisession', 10) == 0 or strncmp($t, 'senssession', 11) == 0) |
|
| 567 | 567 | ) { |
| 568 | - if (!function_exists('session_set')) { |
|
| 569 | - include_spip('inc/session'); |
|
| 570 | - } |
|
| 571 | - $t = preg_replace(',\W,', '_', $t); |
|
| 572 | - if ($v = _request($t)) { |
|
| 573 | - session_set($t, $v); |
|
| 574 | - } |
|
| 568 | + if (!function_exists('session_set')) { |
|
| 569 | + include_spip('inc/session'); |
|
| 570 | + } |
|
| 571 | + $t = preg_replace(',\W,', '_', $t); |
|
| 572 | + if ($v = _request($t)) { |
|
| 573 | + session_set($t, $v); |
|
| 574 | + } |
|
| 575 | 575 | } |
| 576 | 576 | |
| 577 | 577 | /** |
@@ -581,22 +581,22 @@ discard block |
||
| 581 | 581 | * La globale $spip_header_silencieux permet de rendre le header minimal pour raisons de securite |
| 582 | 582 | */ |
| 583 | 583 | if (!defined('_HEADER_COMPOSED_BY')) { |
| 584 | - define('_HEADER_COMPOSED_BY', 'Composed-By: SPIP'); |
|
| 584 | + define('_HEADER_COMPOSED_BY', 'Composed-By: SPIP'); |
|
| 585 | 585 | } |
| 586 | 586 | if (!headers_sent() and _HEADER_COMPOSED_BY) { |
| 587 | - if (!defined('_HEADER_VARY')) { |
|
| 588 | - define('_HEADER_VARY', 'Vary: Cookie, Accept-Encoding'); |
|
| 589 | - } |
|
| 590 | - if (_HEADER_VARY) { |
|
| 591 | - header(_HEADER_VARY); |
|
| 592 | - } |
|
| 593 | - if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) { |
|
| 594 | - include_spip('inc/filtres_mini'); |
|
| 595 | - header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . 'config.txt')); |
|
| 596 | - } else { |
|
| 597 | - // header minimal |
|
| 598 | - header(_HEADER_COMPOSED_BY . ' @ www.spip.net'); |
|
| 599 | - } |
|
| 587 | + if (!defined('_HEADER_VARY')) { |
|
| 588 | + define('_HEADER_VARY', 'Vary: Cookie, Accept-Encoding'); |
|
| 589 | + } |
|
| 590 | + if (_HEADER_VARY) { |
|
| 591 | + header(_HEADER_VARY); |
|
| 592 | + } |
|
| 593 | + if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) { |
|
| 594 | + include_spip('inc/filtres_mini'); |
|
| 595 | + header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . 'config.txt')); |
|
| 596 | + } else { |
|
| 597 | + // header minimal |
|
| 598 | + header(_HEADER_COMPOSED_BY . ' @ www.spip.net'); |
|
| 599 | + } |
|
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | $methode = ($_SERVER['REQUEST_METHOD'] ?? ((php_sapi_name() == 'cli') ? 'cli' : '')); |
@@ -4,248 +4,248 @@ 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' => 'Zurück zur vollständigen grafischen Oberfläche', |
|
| 14 | - 'access_mode_texte' => 'vereinfachtes Interface als Textversion anzeigen', |
|
| 15 | - 'admin_debug' => 'Debug', |
|
| 16 | - 'admin_modifier_article' => 'Artikel bearbeiten', |
|
| 17 | - 'admin_modifier_auteur' => 'Autor bearbeiten', |
|
| 18 | - 'admin_modifier_breve' => 'Meldung bearbeiten', |
|
| 19 | - 'admin_modifier_mot' => 'Schlagwort bearbeiten', |
|
| 20 | - 'admin_modifier_rubrique' => 'Rubrik bearbeiten', |
|
| 21 | - 'admin_recalculer' => 'Seite aus Cache löschen', |
|
| 22 | - 'afficher_calendrier' => 'Kalender anzeigen', |
|
| 23 | - 'afficher_trad' => 'Übersetzungen anzeigen', |
|
| 24 | - 'alerte_maj_impossible' => '<b>Achtung!</b> Ihre SQL Datenbank konnte nicht auf die Version @version@ umgestellt werden. Möglicherweise gibt es ein Problem mit den Zugriffsrechten. Bitte setzen Sie sich mit Ihrem Webspace-Provider in Verbindung.', |
|
| 25 | - 'alerte_modif_info_concourante' => 'Achtung - diese Information wurde auf anderem Weg modifiziert. Der aktuelle Wert lautet:', |
|
| 26 | - 'analyse_xml' => 'XML-Analyse', |
|
| 27 | - 'annuler' => 'Abbrechen', |
|
| 28 | - 'antispam_champ_vide' => 'Bitte lassen Sie dieses Feld leer:', |
|
| 29 | - 'articles_recents' => 'Die neuesten Artikel', |
|
| 30 | - 'attention_champ_mini_nb_caractères' => 'Achtung! Mindestens @nb@ Zeichen', |
|
| 31 | - 'avis_1_erreur_saisie' => 'Ihre Eingabe enthält einen Fehler, bitte überprüfen Sie die Informationen.', |
|
| 32 | - 'avis_archive_incorrect' => 'Die archivierte Datei ist keine SPIP-Datei', |
|
| 33 | - 'avis_archive_invalide' => 'Die archivierte Datei ist keine SPIP-Datei', |
|
| 34 | - 'avis_attention' => 'ACHTUNG!', |
|
| 35 | - 'avis_champ_incorrect_type_objet' => 'Falscher Objektname @name@ für Objekt vom Typ @type@', |
|
| 36 | - 'avis_colonne_inexistante' => 'Die Spalte @col@ existiert nicht', |
|
| 37 | - 'avis_erreur' => 'Fehler: Siehe unten', |
|
| 38 | - 'avis_erreur_connexion' => 'Verbindungsfehler', |
|
| 39 | - 'avis_erreur_cookie' => 'Cookie-Problem', |
|
| 40 | - 'avis_erreur_fonction_contexte' => 'Programmfehler. Diese Funktion darf nicht in diesem Zusammenhang aufgerufen werden.', |
|
| 41 | - 'avis_erreur_mysql' => 'SQL-Fehler', |
|
| 42 | - 'avis_erreur_sauvegarde' => 'Fehler in der Sicherung (@type@ @id_objet@) ! ', |
|
| 43 | - 'avis_erreur_visiteur' => 'Ein Problem beim Zugang zum Redaktionssystem ist aufgetreten.', |
|
| 44 | - 'avis_nb_erreurs_saisie' => 'Ihre Eingabe enthält @nb@ Fehler, bitte überprüfen Sie die Informationen.', |
|
| 12 | + // A |
|
| 13 | + 'access_interface_graphique' => 'Zurück zur vollständigen grafischen Oberfläche', |
|
| 14 | + 'access_mode_texte' => 'vereinfachtes Interface als Textversion anzeigen', |
|
| 15 | + 'admin_debug' => 'Debug', |
|
| 16 | + 'admin_modifier_article' => 'Artikel bearbeiten', |
|
| 17 | + 'admin_modifier_auteur' => 'Autor bearbeiten', |
|
| 18 | + 'admin_modifier_breve' => 'Meldung bearbeiten', |
|
| 19 | + 'admin_modifier_mot' => 'Schlagwort bearbeiten', |
|
| 20 | + 'admin_modifier_rubrique' => 'Rubrik bearbeiten', |
|
| 21 | + 'admin_recalculer' => 'Seite aus Cache löschen', |
|
| 22 | + 'afficher_calendrier' => 'Kalender anzeigen', |
|
| 23 | + 'afficher_trad' => 'Übersetzungen anzeigen', |
|
| 24 | + 'alerte_maj_impossible' => '<b>Achtung!</b> Ihre SQL Datenbank konnte nicht auf die Version @version@ umgestellt werden. Möglicherweise gibt es ein Problem mit den Zugriffsrechten. Bitte setzen Sie sich mit Ihrem Webspace-Provider in Verbindung.', |
|
| 25 | + 'alerte_modif_info_concourante' => 'Achtung - diese Information wurde auf anderem Weg modifiziert. Der aktuelle Wert lautet:', |
|
| 26 | + 'analyse_xml' => 'XML-Analyse', |
|
| 27 | + 'annuler' => 'Abbrechen', |
|
| 28 | + 'antispam_champ_vide' => 'Bitte lassen Sie dieses Feld leer:', |
|
| 29 | + 'articles_recents' => 'Die neuesten Artikel', |
|
| 30 | + 'attention_champ_mini_nb_caractères' => 'Achtung! Mindestens @nb@ Zeichen', |
|
| 31 | + 'avis_1_erreur_saisie' => 'Ihre Eingabe enthält einen Fehler, bitte überprüfen Sie die Informationen.', |
|
| 32 | + 'avis_archive_incorrect' => 'Die archivierte Datei ist keine SPIP-Datei', |
|
| 33 | + 'avis_archive_invalide' => 'Die archivierte Datei ist keine SPIP-Datei', |
|
| 34 | + 'avis_attention' => 'ACHTUNG!', |
|
| 35 | + 'avis_champ_incorrect_type_objet' => 'Falscher Objektname @name@ für Objekt vom Typ @type@', |
|
| 36 | + 'avis_colonne_inexistante' => 'Die Spalte @col@ existiert nicht', |
|
| 37 | + 'avis_erreur' => 'Fehler: Siehe unten', |
|
| 38 | + 'avis_erreur_connexion' => 'Verbindungsfehler', |
|
| 39 | + 'avis_erreur_cookie' => 'Cookie-Problem', |
|
| 40 | + 'avis_erreur_fonction_contexte' => 'Programmfehler. Diese Funktion darf nicht in diesem Zusammenhang aufgerufen werden.', |
|
| 41 | + 'avis_erreur_mysql' => 'SQL-Fehler', |
|
| 42 | + 'avis_erreur_sauvegarde' => 'Fehler in der Sicherung (@type@ @id_objet@) ! ', |
|
| 43 | + 'avis_erreur_visiteur' => 'Ein Problem beim Zugang zum Redaktionssystem ist aufgetreten.', |
|
| 44 | + 'avis_nb_erreurs_saisie' => 'Ihre Eingabe enthält @nb@ Fehler, bitte überprüfen Sie die Informationen.', |
|
| 45 | 45 | |
| 46 | - // B |
|
| 47 | - 'barre_a_accent_grave' => 'Grosses A mit accent grave einfügen', |
|
| 48 | - 'barre_aide' => 'Verwende Sie die typografischen Kürzel, um Ihre Seite zu formatieren.', |
|
| 49 | - 'barre_e_accent_aigu' => 'Grosses E mit accent aigu einfügen', |
|
| 50 | - 'barre_eo' => 'Ein E in das O einfügen', |
|
| 51 | - 'barre_eo_maj' => 'Ein E in ein grosses O einfügen', |
|
| 52 | - 'barre_euro' => 'Symbol € einfügen', |
|
| 53 | - 'barre_gras' => '{{fett}} setzen', |
|
| 54 | - 'barre_guillemets' => 'In „Anführungszeichen“ setzen', |
|
| 55 | - 'barre_guillemets_simples' => 'In ‚Anführungszeichen‘ setzen', |
|
| 56 | - 'barre_intertitre' => 'in {{{Zwischentitel}}} umwandeln', |
|
| 57 | - 'barre_italic' => 'in {kursive} Schrift setzen', |
|
| 58 | - 'barre_lien' => 'in [Hyperlink->http://...] umwandeln', |
|
| 59 | - 'barre_lien_input' => 'Bitte geben Sie die Adresse Ihres Links an. Sie können das Format http://www.meinewebsite.com wählen, oder einfach die Nummer eines Artikels dieser Website angeben.', |
|
| 60 | - 'barre_note' => 'In [[Fussnote]] umwandeln', |
|
| 61 | - 'barre_paragraphe' => 'Neuen Absatz anlegen', |
|
| 62 | - 'barre_quote' => '<quote>Nachricht zitieren</quote>', |
|
| 63 | - 'bouton_changer' => 'Ändern', |
|
| 64 | - 'bouton_chercher' => 'Suchen', |
|
| 65 | - 'bouton_choisir' => 'Auswählen', |
|
| 66 | - 'bouton_deplacer' => 'Verschieben', |
|
| 67 | - 'bouton_download' => 'Runterladen', |
|
| 68 | - 'bouton_enregistrer' => 'Speichern', |
|
| 69 | - 'bouton_radio_desactiver_messagerie_interne' => 'Interne Nachrichten abschalten', |
|
| 70 | - 'bouton_radio_envoi_annonces' => 'Editorische Ankündigungen verschicken', |
|
| 71 | - 'bouton_radio_non_envoi_annonces' => 'Keine Ankündigungen verschicken', |
|
| 72 | - 'bouton_radio_non_envoi_liste_nouveautes' => 'Keine Liste der Neuigkeiten verschicken', |
|
| 73 | - 'bouton_recharger_page' => 'Seite neu laden', |
|
| 74 | - 'bouton_telecharger' => 'Runterladen', |
|
| 75 | - 'bouton_upload' => 'Hochladen', |
|
| 76 | - 'bouton_valider' => 'Bestätigen', |
|
| 46 | + // B |
|
| 47 | + 'barre_a_accent_grave' => 'Grosses A mit accent grave einfügen', |
|
| 48 | + 'barre_aide' => 'Verwende Sie die typografischen Kürzel, um Ihre Seite zu formatieren.', |
|
| 49 | + 'barre_e_accent_aigu' => 'Grosses E mit accent aigu einfügen', |
|
| 50 | + 'barre_eo' => 'Ein E in das O einfügen', |
|
| 51 | + 'barre_eo_maj' => 'Ein E in ein grosses O einfügen', |
|
| 52 | + 'barre_euro' => 'Symbol € einfügen', |
|
| 53 | + 'barre_gras' => '{{fett}} setzen', |
|
| 54 | + 'barre_guillemets' => 'In „Anführungszeichen“ setzen', |
|
| 55 | + 'barre_guillemets_simples' => 'In ‚Anführungszeichen‘ setzen', |
|
| 56 | + 'barre_intertitre' => 'in {{{Zwischentitel}}} umwandeln', |
|
| 57 | + 'barre_italic' => 'in {kursive} Schrift setzen', |
|
| 58 | + 'barre_lien' => 'in [Hyperlink->http://...] umwandeln', |
|
| 59 | + 'barre_lien_input' => 'Bitte geben Sie die Adresse Ihres Links an. Sie können das Format http://www.meinewebsite.com wählen, oder einfach die Nummer eines Artikels dieser Website angeben.', |
|
| 60 | + 'barre_note' => 'In [[Fussnote]] umwandeln', |
|
| 61 | + 'barre_paragraphe' => 'Neuen Absatz anlegen', |
|
| 62 | + 'barre_quote' => '<quote>Nachricht zitieren</quote>', |
|
| 63 | + 'bouton_changer' => 'Ändern', |
|
| 64 | + 'bouton_chercher' => 'Suchen', |
|
| 65 | + 'bouton_choisir' => 'Auswählen', |
|
| 66 | + 'bouton_deplacer' => 'Verschieben', |
|
| 67 | + 'bouton_download' => 'Runterladen', |
|
| 68 | + 'bouton_enregistrer' => 'Speichern', |
|
| 69 | + 'bouton_radio_desactiver_messagerie_interne' => 'Interne Nachrichten abschalten', |
|
| 70 | + 'bouton_radio_envoi_annonces' => 'Editorische Ankündigungen verschicken', |
|
| 71 | + 'bouton_radio_non_envoi_annonces' => 'Keine Ankündigungen verschicken', |
|
| 72 | + 'bouton_radio_non_envoi_liste_nouveautes' => 'Keine Liste der Neuigkeiten verschicken', |
|
| 73 | + 'bouton_recharger_page' => 'Seite neu laden', |
|
| 74 | + 'bouton_telecharger' => 'Runterladen', |
|
| 75 | + 'bouton_upload' => 'Hochladen', |
|
| 76 | + 'bouton_valider' => 'Bestätigen', |
|
| 77 | 77 | |
| 78 | - // C |
|
| 79 | - 'cal_apresmidi' => 'nachmittags', |
|
| 80 | - 'cal_jour_entier' => 'ganztägig', |
|
| 81 | - 'cal_matin' => 'morgens', |
|
| 82 | - 'cal_par_jour' => 'Tageskalender', |
|
| 83 | - 'cal_par_mois' => 'Monatskalender', |
|
| 84 | - 'cal_par_semaine' => 'Wochenkalender', |
|
| 85 | - 'choix_couleur_interface' => 'Farbe', |
|
| 86 | - 'choix_interface' => 'Oberflächenfarbe', |
|
| 87 | - 'colonne' => 'Spalte', |
|
| 88 | - 'confirm_changer_statut' => 'Achtung, Sie werden den Status dieses Elementes ändern. Wollen Sie fortfahren?', |
|
| 89 | - 'correcte' => 'korrekt', |
|
| 78 | + // C |
|
| 79 | + 'cal_apresmidi' => 'nachmittags', |
|
| 80 | + 'cal_jour_entier' => 'ganztägig', |
|
| 81 | + 'cal_matin' => 'morgens', |
|
| 82 | + 'cal_par_jour' => 'Tageskalender', |
|
| 83 | + 'cal_par_mois' => 'Monatskalender', |
|
| 84 | + 'cal_par_semaine' => 'Wochenkalender', |
|
| 85 | + 'choix_couleur_interface' => 'Farbe', |
|
| 86 | + 'choix_interface' => 'Oberflächenfarbe', |
|
| 87 | + 'colonne' => 'Spalte', |
|
| 88 | + 'confirm_changer_statut' => 'Achtung, Sie werden den Status dieses Elementes ändern. Wollen Sie fortfahren?', |
|
| 89 | + 'correcte' => 'korrekt', |
|
| 90 | 90 | |
| 91 | - // D |
|
| 92 | - 'date_aujourdhui' => 'heute', |
|
| 93 | - 'date_avant_jc' => 'v.u.Z.', |
|
| 94 | - 'date_dans' => 'in @delai@', |
|
| 95 | - 'date_de_mois_1' => '@j@ @nommois@', |
|
| 96 | - 'date_de_mois_10' => '@j@ @nommois@', |
|
| 97 | - 'date_de_mois_11' => '@j@ @nommois@', |
|
| 98 | - 'date_de_mois_12' => '@j@ @nommois@', |
|
| 99 | - 'date_de_mois_2' => '@j@ @nommois@', |
|
| 100 | - 'date_de_mois_3' => '@j@ @nommois@', |
|
| 101 | - 'date_de_mois_4' => '@j@ @nommois@', |
|
| 102 | - 'date_de_mois_5' => '@j@ @nommois@', |
|
| 103 | - 'date_de_mois_6' => '@j@ @nommois@', |
|
| 104 | - 'date_de_mois_7' => '@j@ @nommois@', |
|
| 105 | - 'date_de_mois_8' => '@j@ @nommois@', |
|
| 106 | - 'date_de_mois_9' => '@j@ @nommois@', |
|
| 107 | - 'date_demain' => 'morgen', |
|
| 108 | - 'date_fmt_heures_minutes' => '@h@ Uhr @m@ Minuten', |
|
| 109 | - 'date_fmt_heures_minutes_court' => '@h@:@m@', |
|
| 110 | - 'date_fmt_jour' => '@nomjour@ @jour@', |
|
| 111 | - 'date_fmt_jour_heure' => '@jour@ um @heure@', |
|
| 112 | - 'date_fmt_jour_heure_debut_fin' => '@jour@ von @heure_debut@ bis @heure_fin@', |
|
| 113 | - 'date_fmt_jour_heure_debut_fin_abbr' => '@dtstart@@jour@ von @heure_debut@@dtabbr@ bis @dtend@@heure_fin@@dtabbr@', |
|
| 114 | - 'date_fmt_jour_mois' => '@jour@. @nommois@', |
|
| 115 | - 'date_fmt_jour_mois_annee' => '@jour@. @nommois@ @annee@', |
|
| 116 | - 'date_fmt_mois_annee' => '@nommois@ @annee@', |
|
| 117 | - 'date_fmt_nomjour' => '@nomjour@ @date@.', |
|
| 118 | - 'date_fmt_nomjour_date' => 'am @nomjour@ @date@', |
|
| 119 | - 'date_fmt_periode' => 'Vom @date_debut@ bis zum @date_fin@', |
|
| 120 | - 'date_fmt_periode_abbr' => 'Vom @dtart@@date_debut@@dtabbr@ bis zum @dtend@@date_fin@@dtabbr@', |
|
| 121 | - 'date_fmt_periode_from' => 'Von', |
|
| 122 | - 'date_fmt_periode_to' => 'bis', |
|
| 123 | - 'date_fmt_saison_annee' => '@saison@ @annee@', |
|
| 124 | - 'date_heures' => 'Stunden', |
|
| 125 | - 'date_hier' => 'gestern', |
|
| 126 | - 'date_il_y_a' => 'vor @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' => 'Sonntag', |
|
| 159 | - 'date_jour_1_abbr' => 'So.', |
|
| 160 | - 'date_jour_1_initiale' => 'S', |
|
| 161 | - 'date_jour_2' => 'Montag', |
|
| 162 | - 'date_jour_2_abbr' => 'Mo.', |
|
| 163 | - 'date_jour_2_initiale' => 'M', |
|
| 164 | - 'date_jour_3' => 'Dienstag', |
|
| 165 | - 'date_jour_3_abbr' => 'Di.', |
|
| 166 | - 'date_jour_3_initiale' => 'D', |
|
| 167 | - 'date_jour_4' => 'Mittwoch', |
|
| 168 | - 'date_jour_4_abbr' => 'Mi.', |
|
| 169 | - 'date_jour_4_initiale' => 'M', |
|
| 170 | - 'date_jour_5' => 'Donnerstag', |
|
| 171 | - 'date_jour_5_abbr' => 'Do.', |
|
| 172 | - 'date_jour_5_initiale' => 'D', |
|
| 173 | - 'date_jour_6' => 'Freitag', |
|
| 174 | - 'date_jour_6_abbr' => 'Fr.', |
|
| 175 | - 'date_jour_6_initiale' => 'F', |
|
| 176 | - 'date_jour_7' => 'Samstag', |
|
| 177 | - 'date_jour_7_abbr' => 'Sa.', |
|
| 178 | - 'date_jour_7_initiale' => 'S', |
|
| 179 | - 'date_jours' => 'Tagen', |
|
| 180 | - 'date_minutes' => 'Minuten', |
|
| 181 | - 'date_mois' => 'Monaten', |
|
| 182 | - 'date_mois_1' => 'Januar', |
|
| 183 | - 'date_mois_10' => 'Oktober', |
|
| 184 | - 'date_mois_10_abbr' => 'Okt.', |
|
| 185 | - 'date_mois_11' => 'November', |
|
| 186 | - 'date_mois_11_abbr' => 'Nev.', |
|
| 187 | - 'date_mois_12' => 'Dezember', |
|
| 188 | - 'date_mois_12_abbr' => 'Dez.', |
|
| 189 | - 'date_mois_1_abbr' => 'Jan.', |
|
| 190 | - 'date_mois_2' => 'Februar', |
|
| 191 | - 'date_mois_2_abbr' => 'Feb.', |
|
| 192 | - 'date_mois_3' => 'März', |
|
| 193 | - 'date_mois_3_abbr' => 'Mrz.', |
|
| 194 | - 'date_mois_4' => 'April', |
|
| 195 | - 'date_mois_4_abbr' => 'Apr.', |
|
| 196 | - 'date_mois_5' => 'Mai', |
|
| 197 | - 'date_mois_5_abbr' => 'Mai', |
|
| 198 | - 'date_mois_6' => 'Juni', |
|
| 199 | - 'date_mois_6_abbr' => 'Jun.', |
|
| 200 | - 'date_mois_7' => 'Juli', |
|
| 201 | - 'date_mois_7_abbr' => 'Juli', |
|
| 202 | - 'date_mois_8' => 'August', |
|
| 203 | - 'date_mois_8_abbr' => 'Aug.', |
|
| 204 | - 'date_mois_9' => 'September', |
|
| 205 | - 'date_mois_9_abbr' => 'Sept.', |
|
| 206 | - 'date_saison_1' => 'Winter', |
|
| 207 | - 'date_saison_2' => 'Frühling', |
|
| 208 | - 'date_saison_3' => 'Sommer', |
|
| 209 | - 'date_saison_4' => 'unabhängig', |
|
| 210 | - 'date_secondes' => 'Sekunden', |
|
| 211 | - 'date_semaines' => 'Wochen', |
|
| 212 | - 'date_un_mois' => 'Monat', |
|
| 213 | - 'date_une_heure' => 'Stunde', |
|
| 214 | - 'date_une_minute' => 'Minute', |
|
| 215 | - 'date_une_seconde' => 'Sekunde', |
|
| 216 | - 'date_une_semaine' => 'Woche', |
|
| 217 | - 'dirs_commencer' => 'um die Installation wirklich zu starten', |
|
| 218 | - 'dirs_preliminaire' => 'Vorbereitung: <b>Berechtigungen einstellen</b>', |
|
| 219 | - 'dirs_probleme_droits' => 'Problem mit den Berechtigungen', |
|
| 220 | - 'dirs_repertoires_absents' => '<p><b>Folgende Verzeichnisse wurden nicht gefunden:</b></p><ul>@bad_dirs@</ul> |
|
| 91 | + // D |
|
| 92 | + 'date_aujourdhui' => 'heute', |
|
| 93 | + 'date_avant_jc' => 'v.u.Z.', |
|
| 94 | + 'date_dans' => 'in @delai@', |
|
| 95 | + 'date_de_mois_1' => '@j@ @nommois@', |
|
| 96 | + 'date_de_mois_10' => '@j@ @nommois@', |
|
| 97 | + 'date_de_mois_11' => '@j@ @nommois@', |
|
| 98 | + 'date_de_mois_12' => '@j@ @nommois@', |
|
| 99 | + 'date_de_mois_2' => '@j@ @nommois@', |
|
| 100 | + 'date_de_mois_3' => '@j@ @nommois@', |
|
| 101 | + 'date_de_mois_4' => '@j@ @nommois@', |
|
| 102 | + 'date_de_mois_5' => '@j@ @nommois@', |
|
| 103 | + 'date_de_mois_6' => '@j@ @nommois@', |
|
| 104 | + 'date_de_mois_7' => '@j@ @nommois@', |
|
| 105 | + 'date_de_mois_8' => '@j@ @nommois@', |
|
| 106 | + 'date_de_mois_9' => '@j@ @nommois@', |
|
| 107 | + 'date_demain' => 'morgen', |
|
| 108 | + 'date_fmt_heures_minutes' => '@h@ Uhr @m@ Minuten', |
|
| 109 | + 'date_fmt_heures_minutes_court' => '@h@:@m@', |
|
| 110 | + 'date_fmt_jour' => '@nomjour@ @jour@', |
|
| 111 | + 'date_fmt_jour_heure' => '@jour@ um @heure@', |
|
| 112 | + 'date_fmt_jour_heure_debut_fin' => '@jour@ von @heure_debut@ bis @heure_fin@', |
|
| 113 | + 'date_fmt_jour_heure_debut_fin_abbr' => '@dtstart@@jour@ von @heure_debut@@dtabbr@ bis @dtend@@heure_fin@@dtabbr@', |
|
| 114 | + 'date_fmt_jour_mois' => '@jour@. @nommois@', |
|
| 115 | + 'date_fmt_jour_mois_annee' => '@jour@. @nommois@ @annee@', |
|
| 116 | + 'date_fmt_mois_annee' => '@nommois@ @annee@', |
|
| 117 | + 'date_fmt_nomjour' => '@nomjour@ @date@.', |
|
| 118 | + 'date_fmt_nomjour_date' => 'am @nomjour@ @date@', |
|
| 119 | + 'date_fmt_periode' => 'Vom @date_debut@ bis zum @date_fin@', |
|
| 120 | + 'date_fmt_periode_abbr' => 'Vom @dtart@@date_debut@@dtabbr@ bis zum @dtend@@date_fin@@dtabbr@', |
|
| 121 | + 'date_fmt_periode_from' => 'Von', |
|
| 122 | + 'date_fmt_periode_to' => 'bis', |
|
| 123 | + 'date_fmt_saison_annee' => '@saison@ @annee@', |
|
| 124 | + 'date_heures' => 'Stunden', |
|
| 125 | + 'date_hier' => 'gestern', |
|
| 126 | + 'date_il_y_a' => 'vor @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' => 'Sonntag', |
|
| 159 | + 'date_jour_1_abbr' => 'So.', |
|
| 160 | + 'date_jour_1_initiale' => 'S', |
|
| 161 | + 'date_jour_2' => 'Montag', |
|
| 162 | + 'date_jour_2_abbr' => 'Mo.', |
|
| 163 | + 'date_jour_2_initiale' => 'M', |
|
| 164 | + 'date_jour_3' => 'Dienstag', |
|
| 165 | + 'date_jour_3_abbr' => 'Di.', |
|
| 166 | + 'date_jour_3_initiale' => 'D', |
|
| 167 | + 'date_jour_4' => 'Mittwoch', |
|
| 168 | + 'date_jour_4_abbr' => 'Mi.', |
|
| 169 | + 'date_jour_4_initiale' => 'M', |
|
| 170 | + 'date_jour_5' => 'Donnerstag', |
|
| 171 | + 'date_jour_5_abbr' => 'Do.', |
|
| 172 | + 'date_jour_5_initiale' => 'D', |
|
| 173 | + 'date_jour_6' => 'Freitag', |
|
| 174 | + 'date_jour_6_abbr' => 'Fr.', |
|
| 175 | + 'date_jour_6_initiale' => 'F', |
|
| 176 | + 'date_jour_7' => 'Samstag', |
|
| 177 | + 'date_jour_7_abbr' => 'Sa.', |
|
| 178 | + 'date_jour_7_initiale' => 'S', |
|
| 179 | + 'date_jours' => 'Tagen', |
|
| 180 | + 'date_minutes' => 'Minuten', |
|
| 181 | + 'date_mois' => 'Monaten', |
|
| 182 | + 'date_mois_1' => 'Januar', |
|
| 183 | + 'date_mois_10' => 'Oktober', |
|
| 184 | + 'date_mois_10_abbr' => 'Okt.', |
|
| 185 | + 'date_mois_11' => 'November', |
|
| 186 | + 'date_mois_11_abbr' => 'Nev.', |
|
| 187 | + 'date_mois_12' => 'Dezember', |
|
| 188 | + 'date_mois_12_abbr' => 'Dez.', |
|
| 189 | + 'date_mois_1_abbr' => 'Jan.', |
|
| 190 | + 'date_mois_2' => 'Februar', |
|
| 191 | + 'date_mois_2_abbr' => 'Feb.', |
|
| 192 | + 'date_mois_3' => 'März', |
|
| 193 | + 'date_mois_3_abbr' => 'Mrz.', |
|
| 194 | + 'date_mois_4' => 'April', |
|
| 195 | + 'date_mois_4_abbr' => 'Apr.', |
|
| 196 | + 'date_mois_5' => 'Mai', |
|
| 197 | + 'date_mois_5_abbr' => 'Mai', |
|
| 198 | + 'date_mois_6' => 'Juni', |
|
| 199 | + 'date_mois_6_abbr' => 'Jun.', |
|
| 200 | + 'date_mois_7' => 'Juli', |
|
| 201 | + 'date_mois_7_abbr' => 'Juli', |
|
| 202 | + 'date_mois_8' => 'August', |
|
| 203 | + 'date_mois_8_abbr' => 'Aug.', |
|
| 204 | + 'date_mois_9' => 'September', |
|
| 205 | + 'date_mois_9_abbr' => 'Sept.', |
|
| 206 | + 'date_saison_1' => 'Winter', |
|
| 207 | + 'date_saison_2' => 'Frühling', |
|
| 208 | + 'date_saison_3' => 'Sommer', |
|
| 209 | + 'date_saison_4' => 'unabhängig', |
|
| 210 | + 'date_secondes' => 'Sekunden', |
|
| 211 | + 'date_semaines' => 'Wochen', |
|
| 212 | + 'date_un_mois' => 'Monat', |
|
| 213 | + 'date_une_heure' => 'Stunde', |
|
| 214 | + 'date_une_minute' => 'Minute', |
|
| 215 | + 'date_une_seconde' => 'Sekunde', |
|
| 216 | + 'date_une_semaine' => 'Woche', |
|
| 217 | + 'dirs_commencer' => 'um die Installation wirklich zu starten', |
|
| 218 | + 'dirs_preliminaire' => 'Vorbereitung: <b>Berechtigungen einstellen</b>', |
|
| 219 | + 'dirs_probleme_droits' => 'Problem mit den Berechtigungen', |
|
| 220 | + 'dirs_repertoires_absents' => '<p><b>Folgende Verzeichnisse wurden nicht gefunden:</b></p><ul>@bad_dirs@</ul> |
|
| 221 | 221 | <p>Das liegt wahrscheinlich an unzutreffender Gross- und Kleinschreibung. |
| 222 | 222 | Überprüfen Sie bitte die genaue Schreibweise der oben stehenden Verzeichnisse, |
| 223 | 223 | sollten Sie Abweichungen feststellen, benennen Sie bitte mit Ihrem FTP-Programm die betreffenden Verzeichnisse um.</p> |
| 224 | 224 | <p>Danach können Sie ', |
| 225 | - 'dirs_repertoires_suivants' => '<p><b>In die folgenden Verzeichnisse kann nicht geschrieben werden:</b></p><ul>@bad_dirs@</ul> |
|
| 225 | + 'dirs_repertoires_suivants' => '<p><b>In die folgenden Verzeichnisse kann nicht geschrieben werden:</b></p><ul>@bad_dirs@</ul> |
|
| 226 | 226 | <p>Um das Problem zu lösen, verwenden Sie bitte Ihren FTP-Client, um die Zugriffsrechte für diese |
| 227 | 227 | Verzeichnisse zu setzen.Die Installationsanleitung erläutert die Details dazu.</p> |
| 228 | 228 | <p>Wenn Sie diesen Vorgang abgeschlossen haben, können Sie', |
| 229 | - 'double_occurrence' => 'Dublette von @balise@', |
|
| 229 | + 'double_occurrence' => 'Dublette von @balise@', |
|
| 230 | 230 | |
| 231 | - // E |
|
| 232 | - 'en_cours' => 'läuft', |
|
| 233 | - 'envoi_via_le_site' => 'Gesendet über Website ', |
|
| 234 | - 'erreur' => 'Fehler', |
|
| 235 | - 'erreur_balise_non_fermee' => 'Letzter Tag nicht geschlossen:', |
|
| 236 | - 'erreur_technique_ajaxform' => 'Ups. Das Formular wurde aufgrund eines technischen Fehlers nicht abgeschickt. Sie können es erneut versuchen.', |
|
| 237 | - 'erreur_technique_enregistrement_champs' => 'Das Feld @champs@ konnte aufgrund eines technischen Problems nicht gespeichert werden.', |
|
| 238 | - 'erreur_technique_enregistrement_impossible' => 'Technisches Prolem: Speichern nicht möglich.', |
|
| 239 | - 'erreur_texte' => 'Fehler', |
|
| 240 | - 'etape' => 'Schritt', |
|
| 231 | + // E |
|
| 232 | + 'en_cours' => 'läuft', |
|
| 233 | + 'envoi_via_le_site' => 'Gesendet über Website ', |
|
| 234 | + 'erreur' => 'Fehler', |
|
| 235 | + 'erreur_balise_non_fermee' => 'Letzter Tag nicht geschlossen:', |
|
| 236 | + 'erreur_technique_ajaxform' => 'Ups. Das Formular wurde aufgrund eines technischen Fehlers nicht abgeschickt. Sie können es erneut versuchen.', |
|
| 237 | + 'erreur_technique_enregistrement_champs' => 'Das Feld @champs@ konnte aufgrund eines technischen Problems nicht gespeichert werden.', |
|
| 238 | + 'erreur_technique_enregistrement_impossible' => 'Technisches Prolem: Speichern nicht möglich.', |
|
| 239 | + 'erreur_texte' => 'Fehler', |
|
| 240 | + 'etape' => 'Schritt', |
|
| 241 | 241 | |
| 242 | - // F |
|
| 243 | - 'fichier_introuvable' => 'Datei @fichier@ unauffindbar.', |
|
| 244 | - 'fonction_introuvable' => 'Funktion @fonction@() unauffindbar.', |
|
| 245 | - 'form_auteur_confirmation' => 'Bestätigen Sie Ihre Mailadresse', |
|
| 246 | - 'form_auteur_email_modifie' => 'Ihre Mailadresse wurde geändert.', |
|
| 247 | - 'form_auteur_envoi_mail_confirmation' => 'Eine Mail wurde an @email@ gesendet. Sie müssen auf den in ihr angegebenen Link klicken, um die Korrektheit Ihrer Adresse zu bestätigen.', |
|
| 248 | - 'form_auteur_mail_confirmation' => 'Hallo, |
|
| 242 | + // F |
|
| 243 | + 'fichier_introuvable' => 'Datei @fichier@ unauffindbar.', |
|
| 244 | + 'fonction_introuvable' => 'Funktion @fonction@() unauffindbar.', |
|
| 245 | + 'form_auteur_confirmation' => 'Bestätigen Sie Ihre Mailadresse', |
|
| 246 | + 'form_auteur_email_modifie' => 'Ihre Mailadresse wurde geändert.', |
|
| 247 | + 'form_auteur_envoi_mail_confirmation' => 'Eine Mail wurde an @email@ gesendet. Sie müssen auf den in ihr angegebenen Link klicken, um die Korrektheit Ihrer Adresse zu bestätigen.', |
|
| 248 | + 'form_auteur_mail_confirmation' => 'Hallo, |
|
| 249 | 249 | |
| 250 | 250 | Sie möchten Ihre Mail-Adresse ändern.Um Ihre neue Adresse zu bestätigen, |
| 251 | 251 | brauchen Sie nur diesen Link zu öffnen (wenn Sie darauf verzichten, |
@@ -253,335 +253,335 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | @url@ |
| 255 | 255 | ', |
| 256 | - 'form_deja_inscrit' => 'Sie sind bereits eingetragen.', |
|
| 257 | - 'form_email_non_valide' => 'Ihre E-Mail-Adresse ist ungültig.', |
|
| 258 | - 'form_forum_access_refuse' => 'Sie haben keinen Zugang mehr zu dieser Website.', |
|
| 259 | - 'form_forum_bonjour' => 'Hallo @nom@,', |
|
| 260 | - 'form_forum_confirmer_email' => 'Bitte öffnen sie folgenden URL zum Bestätigen ihrer Mailadresse: @url_confirm@', |
|
| 261 | - 'form_forum_email_deja_enregistre' => 'Diese E-Mail-Adresse ist bereits eingetragen. Sie können also Ihr normals Passwort verwenden.', |
|
| 262 | - 'form_forum_identifiant_mail' => 'Ihre neuen Zugangsdaten wurden Ihnen per Mail zugestellt.', |
|
| 263 | - 'form_forum_identifiants' => 'Persönliche Zugangsdaten', |
|
| 264 | - 'form_forum_indiquer_nom_email' => 'Tragen Sie bitte hier Ihren Namen und Ihre E-Mail-Adresse ein. Die persönlichen Zugangsdaten werden Ihnen dann per E-Mail zugeschickt.', |
|
| 265 | - 'form_forum_login' => 'Login:', |
|
| 266 | - 'form_forum_message_auto' => '(automatisch erzeugte Nachricht)', |
|
| 267 | - 'form_forum_pass' => 'Passwort:', |
|
| 268 | - 'form_forum_probleme_mail' => 'E-Mail Problem: Zugangsdaten können nicht verschickt werden.', |
|
| 269 | - 'form_forum_voici1' => 'Hier sind Ihre Zugangsdaten für die Teilnahme an der Website "@nom_site_spip@" (@adresse_site@):', |
|
| 270 | - 'form_forum_voici2' => 'Hier sind Ihre Zugangsdaten um Artikel für die Website "@nom_site_spip@" (@adresse_login@) vorzuschlagen:', |
|
| 271 | - 'form_indiquer_email' => 'Bitte geben Sie Ihre E-Mail-Adresse an.', |
|
| 272 | - 'form_indiquer_nom' => 'Bitte geben Sie Ihren Namen an.', |
|
| 273 | - 'form_indiquer_nom_site' => 'Bitte geben Sie den Namen Ihrer Website an.', |
|
| 274 | - 'form_pet_deja_enregistre' => 'Diese Website wurde bereits erfasst', |
|
| 275 | - 'form_pet_signature_pasprise' => 'Ihre Signatur wird nicht berücksichtigt.', |
|
| 276 | - 'form_prop_confirmer_envoi' => 'Endgültig senden', |
|
| 277 | - 'form_prop_description' => 'Beschreibung/Kommentar', |
|
| 278 | - 'form_prop_enregistre' => 'Ihr Vorschlag wurde gespeichert und wird nach Freigabe durch die Redaktion der Website angezeigt.', |
|
| 279 | - 'form_prop_envoyer' => 'Nachricht senden', |
|
| 280 | - 'form_prop_indiquer_email' => 'Bitte geben Sie eine gültige E-Mail Adresse an', |
|
| 281 | - 'form_prop_indiquer_nom_site' => 'Bitte geben Sie den Namen der Website an.', |
|
| 282 | - 'form_prop_indiquer_sujet' => 'Bitte geben Sie ein Thema an', |
|
| 283 | - 'form_prop_message_envoye' => 'Nachricht gesendet', |
|
| 284 | - 'form_prop_non_enregistre' => 'Ihr Vorschlag wurde nicht gespeichert.', |
|
| 285 | - 'form_prop_sujet' => 'Thema', |
|
| 286 | - 'form_prop_url_site' => 'URL der der Website', |
|
| 287 | - 'format_date_attendu' => 'Ein Datum im Format tt/mm/jjjj eingeben. ', |
|
| 288 | - 'format_date_incorrecte' => 'Falsches Datum oder Datumsformat', |
|
| 289 | - 'format_heure_attendu' => 'Uhrzeit im Format hh:mm eingeben.', |
|
| 290 | - 'format_heure_incorrecte' => 'Falsches Zeitformat oder Zeit', |
|
| 291 | - 'forum_non_inscrit' => 'Sie sind nicht eingeschrieben oder Adresse bzw. Passwort waren falsch.', |
|
| 292 | - 'forum_par_auteur' => 'von @auteur@', |
|
| 293 | - 'forum_titre_erreur' => 'Fehler...', |
|
| 256 | + 'form_deja_inscrit' => 'Sie sind bereits eingetragen.', |
|
| 257 | + 'form_email_non_valide' => 'Ihre E-Mail-Adresse ist ungültig.', |
|
| 258 | + 'form_forum_access_refuse' => 'Sie haben keinen Zugang mehr zu dieser Website.', |
|
| 259 | + 'form_forum_bonjour' => 'Hallo @nom@,', |
|
| 260 | + 'form_forum_confirmer_email' => 'Bitte öffnen sie folgenden URL zum Bestätigen ihrer Mailadresse: @url_confirm@', |
|
| 261 | + 'form_forum_email_deja_enregistre' => 'Diese E-Mail-Adresse ist bereits eingetragen. Sie können also Ihr normals Passwort verwenden.', |
|
| 262 | + 'form_forum_identifiant_mail' => 'Ihre neuen Zugangsdaten wurden Ihnen per Mail zugestellt.', |
|
| 263 | + 'form_forum_identifiants' => 'Persönliche Zugangsdaten', |
|
| 264 | + 'form_forum_indiquer_nom_email' => 'Tragen Sie bitte hier Ihren Namen und Ihre E-Mail-Adresse ein. Die persönlichen Zugangsdaten werden Ihnen dann per E-Mail zugeschickt.', |
|
| 265 | + 'form_forum_login' => 'Login:', |
|
| 266 | + 'form_forum_message_auto' => '(automatisch erzeugte Nachricht)', |
|
| 267 | + 'form_forum_pass' => 'Passwort:', |
|
| 268 | + 'form_forum_probleme_mail' => 'E-Mail Problem: Zugangsdaten können nicht verschickt werden.', |
|
| 269 | + 'form_forum_voici1' => 'Hier sind Ihre Zugangsdaten für die Teilnahme an der Website "@nom_site_spip@" (@adresse_site@):', |
|
| 270 | + 'form_forum_voici2' => 'Hier sind Ihre Zugangsdaten um Artikel für die Website "@nom_site_spip@" (@adresse_login@) vorzuschlagen:', |
|
| 271 | + 'form_indiquer_email' => 'Bitte geben Sie Ihre E-Mail-Adresse an.', |
|
| 272 | + 'form_indiquer_nom' => 'Bitte geben Sie Ihren Namen an.', |
|
| 273 | + 'form_indiquer_nom_site' => 'Bitte geben Sie den Namen Ihrer Website an.', |
|
| 274 | + 'form_pet_deja_enregistre' => 'Diese Website wurde bereits erfasst', |
|
| 275 | + 'form_pet_signature_pasprise' => 'Ihre Signatur wird nicht berücksichtigt.', |
|
| 276 | + 'form_prop_confirmer_envoi' => 'Endgültig senden', |
|
| 277 | + 'form_prop_description' => 'Beschreibung/Kommentar', |
|
| 278 | + 'form_prop_enregistre' => 'Ihr Vorschlag wurde gespeichert und wird nach Freigabe durch die Redaktion der Website angezeigt.', |
|
| 279 | + 'form_prop_envoyer' => 'Nachricht senden', |
|
| 280 | + 'form_prop_indiquer_email' => 'Bitte geben Sie eine gültige E-Mail Adresse an', |
|
| 281 | + 'form_prop_indiquer_nom_site' => 'Bitte geben Sie den Namen der Website an.', |
|
| 282 | + 'form_prop_indiquer_sujet' => 'Bitte geben Sie ein Thema an', |
|
| 283 | + 'form_prop_message_envoye' => 'Nachricht gesendet', |
|
| 284 | + 'form_prop_non_enregistre' => 'Ihr Vorschlag wurde nicht gespeichert.', |
|
| 285 | + 'form_prop_sujet' => 'Thema', |
|
| 286 | + 'form_prop_url_site' => 'URL der der Website', |
|
| 287 | + 'format_date_attendu' => 'Ein Datum im Format tt/mm/jjjj eingeben. ', |
|
| 288 | + 'format_date_incorrecte' => 'Falsches Datum oder Datumsformat', |
|
| 289 | + 'format_heure_attendu' => 'Uhrzeit im Format hh:mm eingeben.', |
|
| 290 | + 'format_heure_incorrecte' => 'Falsches Zeitformat oder Zeit', |
|
| 291 | + 'forum_non_inscrit' => 'Sie sind nicht eingeschrieben oder Adresse bzw. Passwort waren falsch.', |
|
| 292 | + 'forum_par_auteur' => 'von @auteur@', |
|
| 293 | + 'forum_titre_erreur' => 'Fehler...', |
|
| 294 | 294 | |
| 295 | - // I |
|
| 296 | - 'ical_texte_rss_articles' => 'Die «backend» Datei mit den Artikeln der Website finden Sie unter dieser Adresse:', |
|
| 297 | - 'ical_texte_rss_articles2' => 'Sie können auch «backend» Dateien für einzelne Rubriken de Website nutzen:', |
|
| 298 | - 'ical_texte_rss_breves' => 'Es gibt ebenfalls eine Datei für die Meldungen der Website. Wenn Sie die Nummer (ID) einer Rubrik angeben, erhalten Sie auchsschliesslich die Meldungen aus dieser Rubrik.', |
|
| 299 | - 'icone_a_suivre' => 'Aufgaben', |
|
| 300 | - 'icone_admin_site' => 'Konfiguration', |
|
| 301 | - 'icone_agenda' => 'Kalender', |
|
| 302 | - 'icone_aide_ligne' => 'Online-Hilfe', |
|
| 303 | - 'icone_articles' => 'Artikel', |
|
| 304 | - 'icone_auteurs' => 'Autoren', |
|
| 305 | - 'icone_brouteur' => 'Übersicht', |
|
| 306 | - 'icone_configuration_site' => 'Konfiguration', |
|
| 307 | - 'icone_configurer_site' => 'Ihre Website konfigurieren', |
|
| 308 | - 'icone_creer_nouvel_auteur' => 'Neuen Autor anlegen', |
|
| 309 | - 'icone_creer_rubrique' => 'Neue Rubrik anlegen', |
|
| 310 | - 'icone_creer_sous_rubrique' => 'Neue Unterrubrik anlegen', |
|
| 311 | - 'icone_deconnecter' => 'Log-Out', |
|
| 312 | - 'icone_discussions' => 'Diskussionen', |
|
| 313 | - 'icone_doc_rubrique' => 'Dokumente der Rubriken', |
|
| 314 | - 'icone_ecrire_article' => 'Neuen Artikel schreiben', |
|
| 315 | - 'icone_edition_site' => 'Redaktion', |
|
| 316 | - 'icone_gestion_langues' => 'Sprachverwaltung', |
|
| 317 | - 'icone_informations_personnelles' => 'Persönliche Informationen', |
|
| 318 | - 'icone_interface_complet' => 'Expertenmodus', |
|
| 319 | - 'icone_interface_simple' => 'Standardmodus', |
|
| 320 | - 'icone_maintenance_site' => 'Wartung', |
|
| 321 | - 'icone_messagerie_personnelle' => 'Persönliche Nachrichten', |
|
| 322 | - 'icone_repartition_debut' => 'Seit Einrichtung der Website', |
|
| 323 | - 'icone_rubriques' => 'Rubriken', |
|
| 324 | - 'icone_sauver_site' => 'Website sichern', |
|
| 325 | - 'icone_site_entier' => 'Ganze Website', |
|
| 326 | - 'icone_sites_references' => 'Verlinkte Websites', |
|
| 327 | - 'icone_statistiques' => 'Statistiken', |
|
| 328 | - 'icone_suivi_activite' => 'Aktivitäten verfolgen', |
|
| 329 | - 'icone_suivi_actualite' => 'Entwicklung der Website', |
|
| 330 | - 'icone_suivi_pettions' => 'Petitionen verwalten', |
|
| 331 | - 'icone_suivi_revisions' => 'Änderungen des Artikels', |
|
| 332 | - 'icone_supprimer_document' => 'Dokument löschen', |
|
| 333 | - 'icone_supprimer_image' => 'Bild löschen', |
|
| 334 | - 'icone_tous_articles' => 'Alle Ihre Artikel', |
|
| 335 | - 'icone_tous_auteur' => 'Alle Autoren', |
|
| 336 | - 'icone_tous_visiteur' => 'Alle Besucher', |
|
| 337 | - 'icone_visiter_site' => 'Website ansehen', |
|
| 338 | - 'icone_voir_en_ligne' => 'Online ansehen', |
|
| 339 | - 'img_indisponible' => 'Bild nicht vorhanden', |
|
| 340 | - 'impossible' => 'unmöglich', |
|
| 341 | - 'info_a_suivre' => 'AUFGABEN »', |
|
| 342 | - 'info_acces_interdit' => 'Zugang gesperrt', |
|
| 343 | - 'info_acces_refuse' => 'Zugang verweigert', |
|
| 344 | - 'info_action' => 'Aktion: @action@', |
|
| 345 | - 'info_administrer_rubriques' => 'Sie können diese Rubrik und ihre Unterrubriken verwalten', |
|
| 346 | - 'info_adresse_non_indiquee' => 'Sie haben keine Adresse zum Testen agegeben!', |
|
| 347 | - 'info_aide' => 'HILFE:', |
|
| 348 | - 'info_ajouter_mot' => 'Wort hinzufügen', |
|
| 349 | - 'info_annonce' => 'ANKÜNDIGUNG', |
|
| 350 | - 'info_annonces_generales' => 'Allgemeine Ankündigungen:', |
|
| 351 | - 'info_article_propose' => 'Vorgeschlagener Artikel', |
|
| 352 | - 'info_article_publie' => 'Veröffentlichter Artikel', |
|
| 353 | - 'info_article_redaction' => 'Artikel in Bearbeitung', |
|
| 354 | - 'info_article_refuse' => 'Abgelehnter Artikel', |
|
| 355 | - 'info_article_supprime' => 'Gelöschter Artikel', |
|
| 356 | - 'info_articles' => 'Artikel', |
|
| 357 | - 'info_articles_a_valider' => 'Zur Veröffentlichung vorgeschlagenen Artikel', |
|
| 358 | - 'info_articles_nb' => '@nb@ Artikel', |
|
| 359 | - 'info_articles_proposes' => 'Vorgeschlagene Artikel', |
|
| 360 | - 'info_articles_un' => '1 Artikel', |
|
| 361 | - 'info_auteurs_nombre' => 'Autor(en):', |
|
| 362 | - 'info_authentification_ftp' => 'Authentifizierung per FTP.', |
|
| 363 | - 'info_breves_2' => 'Meldungen', |
|
| 364 | - 'info_breves_nb' => '@nb@ Meldungen', |
|
| 365 | - 'info_breves_un' => '1 Meldung', |
|
| 366 | - 'info_connexion_refusee' => 'Die Verbindung wurde verweigert.', |
|
| 367 | - 'info_contact_developpeur' => 'Bitte kontaktieren Sie einen der Entwickler.', |
|
| 368 | - 'info_contenance' => 'Diese Website enthält:', |
|
| 369 | - 'info_contribution' => 'Beiträge', |
|
| 370 | - 'info_copyright' => '@spip@ ist freie Software im Sinne der @lien_gpl@.', |
|
| 371 | - 'info_copyright_doc' => 'Weitere Informationen finden Sie unter <a href="@spipnet@">@spipnet_affiche@</a>.', |
|
| 372 | - 'info_copyright_gpl' => 'GNU Public License', |
|
| 373 | - 'info_cours_edition' => 'In Bearbeitung', |
|
| 374 | - 'info_creer_repertoire' => 'Bitte legen Sie eine Datei oder ein Verzeichnis mit diesem Namen an: ', |
|
| 375 | - 'info_creer_repertoire_2' => '(Im Unterverzeichnis <b>@repertoire@</b>)', |
|
| 376 | - 'info_creer_vignette' => 'Miniaturbilder automatisch anlegen', |
|
| 377 | - 'info_creerdansrubrique_non_autorise' => 'Sie sind nicht berechtigt, Inhalte in dieser Rubrik anzulegen.', |
|
| 378 | - 'info_deplier' => 'Öffnen', |
|
| 379 | - 'info_descriptif_nombre' => 'Beschreibung(en):', |
|
| 380 | - 'info_description' => 'Beschreibung:', |
|
| 381 | - 'info_description_2' => 'Beschreibung:', |
|
| 382 | - 'info_dimension' => 'Maße:', |
|
| 383 | - 'info_documents_nb' => '@nb@ Dokumente', |
|
| 384 | - 'info_documents_un' => '1 Dokument', |
|
| 385 | - 'info_ecire_message_prive' => 'Neue private Nachricht schreiben', |
|
| 386 | - 'info_email_invalide' => 'Ungültige E-Mail Adresse.', |
|
| 387 | - 'info_en_cours_validation' => 'Ihre Artikel in Bearbeitung', |
|
| 388 | - 'info_en_ligne' => 'Zur Zeit online:', |
|
| 389 | - 'info_envoyer_message_prive' => 'Private Nachricht an diesen Autor schicken', |
|
| 390 | - 'info_erreur_requete' => 'Abfragefehler: ', |
|
| 391 | - 'info_erreur_squelette2' => 'Keine Vorlage <b>@fichier@</b> vorhanden ...', |
|
| 392 | - 'info_erreur_systeme' => 'Systemfahler (Fehler no. @errsys@)', |
|
| 393 | - 'info_erreur_systeme2' => 'Möglicherweise ist die Festplatte voll oder die Datenbank beschädigt.<br /> |
|
| 295 | + // I |
|
| 296 | + 'ical_texte_rss_articles' => 'Die «backend» Datei mit den Artikeln der Website finden Sie unter dieser Adresse:', |
|
| 297 | + 'ical_texte_rss_articles2' => 'Sie können auch «backend» Dateien für einzelne Rubriken de Website nutzen:', |
|
| 298 | + 'ical_texte_rss_breves' => 'Es gibt ebenfalls eine Datei für die Meldungen der Website. Wenn Sie die Nummer (ID) einer Rubrik angeben, erhalten Sie auchsschliesslich die Meldungen aus dieser Rubrik.', |
|
| 299 | + 'icone_a_suivre' => 'Aufgaben', |
|
| 300 | + 'icone_admin_site' => 'Konfiguration', |
|
| 301 | + 'icone_agenda' => 'Kalender', |
|
| 302 | + 'icone_aide_ligne' => 'Online-Hilfe', |
|
| 303 | + 'icone_articles' => 'Artikel', |
|
| 304 | + 'icone_auteurs' => 'Autoren', |
|
| 305 | + 'icone_brouteur' => 'Übersicht', |
|
| 306 | + 'icone_configuration_site' => 'Konfiguration', |
|
| 307 | + 'icone_configurer_site' => 'Ihre Website konfigurieren', |
|
| 308 | + 'icone_creer_nouvel_auteur' => 'Neuen Autor anlegen', |
|
| 309 | + 'icone_creer_rubrique' => 'Neue Rubrik anlegen', |
|
| 310 | + 'icone_creer_sous_rubrique' => 'Neue Unterrubrik anlegen', |
|
| 311 | + 'icone_deconnecter' => 'Log-Out', |
|
| 312 | + 'icone_discussions' => 'Diskussionen', |
|
| 313 | + 'icone_doc_rubrique' => 'Dokumente der Rubriken', |
|
| 314 | + 'icone_ecrire_article' => 'Neuen Artikel schreiben', |
|
| 315 | + 'icone_edition_site' => 'Redaktion', |
|
| 316 | + 'icone_gestion_langues' => 'Sprachverwaltung', |
|
| 317 | + 'icone_informations_personnelles' => 'Persönliche Informationen', |
|
| 318 | + 'icone_interface_complet' => 'Expertenmodus', |
|
| 319 | + 'icone_interface_simple' => 'Standardmodus', |
|
| 320 | + 'icone_maintenance_site' => 'Wartung', |
|
| 321 | + 'icone_messagerie_personnelle' => 'Persönliche Nachrichten', |
|
| 322 | + 'icone_repartition_debut' => 'Seit Einrichtung der Website', |
|
| 323 | + 'icone_rubriques' => 'Rubriken', |
|
| 324 | + 'icone_sauver_site' => 'Website sichern', |
|
| 325 | + 'icone_site_entier' => 'Ganze Website', |
|
| 326 | + 'icone_sites_references' => 'Verlinkte Websites', |
|
| 327 | + 'icone_statistiques' => 'Statistiken', |
|
| 328 | + 'icone_suivi_activite' => 'Aktivitäten verfolgen', |
|
| 329 | + 'icone_suivi_actualite' => 'Entwicklung der Website', |
|
| 330 | + 'icone_suivi_pettions' => 'Petitionen verwalten', |
|
| 331 | + 'icone_suivi_revisions' => 'Änderungen des Artikels', |
|
| 332 | + 'icone_supprimer_document' => 'Dokument löschen', |
|
| 333 | + 'icone_supprimer_image' => 'Bild löschen', |
|
| 334 | + 'icone_tous_articles' => 'Alle Ihre Artikel', |
|
| 335 | + 'icone_tous_auteur' => 'Alle Autoren', |
|
| 336 | + 'icone_tous_visiteur' => 'Alle Besucher', |
|
| 337 | + 'icone_visiter_site' => 'Website ansehen', |
|
| 338 | + 'icone_voir_en_ligne' => 'Online ansehen', |
|
| 339 | + 'img_indisponible' => 'Bild nicht vorhanden', |
|
| 340 | + 'impossible' => 'unmöglich', |
|
| 341 | + 'info_a_suivre' => 'AUFGABEN »', |
|
| 342 | + 'info_acces_interdit' => 'Zugang gesperrt', |
|
| 343 | + 'info_acces_refuse' => 'Zugang verweigert', |
|
| 344 | + 'info_action' => 'Aktion: @action@', |
|
| 345 | + 'info_administrer_rubriques' => 'Sie können diese Rubrik und ihre Unterrubriken verwalten', |
|
| 346 | + 'info_adresse_non_indiquee' => 'Sie haben keine Adresse zum Testen agegeben!', |
|
| 347 | + 'info_aide' => 'HILFE:', |
|
| 348 | + 'info_ajouter_mot' => 'Wort hinzufügen', |
|
| 349 | + 'info_annonce' => 'ANKÜNDIGUNG', |
|
| 350 | + 'info_annonces_generales' => 'Allgemeine Ankündigungen:', |
|
| 351 | + 'info_article_propose' => 'Vorgeschlagener Artikel', |
|
| 352 | + 'info_article_publie' => 'Veröffentlichter Artikel', |
|
| 353 | + 'info_article_redaction' => 'Artikel in Bearbeitung', |
|
| 354 | + 'info_article_refuse' => 'Abgelehnter Artikel', |
|
| 355 | + 'info_article_supprime' => 'Gelöschter Artikel', |
|
| 356 | + 'info_articles' => 'Artikel', |
|
| 357 | + 'info_articles_a_valider' => 'Zur Veröffentlichung vorgeschlagenen Artikel', |
|
| 358 | + 'info_articles_nb' => '@nb@ Artikel', |
|
| 359 | + 'info_articles_proposes' => 'Vorgeschlagene Artikel', |
|
| 360 | + 'info_articles_un' => '1 Artikel', |
|
| 361 | + 'info_auteurs_nombre' => 'Autor(en):', |
|
| 362 | + 'info_authentification_ftp' => 'Authentifizierung per FTP.', |
|
| 363 | + 'info_breves_2' => 'Meldungen', |
|
| 364 | + 'info_breves_nb' => '@nb@ Meldungen', |
|
| 365 | + 'info_breves_un' => '1 Meldung', |
|
| 366 | + 'info_connexion_refusee' => 'Die Verbindung wurde verweigert.', |
|
| 367 | + 'info_contact_developpeur' => 'Bitte kontaktieren Sie einen der Entwickler.', |
|
| 368 | + 'info_contenance' => 'Diese Website enthält:', |
|
| 369 | + 'info_contribution' => 'Beiträge', |
|
| 370 | + 'info_copyright' => '@spip@ ist freie Software im Sinne der @lien_gpl@.', |
|
| 371 | + 'info_copyright_doc' => 'Weitere Informationen finden Sie unter <a href="@spipnet@">@spipnet_affiche@</a>.', |
|
| 372 | + 'info_copyright_gpl' => 'GNU Public License', |
|
| 373 | + 'info_cours_edition' => 'In Bearbeitung', |
|
| 374 | + 'info_creer_repertoire' => 'Bitte legen Sie eine Datei oder ein Verzeichnis mit diesem Namen an: ', |
|
| 375 | + 'info_creer_repertoire_2' => '(Im Unterverzeichnis <b>@repertoire@</b>)', |
|
| 376 | + 'info_creer_vignette' => 'Miniaturbilder automatisch anlegen', |
|
| 377 | + 'info_creerdansrubrique_non_autorise' => 'Sie sind nicht berechtigt, Inhalte in dieser Rubrik anzulegen.', |
|
| 378 | + 'info_deplier' => 'Öffnen', |
|
| 379 | + 'info_descriptif_nombre' => 'Beschreibung(en):', |
|
| 380 | + 'info_description' => 'Beschreibung:', |
|
| 381 | + 'info_description_2' => 'Beschreibung:', |
|
| 382 | + 'info_dimension' => 'Maße:', |
|
| 383 | + 'info_documents_nb' => '@nb@ Dokumente', |
|
| 384 | + 'info_documents_un' => '1 Dokument', |
|
| 385 | + 'info_ecire_message_prive' => 'Neue private Nachricht schreiben', |
|
| 386 | + 'info_email_invalide' => 'Ungültige E-Mail Adresse.', |
|
| 387 | + 'info_en_cours_validation' => 'Ihre Artikel in Bearbeitung', |
|
| 388 | + 'info_en_ligne' => 'Zur Zeit online:', |
|
| 389 | + 'info_envoyer_message_prive' => 'Private Nachricht an diesen Autor schicken', |
|
| 390 | + 'info_erreur_requete' => 'Abfragefehler: ', |
|
| 391 | + 'info_erreur_squelette2' => 'Keine Vorlage <b>@fichier@</b> vorhanden ...', |
|
| 392 | + 'info_erreur_systeme' => 'Systemfahler (Fehler no. @errsys@)', |
|
| 393 | + 'info_erreur_systeme2' => 'Möglicherweise ist die Festplatte voll oder die Datenbank beschädigt.<br /> |
|
| 394 | 394 | <span style="color:red;">Versuchen Sie <a href=\'@script@\'>die Datenbank zu reparieren</a>, oder wenden Sie sich an Ihren Provider.</span>', |
| 395 | - 'info_fini' => 'Fertig!', |
|
| 396 | - 'info_format_image' => 'Für diese Dateiformate können Vorschaubilder erstellt werden: @gd_formats@.', |
|
| 397 | - 'info_format_non_defini' => 'Undefiniertes Format', |
|
| 398 | - 'info_grand_ecran' => 'Grosser Bildschirm', |
|
| 399 | - 'info_image_aide' => 'HILFE', |
|
| 400 | - 'info_image_process_titre' => 'Methode zum Anlegen der Miniaturbilder', |
|
| 401 | - 'info_impossible_lire_page' => '<b>Fehler!</b> Die Seite <tt><html>@test_proxy@</html></tt> ist nicht über den Proxy erreichbar', |
|
| 402 | - 'info_installation_systeme_publication' => 'Installation von SPIP ...', |
|
| 403 | - 'info_installer_documents' => 'Sie können alle Dokumente im Verzeichnis @upload@ automatisch installieren.', |
|
| 404 | - 'info_installer_ftp' => 'Als Administrator können Sie Dateien (per FTP) direkt in das Verzeichnis <i>@upload@</i> kopieren und sie hier auswählen.', |
|
| 405 | - 'info_installer_images' => 'Sie können Bilder in den Formaten JPEG, GIF und PNG verwenden.', |
|
| 406 | - 'info_installer_images_dossier' => 'Bilder ins Verzeichnis @upload@ kopieren um sie hier auswählen zu können.', |
|
| 407 | - 'info_interface_complete' => 'Expertenmodus', |
|
| 408 | - 'info_interface_simple' => 'Standardmodus', |
|
| 409 | - 'info_joindre_document_article' => 'Diesem Artikel können Sie Dokumente folgendem Typs beifügen: ', |
|
| 410 | - 'info_joindre_document_rubrique' => 'Dieser Rubrik können Sie Dokumente folgendem Typs beifügen:', |
|
| 411 | - 'info_joindre_documents_article' => 'Diesem Artikel können Sie Dokumente folgendem Typs beifügen:', |
|
| 412 | - 'info_l_article' => 'Der Artikel', |
|
| 413 | - 'info_la_breve' => 'Die Meldung', |
|
| 414 | - 'info_la_rubrique' => 'Die Rubrik', |
|
| 415 | - 'info_langue_principale' => 'Hauptsprache der Website', |
|
| 416 | - 'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ Pixel', |
|
| 417 | - 'info_les_auteurs_1' => 'von @les_auteurs@ ', |
|
| 418 | - 'info_logo_format_interdit' => 'Nur die Logos im Format @formats@ sind zugelassen.', |
|
| 419 | - 'info_logo_max_poids' => 'Die Logogrösse darf nicht @maxi@ überschreiten (aktuelle Dateigrösse @actuel@).', |
|
| 420 | - 'info_mail_fournisseur' => '[email protected]', |
|
| 421 | - 'info_message_2' => 'NACHRICHT', |
|
| 422 | - 'info_message_supprime' => 'NACHRICHT GELÖSCHT', |
|
| 423 | - 'info_messages_nb' => '@nb@ Nachrichten', |
|
| 424 | - 'info_messages_un' => '1 Nachricht', |
|
| 425 | - 'info_mise_en_ligne' => 'Online seit:', |
|
| 426 | - 'info_modification_parametres_securite' => 'Änderung der Sicherheitseinstellungen', |
|
| 427 | - 'info_mois_courant' => 'Im Lauf des Monats:', |
|
| 428 | - 'info_mot_cle_ajoute' => 'Das folgende Wort wurde hinzugefügt zu', |
|
| 429 | - 'info_multi_herit' => 'Standardsprache', |
|
| 430 | - 'info_multi_langues_soulignees' => 'Die Texte des Interface sind in die <u>unterstrichenen Sprachen</u> ganz oder teilweise übersetzt. Wenn Sie eine von ihnen wählen, werden viele Elemente der Website automatisch übersetzt (Datumsangaben, Formulare usw.). In den nicht unterstrichenen Sprachen werden diese Elemente in der Hauptsprache der Website angezeigt.', |
|
| 431 | - 'info_multilinguisme' => 'Mehrsprachigkeit', |
|
| 432 | - 'info_nom_non_utilisateurs_connectes' => 'Ihr Name wird nicht in der Liste der zur Zeit eingelogten Nutzer angezeigt.', |
|
| 433 | - 'info_nom_utilisateurs_connectes' => 'Ihr Name wird in der Liste der angemeldeten Nutzer angezeigt.', |
|
| 434 | - 'info_nombre_en_ligne' => 'Zur Zeit online:', |
|
| 435 | - 'info_non_resultat' => 'Keine Fundstellen für “@cherche_mot@”', |
|
| 436 | - 'info_non_utilisation_messagerie' => 'Sie nehmen nicht am Nachrichtensystem der Website teil.', |
|
| 437 | - 'info_nouveau_message' => 'SIE HABEN EINE NEUE NACHRICHT', |
|
| 438 | - 'info_nouveaux_messages' => 'SIE HABEN @total_messages@ NEUE NACHRICHTEN', |
|
| 439 | - 'info_numero_abbreviation' => 'N° ', |
|
| 440 | - 'info_obligatoire' => 'Diese Information ist obligatorisch.', |
|
| 441 | - 'info_page_actuelle' => 'Aktuelle Seite', |
|
| 442 | - 'info_pense_bete' => 'MERKZETTEL', |
|
| 443 | - 'info_petit_ecran' => 'Kleiner Bildschirm', |
|
| 444 | - 'info_petition_close' => 'Petition geschlossen', |
|
| 445 | - 'info_pixels' => 'Pixel', |
|
| 446 | - 'info_plusieurs_mots_trouves' => 'Mehrere Schlagworte entsprechen Ihrem Suchkriterium “@cherche_mot@”:', |
|
| 447 | - 'info_portfolio_automatique' => 'automatische Mappe:', |
|
| 448 | - 'info_premier_resultat' => '[@debut_limit@ erste Ergebnisse von @total@]', |
|
| 449 | - 'info_premier_resultat_sur' => '[@debut_limit@ erste Ergebnisse von @total@]', |
|
| 450 | - 'info_propose_1' => '[@nom_site_spip@] vorgeschlagen : @titre@', |
|
| 451 | - 'info_propose_2' => 'vorgeschlagener Artikel |
|
| 395 | + 'info_fini' => 'Fertig!', |
|
| 396 | + 'info_format_image' => 'Für diese Dateiformate können Vorschaubilder erstellt werden: @gd_formats@.', |
|
| 397 | + 'info_format_non_defini' => 'Undefiniertes Format', |
|
| 398 | + 'info_grand_ecran' => 'Grosser Bildschirm', |
|
| 399 | + 'info_image_aide' => 'HILFE', |
|
| 400 | + 'info_image_process_titre' => 'Methode zum Anlegen der Miniaturbilder', |
|
| 401 | + 'info_impossible_lire_page' => '<b>Fehler!</b> Die Seite <tt><html>@test_proxy@</html></tt> ist nicht über den Proxy erreichbar', |
|
| 402 | + 'info_installation_systeme_publication' => 'Installation von SPIP ...', |
|
| 403 | + 'info_installer_documents' => 'Sie können alle Dokumente im Verzeichnis @upload@ automatisch installieren.', |
|
| 404 | + 'info_installer_ftp' => 'Als Administrator können Sie Dateien (per FTP) direkt in das Verzeichnis <i>@upload@</i> kopieren und sie hier auswählen.', |
|
| 405 | + 'info_installer_images' => 'Sie können Bilder in den Formaten JPEG, GIF und PNG verwenden.', |
|
| 406 | + 'info_installer_images_dossier' => 'Bilder ins Verzeichnis @upload@ kopieren um sie hier auswählen zu können.', |
|
| 407 | + 'info_interface_complete' => 'Expertenmodus', |
|
| 408 | + 'info_interface_simple' => 'Standardmodus', |
|
| 409 | + 'info_joindre_document_article' => 'Diesem Artikel können Sie Dokumente folgendem Typs beifügen: ', |
|
| 410 | + 'info_joindre_document_rubrique' => 'Dieser Rubrik können Sie Dokumente folgendem Typs beifügen:', |
|
| 411 | + 'info_joindre_documents_article' => 'Diesem Artikel können Sie Dokumente folgendem Typs beifügen:', |
|
| 412 | + 'info_l_article' => 'Der Artikel', |
|
| 413 | + 'info_la_breve' => 'Die Meldung', |
|
| 414 | + 'info_la_rubrique' => 'Die Rubrik', |
|
| 415 | + 'info_langue_principale' => 'Hauptsprache der Website', |
|
| 416 | + 'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ Pixel', |
|
| 417 | + 'info_les_auteurs_1' => 'von @les_auteurs@ ', |
|
| 418 | + 'info_logo_format_interdit' => 'Nur die Logos im Format @formats@ sind zugelassen.', |
|
| 419 | + 'info_logo_max_poids' => 'Die Logogrösse darf nicht @maxi@ überschreiten (aktuelle Dateigrösse @actuel@).', |
|
| 420 | + 'info_mail_fournisseur' => '[email protected]', |
|
| 421 | + 'info_message_2' => 'NACHRICHT', |
|
| 422 | + 'info_message_supprime' => 'NACHRICHT GELÖSCHT', |
|
| 423 | + 'info_messages_nb' => '@nb@ Nachrichten', |
|
| 424 | + 'info_messages_un' => '1 Nachricht', |
|
| 425 | + 'info_mise_en_ligne' => 'Online seit:', |
|
| 426 | + 'info_modification_parametres_securite' => 'Änderung der Sicherheitseinstellungen', |
|
| 427 | + 'info_mois_courant' => 'Im Lauf des Monats:', |
|
| 428 | + 'info_mot_cle_ajoute' => 'Das folgende Wort wurde hinzugefügt zu', |
|
| 429 | + 'info_multi_herit' => 'Standardsprache', |
|
| 430 | + 'info_multi_langues_soulignees' => 'Die Texte des Interface sind in die <u>unterstrichenen Sprachen</u> ganz oder teilweise übersetzt. Wenn Sie eine von ihnen wählen, werden viele Elemente der Website automatisch übersetzt (Datumsangaben, Formulare usw.). In den nicht unterstrichenen Sprachen werden diese Elemente in der Hauptsprache der Website angezeigt.', |
|
| 431 | + 'info_multilinguisme' => 'Mehrsprachigkeit', |
|
| 432 | + 'info_nom_non_utilisateurs_connectes' => 'Ihr Name wird nicht in der Liste der zur Zeit eingelogten Nutzer angezeigt.', |
|
| 433 | + 'info_nom_utilisateurs_connectes' => 'Ihr Name wird in der Liste der angemeldeten Nutzer angezeigt.', |
|
| 434 | + 'info_nombre_en_ligne' => 'Zur Zeit online:', |
|
| 435 | + 'info_non_resultat' => 'Keine Fundstellen für “@cherche_mot@”', |
|
| 436 | + 'info_non_utilisation_messagerie' => 'Sie nehmen nicht am Nachrichtensystem der Website teil.', |
|
| 437 | + 'info_nouveau_message' => 'SIE HABEN EINE NEUE NACHRICHT', |
|
| 438 | + 'info_nouveaux_messages' => 'SIE HABEN @total_messages@ NEUE NACHRICHTEN', |
|
| 439 | + 'info_numero_abbreviation' => 'N° ', |
|
| 440 | + 'info_obligatoire' => 'Diese Information ist obligatorisch.', |
|
| 441 | + 'info_page_actuelle' => 'Aktuelle Seite', |
|
| 442 | + 'info_pense_bete' => 'MERKZETTEL', |
|
| 443 | + 'info_petit_ecran' => 'Kleiner Bildschirm', |
|
| 444 | + 'info_petition_close' => 'Petition geschlossen', |
|
| 445 | + 'info_pixels' => 'Pixel', |
|
| 446 | + 'info_plusieurs_mots_trouves' => 'Mehrere Schlagworte entsprechen Ihrem Suchkriterium “@cherche_mot@”:', |
|
| 447 | + 'info_portfolio_automatique' => 'automatische Mappe:', |
|
| 448 | + 'info_premier_resultat' => '[@debut_limit@ erste Ergebnisse von @total@]', |
|
| 449 | + 'info_premier_resultat_sur' => '[@debut_limit@ erste Ergebnisse von @total@]', |
|
| 450 | + 'info_propose_1' => '[@nom_site_spip@] vorgeschlagen : @titre@', |
|
| 451 | + 'info_propose_2' => 'vorgeschlagener Artikel |
|
| 452 | 452 | ---------------', |
| 453 | - 'info_propose_3' => 'Der Artikel “@titre@” ist zur Veröffentlichung vorgeschlagen.', |
|
| 454 | - 'info_propose_4' => 'Bitte teilen Sie den anderen Autoren Ihre Meinung zu diesem Artikel mit', |
|
| 455 | - 'info_propose_5' => '(im Forum des Artikels). Sie können ihn unter dieser Adresse lesen:', |
|
| 456 | - 'info_publie_01' => 'Der Artikel „@titre@“ wurde von @connect_nom@ freigegeben.', |
|
| 457 | - 'info_publie_1' => '[@nom_site_spip@] VERÖFFENTLICHT: @titre@', |
|
| 458 | - 'info_publie_2' => 'Artikel veröffentlicht |
|
| 453 | + 'info_propose_3' => 'Der Artikel “@titre@” ist zur Veröffentlichung vorgeschlagen.', |
|
| 454 | + 'info_propose_4' => 'Bitte teilen Sie den anderen Autoren Ihre Meinung zu diesem Artikel mit', |
|
| 455 | + 'info_propose_5' => '(im Forum des Artikels). Sie können ihn unter dieser Adresse lesen:', |
|
| 456 | + 'info_publie_01' => 'Der Artikel „@titre@“ wurde von @connect_nom@ freigegeben.', |
|
| 457 | + 'info_publie_1' => '[@nom_site_spip@] VERÖFFENTLICHT: @titre@', |
|
| 458 | + 'info_publie_2' => 'Artikel veröffentlicht |
|
| 459 | 459 | --------------', |
| 460 | - 'info_rechercher' => 'Suchen', |
|
| 461 | - 'info_rechercher_02' => 'Suchen:', |
|
| 462 | - 'info_remplacer_vignette' => 'Ersetzen Sie das Standard-Piktogramm durch ein eigenes Logo:', |
|
| 463 | - 'info_rubriques_nb' => '@nb@ Rubriken', |
|
| 464 | - 'info_rubriques_un' => '1 Rubrik', |
|
| 465 | - 'info_sans_titre_2' => 'ohne Titel', |
|
| 466 | - 'info_selectionner_fichier' => 'Sie können eine Datei aus dem Verzeichnis @upload@ auswählen.', |
|
| 467 | - 'info_selectionner_fichier_2' => 'Wählen Sie eine Datei:', |
|
| 468 | - 'info_sites_nb' => '@nb@ Websites', |
|
| 469 | - 'info_sites_un' => '1 Website', |
|
| 470 | - 'info_supprimer_vignette' => 'Icon löschen', |
|
| 471 | - 'info_symbole_bleu' => 'Das <b>blaue</b> Symbol bedeutet <b>Merkzettel</b>, d.h. eine Nachricht nur zu Ihrer eigenen Verwendung.', |
|
| 472 | - 'info_symbole_jaune' => 'Das <b>gelbe</b> Symbol bedeutet <b>Ankündigung an alle Redakteure</b> (für alle Redakteure sichtbar, Änderung nur durch Administratoren)', |
|
| 473 | - 'info_symbole_vert' => 'Das <b>grüne</b> Symbol bezeichnet Nachrichten an <b>andere Benutzer</b> der Website.', |
|
| 474 | - 'info_telecharger_nouveau_logo' => 'Neues Logo hochladen:', |
|
| 475 | - 'info_telecharger_ordinateur' => 'Von Ihrem Computer hochladen:', |
|
| 476 | - 'info_tous_resultats_enregistres' => ' [alle Ergebnisse sind erfasst]', |
|
| 477 | - 'info_tout_afficher' => 'Alles zeigen', |
|
| 478 | - 'info_travaux_texte' => 'Diese Website ist noch nicht fertig eingerichtet. Schauen Sie später mal wieder rein ...', |
|
| 479 | - 'info_travaux_titre' => 'Website in Bearbeitung', |
|
| 480 | - 'info_trop_resultat' => 'Zu viele Ergebnisse für “@cherche_mot”. Bitte präzisieren Sie Ihre Suchbegriffe.', |
|
| 481 | - 'info_utilisation_messagerie_interne' => 'Sie verwenden das interne Nachrichtensystem der Website. ', |
|
| 482 | - 'info_valider_lien' => 'Link freigeben', |
|
| 483 | - 'info_verifier_image' => ', bitte prüfen Sie, ob Ihre Bilder fehlerfrei übertagen wurden.', |
|
| 484 | - 'info_vignette_defaut' => 'Standardsymbol', |
|
| 485 | - 'info_vignette_personnalisee' => 'Persönliches Icon', |
|
| 486 | - 'info_visite' => 'Besuch:', |
|
| 487 | - 'info_vos_rendez_vous' => 'Ihre kommenden Termine', |
|
| 488 | - 'infos_vos_pense_bete' => 'Ihre Merkzettel', |
|
| 460 | + 'info_rechercher' => 'Suchen', |
|
| 461 | + 'info_rechercher_02' => 'Suchen:', |
|
| 462 | + 'info_remplacer_vignette' => 'Ersetzen Sie das Standard-Piktogramm durch ein eigenes Logo:', |
|
| 463 | + 'info_rubriques_nb' => '@nb@ Rubriken', |
|
| 464 | + 'info_rubriques_un' => '1 Rubrik', |
|
| 465 | + 'info_sans_titre_2' => 'ohne Titel', |
|
| 466 | + 'info_selectionner_fichier' => 'Sie können eine Datei aus dem Verzeichnis @upload@ auswählen.', |
|
| 467 | + 'info_selectionner_fichier_2' => 'Wählen Sie eine Datei:', |
|
| 468 | + 'info_sites_nb' => '@nb@ Websites', |
|
| 469 | + 'info_sites_un' => '1 Website', |
|
| 470 | + 'info_supprimer_vignette' => 'Icon löschen', |
|
| 471 | + 'info_symbole_bleu' => 'Das <b>blaue</b> Symbol bedeutet <b>Merkzettel</b>, d.h. eine Nachricht nur zu Ihrer eigenen Verwendung.', |
|
| 472 | + 'info_symbole_jaune' => 'Das <b>gelbe</b> Symbol bedeutet <b>Ankündigung an alle Redakteure</b> (für alle Redakteure sichtbar, Änderung nur durch Administratoren)', |
|
| 473 | + 'info_symbole_vert' => 'Das <b>grüne</b> Symbol bezeichnet Nachrichten an <b>andere Benutzer</b> der Website.', |
|
| 474 | + 'info_telecharger_nouveau_logo' => 'Neues Logo hochladen:', |
|
| 475 | + 'info_telecharger_ordinateur' => 'Von Ihrem Computer hochladen:', |
|
| 476 | + 'info_tous_resultats_enregistres' => ' [alle Ergebnisse sind erfasst]', |
|
| 477 | + 'info_tout_afficher' => 'Alles zeigen', |
|
| 478 | + 'info_travaux_texte' => 'Diese Website ist noch nicht fertig eingerichtet. Schauen Sie später mal wieder rein ...', |
|
| 479 | + 'info_travaux_titre' => 'Website in Bearbeitung', |
|
| 480 | + 'info_trop_resultat' => 'Zu viele Ergebnisse für “@cherche_mot”. Bitte präzisieren Sie Ihre Suchbegriffe.', |
|
| 481 | + 'info_utilisation_messagerie_interne' => 'Sie verwenden das interne Nachrichtensystem der Website. ', |
|
| 482 | + 'info_valider_lien' => 'Link freigeben', |
|
| 483 | + 'info_verifier_image' => ', bitte prüfen Sie, ob Ihre Bilder fehlerfrei übertagen wurden.', |
|
| 484 | + 'info_vignette_defaut' => 'Standardsymbol', |
|
| 485 | + 'info_vignette_personnalisee' => 'Persönliches Icon', |
|
| 486 | + 'info_visite' => 'Besuch:', |
|
| 487 | + 'info_vos_rendez_vous' => 'Ihre kommenden Termine', |
|
| 488 | + 'infos_vos_pense_bete' => 'Ihre Merkzettel', |
|
| 489 | 489 | |
| 490 | - // L |
|
| 491 | - 'label_ajout_id_rapide' => 'schnell hinzufügen', |
|
| 492 | - 'label_poids_fichier' => 'Größe', |
|
| 493 | - 'label_ponctuer' => '@label@:', |
|
| 494 | - 'lien_afficher_icones_seuls' => 'Nur Piktogramme anzeigen', |
|
| 495 | - 'lien_afficher_texte_icones' => 'Piktogramme und Beschriftung anzeigen', |
|
| 496 | - 'lien_afficher_texte_seul' => 'Nur Textmenüs', |
|
| 497 | - 'lien_aller_a_la_derniere_page' => 'Zur letzten Seite gehen', |
|
| 498 | - 'lien_aller_a_la_page_nb' => 'Zu Seite @nb@ gehen', |
|
| 499 | - 'lien_aller_a_la_page_precedente' => 'Zur vorherigen Seite gehen', |
|
| 500 | - 'lien_aller_a_la_page_suivante' => 'Zur nächsten Seite gehen', |
|
| 501 | - 'lien_aller_a_la_premiere_page' => 'Zur ersten Seite gehen', |
|
| 502 | - 'lien_liberer' => 'freigeben', |
|
| 503 | - 'lien_liberer_tous' => 'Alle freigeben', |
|
| 504 | - 'lien_nouvea_pense_bete' => 'NEUER MERKZETTEL', |
|
| 505 | - 'lien_nouveau_message' => 'NEUE NACHRICHT', |
|
| 506 | - 'lien_nouvelle_annonce' => 'NEUE ANKÜNDIGUNG', |
|
| 507 | - 'lien_petitions' => 'PETITION', |
|
| 508 | - 'lien_popularite' => 'Beliebtheit: @popularite@%', |
|
| 509 | - 'lien_racine_site' => 'OBERSTE EBENE DER WEBSITE', |
|
| 510 | - 'lien_reessayer' => 'Wiederholen', |
|
| 511 | - 'lien_repondre_message' => 'Nachricht beantworten', |
|
| 512 | - 'lien_supprimer' => 'Löschen', |
|
| 513 | - 'lien_tout_afficher' => 'Alles zeigen', |
|
| 514 | - 'lien_visite_site' => 'Website anzeigen', |
|
| 515 | - 'lien_visites' => '@visites@ Besuche', |
|
| 516 | - 'lien_voir_auteur' => 'Autor anzeigen', |
|
| 517 | - 'ligne' => 'Zeile', |
|
| 518 | - 'login' => 'Login', |
|
| 519 | - 'login_acces_prive' => 'Login zum Redaktionssystem', |
|
| 520 | - 'login_autre_identifiant' => 'Unter anderem Namen anmelden', |
|
| 521 | - 'login_cookie_accepte' => 'Bitte stellen Sie Ihren Webbrowser so ein, dass er sie akzeptiert (zumindest für diese Website).', |
|
| 522 | - 'login_cookie_oblige' => 'Zu Ihrer Sicherheit muss Ihr Browser Cookies akzeptieren, wenn Sie sich bei der Website anmelden.', |
|
| 523 | - 'login_deconnexion_ok' => 'Abmeldung erfolgreich.', |
|
| 524 | - 'login_erreur_pass' => 'Passwort oder Benutzername falsch.', |
|
| 525 | - 'login_espace_prive' => 'Redaktionssystem', |
|
| 526 | - 'login_identifiant_inconnu' => 'Benutzer «@login@» unbekannt.', |
|
| 527 | - 'login_login' => 'Login:', |
|
| 528 | - 'login_login2' => 'Login-ID oder E-Mail:', |
|
| 529 | - 'login_login_pass_incorrect' => '(Login oder Passwort falsch.)', |
|
| 530 | - 'login_motpasseoublie' => 'Passwort vergessen?', |
|
| 531 | - 'login_non_securise' => 'Achtung, dieses Formular ist nicht abgesichert. Wenn Sie sicher stellen wollen, dass Ihr Passwort nicht im Netzwerk mitgehört werden kann, aktivieren Sie bitte Javascript und', |
|
| 532 | - 'login_nouvelle_tentative' => 'Erneut versuchen', |
|
| 533 | - 'login_par_ici' => 'Sie sind angemeldet... hier...', |
|
| 534 | - 'login_pass2' => 'Passwort:', |
|
| 535 | - 'login_preferez_refuser' => '<b>Wenn Sie keine Cookies verwenden wollen</b>, können Sie eine alternative (weniger sichere) Anmeldung nutzen:', |
|
| 536 | - 'login_recharger' => 'diese Seite neu laden', |
|
| 537 | - 'login_rester_identifie' => 'An mich erinnern', |
|
| 538 | - 'login_retour_public' => 'Zurück zur öffentlichen Website', |
|
| 539 | - 'login_retour_site' => 'Zurück zur öffentlichen Website', |
|
| 540 | - 'login_retoursitepublic' => 'Zurück zur öffentlichen Website', |
|
| 541 | - 'login_sans_cookie' => 'Login ohne Cookie', |
|
| 542 | - 'login_securise' => 'Sicheres Login', |
|
| 543 | - 'login_sinscrire' => 'anmelden', |
|
| 544 | - 'login_test_navigateur' => 'Test Webbrowser/Verbindung', |
|
| 545 | - 'login_verifiez_navigateur' => '(Überprüfen Sie, dass Ihr Webbrowser Ihr Passwort nicht gespeichert hat ...)', |
|
| 490 | + // L |
|
| 491 | + 'label_ajout_id_rapide' => 'schnell hinzufügen', |
|
| 492 | + 'label_poids_fichier' => 'Größe', |
|
| 493 | + 'label_ponctuer' => '@label@:', |
|
| 494 | + 'lien_afficher_icones_seuls' => 'Nur Piktogramme anzeigen', |
|
| 495 | + 'lien_afficher_texte_icones' => 'Piktogramme und Beschriftung anzeigen', |
|
| 496 | + 'lien_afficher_texte_seul' => 'Nur Textmenüs', |
|
| 497 | + 'lien_aller_a_la_derniere_page' => 'Zur letzten Seite gehen', |
|
| 498 | + 'lien_aller_a_la_page_nb' => 'Zu Seite @nb@ gehen', |
|
| 499 | + 'lien_aller_a_la_page_precedente' => 'Zur vorherigen Seite gehen', |
|
| 500 | + 'lien_aller_a_la_page_suivante' => 'Zur nächsten Seite gehen', |
|
| 501 | + 'lien_aller_a_la_premiere_page' => 'Zur ersten Seite gehen', |
|
| 502 | + 'lien_liberer' => 'freigeben', |
|
| 503 | + 'lien_liberer_tous' => 'Alle freigeben', |
|
| 504 | + 'lien_nouvea_pense_bete' => 'NEUER MERKZETTEL', |
|
| 505 | + 'lien_nouveau_message' => 'NEUE NACHRICHT', |
|
| 506 | + 'lien_nouvelle_annonce' => 'NEUE ANKÜNDIGUNG', |
|
| 507 | + 'lien_petitions' => 'PETITION', |
|
| 508 | + 'lien_popularite' => 'Beliebtheit: @popularite@%', |
|
| 509 | + 'lien_racine_site' => 'OBERSTE EBENE DER WEBSITE', |
|
| 510 | + 'lien_reessayer' => 'Wiederholen', |
|
| 511 | + 'lien_repondre_message' => 'Nachricht beantworten', |
|
| 512 | + 'lien_supprimer' => 'Löschen', |
|
| 513 | + 'lien_tout_afficher' => 'Alles zeigen', |
|
| 514 | + 'lien_visite_site' => 'Website anzeigen', |
|
| 515 | + 'lien_visites' => '@visites@ Besuche', |
|
| 516 | + 'lien_voir_auteur' => 'Autor anzeigen', |
|
| 517 | + 'ligne' => 'Zeile', |
|
| 518 | + 'login' => 'Login', |
|
| 519 | + 'login_acces_prive' => 'Login zum Redaktionssystem', |
|
| 520 | + 'login_autre_identifiant' => 'Unter anderem Namen anmelden', |
|
| 521 | + 'login_cookie_accepte' => 'Bitte stellen Sie Ihren Webbrowser so ein, dass er sie akzeptiert (zumindest für diese Website).', |
|
| 522 | + 'login_cookie_oblige' => 'Zu Ihrer Sicherheit muss Ihr Browser Cookies akzeptieren, wenn Sie sich bei der Website anmelden.', |
|
| 523 | + 'login_deconnexion_ok' => 'Abmeldung erfolgreich.', |
|
| 524 | + 'login_erreur_pass' => 'Passwort oder Benutzername falsch.', |
|
| 525 | + 'login_espace_prive' => 'Redaktionssystem', |
|
| 526 | + 'login_identifiant_inconnu' => 'Benutzer «@login@» unbekannt.', |
|
| 527 | + 'login_login' => 'Login:', |
|
| 528 | + 'login_login2' => 'Login-ID oder E-Mail:', |
|
| 529 | + 'login_login_pass_incorrect' => '(Login oder Passwort falsch.)', |
|
| 530 | + 'login_motpasseoublie' => 'Passwort vergessen?', |
|
| 531 | + 'login_non_securise' => 'Achtung, dieses Formular ist nicht abgesichert. Wenn Sie sicher stellen wollen, dass Ihr Passwort nicht im Netzwerk mitgehört werden kann, aktivieren Sie bitte Javascript und', |
|
| 532 | + 'login_nouvelle_tentative' => 'Erneut versuchen', |
|
| 533 | + 'login_par_ici' => 'Sie sind angemeldet... hier...', |
|
| 534 | + 'login_pass2' => 'Passwort:', |
|
| 535 | + 'login_preferez_refuser' => '<b>Wenn Sie keine Cookies verwenden wollen</b>, können Sie eine alternative (weniger sichere) Anmeldung nutzen:', |
|
| 536 | + 'login_recharger' => 'diese Seite neu laden', |
|
| 537 | + 'login_rester_identifie' => 'An mich erinnern', |
|
| 538 | + 'login_retour_public' => 'Zurück zur öffentlichen Website', |
|
| 539 | + 'login_retour_site' => 'Zurück zur öffentlichen Website', |
|
| 540 | + 'login_retoursitepublic' => 'Zurück zur öffentlichen Website', |
|
| 541 | + 'login_sans_cookie' => 'Login ohne Cookie', |
|
| 542 | + 'login_securise' => 'Sicheres Login', |
|
| 543 | + 'login_sinscrire' => 'anmelden', |
|
| 544 | + 'login_test_navigateur' => 'Test Webbrowser/Verbindung', |
|
| 545 | + 'login_verifiez_navigateur' => '(Überprüfen Sie, dass Ihr Webbrowser Ihr Passwort nicht gespeichert hat ...)', |
|
| 546 | 546 | |
| 547 | - // M |
|
| 548 | - 'masquer_colonne' => 'Diese Spalte verbergen', |
|
| 549 | - 'masquer_trad' => 'Übersetzungen ausblenden', |
|
| 550 | - 'message_nouveaux_identifiants_echec' => 'Es können keine neuen Zugangsdaten erzeigt werden.', |
|
| 551 | - 'message_nouveaux_identifiants_echec_envoi' => 'Die neuen Zugangsdaten konnten nicht übermittelt werden.', |
|
| 552 | - 'message_nouveaux_identifiants_ok' => 'Die neuen Zugangsdaten wurden an @email@ übermittelt.', |
|
| 553 | - 'module_fichiers_langues' => 'Sprachdateien', |
|
| 547 | + // M |
|
| 548 | + 'masquer_colonne' => 'Diese Spalte verbergen', |
|
| 549 | + 'masquer_trad' => 'Übersetzungen ausblenden', |
|
| 550 | + 'message_nouveaux_identifiants_echec' => 'Es können keine neuen Zugangsdaten erzeigt werden.', |
|
| 551 | + 'message_nouveaux_identifiants_echec_envoi' => 'Die neuen Zugangsdaten konnten nicht übermittelt werden.', |
|
| 552 | + 'message_nouveaux_identifiants_ok' => 'Die neuen Zugangsdaten wurden an @email@ übermittelt.', |
|
| 553 | + 'module_fichiers_langues' => 'Sprachdateien', |
|
| 554 | 554 | |
| 555 | - // N |
|
| 556 | - 'navigateur_pas_redirige' => 'Wenn Ihr Browser keine automatische Weiterleitung unterstützt, klicken Sie hier.', |
|
| 557 | - 'numero' => 'Nummer', |
|
| 555 | + // N |
|
| 556 | + 'navigateur_pas_redirige' => 'Wenn Ihr Browser keine automatische Weiterleitung unterstützt, klicken Sie hier.', |
|
| 557 | + 'numero' => 'Nummer', |
|
| 558 | 558 | |
| 559 | - // O |
|
| 560 | - 'occurence' => 'Vorkommen', |
|
| 561 | - 'onglet_affacer_base' => 'Datenbank löschen', |
|
| 562 | - 'onglet_auteur' => 'Autor', |
|
| 563 | - 'onglet_contenu_site' => 'Inhalte der Website', |
|
| 564 | - 'onglet_evolution_visite_mod' => 'Entwicklung', |
|
| 565 | - 'onglet_fonctions_avances' => 'Erweiterte Einstellungen', |
|
| 566 | - 'onglet_informations_personnelles' => 'Persönliche Informationen', |
|
| 567 | - 'onglet_interactivite' => 'Interaktivität', |
|
| 568 | - 'onglet_messagerie' => 'Nachrichtensystem', |
|
| 569 | - 'onglet_repartition_rubrique' => 'Verteilung auf Rubriken', |
|
| 570 | - 'onglet_save_restaur_base' => 'Datenbank sichern/wieder herstellen', |
|
| 571 | - 'onglet_vider_cache' => 'Sitecache löschen', |
|
| 559 | + // O |
|
| 560 | + 'occurence' => 'Vorkommen', |
|
| 561 | + 'onglet_affacer_base' => 'Datenbank löschen', |
|
| 562 | + 'onglet_auteur' => 'Autor', |
|
| 563 | + 'onglet_contenu_site' => 'Inhalte der Website', |
|
| 564 | + 'onglet_evolution_visite_mod' => 'Entwicklung', |
|
| 565 | + 'onglet_fonctions_avances' => 'Erweiterte Einstellungen', |
|
| 566 | + 'onglet_informations_personnelles' => 'Persönliche Informationen', |
|
| 567 | + 'onglet_interactivite' => 'Interaktivität', |
|
| 568 | + 'onglet_messagerie' => 'Nachrichtensystem', |
|
| 569 | + 'onglet_repartition_rubrique' => 'Verteilung auf Rubriken', |
|
| 570 | + 'onglet_save_restaur_base' => 'Datenbank sichern/wieder herstellen', |
|
| 571 | + 'onglet_vider_cache' => 'Sitecache löschen', |
|
| 572 | 572 | |
| 573 | - // P |
|
| 574 | - 'pass_choix_pass' => 'Bitte geben Sie Ihr neues Passwort ein:', |
|
| 575 | - 'pass_erreur' => 'Fehler', |
|
| 576 | - 'pass_erreur_acces_refuse' => '<b>Fehler:</b> Sie haben keinen Zugang mehr zur Website.', |
|
| 577 | - 'pass_erreur_code_inconnu' => '<b>Fehler:</b> Angabe entspricht keinem Benutzer mit Zugang zu dieser Website.', |
|
| 578 | - 'pass_erreur_non_enregistre' => '<b>Fehler:</b> Die Adresse <tt>@email_oubli@</tt> ist nicht bekannt.', |
|
| 579 | - 'pass_erreur_non_valide' => '<b>Fehler:</b> Diese E-Mail Adresse <tt>@email_oubli@</tt> ist ungültig!', |
|
| 580 | - 'pass_erreur_probleme_technique' => '<b>Fehler:</b> E-Mail kann aufgrund eines technischen Problems nicht gesendet werden.', |
|
| 581 | - 'pass_espace_prive_bla' => 'Das Redaktionssystem dieser Website ist für Besucher zugänglich, die sich angemeldet haben. Nach erfolgreicher Anmeldung können Sie an Artikeln mitarbeiten, eigene Artikel vorschlagen und an allen Diskussionsforen teilnehmen.', |
|
| 582 | - 'pass_forum_bla' => 'Sie möchten in einem Forum für eingetragene Besucher der Website schreiben.', |
|
| 583 | - 'pass_indiquez_cidessous' => 'Bitte geben Sie die E-Mail Adresse an, mit der Sie sich ursprünglich eingetragen haben. Sie erhalten dann eine Mail mit allen erforderlichen Schritten um wieder Zugang zu bekommen.', |
|
| 584 | - 'pass_mail_passcookie' => '(Diese Nachricht wurde automatisch erzeugt) |
|
| 573 | + // P |
|
| 574 | + 'pass_choix_pass' => 'Bitte geben Sie Ihr neues Passwort ein:', |
|
| 575 | + 'pass_erreur' => 'Fehler', |
|
| 576 | + 'pass_erreur_acces_refuse' => '<b>Fehler:</b> Sie haben keinen Zugang mehr zur Website.', |
|
| 577 | + 'pass_erreur_code_inconnu' => '<b>Fehler:</b> Angabe entspricht keinem Benutzer mit Zugang zu dieser Website.', |
|
| 578 | + 'pass_erreur_non_enregistre' => '<b>Fehler:</b> Die Adresse <tt>@email_oubli@</tt> ist nicht bekannt.', |
|
| 579 | + 'pass_erreur_non_valide' => '<b>Fehler:</b> Diese E-Mail Adresse <tt>@email_oubli@</tt> ist ungültig!', |
|
| 580 | + 'pass_erreur_probleme_technique' => '<b>Fehler:</b> E-Mail kann aufgrund eines technischen Problems nicht gesendet werden.', |
|
| 581 | + 'pass_espace_prive_bla' => 'Das Redaktionssystem dieser Website ist für Besucher zugänglich, die sich angemeldet haben. Nach erfolgreicher Anmeldung können Sie an Artikeln mitarbeiten, eigene Artikel vorschlagen und an allen Diskussionsforen teilnehmen.', |
|
| 582 | + 'pass_forum_bla' => 'Sie möchten in einem Forum für eingetragene Besucher der Website schreiben.', |
|
| 583 | + 'pass_indiquez_cidessous' => 'Bitte geben Sie die E-Mail Adresse an, mit der Sie sich ursprünglich eingetragen haben. Sie erhalten dann eine Mail mit allen erforderlichen Schritten um wieder Zugang zu bekommen.', |
|
| 584 | + 'pass_mail_passcookie' => '(Diese Nachricht wurde automatisch erzeugt) |
|
| 585 | 585 | |
| 586 | 586 | Um sich wieder bei der Website |
| 587 | 587 | @nom_site_spip@ (@adresse_site@) |
@@ -591,135 +591,135 @@ discard block |
||
| 591 | 591 | |
| 592 | 592 | Sie können auf dieser Seite ein neues Passwort eingeben und sich wieder bei der Website einloggen. |
| 593 | 593 | ', |
| 594 | - 'pass_mot_oublie' => 'Passwort vergessen', |
|
| 595 | - 'pass_nouveau_enregistre' => 'Ihr neues Passwort wurde gespeichert.', |
|
| 596 | - 'pass_nouveau_pass' => 'Neues Passwort', |
|
| 597 | - 'pass_ok' => 'O.K.', |
|
| 598 | - 'pass_oubli_mot' => 'Passwort vergessen', |
|
| 599 | - 'pass_procedure_changer' => 'Um Ihr Paßwort zu ändern, geben Sie bitte die Mailadresse Ihres Accounts an.', |
|
| 600 | - 'pass_quitter_fenetre' => 'Dieses Fenster verlassen', |
|
| 601 | - 'pass_rappel_login' => 'Erinnerung: Ihr Login ist «@login@».', |
|
| 602 | - 'pass_recevoir_mail' => 'Ein Link zum Zurücksetzen Ihres Passworts wurde an Ihre E-Mail-Adresse geschickt (sofern diese gültig ist).', |
|
| 603 | - 'pass_retour_public' => 'Zurück zum öffentlichen Bereich', |
|
| 604 | - 'pass_rien_a_faire_ici' => 'Hier ist nichts zu tun.', |
|
| 605 | - 'pass_vousinscrire' => 'Bei dieser Website anmelden', |
|
| 606 | - 'precedent' => 'zurück', |
|
| 607 | - 'previsualisation' => 'Vorschau', |
|
| 608 | - 'previsualiser' => 'Vorschau anzeigen', |
|
| 594 | + 'pass_mot_oublie' => 'Passwort vergessen', |
|
| 595 | + 'pass_nouveau_enregistre' => 'Ihr neues Passwort wurde gespeichert.', |
|
| 596 | + 'pass_nouveau_pass' => 'Neues Passwort', |
|
| 597 | + 'pass_ok' => 'O.K.', |
|
| 598 | + 'pass_oubli_mot' => 'Passwort vergessen', |
|
| 599 | + 'pass_procedure_changer' => 'Um Ihr Paßwort zu ändern, geben Sie bitte die Mailadresse Ihres Accounts an.', |
|
| 600 | + 'pass_quitter_fenetre' => 'Dieses Fenster verlassen', |
|
| 601 | + 'pass_rappel_login' => 'Erinnerung: Ihr Login ist «@login@».', |
|
| 602 | + 'pass_recevoir_mail' => 'Ein Link zum Zurücksetzen Ihres Passworts wurde an Ihre E-Mail-Adresse geschickt (sofern diese gültig ist).', |
|
| 603 | + 'pass_retour_public' => 'Zurück zum öffentlichen Bereich', |
|
| 604 | + 'pass_rien_a_faire_ici' => 'Hier ist nichts zu tun.', |
|
| 605 | + 'pass_vousinscrire' => 'Bei dieser Website anmelden', |
|
| 606 | + 'precedent' => 'zurück', |
|
| 607 | + 'previsualisation' => 'Vorschau', |
|
| 608 | + 'previsualiser' => 'Vorschau anzeigen', |
|
| 609 | 609 | |
| 610 | - // R |
|
| 611 | - 'retour' => 'Zurück', |
|
| 610 | + // R |
|
| 611 | + 'retour' => 'Zurück', |
|
| 612 | 612 | |
| 613 | - // S |
|
| 614 | - 'spip_conforme_dtd' => 'SPIP erkennt dieses Dokument als dem DOCTYPE entsprechend:', |
|
| 615 | - 'squelette' => 'Skelett', |
|
| 616 | - 'squelette_inclus_ligne' => 'eingebettetes Skelett, Zeile', |
|
| 617 | - 'squelette_ligne' => 'Skelett, Zeile', |
|
| 618 | - 'stats_visites_et_popularite' => '@visites@ Besuche; Beliebtheit: @popularite@', |
|
| 619 | - 'suivant' => 'weiter', |
|
| 613 | + // S |
|
| 614 | + 'spip_conforme_dtd' => 'SPIP erkennt dieses Dokument als dem DOCTYPE entsprechend:', |
|
| 615 | + 'squelette' => 'Skelett', |
|
| 616 | + 'squelette_inclus_ligne' => 'eingebettetes Skelett, Zeile', |
|
| 617 | + 'squelette_ligne' => 'Skelett, Zeile', |
|
| 618 | + 'stats_visites_et_popularite' => '@visites@ Besuche; Beliebtheit: @popularite@', |
|
| 619 | + 'suivant' => 'weiter', |
|
| 620 | 620 | |
| 621 | - // T |
|
| 622 | - 'taille_go' => '@taille@ Start', |
|
| 623 | - 'taille_ko' => '@taille@ kB', |
|
| 624 | - 'taille_mo' => '@taille@ MB', |
|
| 625 | - 'taille_octets' => '@taille@ Byte', |
|
| 626 | - 'texte_actualite_site_1' => 'Wenn Sie sich mit der Oberfläche des Redaktionssystems vertraut gemacht haben, können Sie „', |
|
| 627 | - 'texte_actualite_site_2' => 'den Expertenmodus aktivieren,', |
|
| 628 | - 'texte_actualite_site_3' => 'um zusätzliche Funktionen zu nutzen.', |
|
| 629 | - 'texte_creation_automatique_vignette' => 'Diese Website generiert automatisch Vorschaubilder. Wenn Sie Bilder in den Formaten @gd_formats@ mit diesem Formular installieren, werden Vorschaubilder mit den maximalen Diemsionen @taille_preview@ Pixel angelegt.', |
|
| 630 | - 'texte_documents_associes' => 'Die folgenden Dokumente wurden dem Artikel zugeordnet jedoch nicht direkt in ihn eingefügt. Ja nach Gestaltung der öffentlichen Website können Sie alle beigeordneten Dokumente angezeigt werden (oder auch nicht).', |
|
| 631 | - 'texte_erreur_mise_niveau_base' => 'Datenbankfehler beim Einrichten der neuen Version. Das Bild <b>@fichier@</b> wurde nicht übernommen (Artikel @id_article@). |
|
| 621 | + // T |
|
| 622 | + 'taille_go' => '@taille@ Start', |
|
| 623 | + 'taille_ko' => '@taille@ kB', |
|
| 624 | + 'taille_mo' => '@taille@ MB', |
|
| 625 | + 'taille_octets' => '@taille@ Byte', |
|
| 626 | + 'texte_actualite_site_1' => 'Wenn Sie sich mit der Oberfläche des Redaktionssystems vertraut gemacht haben, können Sie „', |
|
| 627 | + 'texte_actualite_site_2' => 'den Expertenmodus aktivieren,', |
|
| 628 | + 'texte_actualite_site_3' => 'um zusätzliche Funktionen zu nutzen.', |
|
| 629 | + 'texte_creation_automatique_vignette' => 'Diese Website generiert automatisch Vorschaubilder. Wenn Sie Bilder in den Formaten @gd_formats@ mit diesem Formular installieren, werden Vorschaubilder mit den maximalen Diemsionen @taille_preview@ Pixel angelegt.', |
|
| 630 | + 'texte_documents_associes' => 'Die folgenden Dokumente wurden dem Artikel zugeordnet jedoch nicht direkt in ihn eingefügt. Ja nach Gestaltung der öffentlichen Website können Sie alle beigeordneten Dokumente angezeigt werden (oder auch nicht).', |
|
| 631 | + 'texte_erreur_mise_niveau_base' => 'Datenbankfehler beim Einrichten der neuen Version. Das Bild <b>@fichier@</b> wurde nicht übernommen (Artikel @id_article@). |
|
| 632 | 632 | Bitte notieren Sie diesen Hinweis, starten Sie die Aktualisierung erneut und prüfen Sie, ob die Bilder |
| 633 | 633 | in den Artikeln angezeigt werden.', |
| 634 | - 'texte_erreur_visiteur' => 'Sie haben versucht, sich mit einer Identität einzuloggen, die dazu nicht berechtigt.', |
|
| 635 | - 'texte_inc_auth_1' => 'Sie sind angemeldet als <b>@auth_login@</b>, aber diese ID existiert nicht bzw. nicht mehr in der Datenbank. |
|
| 634 | + 'texte_erreur_visiteur' => 'Sie haben versucht, sich mit einer Identität einzuloggen, die dazu nicht berechtigt.', |
|
| 635 | + 'texte_inc_auth_1' => 'Sie sind angemeldet als <b>@auth_login@</b>, aber diese ID existiert nicht bzw. nicht mehr in der Datenbank. |
|
| 636 | 636 | Versuchen Sie,', |
| 637 | - 'texte_inc_auth_2' => 'sich erneut anzumelden', |
|
| 638 | - 'texte_inc_auth_3' => ', nachdem Sie u.U. Ihren Webbrowser neu gestartet haben.', |
|
| 639 | - 'texte_inc_config' => 'Die hier möglichten Einstellungen beeinflussen das grundsätzliche Verhalten Ihrer Website. Wir raten dringend, sie nur zu ändern, wenn Sie vollständig mit der Funktionsweise von SPIP vertraut sind.<br /><br /><b>Es ist ebenfalls mehr als ratsam, diese Einstellungen nur von Ihrem Haupt-Administrator vornehmen zu lassen.</b>', |
|
| 640 | - 'texte_inc_meta_1' => 'Das System konnte die Datei <code>@fichier@</code> nicht speichern. Bitte prüfen Sie als Administrator ', |
|
| 641 | - 'texte_inc_meta_2' => 'die Berechtigungen', |
|
| 642 | - 'texte_inc_meta_3' => 'für das Verzeichnis <code>@repertoire@</code>.', |
|
| 643 | - 'texte_statut_en_cours_redaction' => 'in Bearbeitung', |
|
| 644 | - 'texte_statut_poubelle' => 'im Mülleimer', |
|
| 645 | - 'texte_statut_propose_evaluation' => 'vorgeschlagen', |
|
| 646 | - 'texte_statut_publie' => 'veröffentlicht', |
|
| 647 | - 'texte_statut_refuse' => 'abgelehnt', |
|
| 648 | - 'titre_ajouter_mot_cle' => 'SCHLAGWORT ZUORDNEN:', |
|
| 649 | - 'titre_cadre_raccourcis' => 'SCHNELLZUGANG:', |
|
| 650 | - 'titre_changer_couleur_interface' => 'Farbe der Oberfläche ändern', |
|
| 651 | - 'titre_image_admin_article' => 'Sie können diesen Artikel verwalten', |
|
| 652 | - 'titre_image_administrateur' => 'Administrator', |
|
| 653 | - 'titre_image_aide' => 'Hilfe zu diesem Element', |
|
| 654 | - 'titre_image_auteur_supprime' => 'gelöschter Autor', |
|
| 655 | - 'titre_image_redacteur' => 'Redakteur ohne Systemzugang', |
|
| 656 | - 'titre_image_redacteur_02' => 'Redakteur', |
|
| 657 | - 'titre_image_selecteur' => 'Liste anzeigen', |
|
| 658 | - 'titre_image_visiteur' => 'Besucher', |
|
| 659 | - 'titre_joindre_document' => 'DOKUMENT ANFÜGEN', |
|
| 660 | - 'titre_mots_cles' => 'SCHLAGWORTE', |
|
| 661 | - 'titre_probleme_technique' => 'Achtung! Ein Problem mit dem SQL Server verhindert den Zugang zu diesem Teil der Website. Danke für Ihr Verständnis.', |
|
| 662 | - 'titre_publier_document' => 'DOKUMENT IN DIESER RUBRIK VERÖFFENTLICHEN', |
|
| 663 | - 'titre_signatures_attente' => 'Nicht bestätigte Unterschriften', |
|
| 664 | - 'titre_signatures_confirmees' => 'Bestätigte Unterschriften', |
|
| 665 | - 'titre_statistiques' => 'Statistiken', |
|
| 666 | - 'titre_titre_document' => 'Titel des Dokuments:', |
|
| 667 | - 'todo' => 'demnächst', |
|
| 668 | - 'trad_definir_reference' => 'Wählen Sie "@titre@" als Referenz für Übersetzungen', |
|
| 669 | - 'trad_reference' => '(Referenzartikel)', |
|
| 637 | + 'texte_inc_auth_2' => 'sich erneut anzumelden', |
|
| 638 | + 'texte_inc_auth_3' => ', nachdem Sie u.U. Ihren Webbrowser neu gestartet haben.', |
|
| 639 | + 'texte_inc_config' => 'Die hier möglichten Einstellungen beeinflussen das grundsätzliche Verhalten Ihrer Website. Wir raten dringend, sie nur zu ändern, wenn Sie vollständig mit der Funktionsweise von SPIP vertraut sind.<br /><br /><b>Es ist ebenfalls mehr als ratsam, diese Einstellungen nur von Ihrem Haupt-Administrator vornehmen zu lassen.</b>', |
|
| 640 | + 'texte_inc_meta_1' => 'Das System konnte die Datei <code>@fichier@</code> nicht speichern. Bitte prüfen Sie als Administrator ', |
|
| 641 | + 'texte_inc_meta_2' => 'die Berechtigungen', |
|
| 642 | + 'texte_inc_meta_3' => 'für das Verzeichnis <code>@repertoire@</code>.', |
|
| 643 | + 'texte_statut_en_cours_redaction' => 'in Bearbeitung', |
|
| 644 | + 'texte_statut_poubelle' => 'im Mülleimer', |
|
| 645 | + 'texte_statut_propose_evaluation' => 'vorgeschlagen', |
|
| 646 | + 'texte_statut_publie' => 'veröffentlicht', |
|
| 647 | + 'texte_statut_refuse' => 'abgelehnt', |
|
| 648 | + 'titre_ajouter_mot_cle' => 'SCHLAGWORT ZUORDNEN:', |
|
| 649 | + 'titre_cadre_raccourcis' => 'SCHNELLZUGANG:', |
|
| 650 | + 'titre_changer_couleur_interface' => 'Farbe der Oberfläche ändern', |
|
| 651 | + 'titre_image_admin_article' => 'Sie können diesen Artikel verwalten', |
|
| 652 | + 'titre_image_administrateur' => 'Administrator', |
|
| 653 | + 'titre_image_aide' => 'Hilfe zu diesem Element', |
|
| 654 | + 'titre_image_auteur_supprime' => 'gelöschter Autor', |
|
| 655 | + 'titre_image_redacteur' => 'Redakteur ohne Systemzugang', |
|
| 656 | + 'titre_image_redacteur_02' => 'Redakteur', |
|
| 657 | + 'titre_image_selecteur' => 'Liste anzeigen', |
|
| 658 | + 'titre_image_visiteur' => 'Besucher', |
|
| 659 | + 'titre_joindre_document' => 'DOKUMENT ANFÜGEN', |
|
| 660 | + 'titre_mots_cles' => 'SCHLAGWORTE', |
|
| 661 | + 'titre_probleme_technique' => 'Achtung! Ein Problem mit dem SQL Server verhindert den Zugang zu diesem Teil der Website. Danke für Ihr Verständnis.', |
|
| 662 | + 'titre_publier_document' => 'DOKUMENT IN DIESER RUBRIK VERÖFFENTLICHEN', |
|
| 663 | + 'titre_signatures_attente' => 'Nicht bestätigte Unterschriften', |
|
| 664 | + 'titre_signatures_confirmees' => 'Bestätigte Unterschriften', |
|
| 665 | + 'titre_statistiques' => 'Statistiken', |
|
| 666 | + 'titre_titre_document' => 'Titel des Dokuments:', |
|
| 667 | + 'todo' => 'demnächst', |
|
| 668 | + 'trad_definir_reference' => 'Wählen Sie "@titre@" als Referenz für Übersetzungen', |
|
| 669 | + 'trad_reference' => '(Referenzartikel)', |
|
| 670 | 670 | |
| 671 | - // U |
|
| 672 | - 'upload_limit' => 'Die Datei ist zu groß für den Server; die maximal erlaubte Dateigröße für den <i>Upload</i> ist @max@.', |
|
| 671 | + // U |
|
| 672 | + 'upload_limit' => 'Die Datei ist zu groß für den Server; die maximal erlaubte Dateigröße für den <i>Upload</i> ist @max@.', |
|
| 673 | 673 | |
| 674 | - // Z |
|
| 675 | - 'zbug_balise_b_aval' => ' : Tag B muss vor der Schleife stehen', |
|
| 676 | - 'zbug_balise_inexistante' => 'Fehler: Der Tag @balise@ wurde nicht richtig für @from@ deklariert.', |
|
| 677 | - 'zbug_balise_sans_argument' => 'Dem Tag @balise@ fehlt ein Parameter', |
|
| 678 | - 'zbug_boucle' => 'Schleife', |
|
| 679 | - 'zbug_boucle_recursive_undef' => 'Die rekursive Schleife @nom@ ist nicht definiert', |
|
| 680 | - 'zbug_calcul' => 'berechnen', |
|
| 681 | - 'zbug_champ_hors_boucle' => 'Feld @champ@ ausserhalb einer Schleife', |
|
| 682 | - 'zbug_champ_hors_critere' => 'Feld @champ@ ohne Kriterium @critere@', |
|
| 683 | - 'zbug_champ_hors_motif' => 'Feld @champ@ befindet sich ausserhalb eines Kontexts @motif@', |
|
| 684 | - 'zbug_code' => 'Code', |
|
| 685 | - 'zbug_critere_inconnu' => 'Unbekanntes Kriterium @critere@', |
|
| 686 | - 'zbug_critere_sur_table_sans_cle_primaire' => '{@critere@} für eine Tabelle ohne eindeutigen Schlüssel', |
|
| 687 | - 'zbug_distant_interdit' => 'Extern unzulässig', |
|
| 688 | - 'zbug_doublon_table_sans_cle_primaire' => 'Dublette in einer Tabelle ohne eindeutigen Primärschlüssel', |
|
| 689 | - 'zbug_doublon_table_sans_index' => 'Dublette in Tabelle ohne Index', |
|
| 690 | - 'zbug_erreur_boucle_double' => 'Schleife (BOUCLE) @id@ doppelt vorhanden', |
|
| 691 | - 'zbug_erreur_boucle_fermant' => 'Schleife (BOUCLE) @id@: Schluss-Tag fehlt', |
|
| 692 | - 'zbug_erreur_boucle_syntaxe' => 'Syntax der Schleife @id@ fehlerhaft', |
|
| 693 | - 'zbug_erreur_compilation' => 'Fehler beim Kompilieren', |
|
| 694 | - 'zbug_erreur_execution_page' => 'Fehler beim Ausführen', |
|
| 695 | - 'zbug_erreur_filtre' => 'Der Filter @filtre@ ist nicht definiert.', |
|
| 696 | - 'zbug_erreur_filtre_nbarg_min' => 'Filter @filtre@: es fehlen @nb@ Argument(e)', |
|
| 697 | - 'zbug_erreur_meme_parent' => 'Das Kriterium {meme_parent} funktioniert nur mit den Schleifen (FORUMS) und (RUBRIQUES).', |
|
| 698 | - 'zbug_erreur_squelette' => 'Fehler in Layoutvorlage (Skelett)', |
|
| 699 | - 'zbug_hors_compilation' => 'Außerhalb der Kompilation', |
|
| 700 | - 'zbug_info_erreur_squelette' => 'Irrtum auf der Seite', |
|
| 701 | - 'zbug_inversion_ordre_inexistant' => 'Umkehrung einer inexistenten Sortierung ', |
|
| 702 | - 'zbug_pagination_sans_critere' => '#PAGINATION ohne Kriterium {pagination} oder in rekursiver Schleife', |
|
| 703 | - 'zbug_parametres_inclus_incorrects' => 'INCLUDE-Parameter fehlerhaft: @param@', |
|
| 704 | - 'zbug_profile' => 'Rechenzeit: @time@', |
|
| 705 | - 'zbug_resultat' => 'Ergebnis', |
|
| 706 | - 'zbug_serveur_indefini' => 'SQL-Server nicht definiert', |
|
| 707 | - 'zbug_statistiques' => 'Statistik der SQL Abfragen nach Dauer', |
|
| 708 | - 'zbug_table_inconnue' => 'SQL-Tabelle « @table@ » unbekannt', |
|
| 709 | - 'zxml_connus_attributs' => 'bekannte Attribute', |
|
| 710 | - 'zxml_de' => 'von', |
|
| 711 | - 'zxml_inconnu_attribut' => 'Attribut unbekannt', |
|
| 712 | - 'zxml_inconnu_balise' => 'Tag unbekannt', |
|
| 713 | - 'zxml_inconnu_entite' => 'Entity unbekannt', |
|
| 714 | - 'zxml_inconnu_id' => 'ID unbekannt', |
|
| 715 | - 'zxml_mais_de' => 'aber', |
|
| 716 | - 'zxml_non_conforme' => 'entspricht nicht dem Motiv', |
|
| 717 | - 'zxml_non_fils' => 'ist kein Kind von', |
|
| 718 | - 'zxml_nonvide_balise' => 'kein leerer Tag', |
|
| 719 | - 'zxml_obligatoire_attribut' => 'obligatorisches Attribut fehlt in', |
|
| 720 | - 'zxml_succession_fils_incorrecte' => 'Objektreihenfolge inkorrekt', |
|
| 721 | - 'zxml_survoler' => 'Mouseover zeigt korrekte', |
|
| 722 | - 'zxml_valeur_attribut' => 'Attributwert', |
|
| 723 | - 'zxml_vide_balise' => 'leerer Tag', |
|
| 724 | - 'zxml_vu' => 'bereits gesehen' |
|
| 674 | + // Z |
|
| 675 | + 'zbug_balise_b_aval' => ' : Tag B muss vor der Schleife stehen', |
|
| 676 | + 'zbug_balise_inexistante' => 'Fehler: Der Tag @balise@ wurde nicht richtig für @from@ deklariert.', |
|
| 677 | + 'zbug_balise_sans_argument' => 'Dem Tag @balise@ fehlt ein Parameter', |
|
| 678 | + 'zbug_boucle' => 'Schleife', |
|
| 679 | + 'zbug_boucle_recursive_undef' => 'Die rekursive Schleife @nom@ ist nicht definiert', |
|
| 680 | + 'zbug_calcul' => 'berechnen', |
|
| 681 | + 'zbug_champ_hors_boucle' => 'Feld @champ@ ausserhalb einer Schleife', |
|
| 682 | + 'zbug_champ_hors_critere' => 'Feld @champ@ ohne Kriterium @critere@', |
|
| 683 | + 'zbug_champ_hors_motif' => 'Feld @champ@ befindet sich ausserhalb eines Kontexts @motif@', |
|
| 684 | + 'zbug_code' => 'Code', |
|
| 685 | + 'zbug_critere_inconnu' => 'Unbekanntes Kriterium @critere@', |
|
| 686 | + 'zbug_critere_sur_table_sans_cle_primaire' => '{@critere@} für eine Tabelle ohne eindeutigen Schlüssel', |
|
| 687 | + 'zbug_distant_interdit' => 'Extern unzulässig', |
|
| 688 | + 'zbug_doublon_table_sans_cle_primaire' => 'Dublette in einer Tabelle ohne eindeutigen Primärschlüssel', |
|
| 689 | + 'zbug_doublon_table_sans_index' => 'Dublette in Tabelle ohne Index', |
|
| 690 | + 'zbug_erreur_boucle_double' => 'Schleife (BOUCLE) @id@ doppelt vorhanden', |
|
| 691 | + 'zbug_erreur_boucle_fermant' => 'Schleife (BOUCLE) @id@: Schluss-Tag fehlt', |
|
| 692 | + 'zbug_erreur_boucle_syntaxe' => 'Syntax der Schleife @id@ fehlerhaft', |
|
| 693 | + 'zbug_erreur_compilation' => 'Fehler beim Kompilieren', |
|
| 694 | + 'zbug_erreur_execution_page' => 'Fehler beim Ausführen', |
|
| 695 | + 'zbug_erreur_filtre' => 'Der Filter @filtre@ ist nicht definiert.', |
|
| 696 | + 'zbug_erreur_filtre_nbarg_min' => 'Filter @filtre@: es fehlen @nb@ Argument(e)', |
|
| 697 | + 'zbug_erreur_meme_parent' => 'Das Kriterium {meme_parent} funktioniert nur mit den Schleifen (FORUMS) und (RUBRIQUES).', |
|
| 698 | + 'zbug_erreur_squelette' => 'Fehler in Layoutvorlage (Skelett)', |
|
| 699 | + 'zbug_hors_compilation' => 'Außerhalb der Kompilation', |
|
| 700 | + 'zbug_info_erreur_squelette' => 'Irrtum auf der Seite', |
|
| 701 | + 'zbug_inversion_ordre_inexistant' => 'Umkehrung einer inexistenten Sortierung ', |
|
| 702 | + 'zbug_pagination_sans_critere' => '#PAGINATION ohne Kriterium {pagination} oder in rekursiver Schleife', |
|
| 703 | + 'zbug_parametres_inclus_incorrects' => 'INCLUDE-Parameter fehlerhaft: @param@', |
|
| 704 | + 'zbug_profile' => 'Rechenzeit: @time@', |
|
| 705 | + 'zbug_resultat' => 'Ergebnis', |
|
| 706 | + 'zbug_serveur_indefini' => 'SQL-Server nicht definiert', |
|
| 707 | + 'zbug_statistiques' => 'Statistik der SQL Abfragen nach Dauer', |
|
| 708 | + 'zbug_table_inconnue' => 'SQL-Tabelle « @table@ » unbekannt', |
|
| 709 | + 'zxml_connus_attributs' => 'bekannte Attribute', |
|
| 710 | + 'zxml_de' => 'von', |
|
| 711 | + 'zxml_inconnu_attribut' => 'Attribut unbekannt', |
|
| 712 | + 'zxml_inconnu_balise' => 'Tag unbekannt', |
|
| 713 | + 'zxml_inconnu_entite' => 'Entity unbekannt', |
|
| 714 | + 'zxml_inconnu_id' => 'ID unbekannt', |
|
| 715 | + 'zxml_mais_de' => 'aber', |
|
| 716 | + 'zxml_non_conforme' => 'entspricht nicht dem Motiv', |
|
| 717 | + 'zxml_non_fils' => 'ist kein Kind von', |
|
| 718 | + 'zxml_nonvide_balise' => 'kein leerer Tag', |
|
| 719 | + 'zxml_obligatoire_attribut' => 'obligatorisches Attribut fehlt in', |
|
| 720 | + 'zxml_succession_fils_incorrecte' => 'Objektreihenfolge inkorrekt', |
|
| 721 | + 'zxml_survoler' => 'Mouseover zeigt korrekte', |
|
| 722 | + 'zxml_valeur_attribut' => 'Attributwert', |
|
| 723 | + 'zxml_vide_balise' => 'leerer Tag', |
|
| 724 | + 'zxml_vu' => 'bereits gesehen' |
|
| 725 | 725 | ); |
@@ -4,123 +4,123 @@ |
||
| 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 | - 'accueil_site' => 'Startseite', |
|
| 14 | - 'article' => 'Artikel', |
|
| 15 | - 'articles' => 'Artikel', |
|
| 16 | - 'articles_auteur' => 'Artikel dieses Autors', |
|
| 17 | - 'articles_populaires' => 'Die beliebtesten Artikel', |
|
| 18 | - 'articles_rubrique' => 'Artikel dieser Rubrik', |
|
| 19 | - 'aucun_article' => 'Unter dieser Adresse gibt es keinen Artikel.', |
|
| 20 | - 'aucun_auteur' => 'Unter dieser Adresse gibt es keinen Autor.', |
|
| 21 | - 'aucun_site' => 'Unter dieser Adresse gibt es keien Website.', |
|
| 22 | - 'aucune_breve' => 'Unter dieser Adresse gibt es keine Meldung.', |
|
| 23 | - 'aucune_rubrique' => 'Unter dieser Adresse gibt es keine Rubrik.', |
|
| 24 | - 'auteur' => 'Autor', |
|
| 25 | - 'autres' => 'Andere', |
|
| 26 | - 'autres_breves' => 'Weitere Meldungen.', |
|
| 27 | - 'autres_groupes_mots_clefs' => 'Weitere Schlagwortgruppen', |
|
| 28 | - 'autres_sites' => 'Weitere Websites', |
|
| 29 | - |
|
| 30 | - // B |
|
| 31 | - 'bonjour' => 'Hallo', |
|
| 32 | - |
|
| 33 | - // C |
|
| 34 | - 'commenter_site' => 'Website kommentieren', |
|
| 35 | - 'contact' => 'Kontakt', |
|
| 36 | - 'copie_document_impossible' => 'Dokument kann nicht kopiert werden', |
|
| 37 | - |
|
| 38 | - // D |
|
| 39 | - 'date' => 'Datum', |
|
| 40 | - 'dernier_ajout' => 'Neuester Eintrag', |
|
| 41 | - 'dernieres_breves' => 'Neue Meldungen', |
|
| 42 | - 'derniers_articles' => 'Neueste Artikel', |
|
| 43 | - 'derniers_commentaires' => 'Neueste Kommentare', |
|
| 44 | - 'derniers_messages_forum' => 'Neue Forumsbeiträge', |
|
| 45 | - |
|
| 46 | - // E |
|
| 47 | - 'edition_mode_texte' => 'Im Textmodus bearbeiten ', |
|
| 48 | - 'en_reponse' => 'Antwort auf:', |
|
| 49 | - 'en_resume' => 'Als Zusammenfassung', |
|
| 50 | - 'envoyer_message' => 'Nachricht senden', |
|
| 51 | - 'espace_prive' => 'Redaktion', |
|
| 52 | - |
|
| 53 | - // F |
|
| 54 | - 'formats_acceptes' => 'Akzeptierte Formate: @formats@.', |
|
| 55 | - |
|
| 56 | - // H |
|
| 57 | - 'hierarchie_site' => 'Baumstruktur der Website', |
|
| 58 | - |
|
| 59 | - // J |
|
| 60 | - 'jours' => 'Tage', |
|
| 61 | - |
|
| 62 | - // L |
|
| 63 | - 'lien_connecter' => 'Login', |
|
| 64 | - |
|
| 65 | - // M |
|
| 66 | - 'meme_auteur' => 'Vom gleichen Autor', |
|
| 67 | - 'meme_rubrique' => 'In der gleichen Rubrik', |
|
| 68 | - 'memes_auteurs' => 'Von den gleichen Autoren', |
|
| 69 | - 'message' => 'Nachricht', |
|
| 70 | - 'messages_forum' => 'Nachrichten', |
|
| 71 | - 'messages_recents' => 'Neue Forumsbeiträge', |
|
| 72 | - 'mots_clef' => 'Schlagwort', |
|
| 73 | - 'mots_clefs' => 'Schlagworte', |
|
| 74 | - 'mots_clefs_meme_groupe' => 'Schlagworte der gleichen Kategorie', |
|
| 75 | - |
|
| 76 | - // N |
|
| 77 | - 'navigation' => 'Navigation', |
|
| 78 | - 'nom' => 'Name', |
|
| 79 | - 'nouveautes' => 'Neuigkeiten', |
|
| 80 | - 'nouveautes_web' => 'Neues im WWW', |
|
| 81 | - 'nouveaux_articles' => 'Neue Artikel', |
|
| 82 | - 'nouvelles_breves' => 'Neue Meldungen', |
|
| 83 | - |
|
| 84 | - // P |
|
| 85 | - 'page_precedente' => 'vorige Seite', |
|
| 86 | - 'page_suivante' => 'nächste Seite', |
|
| 87 | - 'par_auteur' => 'von ', |
|
| 88 | - 'participer_site' => 'Sie können bei dieser Website mitmachen, wenn Sie sich anmelden. Sie erhalten sofort eine E-Mail mit den Zugangsdaten zum Redaktionssystem.', |
|
| 89 | - 'plan_site' => 'Sitemap', |
|
| 90 | - 'popularite' => 'Beliebtheit', |
|
| 91 | - 'poster_message' => 'Nachricht senden', |
|
| 92 | - 'proposer_site' => 'Sie können in dieser Rubrik eine Seite vorschlagen :', |
|
| 93 | - |
|
| 94 | - // R |
|
| 95 | - 'repondre_article' => 'auf diesen Artikel antworten', |
|
| 96 | - 'repondre_breve' => 'auf diese Meldung antworten', |
|
| 97 | - 'resultats_recherche' => 'Suchergebnis(se)', |
|
| 98 | - 'retour_debut_forums' => 'Zurück zum Beginn des Forums', |
|
| 99 | - 'rss_abonnement' => 'Kopieren Sie die folgende URL in Ihren Feedreader:', |
|
| 100 | - 'rss_abonnement_titre' => 'Abonnieren', |
|
| 101 | - 'rss_abonnement_titre_page' => 'Abonnieren von', |
|
| 102 | - 'rss_explication' => 'Ein RSS-Feed sammelt Informationen über die Aktualisierungen einer Website. Er liefert den Inhalt von Einträgen oder Kommentaren oder einen Auszug daraus sowie einen Link zu den Vollversionen und einige andere Informationen. Der Feed ist dazu gedacht, von einem RSS-Aggregator (Feedreader) gelesen zu werden', |
|
| 103 | - 'rss_explication_titre' => 'Was ist ein RSS-Feed ?', |
|
| 104 | - 'rubrique' => 'Rubrik', |
|
| 105 | - 'rubriques' => 'Rubriken', |
|
| 106 | - |
|
| 107 | - // S |
|
| 108 | - 'signatures_petition' => 'Unterschrift', |
|
| 109 | - 'site_realise_avec_spip' => 'Realisiert mit SPIP', |
|
| 110 | - 'sites_web' => 'Websites', |
|
| 111 | - 'sous_rubriques' => 'Unterrubriken', |
|
| 112 | - 'spam' => 'SPAM', |
|
| 113 | - 'suite' => 'weiter', |
|
| 114 | - 'sur_web' => 'Im WWW', |
|
| 115 | - 'syndiquer_rubrique' => 'Diese Rubrik per RSS einbinden', |
|
| 116 | - 'syndiquer_site' => 'Die ganze Website mit RSS einbinden', |
|
| 117 | - |
|
| 118 | - // T |
|
| 119 | - 'texte_lettre_information' => 'Dies ist der Newsletter der Website ', |
|
| 120 | - 'texte_lettre_information_2' => 'Diese Mail informiert über die Neuerscheinungen der letzten', |
|
| 121 | - |
|
| 122 | - // V |
|
| 123 | - 'ver_imprimer' => 'Druckversion', |
|
| 124 | - 'voir_en_ligne' => 'Online ansehen', |
|
| 125 | - 'voir_squelette' => 'Layoutvorlage dieser Seite ansehen' |
|
| 12 | + // A |
|
| 13 | + 'accueil_site' => 'Startseite', |
|
| 14 | + 'article' => 'Artikel', |
|
| 15 | + 'articles' => 'Artikel', |
|
| 16 | + 'articles_auteur' => 'Artikel dieses Autors', |
|
| 17 | + 'articles_populaires' => 'Die beliebtesten Artikel', |
|
| 18 | + 'articles_rubrique' => 'Artikel dieser Rubrik', |
|
| 19 | + 'aucun_article' => 'Unter dieser Adresse gibt es keinen Artikel.', |
|
| 20 | + 'aucun_auteur' => 'Unter dieser Adresse gibt es keinen Autor.', |
|
| 21 | + 'aucun_site' => 'Unter dieser Adresse gibt es keien Website.', |
|
| 22 | + 'aucune_breve' => 'Unter dieser Adresse gibt es keine Meldung.', |
|
| 23 | + 'aucune_rubrique' => 'Unter dieser Adresse gibt es keine Rubrik.', |
|
| 24 | + 'auteur' => 'Autor', |
|
| 25 | + 'autres' => 'Andere', |
|
| 26 | + 'autres_breves' => 'Weitere Meldungen.', |
|
| 27 | + 'autres_groupes_mots_clefs' => 'Weitere Schlagwortgruppen', |
|
| 28 | + 'autres_sites' => 'Weitere Websites', |
|
| 29 | + |
|
| 30 | + // B |
|
| 31 | + 'bonjour' => 'Hallo', |
|
| 32 | + |
|
| 33 | + // C |
|
| 34 | + 'commenter_site' => 'Website kommentieren', |
|
| 35 | + 'contact' => 'Kontakt', |
|
| 36 | + 'copie_document_impossible' => 'Dokument kann nicht kopiert werden', |
|
| 37 | + |
|
| 38 | + // D |
|
| 39 | + 'date' => 'Datum', |
|
| 40 | + 'dernier_ajout' => 'Neuester Eintrag', |
|
| 41 | + 'dernieres_breves' => 'Neue Meldungen', |
|
| 42 | + 'derniers_articles' => 'Neueste Artikel', |
|
| 43 | + 'derniers_commentaires' => 'Neueste Kommentare', |
|
| 44 | + 'derniers_messages_forum' => 'Neue Forumsbeiträge', |
|
| 45 | + |
|
| 46 | + // E |
|
| 47 | + 'edition_mode_texte' => 'Im Textmodus bearbeiten ', |
|
| 48 | + 'en_reponse' => 'Antwort auf:', |
|
| 49 | + 'en_resume' => 'Als Zusammenfassung', |
|
| 50 | + 'envoyer_message' => 'Nachricht senden', |
|
| 51 | + 'espace_prive' => 'Redaktion', |
|
| 52 | + |
|
| 53 | + // F |
|
| 54 | + 'formats_acceptes' => 'Akzeptierte Formate: @formats@.', |
|
| 55 | + |
|
| 56 | + // H |
|
| 57 | + 'hierarchie_site' => 'Baumstruktur der Website', |
|
| 58 | + |
|
| 59 | + // J |
|
| 60 | + 'jours' => 'Tage', |
|
| 61 | + |
|
| 62 | + // L |
|
| 63 | + 'lien_connecter' => 'Login', |
|
| 64 | + |
|
| 65 | + // M |
|
| 66 | + 'meme_auteur' => 'Vom gleichen Autor', |
|
| 67 | + 'meme_rubrique' => 'In der gleichen Rubrik', |
|
| 68 | + 'memes_auteurs' => 'Von den gleichen Autoren', |
|
| 69 | + 'message' => 'Nachricht', |
|
| 70 | + 'messages_forum' => 'Nachrichten', |
|
| 71 | + 'messages_recents' => 'Neue Forumsbeiträge', |
|
| 72 | + 'mots_clef' => 'Schlagwort', |
|
| 73 | + 'mots_clefs' => 'Schlagworte', |
|
| 74 | + 'mots_clefs_meme_groupe' => 'Schlagworte der gleichen Kategorie', |
|
| 75 | + |
|
| 76 | + // N |
|
| 77 | + 'navigation' => 'Navigation', |
|
| 78 | + 'nom' => 'Name', |
|
| 79 | + 'nouveautes' => 'Neuigkeiten', |
|
| 80 | + 'nouveautes_web' => 'Neues im WWW', |
|
| 81 | + 'nouveaux_articles' => 'Neue Artikel', |
|
| 82 | + 'nouvelles_breves' => 'Neue Meldungen', |
|
| 83 | + |
|
| 84 | + // P |
|
| 85 | + 'page_precedente' => 'vorige Seite', |
|
| 86 | + 'page_suivante' => 'nächste Seite', |
|
| 87 | + 'par_auteur' => 'von ', |
|
| 88 | + 'participer_site' => 'Sie können bei dieser Website mitmachen, wenn Sie sich anmelden. Sie erhalten sofort eine E-Mail mit den Zugangsdaten zum Redaktionssystem.', |
|
| 89 | + 'plan_site' => 'Sitemap', |
|
| 90 | + 'popularite' => 'Beliebtheit', |
|
| 91 | + 'poster_message' => 'Nachricht senden', |
|
| 92 | + 'proposer_site' => 'Sie können in dieser Rubrik eine Seite vorschlagen :', |
|
| 93 | + |
|
| 94 | + // R |
|
| 95 | + 'repondre_article' => 'auf diesen Artikel antworten', |
|
| 96 | + 'repondre_breve' => 'auf diese Meldung antworten', |
|
| 97 | + 'resultats_recherche' => 'Suchergebnis(se)', |
|
| 98 | + 'retour_debut_forums' => 'Zurück zum Beginn des Forums', |
|
| 99 | + 'rss_abonnement' => 'Kopieren Sie die folgende URL in Ihren Feedreader:', |
|
| 100 | + 'rss_abonnement_titre' => 'Abonnieren', |
|
| 101 | + 'rss_abonnement_titre_page' => 'Abonnieren von', |
|
| 102 | + 'rss_explication' => 'Ein RSS-Feed sammelt Informationen über die Aktualisierungen einer Website. Er liefert den Inhalt von Einträgen oder Kommentaren oder einen Auszug daraus sowie einen Link zu den Vollversionen und einige andere Informationen. Der Feed ist dazu gedacht, von einem RSS-Aggregator (Feedreader) gelesen zu werden', |
|
| 103 | + 'rss_explication_titre' => 'Was ist ein RSS-Feed ?', |
|
| 104 | + 'rubrique' => 'Rubrik', |
|
| 105 | + 'rubriques' => 'Rubriken', |
|
| 106 | + |
|
| 107 | + // S |
|
| 108 | + 'signatures_petition' => 'Unterschrift', |
|
| 109 | + 'site_realise_avec_spip' => 'Realisiert mit SPIP', |
|
| 110 | + 'sites_web' => 'Websites', |
|
| 111 | + 'sous_rubriques' => 'Unterrubriken', |
|
| 112 | + 'spam' => 'SPAM', |
|
| 113 | + 'suite' => 'weiter', |
|
| 114 | + 'sur_web' => 'Im WWW', |
|
| 115 | + 'syndiquer_rubrique' => 'Diese Rubrik per RSS einbinden', |
|
| 116 | + 'syndiquer_site' => 'Die ganze Website mit RSS einbinden', |
|
| 117 | + |
|
| 118 | + // T |
|
| 119 | + 'texte_lettre_information' => 'Dies ist der Newsletter der Website ', |
|
| 120 | + 'texte_lettre_information_2' => 'Diese Mail informiert über die Neuerscheinungen der letzten', |
|
| 121 | + |
|
| 122 | + // V |
|
| 123 | + 'ver_imprimer' => 'Druckversion', |
|
| 124 | + 'voir_en_ligne' => 'Online ansehen', |
|
| 125 | + 'voir_squelette' => 'Layoutvorlage dieser Seite ansehen' |
|
| 126 | 126 | ); |
@@ -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 | /** |
@@ -38,20 +38,20 @@ discard block |
||
| 38 | 38 | * Liste des fichiers de langue trouvés, dans l'ordre des chemins |
| 39 | 39 | */ |
| 40 | 40 | function find_langs_in_path($file, $dirname = 'lang') { |
| 41 | - static $dirs = []; |
|
| 42 | - $liste = []; |
|
| 43 | - foreach (creer_chemin() as $dir) { |
|
| 44 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 45 | - $dirs[$a] = (is_dir($a) || !$a); |
|
| 46 | - } |
|
| 47 | - if ($dirs[$a]) { |
|
| 48 | - if (is_readable($a .= $file)) { |
|
| 49 | - $liste[] = $a; |
|
| 50 | - } |
|
| 51 | - } |
|
| 52 | - } |
|
| 41 | + static $dirs = []; |
|
| 42 | + $liste = []; |
|
| 43 | + foreach (creer_chemin() as $dir) { |
|
| 44 | + if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 45 | + $dirs[$a] = (is_dir($a) || !$a); |
|
| 46 | + } |
|
| 47 | + if ($dirs[$a]) { |
|
| 48 | + if (is_readable($a .= $file)) { |
|
| 49 | + $liste[] = $a; |
|
| 50 | + } |
|
| 51 | + } |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - return array_reverse($liste); |
|
| 54 | + return array_reverse($liste); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -66,23 +66,23 @@ discard block |
||
| 66 | 66 | * Liste des fichiers touvés pour ce module et cette langue. |
| 67 | 67 | **/ |
| 68 | 68 | function chercher_module_lang($module, $lang = '') { |
| 69 | - if ($lang) { |
|
| 70 | - $lang = '_' . $lang; |
|
| 71 | - } |
|
| 69 | + if ($lang) { |
|
| 70 | + $lang = '_' . $lang; |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - // 1) dans un repertoire nomme lang/ se trouvant sur le chemin |
|
| 74 | - if ( |
|
| 75 | - $f = ($module == 'local' |
|
| 76 | - ? find_in_path($module . $lang . '.php', 'lang/') |
|
| 77 | - : find_langs_in_path($module . $lang . '.php', 'lang/')) |
|
| 78 | - ) { |
|
| 79 | - return is_array($f) ? $f : [$f]; |
|
| 80 | - } |
|
| 73 | + // 1) dans un repertoire nomme lang/ se trouvant sur le chemin |
|
| 74 | + if ( |
|
| 75 | + $f = ($module == 'local' |
|
| 76 | + ? find_in_path($module . $lang . '.php', 'lang/') |
|
| 77 | + : find_langs_in_path($module . $lang . '.php', 'lang/')) |
|
| 78 | + ) { |
|
| 79 | + return is_array($f) ? $f : [$f]; |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - // 2) directement dans le chemin (old style, uniquement pour local) |
|
| 83 | - return (($module == 'local') or strpos($module, '/')) |
|
| 84 | - ? (($f = find_in_path($module . $lang . '.php')) ? [$f] : false) |
|
| 85 | - : false; |
|
| 82 | + // 2) directement dans le chemin (old style, uniquement pour local) |
|
| 83 | + return (($module == 'local') or strpos($module, '/')) |
|
| 84 | + ? (($f = find_in_path($module . $lang . '.php')) ? [$f] : false) |
|
| 85 | + : false; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -104,33 +104,33 @@ discard block |
||
| 104 | 104 | * @return void |
| 105 | 105 | **/ |
| 106 | 106 | function charger_langue($lang, $module = 'spip') { |
| 107 | - static $langs = []; |
|
| 108 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 109 | - if (!isset($langs[$lang])) { |
|
| 110 | - $langs[$lang] = []; |
|
| 111 | - if ($lang) { |
|
| 112 | - $langs[$lang][] = $lang; |
|
| 113 | - if (strpos($lang, '_') !== false) { |
|
| 114 | - $l = explode('_', $lang); |
|
| 115 | - $langs[$lang][] = reset($l); |
|
| 116 | - } |
|
| 117 | - } |
|
| 118 | - $langs[$lang][] = $GLOBALS['meta']['langue_site']; |
|
| 119 | - $langs[$lang][] = _LANGUE_PAR_DEFAUT; |
|
| 120 | - } |
|
| 121 | - foreach ($langs[$lang] as $l) { |
|
| 122 | - if ($fichiers_lang = chercher_module_lang($module, $l)) { |
|
| 123 | - $GLOBALS['idx_lang'] = 'i18n_' . $module . '_' . $l; |
|
| 124 | - $GLOBALS[$GLOBALS['idx_lang']] = lire_fichier_langue(array_shift($fichiers_lang)); |
|
| 125 | - surcharger_langue($fichiers_lang); |
|
| 126 | - if ($l !== $lang) { |
|
| 127 | - $GLOBALS[$var] = &$GLOBALS['i18n_' . $module . '_' . $l]; |
|
| 128 | - } |
|
| 129 | - $GLOBALS['lang_' . $var] = $l; |
|
| 130 | - #spip_log("module de langue : ${module}_$l.php", 'traduire'); |
|
| 131 | - break; |
|
| 132 | - } |
|
| 133 | - } |
|
| 107 | + static $langs = []; |
|
| 108 | + $var = 'i18n_' . $module . '_' . $lang; |
|
| 109 | + if (!isset($langs[$lang])) { |
|
| 110 | + $langs[$lang] = []; |
|
| 111 | + if ($lang) { |
|
| 112 | + $langs[$lang][] = $lang; |
|
| 113 | + if (strpos($lang, '_') !== false) { |
|
| 114 | + $l = explode('_', $lang); |
|
| 115 | + $langs[$lang][] = reset($l); |
|
| 116 | + } |
|
| 117 | + } |
|
| 118 | + $langs[$lang][] = $GLOBALS['meta']['langue_site']; |
|
| 119 | + $langs[$lang][] = _LANGUE_PAR_DEFAUT; |
|
| 120 | + } |
|
| 121 | + foreach ($langs[$lang] as $l) { |
|
| 122 | + if ($fichiers_lang = chercher_module_lang($module, $l)) { |
|
| 123 | + $GLOBALS['idx_lang'] = 'i18n_' . $module . '_' . $l; |
|
| 124 | + $GLOBALS[$GLOBALS['idx_lang']] = lire_fichier_langue(array_shift($fichiers_lang)); |
|
| 125 | + surcharger_langue($fichiers_lang); |
|
| 126 | + if ($l !== $lang) { |
|
| 127 | + $GLOBALS[$var] = &$GLOBALS['i18n_' . $module . '_' . $l]; |
|
| 128 | + } |
|
| 129 | + $GLOBALS['lang_' . $var] = $l; |
|
| 130 | + #spip_log("module de langue : ${module}_$l.php", 'traduire'); |
|
| 131 | + break; |
|
| 132 | + } |
|
| 133 | + } |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
@@ -143,21 +143,21 @@ discard block |
||
| 143 | 143 | * @return array<string, string> |
| 144 | 144 | */ |
| 145 | 145 | function lire_fichier_langue(string $fichier): array { |
| 146 | - $idx_lang_before = $GLOBALS['idx_lang'] ?? null; |
|
| 147 | - $idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang') . '@temporaire'; |
|
| 148 | - $GLOBALS['idx_lang'] = $idx_lang_tmp; |
|
| 149 | - $idx_lang = include $fichier; |
|
| 150 | - $GLOBALS['idx_lang'] = $idx_lang_before; |
|
| 151 | - if (!is_array($idx_lang)) { |
|
| 152 | - if (isset($GLOBALS[$idx_lang_tmp]) and is_array($GLOBALS[$idx_lang_tmp])) { |
|
| 153 | - $idx_lang = $GLOBALS[$idx_lang_tmp]; |
|
| 154 | - } else { |
|
| 155 | - $idx_lang = []; |
|
| 156 | - spip_log(sprintf('Fichier de langue incorrect : %s', $fichier), _LOG_ERREUR); |
|
| 157 | - } |
|
| 158 | - unset($GLOBALS[$idx_lang_tmp]); |
|
| 159 | - } |
|
| 160 | - return $idx_lang; |
|
| 146 | + $idx_lang_before = $GLOBALS['idx_lang'] ?? null; |
|
| 147 | + $idx_lang_tmp = ($GLOBALS['idx_lang'] ?? 'lang') . '@temporaire'; |
|
| 148 | + $GLOBALS['idx_lang'] = $idx_lang_tmp; |
|
| 149 | + $idx_lang = include $fichier; |
|
| 150 | + $GLOBALS['idx_lang'] = $idx_lang_before; |
|
| 151 | + if (!is_array($idx_lang)) { |
|
| 152 | + if (isset($GLOBALS[$idx_lang_tmp]) and is_array($GLOBALS[$idx_lang_tmp])) { |
|
| 153 | + $idx_lang = $GLOBALS[$idx_lang_tmp]; |
|
| 154 | + } else { |
|
| 155 | + $idx_lang = []; |
|
| 156 | + spip_log(sprintf('Fichier de langue incorrect : %s', $fichier), _LOG_ERREUR); |
|
| 157 | + } |
|
| 158 | + unset($GLOBALS[$idx_lang_tmp]); |
|
| 159 | + } |
|
| 160 | + return $idx_lang; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -177,46 +177,46 @@ discard block |
||
| 177 | 177 | * Liste des chemins de fichiers de langue à surcharger. |
| 178 | 178 | **/ |
| 179 | 179 | function surcharger_langue($fichiers) { |
| 180 | - static $surcharges = []; |
|
| 181 | - if (!isset($GLOBALS['idx_lang'])) { |
|
| 182 | - return; |
|
| 183 | - } |
|
| 180 | + static $surcharges = []; |
|
| 181 | + if (!isset($GLOBALS['idx_lang'])) { |
|
| 182 | + return; |
|
| 183 | + } |
|
| 184 | 184 | |
| 185 | - if (!is_array($fichiers)) { |
|
| 186 | - $fichiers = [$fichiers]; |
|
| 187 | - } |
|
| 188 | - if (!count($fichiers)) { |
|
| 189 | - return; |
|
| 190 | - } |
|
| 191 | - foreach ($fichiers as $fichier) { |
|
| 192 | - if (!isset($surcharges[$fichier])) { |
|
| 193 | - $surcharges[$fichier] = lire_fichier_langue($fichier); |
|
| 194 | - } |
|
| 195 | - if (is_array($surcharges[$fichier])) { |
|
| 196 | - $GLOBALS[$GLOBALS['idx_lang']] ??= []; |
|
| 197 | - $GLOBALS[$GLOBALS['idx_lang']] = array_merge( |
|
| 198 | - $GLOBALS[$GLOBALS['idx_lang']], |
|
| 199 | - $surcharges[$fichier] |
|
| 200 | - ); |
|
| 201 | - } |
|
| 202 | - } |
|
| 185 | + if (!is_array($fichiers)) { |
|
| 186 | + $fichiers = [$fichiers]; |
|
| 187 | + } |
|
| 188 | + if (!count($fichiers)) { |
|
| 189 | + return; |
|
| 190 | + } |
|
| 191 | + foreach ($fichiers as $fichier) { |
|
| 192 | + if (!isset($surcharges[$fichier])) { |
|
| 193 | + $surcharges[$fichier] = lire_fichier_langue($fichier); |
|
| 194 | + } |
|
| 195 | + if (is_array($surcharges[$fichier])) { |
|
| 196 | + $GLOBALS[$GLOBALS['idx_lang']] ??= []; |
|
| 197 | + $GLOBALS[$GLOBALS['idx_lang']] = array_merge( |
|
| 198 | + $GLOBALS[$GLOBALS['idx_lang']], |
|
| 199 | + $surcharges[$fichier] |
|
| 200 | + ); |
|
| 201 | + } |
|
| 202 | + } |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | |
| 206 | 206 | |
| 207 | 207 | class SPIP_Traductions_Description { |
| 208 | - /** @var string code de langue (hors module) */ |
|
| 209 | - public $code; |
|
| 210 | - /** @var string nom du module de langue */ |
|
| 211 | - public $module; |
|
| 212 | - /** @var string langue de la traduction */ |
|
| 213 | - public $langue; |
|
| 214 | - /** @var string traduction */ |
|
| 215 | - public $texte; |
|
| 216 | - /** @var string var mode particulier appliqué ? */ |
|
| 217 | - public $mode; |
|
| 218 | - /** @var bool Corrections des textes appliqué ? */ |
|
| 219 | - public $corrections = false; |
|
| 208 | + /** @var string code de langue (hors module) */ |
|
| 209 | + public $code; |
|
| 210 | + /** @var string nom du module de langue */ |
|
| 211 | + public $module; |
|
| 212 | + /** @var string langue de la traduction */ |
|
| 213 | + public $langue; |
|
| 214 | + /** @var string traduction */ |
|
| 215 | + public $texte; |
|
| 216 | + /** @var string var mode particulier appliqué ? */ |
|
| 217 | + public $mode; |
|
| 218 | + /** @var bool Corrections des textes appliqué ? */ |
|
| 219 | + public $corrections = false; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | |
@@ -258,99 +258,99 @@ discard block |
||
| 258 | 258 | * - SPIP_Traductions_Description : traduction et description (texte, module, langue) |
| 259 | 259 | **/ |
| 260 | 260 | function inc_traduire_dist($ori, $lang, $raw = false) { |
| 261 | - static $deja_vu = []; |
|
| 262 | - static $local = []; |
|
| 261 | + static $deja_vu = []; |
|
| 262 | + static $local = []; |
|
| 263 | 263 | |
| 264 | - if (isset($deja_vu[$lang][$ori]) and (_request('var_mode') != 'traduction')) { |
|
| 265 | - return $raw ? $deja_vu[$lang][$ori] : $deja_vu[$lang][$ori]->texte; |
|
| 266 | - } |
|
| 264 | + if (isset($deja_vu[$lang][$ori]) and (_request('var_mode') != 'traduction')) { |
|
| 265 | + return $raw ? $deja_vu[$lang][$ori] : $deja_vu[$lang][$ori]->texte; |
|
| 266 | + } |
|
| 267 | 267 | |
| 268 | - // modules demandes explicitement <xxx|yyy|zzz:code> cf MODULES_IDIOMES |
|
| 269 | - if (strpos($ori, ':')) { |
|
| 270 | - [$modules, $code] = explode(':', $ori, 2); |
|
| 271 | - $modules = explode('|', $modules); |
|
| 272 | - $ori_complet = $ori; |
|
| 273 | - } else { |
|
| 274 | - $modules = ['spip', 'ecrire']; |
|
| 275 | - $code = $ori; |
|
| 276 | - $ori_complet = implode('|', $modules) . ':' . $ori; |
|
| 277 | - } |
|
| 268 | + // modules demandes explicitement <xxx|yyy|zzz:code> cf MODULES_IDIOMES |
|
| 269 | + if (strpos($ori, ':')) { |
|
| 270 | + [$modules, $code] = explode(':', $ori, 2); |
|
| 271 | + $modules = explode('|', $modules); |
|
| 272 | + $ori_complet = $ori; |
|
| 273 | + } else { |
|
| 274 | + $modules = ['spip', 'ecrire']; |
|
| 275 | + $code = $ori; |
|
| 276 | + $ori_complet = implode('|', $modules) . ':' . $ori; |
|
| 277 | + } |
|
| 278 | 278 | |
| 279 | - $desc = new SPIP_Traductions_Description(); |
|
| 279 | + $desc = new SPIP_Traductions_Description(); |
|
| 280 | 280 | |
| 281 | - // parcourir tous les modules jusqu'a ce qu'on trouve |
|
| 282 | - foreach ($modules as $module) { |
|
| 283 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 281 | + // parcourir tous les modules jusqu'a ce qu'on trouve |
|
| 282 | + foreach ($modules as $module) { |
|
| 283 | + $var = 'i18n_' . $module . '_' . $lang; |
|
| 284 | 284 | |
| 285 | - if (empty($GLOBALS[$var])) { |
|
| 286 | - charger_langue($lang, $module); |
|
| 287 | - // surcharges persos -- on cherche |
|
| 288 | - // (lang/)local_xx.php et/ou (lang/)local.php ... |
|
| 289 | - if (!isset($local['local_' . $lang])) { |
|
| 290 | - // redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer) |
|
| 291 | - $GLOBALS['idx_lang'] = $var; |
|
| 292 | - // ... (lang/)local_xx.php |
|
| 293 | - $local['local_' . $lang] = chercher_module_lang('local', $lang); |
|
| 294 | - } |
|
| 295 | - if ($local['local_' . $lang]) { |
|
| 296 | - surcharger_langue($local['local_' . $lang]); |
|
| 297 | - } |
|
| 298 | - // ... puis (lang/)local.php |
|
| 299 | - if (!isset($local['local'])) { |
|
| 300 | - $local['local'] = chercher_module_lang('local'); |
|
| 301 | - } |
|
| 302 | - if ($local['local']) { |
|
| 303 | - surcharger_langue($local['local']); |
|
| 304 | - } |
|
| 305 | - } |
|
| 285 | + if (empty($GLOBALS[$var])) { |
|
| 286 | + charger_langue($lang, $module); |
|
| 287 | + // surcharges persos -- on cherche |
|
| 288 | + // (lang/)local_xx.php et/ou (lang/)local.php ... |
|
| 289 | + if (!isset($local['local_' . $lang])) { |
|
| 290 | + // redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer) |
|
| 291 | + $GLOBALS['idx_lang'] = $var; |
|
| 292 | + // ... (lang/)local_xx.php |
|
| 293 | + $local['local_' . $lang] = chercher_module_lang('local', $lang); |
|
| 294 | + } |
|
| 295 | + if ($local['local_' . $lang]) { |
|
| 296 | + surcharger_langue($local['local_' . $lang]); |
|
| 297 | + } |
|
| 298 | + // ... puis (lang/)local.php |
|
| 299 | + if (!isset($local['local'])) { |
|
| 300 | + $local['local'] = chercher_module_lang('local'); |
|
| 301 | + } |
|
| 302 | + if ($local['local']) { |
|
| 303 | + surcharger_langue($local['local']); |
|
| 304 | + } |
|
| 305 | + } |
|
| 306 | 306 | |
| 307 | - if (isset($GLOBALS[$var][$code])) { |
|
| 308 | - $desc->code = $code; |
|
| 309 | - $desc->module = $module; |
|
| 310 | - $desc->langue = $GLOBALS['lang_' . $var] ?? $lang; |
|
| 311 | - $desc->texte = $GLOBALS[$var][$code]; |
|
| 312 | - break; |
|
| 313 | - } |
|
| 314 | - } |
|
| 307 | + if (isset($GLOBALS[$var][$code])) { |
|
| 308 | + $desc->code = $code; |
|
| 309 | + $desc->module = $module; |
|
| 310 | + $desc->langue = $GLOBALS['lang_' . $var] ?? $lang; |
|
| 311 | + $desc->texte = $GLOBALS[$var][$code]; |
|
| 312 | + break; |
|
| 313 | + } |
|
| 314 | + } |
|
| 315 | 315 | |
| 316 | - if (!$desc->corrections) { |
|
| 317 | - $desc->corrections = true; |
|
| 318 | - // Retour aux sources si la chaine est absente dans la langue cible ; |
|
| 319 | - // on essaie d'abord la langue du site, puis a defaut la langue fr |
|
| 320 | - if ( |
|
| 321 | - ($desc->texte === null || !strlen($desc->texte)) |
|
| 322 | - and $lang !== _LANGUE_PAR_DEFAUT |
|
| 323 | - ) { |
|
| 324 | - if ($lang !== $GLOBALS['meta']['langue_site']) { |
|
| 325 | - $desc = inc_traduire_dist($ori, $GLOBALS['meta']['langue_site'], true); |
|
| 326 | - } else { |
|
| 327 | - $desc = inc_traduire_dist($ori, _LANGUE_PAR_DEFAUT, true); |
|
| 328 | - } |
|
| 329 | - } |
|
| 316 | + if (!$desc->corrections) { |
|
| 317 | + $desc->corrections = true; |
|
| 318 | + // Retour aux sources si la chaine est absente dans la langue cible ; |
|
| 319 | + // on essaie d'abord la langue du site, puis a defaut la langue fr |
|
| 320 | + if ( |
|
| 321 | + ($desc->texte === null || !strlen($desc->texte)) |
|
| 322 | + and $lang !== _LANGUE_PAR_DEFAUT |
|
| 323 | + ) { |
|
| 324 | + if ($lang !== $GLOBALS['meta']['langue_site']) { |
|
| 325 | + $desc = inc_traduire_dist($ori, $GLOBALS['meta']['langue_site'], true); |
|
| 326 | + } else { |
|
| 327 | + $desc = inc_traduire_dist($ori, _LANGUE_PAR_DEFAUT, true); |
|
| 328 | + } |
|
| 329 | + } |
|
| 330 | 330 | |
| 331 | - // Supprimer la mention <NEW> ou <MODIF> |
|
| 332 | - if ($desc->texte && substr($desc->texte, 0, 1) === '<') { |
|
| 333 | - $desc->texte = str_replace(['<NEW>', '<MODIF>'], [], $desc->texte); |
|
| 334 | - } |
|
| 331 | + // Supprimer la mention <NEW> ou <MODIF> |
|
| 332 | + if ($desc->texte && substr($desc->texte, 0, 1) === '<') { |
|
| 333 | + $desc->texte = str_replace(['<NEW>', '<MODIF>'], [], $desc->texte); |
|
| 334 | + } |
|
| 335 | 335 | |
| 336 | - // Si on n'est pas en utf-8, la chaine peut l'etre... |
|
| 337 | - // le cas echeant on la convertit en entites html &#xxx; |
|
| 338 | - if ( |
|
| 339 | - (!isset($GLOBALS['meta']['charset']) or $GLOBALS['meta']['charset'] !== 'utf-8') |
|
| 340 | - and preg_match(',[\x7f-\xff],S', $desc->texte) |
|
| 341 | - ) { |
|
| 342 | - include_spip('inc/charsets'); |
|
| 343 | - $desc->texte = charset2unicode($desc->texte, 'utf-8'); |
|
| 344 | - } |
|
| 345 | - } |
|
| 336 | + // Si on n'est pas en utf-8, la chaine peut l'etre... |
|
| 337 | + // le cas echeant on la convertit en entites html &#xxx; |
|
| 338 | + if ( |
|
| 339 | + (!isset($GLOBALS['meta']['charset']) or $GLOBALS['meta']['charset'] !== 'utf-8') |
|
| 340 | + and preg_match(',[\x7f-\xff],S', $desc->texte) |
|
| 341 | + ) { |
|
| 342 | + include_spip('inc/charsets'); |
|
| 343 | + $desc->texte = charset2unicode($desc->texte, 'utf-8'); |
|
| 344 | + } |
|
| 345 | + } |
|
| 346 | 346 | |
| 347 | - if (_request('var_mode') == 'traduction') { |
|
| 348 | - $desc = definir_details_traduction($desc, $ori_complet); |
|
| 349 | - } else { |
|
| 350 | - $deja_vu[$lang][$ori] = $desc; |
|
| 351 | - } |
|
| 347 | + if (_request('var_mode') == 'traduction') { |
|
| 348 | + $desc = definir_details_traduction($desc, $ori_complet); |
|
| 349 | + } else { |
|
| 350 | + $deja_vu[$lang][$ori] = $desc; |
|
| 351 | + } |
|
| 352 | 352 | |
| 353 | - return $raw ? $desc : $desc->texte; |
|
| 353 | + return $raw ? $desc : $desc->texte; |
|
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | /** |
@@ -362,23 +362,23 @@ discard block |
||
| 362 | 362 | * @return SPIP_Traductions_Description |
| 363 | 363 | */ |
| 364 | 364 | function definir_details_traduction($desc, $modules) { |
| 365 | - if (!$desc->mode and $desc->texte) { |
|
| 366 | - // ne pas modifier 2 fois l'affichage |
|
| 367 | - $desc->mode = 'traduction'; |
|
| 368 | - $classe = 'debug-traduction' . ($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 369 | - $desc->texte = '<span ' |
|
| 370 | - . 'lang=' . $desc->langue |
|
| 371 | - . ' class=' . $classe |
|
| 372 | - . ' data-module=' . $desc->module |
|
| 373 | - . ' data-code=' . $desc->code |
|
| 374 | - . ' title=' . $modules . '(' . $desc->langue . ')>' |
|
| 375 | - . $desc->texte |
|
| 376 | - . '</span>'; |
|
| 377 | - $desc->texte = str_replace( |
|
| 378 | - ["$desc->module:", "$desc->module|"], |
|
| 379 | - ["*$desc->module*:", "*$desc->module*|"], |
|
| 380 | - $desc->texte |
|
| 381 | - ); |
|
| 382 | - } |
|
| 383 | - return $desc; |
|
| 365 | + if (!$desc->mode and $desc->texte) { |
|
| 366 | + // ne pas modifier 2 fois l'affichage |
|
| 367 | + $desc->mode = 'traduction'; |
|
| 368 | + $classe = 'debug-traduction' . ($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 369 | + $desc->texte = '<span ' |
|
| 370 | + . 'lang=' . $desc->langue |
|
| 371 | + . ' class=' . $classe |
|
| 372 | + . ' data-module=' . $desc->module |
|
| 373 | + . ' data-code=' . $desc->code |
|
| 374 | + . ' title=' . $modules . '(' . $desc->langue . ')>' |
|
| 375 | + . $desc->texte |
|
| 376 | + . '</span>'; |
|
| 377 | + $desc->texte = str_replace( |
|
| 378 | + ["$desc->module:", "$desc->module|"], |
|
| 379 | + ["*$desc->module*:", "*$desc->module*|"], |
|
| 380 | + $desc->texte |
|
| 381 | + ); |
|
| 382 | + } |
|
| 383 | + return $desc; |
|
| 384 | 384 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | * \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | include_spip('src/Chiffrer/Chiffrement'); |