@@ -11,77 +11,77 @@ |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | # Les information d'une rubrique selectionnee dans le mini navigateur |
| 18 | 18 | |
| 19 | 19 | function inc_informer_dist($id, $col, $exclus, $rac, $type, $do = 'aff') { |
| 20 | - include_spip('inc/texte'); |
|
| 21 | - $titre = $descriptif = ''; |
|
| 22 | - if ($type === 'rubrique') { |
|
| 23 | - $row = sql_fetsel('titre, descriptif', 'spip_rubriques', 'id_rubrique = ' . intval($id)); |
|
| 24 | - if ($row) { |
|
| 25 | - $titre = typo($row['titre']); |
|
| 26 | - $descriptif = propre($row['descriptif']); |
|
| 27 | - } else { |
|
| 28 | - $titre = _T('info_racine_site'); |
|
| 29 | - } |
|
| 30 | - } |
|
| 20 | + include_spip('inc/texte'); |
|
| 21 | + $titre = $descriptif = ''; |
|
| 22 | + if ($type === 'rubrique') { |
|
| 23 | + $row = sql_fetsel('titre, descriptif', 'spip_rubriques', 'id_rubrique = ' . intval($id)); |
|
| 24 | + if ($row) { |
|
| 25 | + $titre = typo($row['titre']); |
|
| 26 | + $descriptif = propre($row['descriptif']); |
|
| 27 | + } else { |
|
| 28 | + $titre = _T('info_racine_site'); |
|
| 29 | + } |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | - $res = ''; |
|
| 33 | - if ( |
|
| 34 | - $type === 'rubrique' |
|
| 35 | - and intval($GLOBALS['visiteur_session']['prefs']['display'] ?? 0) !== 1 |
|
| 36 | - and isset($GLOBALS['meta']['image_process']) |
|
| 37 | - ) { |
|
| 38 | - if ($GLOBALS['meta']['image_process'] !== 'non') { |
|
| 39 | - $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 40 | - if ($res = $chercher_logo($id, 'id_rubrique', 'on')) { |
|
| 41 | - [$fid, $dir, $nom, $format] = $res; |
|
| 42 | - include_spip('inc/filtres_images_mini'); |
|
| 43 | - $res = image_reduire("<img src='$fid' alt='' />", 100, 48); |
|
| 44 | - if ($res) { |
|
| 45 | - $res = "<div class='informer__media' style='float: " . $GLOBALS['spip_lang_right'] . '; margin-' . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>"; |
|
| 46 | - } |
|
| 47 | - } |
|
| 48 | - } |
|
| 49 | - } |
|
| 32 | + $res = ''; |
|
| 33 | + if ( |
|
| 34 | + $type === 'rubrique' |
|
| 35 | + and intval($GLOBALS['visiteur_session']['prefs']['display'] ?? 0) !== 1 |
|
| 36 | + and isset($GLOBALS['meta']['image_process']) |
|
| 37 | + ) { |
|
| 38 | + if ($GLOBALS['meta']['image_process'] !== 'non') { |
|
| 39 | + $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 40 | + if ($res = $chercher_logo($id, 'id_rubrique', 'on')) { |
|
| 41 | + [$fid, $dir, $nom, $format] = $res; |
|
| 42 | + include_spip('inc/filtres_images_mini'); |
|
| 43 | + $res = image_reduire("<img src='$fid' alt='' />", 100, 48); |
|
| 44 | + if ($res) { |
|
| 45 | + $res = "<div class='informer__media' style='float: " . $GLOBALS['spip_lang_right'] . '; margin-' . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>"; |
|
| 46 | + } |
|
| 47 | + } |
|
| 48 | + } |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - $rac = spip_htmlentities($rac, ENT_QUOTES); |
|
| 52 | - $do = spip_htmlentities($do, ENT_QUOTES); |
|
| 53 | - $id = intval($id); |
|
| 51 | + $rac = spip_htmlentities($rac, ENT_QUOTES); |
|
| 52 | + $do = spip_htmlentities($do, ENT_QUOTES); |
|
| 53 | + $id = intval($id); |
|
| 54 | 54 | |
| 55 | 55 | # ce lien provoque la selection (directe) de la rubrique cliquee |
| 56 | 56 | # et l'affichage de son titre dans le bandeau |
| 57 | - $titre = strtr( |
|
| 58 | - str_replace( |
|
| 59 | - "'", |
|
| 60 | - '’', |
|
| 61 | - str_replace('"', '"', textebrut($titre)) |
|
| 62 | - ), |
|
| 63 | - "\n\r", |
|
| 64 | - ' ' |
|
| 65 | - ); |
|
| 57 | + $titre = strtr( |
|
| 58 | + str_replace( |
|
| 59 | + "'", |
|
| 60 | + '’', |
|
| 61 | + str_replace('"', '"', textebrut($titre)) |
|
| 62 | + ), |
|
| 63 | + "\n\r", |
|
| 64 | + ' ' |
|
| 65 | + ); |
|
| 66 | 66 | |
| 67 | - $js_func = $do . '_selection_titre'; |
|
| 67 | + $js_func = $do . '_selection_titre'; |
|
| 68 | 68 | |
| 69 | - return "<div style='display: none;'>" |
|
| 70 | - . "<input type='text' id='" . $rac . "_sel' value='$id' />" |
|
| 71 | - . "<input type='text' id='" . $rac . "_sel2' value=\"" |
|
| 72 | - . entites_html($titre) |
|
| 73 | - . '" />' |
|
| 74 | - . '</div>' |
|
| 75 | - . "<div class='informer' style='padding: 5px; border-top: 0px;'>" |
|
| 76 | - . '<div class="informer__item">' |
|
| 77 | - . (!$res ? '' : $res) |
|
| 78 | - . "<p class='informer__titre'><b>" . safehtml($titre) . '</b></p>' |
|
| 79 | - . (!$descriptif ? '' : "<div class='informer__descriptif'>" . safehtml($descriptif) . '</div>') |
|
| 80 | - . '</div>' |
|
| 81 | - . "<div class='informer__action' style='clear:both; text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 82 | - . "<input type='submit' class='fondo btn submit' value='" |
|
| 83 | - . _T('bouton_choisir') |
|
| 84 | - . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />" |
|
| 85 | - . '</div>' |
|
| 86 | - . '</div>'; |
|
| 69 | + return "<div style='display: none;'>" |
|
| 70 | + . "<input type='text' id='" . $rac . "_sel' value='$id' />" |
|
| 71 | + . "<input type='text' id='" . $rac . "_sel2' value=\"" |
|
| 72 | + . entites_html($titre) |
|
| 73 | + . '" />' |
|
| 74 | + . '</div>' |
|
| 75 | + . "<div class='informer' style='padding: 5px; border-top: 0px;'>" |
|
| 76 | + . '<div class="informer__item">' |
|
| 77 | + . (!$res ? '' : $res) |
|
| 78 | + . "<p class='informer__titre'><b>" . safehtml($titre) . '</b></p>' |
|
| 79 | + . (!$descriptif ? '' : "<div class='informer__descriptif'>" . safehtml($descriptif) . '</div>') |
|
| 80 | + . '</div>' |
|
| 81 | + . "<div class='informer__action' style='clear:both; text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 82 | + . "<input type='submit' class='fondo btn submit' value='" |
|
| 83 | + . _T('bouton_choisir') |
|
| 84 | + . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />" |
|
| 85 | + . '</div>' |
|
| 86 | + . '</div>'; |
|
| 87 | 87 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -43,25 +43,25 @@ discard block |
||
| 43 | 43 | * @return string Code HTML |
| 44 | 44 | **/ |
| 45 | 45 | function inc_commencer_page_dist( |
| 46 | - $titre = '', |
|
| 47 | - $rubrique = 'accueil', |
|
| 48 | - $sous_rubrique = 'accueil', |
|
| 49 | - $id_rubrique = '', |
|
| 50 | - $menu = true, |
|
| 51 | - $minipres = false, |
|
| 52 | - $alertes = true |
|
| 46 | + $titre = '', |
|
| 47 | + $rubrique = 'accueil', |
|
| 48 | + $sous_rubrique = 'accueil', |
|
| 49 | + $id_rubrique = '', |
|
| 50 | + $menu = true, |
|
| 51 | + $minipres = false, |
|
| 52 | + $alertes = true |
|
| 53 | 53 | ) { |
| 54 | 54 | |
| 55 | - include_spip('inc/headers'); |
|
| 55 | + include_spip('inc/headers'); |
|
| 56 | 56 | |
| 57 | - http_no_cache(); |
|
| 57 | + http_no_cache(); |
|
| 58 | 58 | |
| 59 | - return init_entete($titre, $id_rubrique, $minipres) |
|
| 60 | - . init_body($rubrique, $sous_rubrique, $id_rubrique, $menu) |
|
| 61 | - . "<div id='page'>" |
|
| 62 | - . auteurs_recemment_connectes($GLOBALS['connect_id_auteur']) |
|
| 63 | - . ($alertes ? alertes_auteur($GLOBALS['connect_id_auteur']) : '') |
|
| 64 | - . '<div class="largeur">'; |
|
| 59 | + return init_entete($titre, $id_rubrique, $minipres) |
|
| 60 | + . init_body($rubrique, $sous_rubrique, $id_rubrique, $menu) |
|
| 61 | + . "<div id='page'>" |
|
| 62 | + . auteurs_recemment_connectes($GLOBALS['connect_id_auteur']) |
|
| 63 | + . ($alertes ? alertes_auteur($GLOBALS['connect_id_auteur']) : '') |
|
| 64 | + . '<div class="largeur">'; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -82,21 +82,21 @@ discard block |
||
| 82 | 82 | * Entête du fichier HTML avec le DOCTYPE |
| 83 | 83 | */ |
| 84 | 84 | function init_entete($titre = '', $dummy = 0, $minipres = false) { |
| 85 | - include_spip('inc/texte'); |
|
| 86 | - if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']['nom_site']))) { |
|
| 87 | - $nom_site_spip = _T('info_mon_site_spip'); |
|
| 88 | - } |
|
| 89 | - |
|
| 90 | - $titre = '[' |
|
| 91 | - . $nom_site_spip |
|
| 92 | - . ']' |
|
| 93 | - . ($titre ? ' ' . textebrut(typo($titre)) : ''); |
|
| 94 | - |
|
| 95 | - return _DOCTYPE_ECRIRE |
|
| 96 | - . html_lang_attributes() |
|
| 97 | - . "<head>\n" |
|
| 98 | - . init_head($titre, $dummy, $minipres) |
|
| 99 | - . "</head>\n"; |
|
| 85 | + include_spip('inc/texte'); |
|
| 86 | + if (!$nom_site_spip = textebrut(typo($GLOBALS['meta']['nom_site']))) { |
|
| 87 | + $nom_site_spip = _T('info_mon_site_spip'); |
|
| 88 | + } |
|
| 89 | + |
|
| 90 | + $titre = '[' |
|
| 91 | + . $nom_site_spip |
|
| 92 | + . ']' |
|
| 93 | + . ($titre ? ' ' . textebrut(typo($titre)) : ''); |
|
| 94 | + |
|
| 95 | + return _DOCTYPE_ECRIRE |
|
| 96 | + . html_lang_attributes() |
|
| 97 | + . "<head>\n" |
|
| 98 | + . init_head($titre, $dummy, $minipres) |
|
| 99 | + . "</head>\n"; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @return string |
| 111 | 111 | */ |
| 112 | 112 | function init_head($titre = '', $dummy = 0, $minipres = false) { |
| 113 | - return recuperer_fond('prive/squelettes/head/dist', ['titre' => $titre, 'minipres' => $minipres ? ' ' : '']); |
|
| 113 | + return recuperer_fond('prive/squelettes/head/dist', ['titre' => $titre, 'minipres' => $minipres ? ' ' : '']); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -132,20 +132,20 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | function init_body($rubrique = 'accueil', $sous_rubrique = 'accueil', $id_rubrique = '', $menu = true) { |
| 134 | 134 | |
| 135 | - $res = pipeline('body_prive', "<body class='" |
|
| 136 | - . init_body_class() . ' ' . _request('exec') . "'" |
|
| 137 | - . ($GLOBALS['spip_lang_rtl'] ? " dir='rtl'" : '') |
|
| 138 | - . '>'); |
|
| 135 | + $res = pipeline('body_prive', "<body class='" |
|
| 136 | + . init_body_class() . ' ' . _request('exec') . "'" |
|
| 137 | + . ($GLOBALS['spip_lang_rtl'] ? " dir='rtl'" : '') |
|
| 138 | + . '>'); |
|
| 139 | 139 | |
| 140 | - if (!$menu) { |
|
| 141 | - return $res; |
|
| 142 | - } |
|
| 140 | + if (!$menu) { |
|
| 141 | + return $res; |
|
| 142 | + } |
|
| 143 | 143 | |
| 144 | 144 | |
| 145 | - $bandeau = charger_fonction('bandeau', 'inc'); |
|
| 145 | + $bandeau = charger_fonction('bandeau', 'inc'); |
|
| 146 | 146 | |
| 147 | - return $res |
|
| 148 | - . $bandeau(); |
|
| 147 | + return $res |
|
| 148 | + . $bandeau(); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |
@@ -157,23 +157,23 @@ discard block |
||
| 157 | 157 | * @return string Classes CSS (séparées par des espaces) |
| 158 | 158 | */ |
| 159 | 159 | function init_body_class() { |
| 160 | - $display_modes = [ |
|
| 161 | - 0 => 'icones_img_texte' // défaut. |
|
| 162 | - /*init*/, |
|
| 163 | - 1 => 'icones_texte', |
|
| 164 | - 2 => 'icones_img_texte', |
|
| 165 | - 3 => 'icones_img' |
|
| 166 | - ]; |
|
| 160 | + $display_modes = [ |
|
| 161 | + 0 => 'icones_img_texte' // défaut. |
|
| 162 | + /*init*/, |
|
| 163 | + 1 => 'icones_texte', |
|
| 164 | + 2 => 'icones_img_texte', |
|
| 165 | + 3 => 'icones_img' |
|
| 166 | + ]; |
|
| 167 | 167 | |
| 168 | - $prefs = $GLOBALS['visiteur_session']['prefs'] ?? []; |
|
| 168 | + $prefs = $GLOBALS['visiteur_session']['prefs'] ?? []; |
|
| 169 | 169 | |
| 170 | - $display_mode = $display_modes[intval($prefs['display'] ?? 0)] ?? $display_modes[0]; |
|
| 171 | - $spip_display_navigation = isset($prefs['display_navigation']) ? spip_sanitize_classname($prefs['display_navigation']) : 'navigation_avec_icones'; |
|
| 170 | + $display_mode = $display_modes[intval($prefs['display'] ?? 0)] ?? $display_modes[0]; |
|
| 171 | + $spip_display_navigation = isset($prefs['display_navigation']) ? spip_sanitize_classname($prefs['display_navigation']) : 'navigation_avec_icones'; |
|
| 172 | 172 | |
| 173 | - $couleur = intval($prefs['couleur'] ?? 2); |
|
| 173 | + $couleur = intval($prefs['couleur'] ?? 2); |
|
| 174 | 174 | |
| 175 | - $classes = "spip-theme-colors-$couleur $spip_display_navigation $display_mode"; |
|
| 176 | - return spip_sanitize_classname($classes); |
|
| 175 | + $classes = "spip-theme-colors-$couleur $spip_display_navigation $display_mode"; |
|
| 176 | + return spip_sanitize_classname($classes); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | |
@@ -184,5 +184,5 @@ discard block |
||
| 184 | 184 | * @return string |
| 185 | 185 | */ |
| 186 | 186 | function auteurs_recemment_connectes($id_auteur) { |
| 187 | - return recuperer_fond('prive/objets/liste/auteurs_enligne'); |
|
| 187 | + return recuperer_fond('prive/objets/liste/auteurs_enligne'); |
|
| 188 | 188 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | /** Drapeau indiquant que l'on est dans l'espace privé */ |
| 20 | 20 | define('_ESPACE_PRIVE', true); |
| 21 | 21 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 22 | - include 'inc_version.php'; |
|
| 22 | + include 'inc_version.php'; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | include_spip('inc/cookie'); |
@@ -35,18 +35,18 @@ discard block |
||
| 35 | 35 | // alors il faut blinder les variables d'URL |
| 36 | 36 | // |
| 37 | 37 | if (autoriser_sans_cookie($exec, false)) { |
| 38 | - if (!isset($reinstall)) { |
|
| 39 | - $reinstall = 'non'; |
|
| 40 | - } |
|
| 41 | - $var_auth = true; |
|
| 38 | + if (!isset($reinstall)) { |
|
| 39 | + $reinstall = 'non'; |
|
| 40 | + } |
|
| 41 | + $var_auth = true; |
|
| 42 | 42 | } else { |
| 43 | - // Authentification, redefinissable |
|
| 44 | - $auth = charger_fonction('auth', 'inc'); |
|
| 45 | - $var_auth = $auth(); |
|
| 46 | - if ($var_auth) { |
|
| 47 | - echo auth_echec($var_auth); |
|
| 48 | - exit; |
|
| 49 | - } |
|
| 43 | + // Authentification, redefinissable |
|
| 44 | + $auth = charger_fonction('auth', 'inc'); |
|
| 45 | + $var_auth = $auth(); |
|
| 46 | + if ($var_auth) { |
|
| 47 | + echo auth_echec($var_auth); |
|
| 48 | + exit; |
|
| 49 | + } |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | // initialiser a la langue par defaut |
@@ -57,29 +57,29 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | if (_request('action') or _request('var_ajax') or _request('formulaire_action')) { |
| 60 | - if (!autoriser_sans_cookie($exec)) { |
|
| 61 | - // Charger l'aiguilleur qui va mettre sur la bonne voie les traitements derogatoires |
|
| 62 | - include_spip('public/aiguiller'); |
|
| 63 | - if ( |
|
| 64 | - // cas des appels actions ?action=xxx |
|
| 65 | - traiter_appels_actions() |
|
| 66 | - or |
|
| 67 | - // cas des hits ajax sur les inclusions ajax |
|
| 68 | - traiter_appels_inclusions_ajax() |
|
| 69 | - or |
|
| 70 | - // cas des formulaires charger/verifier/traiter |
|
| 71 | - traiter_formulaires_dynamiques() |
|
| 72 | - ) { |
|
| 73 | - exit; |
|
| 74 | - } // le hit est fini ! |
|
| 75 | - } |
|
| 60 | + if (!autoriser_sans_cookie($exec)) { |
|
| 61 | + // Charger l'aiguilleur qui va mettre sur la bonne voie les traitements derogatoires |
|
| 62 | + include_spip('public/aiguiller'); |
|
| 63 | + if ( |
|
| 64 | + // cas des appels actions ?action=xxx |
|
| 65 | + traiter_appels_actions() |
|
| 66 | + or |
|
| 67 | + // cas des hits ajax sur les inclusions ajax |
|
| 68 | + traiter_appels_inclusions_ajax() |
|
| 69 | + or |
|
| 70 | + // cas des formulaires charger/verifier/traiter |
|
| 71 | + traiter_formulaires_dynamiques() |
|
| 72 | + ) { |
|
| 73 | + exit; |
|
| 74 | + } // le hit est fini ! |
|
| 75 | + } |
|
| 76 | 76 | } |
| 77 | 77 | // securiser les redirect du back-office |
| 78 | 78 | if (_request('redirect')) { |
| 79 | - if (!function_exists('securiser_redirect_action')) { |
|
| 80 | - include_spip('public/aiguiller'); |
|
| 81 | - } |
|
| 82 | - set_request('redirect', securiser_redirect_action(_request('redirect'))); |
|
| 79 | + if (!function_exists('securiser_redirect_action')) { |
|
| 80 | + include_spip('public/aiguiller'); |
|
| 81 | + } |
|
| 82 | + set_request('redirect', securiser_redirect_action(_request('redirect'))); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | |
@@ -89,12 +89,12 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | // Controle de la version, sauf si on est deja en train de s'en occuper |
| 91 | 91 | if ( |
| 92 | - !$reinstall == 'oui' |
|
| 93 | - and !_AJAX |
|
| 94 | - and isset($GLOBALS['meta']['version_installee']) |
|
| 95 | - and ($GLOBALS['spip_version_base'] != (str_replace(',', '.', $GLOBALS['meta']['version_installee']))) |
|
| 92 | + !$reinstall == 'oui' |
|
| 93 | + and !_AJAX |
|
| 94 | + and isset($GLOBALS['meta']['version_installee']) |
|
| 95 | + and ($GLOBALS['spip_version_base'] != (str_replace(',', '.', $GLOBALS['meta']['version_installee']))) |
|
| 96 | 96 | ) { |
| 97 | - $exec = 'demande_mise_a_jour'; |
|
| 97 | + $exec = 'demande_mise_a_jour'; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // Quand une action d'administration est en cours (meta "admin"), |
@@ -104,39 +104,39 @@ discard block |
||
| 104 | 104 | // sinon c'est qu'elle a ete interrompue et il faut la reprendre |
| 105 | 105 | |
| 106 | 106 | elseif (isset($GLOBALS['meta']['admin'])) { |
| 107 | - if (preg_match('/^(.*)_(\d+)_/', $GLOBALS['meta']['admin'], $l)) { |
|
| 108 | - [, $var_f, $n] = $l; |
|
| 109 | - } |
|
| 110 | - if ( |
|
| 111 | - _AJAX |
|
| 112 | - or !( |
|
| 113 | - isset($_COOKIE['spip_admin']) |
|
| 114 | - or (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']['statut'] == '0minirezo') |
|
| 115 | - ) |
|
| 116 | - ) { |
|
| 117 | - spip_log('Quand la meta admin vaut ' . |
|
| 118 | - $GLOBALS['meta']['admin'] . |
|
| 119 | - ' seul un admin peut se connecter et sans AJAX.' . |
|
| 120 | - ' En cas de probleme, detruire cette meta.'); |
|
| 121 | - die(_T('info_travaux_texte')); |
|
| 122 | - } |
|
| 123 | - if ($n) { |
|
| 124 | - [, $var_f, $n] = $l; |
|
| 125 | - if (tester_url_ecrire("base_$var_f")) { |
|
| 126 | - $var_f = "base_$var_f"; |
|
| 127 | - } |
|
| 128 | - if ($var_f != $exec) { |
|
| 129 | - spip_log("Le script $var_f lance par auteur$n se substitue a l'exec $exec"); |
|
| 130 | - $exec = $var_f; |
|
| 131 | - set_request('exec', $exec); |
|
| 132 | - } |
|
| 133 | - } |
|
| 107 | + if (preg_match('/^(.*)_(\d+)_/', $GLOBALS['meta']['admin'], $l)) { |
|
| 108 | + [, $var_f, $n] = $l; |
|
| 109 | + } |
|
| 110 | + if ( |
|
| 111 | + _AJAX |
|
| 112 | + or !( |
|
| 113 | + isset($_COOKIE['spip_admin']) |
|
| 114 | + or (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']['statut'] == '0minirezo') |
|
| 115 | + ) |
|
| 116 | + ) { |
|
| 117 | + spip_log('Quand la meta admin vaut ' . |
|
| 118 | + $GLOBALS['meta']['admin'] . |
|
| 119 | + ' seul un admin peut se connecter et sans AJAX.' . |
|
| 120 | + ' En cas de probleme, detruire cette meta.'); |
|
| 121 | + die(_T('info_travaux_texte')); |
|
| 122 | + } |
|
| 123 | + if ($n) { |
|
| 124 | + [, $var_f, $n] = $l; |
|
| 125 | + if (tester_url_ecrire("base_$var_f")) { |
|
| 126 | + $var_f = "base_$var_f"; |
|
| 127 | + } |
|
| 128 | + if ($var_f != $exec) { |
|
| 129 | + spip_log("Le script $var_f lance par auteur$n se substitue a l'exec $exec"); |
|
| 130 | + $exec = $var_f; |
|
| 131 | + set_request('exec', $exec); |
|
| 132 | + } |
|
| 133 | + } |
|
| 134 | 134 | } |
| 135 | 135 | // si nom pas plausible, prendre le script par defaut |
| 136 | 136 | // attention aux deux cas 404/403 qui commencent par un 4 ! |
| 137 | 137 | elseif (!preg_match(',^[a-z4_][0-9a-z_-]*$,i', $exec)) { |
| 138 | - $exec = 'accueil'; |
|
| 139 | - set_request('exec', $exec); |
|
| 138 | + $exec = 'accueil'; |
|
| 139 | + set_request('exec', $exec); |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | // si la langue est specifiee par cookie et ne correspond pas |
@@ -144,19 +144,19 @@ discard block |
||
| 144 | 144 | // on appelle directement la fonction, car un appel d'action peut conduire a une boucle infinie |
| 145 | 145 | // si le cookie n'est pas pose correctement dans l'action |
| 146 | 146 | if ( |
| 147 | - !$var_auth and isset($_COOKIE['spip_lang_ecrire']) |
|
| 148 | - and $_COOKIE['spip_lang_ecrire'] <> $GLOBALS['visiteur_session']['lang'] |
|
| 147 | + !$var_auth and isset($_COOKIE['spip_lang_ecrire']) |
|
| 148 | + and $_COOKIE['spip_lang_ecrire'] <> $GLOBALS['visiteur_session']['lang'] |
|
| 149 | 149 | ) { |
| 150 | - include_spip('action/converser'); |
|
| 151 | - action_converser_post($GLOBALS['visiteur_session']['lang'], true); |
|
| 150 | + include_spip('action/converser'); |
|
| 151 | + action_converser_post($GLOBALS['visiteur_session']['lang'], true); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | if ($var_f = tester_url_ecrire($exec)) { |
| 155 | - $var_f = charger_fonction($var_f); |
|
| 156 | - $var_f(); // at last |
|
| 155 | + $var_f = charger_fonction($var_f); |
|
| 156 | + $var_f(); // at last |
|
| 157 | 157 | } else { |
| 158 | - // Rien de connu: rerouter vers exec=404 au lieu d'echouer |
|
| 159 | - // ce qui permet de laisser la main a un plugin |
|
| 160 | - $var_f = charger_fonction('404'); |
|
| 161 | - $var_f($exec); |
|
| 158 | + // Rien de connu: rerouter vers exec=404 au lieu d'echouer |
|
| 159 | + // ce qui permet de laisser la main a un plugin |
|
| 160 | + $var_f = charger_fonction('404'); |
|
| 161 | + $var_f($exec); |
|
| 162 | 162 | } |
@@ -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 | /** |
@@ -43,22 +43,22 @@ discard block |
||
| 43 | 43 | * Pile complétée par le code à générer |
| 44 | 44 | */ |
| 45 | 45 | function balise_ALERTE_MESSAGE_dist($p) { |
| 46 | - $_texte = interprete_argument_balise(1, $p); |
|
| 47 | - $_titre = interprete_argument_balise(2, $p); |
|
| 48 | - $_class = interprete_argument_balise(3, $p); |
|
| 49 | - $_role = interprete_argument_balise(4, $p); |
|
| 50 | - $_id = interprete_argument_balise(5, $p); |
|
| 51 | - $_texte = ($_texte ?: "''"); |
|
| 52 | - $_titre = ($_titre ? ", $_titre" : ', null'); |
|
| 53 | - $_class = ($_class ? ", $_class" : ', null'); |
|
| 54 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 46 | + $_texte = interprete_argument_balise(1, $p); |
|
| 47 | + $_titre = interprete_argument_balise(2, $p); |
|
| 48 | + $_class = interprete_argument_balise(3, $p); |
|
| 49 | + $_role = interprete_argument_balise(4, $p); |
|
| 50 | + $_id = interprete_argument_balise(5, $p); |
|
| 51 | + $_texte = ($_texte ?: "''"); |
|
| 52 | + $_titre = ($_titre ? ", $_titre" : ', null'); |
|
| 53 | + $_class = ($_class ? ", $_class" : ', null'); |
|
| 54 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 56 | 56 | |
| 57 | - $f = chercher_filtre('message_alerte'); |
|
| 58 | - $p->code = "$f($_texte$_titre$_class$_role$_id)"; |
|
| 59 | - $p->interdire_scripts = false; |
|
| 57 | + $f = chercher_filtre('message_alerte'); |
|
| 58 | + $p->code = "$f($_texte$_titre$_class$_role$_id)"; |
|
| 59 | + $p->interdire_scripts = false; |
|
| 60 | 60 | |
| 61 | - return $p; |
|
| 61 | + return $p; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -86,20 +86,20 @@ discard block |
||
| 86 | 86 | * Pile complétée par le code à générer |
| 87 | 87 | */ |
| 88 | 88 | function balise_ALERTE_OUVRIR_dist($p) { |
| 89 | - $_titre = interprete_argument_balise(1, $p); |
|
| 90 | - $_class = interprete_argument_balise(2, $p); |
|
| 91 | - $_role = interprete_argument_balise(3, $p); |
|
| 92 | - $_id = interprete_argument_balise(4, $p); |
|
| 93 | - $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 94 | - $_class = ($_class ? ", $_class" : ', null'); |
|
| 95 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 89 | + $_titre = interprete_argument_balise(1, $p); |
|
| 90 | + $_class = interprete_argument_balise(2, $p); |
|
| 91 | + $_role = interprete_argument_balise(3, $p); |
|
| 92 | + $_id = interprete_argument_balise(4, $p); |
|
| 93 | + $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 94 | + $_class = ($_class ? ", $_class" : ', null'); |
|
| 95 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 97 | 97 | |
| 98 | - $f = chercher_filtre('message_alerte_ouvrir'); |
|
| 99 | - $p->code = "$f($_titre$_class$_role$_id)"; |
|
| 100 | - $p->interdire_scripts = false; |
|
| 98 | + $f = chercher_filtre('message_alerte_ouvrir'); |
|
| 99 | + $p->code = "$f($_titre$_class$_role$_id)"; |
|
| 100 | + $p->interdire_scripts = false; |
|
| 101 | 101 | |
| 102 | - return $p; |
|
| 102 | + return $p; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | * Pile complétée par le code à générer |
| 122 | 122 | */ |
| 123 | 123 | function balise_ALERTE_FERMER_dist($p) { |
| 124 | - $f = chercher_filtre('message_alerte_fermer'); |
|
| 125 | - $p->code = "$f()"; |
|
| 126 | - $p->interdire_scripts = false; |
|
| 124 | + $f = chercher_filtre('message_alerte_fermer'); |
|
| 125 | + $p->code = "$f()"; |
|
| 126 | + $p->interdire_scripts = false; |
|
| 127 | 127 | |
| 128 | - return $p; |
|
| 128 | + return $p; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -160,14 +160,14 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | function message_alerte(string $texte, ?string $titre = null, ?string $class = null, ?string $role = null, ?string $id = null): string { |
| 162 | 162 | |
| 163 | - $message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir'); |
|
| 164 | - $message_alerte_fermer = chercher_filtre('message_alerte_fermer'); |
|
| 165 | - $message = |
|
| 166 | - $message_alerte_ouvrir($titre, $class, $role, $id) . |
|
| 167 | - $texte . |
|
| 168 | - $message_alerte_fermer(); |
|
| 163 | + $message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir'); |
|
| 164 | + $message_alerte_fermer = chercher_filtre('message_alerte_fermer'); |
|
| 165 | + $message = |
|
| 166 | + $message_alerte_ouvrir($titre, $class, $role, $id) . |
|
| 167 | + $texte . |
|
| 168 | + $message_alerte_fermer(); |
|
| 169 | 169 | |
| 170 | - return $message; |
|
| 170 | + return $message; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -198,56 +198,56 @@ discard block |
||
| 198 | 198 | */ |
| 199 | 199 | function message_alerte_ouvrir(?string $titre = null, ?string $class = null, ?string $role = null, ?string $id = null): string { |
| 200 | 200 | |
| 201 | - $prive = test_espace_prive(); |
|
| 201 | + $prive = test_espace_prive(); |
|
| 202 | 202 | |
| 203 | - // Valeurs par défaut |
|
| 204 | - $titre = trim($titre ?? ''); |
|
| 205 | - $role ??= 'alert'; // fallback uniquement si null |
|
| 206 | - $class ??= 'notice'; // fallback uniquement si null |
|
| 203 | + // Valeurs par défaut |
|
| 204 | + $titre = trim($titre ?? ''); |
|
| 205 | + $role ??= 'alert'; // fallback uniquement si null |
|
| 206 | + $class ??= 'notice'; // fallback uniquement si null |
|
| 207 | 207 | |
| 208 | - // Type d'alerte : le chercher dans les classes, nettoyer celles-ci, puis le réinjecter |
|
| 209 | - $types = [ |
|
| 210 | - 'notice', |
|
| 211 | - 'error', |
|
| 212 | - 'success', |
|
| 213 | - 'info', |
|
| 214 | - ]; |
|
| 215 | - $type = array_intersect(explode(' ', $class), $types); |
|
| 216 | - $type = reset($type); |
|
| 217 | - $class = trim(str_replace($types, '', $class) . " $type"); |
|
| 208 | + // Type d'alerte : le chercher dans les classes, nettoyer celles-ci, puis le réinjecter |
|
| 209 | + $types = [ |
|
| 210 | + 'notice', |
|
| 211 | + 'error', |
|
| 212 | + 'success', |
|
| 213 | + 'info', |
|
| 214 | + ]; |
|
| 215 | + $type = array_intersect(explode(' ', $class), $types); |
|
| 216 | + $type = reset($type); |
|
| 217 | + $class = trim(str_replace($types, '', $class) . " $type"); |
|
| 218 | 218 | |
| 219 | - // Classes |
|
| 220 | - $class_racine = 'msg-alert'; |
|
| 221 | - $clearfix = ($prive ? 'clearfix' : ''); |
|
| 222 | - $class_alerte = "$class_racine $class"; |
|
| 223 | - $class_texte = "{$class_racine}__text $clearfix"; |
|
| 224 | - $class_titre = "{$class_racine}__heading"; |
|
| 219 | + // Classes |
|
| 220 | + $class_racine = 'msg-alert'; |
|
| 221 | + $clearfix = ($prive ? 'clearfix' : ''); |
|
| 222 | + $class_alerte = "$class_racine $class"; |
|
| 223 | + $class_texte = "{$class_racine}__text $clearfix"; |
|
| 224 | + $class_titre = "{$class_racine}__heading"; |
|
| 225 | 225 | |
| 226 | - // Titre : markup |
|
| 227 | - $titre = trim($titre); |
|
| 228 | - if (strlen($titre)) { |
|
| 229 | - include_spip('inc/filtres'); |
|
| 230 | - // Si besoin on encapsule le titre : un h3 dans le privé, un simple div sinon. |
|
| 231 | - $cherche_tag = ($prive ? '<h' : '<'); |
|
| 232 | - $wrap_tag = ($prive ? '<h3>' : '<div>'); |
|
| 233 | - if (strpos($titre, $cherche_tag) !== 0) { |
|
| 234 | - $titre = wrap($titre, $wrap_tag); |
|
| 235 | - } |
|
| 236 | - // puis on ajoute la classe |
|
| 237 | - $titre = ajouter_class($titre, $class_titre); |
|
| 238 | - } |
|
| 226 | + // Titre : markup |
|
| 227 | + $titre = trim($titre); |
|
| 228 | + if (strlen($titre)) { |
|
| 229 | + include_spip('inc/filtres'); |
|
| 230 | + // Si besoin on encapsule le titre : un h3 dans le privé, un simple div sinon. |
|
| 231 | + $cherche_tag = ($prive ? '<h' : '<'); |
|
| 232 | + $wrap_tag = ($prive ? '<h3>' : '<div>'); |
|
| 233 | + if (strpos($titre, $cherche_tag) !== 0) { |
|
| 234 | + $titre = wrap($titre, $wrap_tag); |
|
| 235 | + } |
|
| 236 | + // puis on ajoute la classe |
|
| 237 | + $titre = ajouter_class($titre, $class_titre); |
|
| 238 | + } |
|
| 239 | 239 | |
| 240 | - // Attributs |
|
| 241 | - $attr_role = ($role ? "role=\"$role\"" : ''); |
|
| 242 | - $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 243 | - $attr_data = ($type ? "data-alert=\"$type\"" : ''); |
|
| 240 | + // Attributs |
|
| 241 | + $attr_role = ($role ? "role=\"$role\"" : ''); |
|
| 242 | + $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 243 | + $attr_data = ($type ? "data-alert=\"$type\"" : ''); |
|
| 244 | 244 | |
| 245 | - $message = |
|
| 246 | - "<div class=\"$class_alerte\" $attr_role $attr_id $attr_data>" |
|
| 247 | - . $titre |
|
| 248 | - . "<div class=\"$class_texte\">"; |
|
| 245 | + $message = |
|
| 246 | + "<div class=\"$class_alerte\" $attr_role $attr_id $attr_data>" |
|
| 247 | + . $titre |
|
| 248 | + . "<div class=\"$class_texte\">"; |
|
| 249 | 249 | |
| 250 | - return $message; |
|
| 250 | + return $message; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | /** |
@@ -261,5 +261,5 @@ discard block |
||
| 261 | 261 | * HTML de fin de l'alerte |
| 262 | 262 | */ |
| 263 | 263 | function message_alerte_fermer(): string { |
| 264 | - return '</div></div>'; |
|
| 264 | + return '</div></div>'; |
|
| 265 | 265 | } |
@@ -11,298 +11,298 @@ |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | // methodes sql |
| 19 | 19 | function inc_recherche_to_array_dist($recherche, $options = []) { |
| 20 | 20 | |
| 21 | - // options par defaut |
|
| 22 | - $options = array_merge( |
|
| 23 | - [ |
|
| 24 | - 'score' => true, |
|
| 25 | - 'champs' => false, |
|
| 26 | - 'toutvoir' => false, |
|
| 27 | - 'matches' => false, |
|
| 28 | - 'jointures' => false |
|
| 29 | - ], |
|
| 30 | - $options |
|
| 31 | - ); |
|
| 21 | + // options par defaut |
|
| 22 | + $options = array_merge( |
|
| 23 | + [ |
|
| 24 | + 'score' => true, |
|
| 25 | + 'champs' => false, |
|
| 26 | + 'toutvoir' => false, |
|
| 27 | + 'matches' => false, |
|
| 28 | + 'jointures' => false |
|
| 29 | + ], |
|
| 30 | + $options |
|
| 31 | + ); |
|
| 32 | 32 | |
| 33 | - include_spip('inc/rechercher'); |
|
| 34 | - include_spip('inc/autoriser'); |
|
| 33 | + include_spip('inc/rechercher'); |
|
| 34 | + include_spip('inc/autoriser'); |
|
| 35 | 35 | |
| 36 | - $requete = [ |
|
| 37 | - 'SELECT' => [], |
|
| 38 | - 'FROM' => [], |
|
| 39 | - 'WHERE' => [], |
|
| 40 | - 'GROUPBY' => [], |
|
| 41 | - 'ORDERBY' => [], |
|
| 42 | - 'LIMIT' => '', |
|
| 43 | - 'HAVING' => [] |
|
| 44 | - ]; |
|
| 36 | + $requete = [ |
|
| 37 | + 'SELECT' => [], |
|
| 38 | + 'FROM' => [], |
|
| 39 | + 'WHERE' => [], |
|
| 40 | + 'GROUPBY' => [], |
|
| 41 | + 'ORDERBY' => [], |
|
| 42 | + 'LIMIT' => '', |
|
| 43 | + 'HAVING' => [] |
|
| 44 | + ]; |
|
| 45 | 45 | |
| 46 | - $table = sinon($options['table'], 'article'); |
|
| 47 | - if ($options['champs']) { |
|
| 48 | - $champs = $options['champs']; |
|
| 49 | - } else { |
|
| 50 | - $l = liste_des_champs(); |
|
| 51 | - $champs = $l['article']; |
|
| 52 | - } |
|
| 53 | - $serveur = $options['serveur']; |
|
| 46 | + $table = sinon($options['table'], 'article'); |
|
| 47 | + if ($options['champs']) { |
|
| 48 | + $champs = $options['champs']; |
|
| 49 | + } else { |
|
| 50 | + $l = liste_des_champs(); |
|
| 51 | + $champs = $l['article']; |
|
| 52 | + } |
|
| 53 | + $serveur = $options['serveur']; |
|
| 54 | 54 | |
| 55 | - [$methode, $q, $preg] = expression_recherche($recherche, $options); |
|
| 55 | + [$methode, $q, $preg] = expression_recherche($recherche, $options); |
|
| 56 | 56 | |
| 57 | - $jointures = $options['jointures'] |
|
| 58 | - ? liste_des_jointures() |
|
| 59 | - : []; |
|
| 57 | + $jointures = $options['jointures'] |
|
| 58 | + ? liste_des_jointures() |
|
| 59 | + : []; |
|
| 60 | 60 | |
| 61 | - $_id_table = id_table_objet($table); |
|
| 61 | + $_id_table = id_table_objet($table); |
|
| 62 | 62 | |
| 63 | - // c'est un pis-aller : ca a peu de chance de marcher, mais mieux quand meme que en conservant la ',' |
|
| 64 | - // (aka ca marche au moins dans certains cas comme avec spip_formulaires_reponses_champs) |
|
| 65 | - if (strpos($_id_table, ',') !== false) { |
|
| 66 | - $_id_table = explode(',', $_id_table); |
|
| 67 | - $_id_table = reset($_id_table); |
|
| 68 | - } |
|
| 63 | + // c'est un pis-aller : ca a peu de chance de marcher, mais mieux quand meme que en conservant la ',' |
|
| 64 | + // (aka ca marche au moins dans certains cas comme avec spip_formulaires_reponses_champs) |
|
| 65 | + if (strpos($_id_table, ',') !== false) { |
|
| 66 | + $_id_table = explode(',', $_id_table); |
|
| 67 | + $_id_table = reset($_id_table); |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | - $requete['SELECT'][] = 't.' . $_id_table; |
|
| 71 | - $a = []; |
|
| 72 | - // Recherche fulltext |
|
| 73 | - foreach ($champs as $champ => $poids) { |
|
| 74 | - if (is_array($champ)) { |
|
| 75 | - spip_log('requetes imbriquees interdites'); |
|
| 76 | - } else { |
|
| 77 | - if (strpos($champ, '.') === false) { |
|
| 78 | - $champ = "t.$champ"; |
|
| 79 | - } |
|
| 80 | - $requete['SELECT'][] = $champ; |
|
| 81 | - $a[] = $champ . ' ' . $methode . ' ' . $q; |
|
| 82 | - } |
|
| 83 | - } |
|
| 84 | - if ($a) { |
|
| 85 | - $requete['WHERE'][] = join(' OR ', $a); |
|
| 86 | - } |
|
| 87 | - $requete['FROM'][] = table_objet_sql($table) . ' AS t'; |
|
| 70 | + $requete['SELECT'][] = 't.' . $_id_table; |
|
| 71 | + $a = []; |
|
| 72 | + // Recherche fulltext |
|
| 73 | + foreach ($champs as $champ => $poids) { |
|
| 74 | + if (is_array($champ)) { |
|
| 75 | + spip_log('requetes imbriquees interdites'); |
|
| 76 | + } else { |
|
| 77 | + if (strpos($champ, '.') === false) { |
|
| 78 | + $champ = "t.$champ"; |
|
| 79 | + } |
|
| 80 | + $requete['SELECT'][] = $champ; |
|
| 81 | + $a[] = $champ . ' ' . $methode . ' ' . $q; |
|
| 82 | + } |
|
| 83 | + } |
|
| 84 | + if ($a) { |
|
| 85 | + $requete['WHERE'][] = join(' OR ', $a); |
|
| 86 | + } |
|
| 87 | + $requete['FROM'][] = table_objet_sql($table) . ' AS t'; |
|
| 88 | 88 | |
| 89 | - $results = []; |
|
| 89 | + $results = []; |
|
| 90 | 90 | |
| 91 | - $s = sql_select( |
|
| 92 | - $requete['SELECT'], |
|
| 93 | - $requete['FROM'], |
|
| 94 | - $requete['WHERE'], |
|
| 95 | - implode(' ', $requete['GROUPBY']), |
|
| 96 | - $requete['ORDERBY'], |
|
| 97 | - $requete['LIMIT'], |
|
| 98 | - $requete['HAVING'], |
|
| 99 | - $serveur |
|
| 100 | - ); |
|
| 91 | + $s = sql_select( |
|
| 92 | + $requete['SELECT'], |
|
| 93 | + $requete['FROM'], |
|
| 94 | + $requete['WHERE'], |
|
| 95 | + implode(' ', $requete['GROUPBY']), |
|
| 96 | + $requete['ORDERBY'], |
|
| 97 | + $requete['LIMIT'], |
|
| 98 | + $requete['HAVING'], |
|
| 99 | + $serveur |
|
| 100 | + ); |
|
| 101 | 101 | |
| 102 | - while ( |
|
| 103 | - $t = sql_fetch($s, $serveur) |
|
| 104 | - and (!isset($t['score']) or $t['score'] > 0) |
|
| 105 | - ) { |
|
| 106 | - $id = intval($t[$_id_table]); |
|
| 102 | + while ( |
|
| 103 | + $t = sql_fetch($s, $serveur) |
|
| 104 | + and (!isset($t['score']) or $t['score'] > 0) |
|
| 105 | + ) { |
|
| 106 | + $id = intval($t[$_id_table]); |
|
| 107 | 107 | |
| 108 | - if ( |
|
| 109 | - $options['toutvoir'] |
|
| 110 | - or autoriser('voir', $table, $id) |
|
| 111 | - ) { |
|
| 112 | - // indiquer les champs concernes |
|
| 113 | - $champs_vus = []; |
|
| 114 | - $score = 0; |
|
| 115 | - $matches = []; |
|
| 108 | + if ( |
|
| 109 | + $options['toutvoir'] |
|
| 110 | + or autoriser('voir', $table, $id) |
|
| 111 | + ) { |
|
| 112 | + // indiquer les champs concernes |
|
| 113 | + $champs_vus = []; |
|
| 114 | + $score = 0; |
|
| 115 | + $matches = []; |
|
| 116 | 116 | |
| 117 | - $vu = false; |
|
| 118 | - foreach ($champs as $champ => $poids) { |
|
| 119 | - $champ = explode('.', $champ); |
|
| 120 | - $champ = end($champ); |
|
| 121 | - // translitteration_rapide uniquement si on est deja en utf-8 |
|
| 122 | - $value = ($GLOBALS['meta']['charset'] == 'utf-8' ? translitteration_rapide($t[$champ]) : translitteration($t[$champ])); |
|
| 123 | - if ( |
|
| 124 | - $n = |
|
| 125 | - ($options['score'] || $options['matches']) |
|
| 126 | - ? preg_match_all($preg, $value, $regs, PREG_SET_ORDER) |
|
| 127 | - : preg_match($preg, $value) |
|
| 128 | - ) { |
|
| 129 | - $vu = true; |
|
| 117 | + $vu = false; |
|
| 118 | + foreach ($champs as $champ => $poids) { |
|
| 119 | + $champ = explode('.', $champ); |
|
| 120 | + $champ = end($champ); |
|
| 121 | + // translitteration_rapide uniquement si on est deja en utf-8 |
|
| 122 | + $value = ($GLOBALS['meta']['charset'] == 'utf-8' ? translitteration_rapide($t[$champ]) : translitteration($t[$champ])); |
|
| 123 | + if ( |
|
| 124 | + $n = |
|
| 125 | + ($options['score'] || $options['matches']) |
|
| 126 | + ? preg_match_all($preg, $value, $regs, PREG_SET_ORDER) |
|
| 127 | + : preg_match($preg, $value) |
|
| 128 | + ) { |
|
| 129 | + $vu = true; |
|
| 130 | 130 | |
| 131 | - if ($options['champs']) { |
|
| 132 | - $champs_vus[$champ] = $t[$champ]; |
|
| 133 | - } |
|
| 134 | - if ($options['score']) { |
|
| 135 | - // compter les points avec un peu de discernement : on pondere par la longueur du match compte en chars |
|
| 136 | - $score += $poids * strlen(implode('', array_column($regs, 0))); |
|
| 137 | - } |
|
| 131 | + if ($options['champs']) { |
|
| 132 | + $champs_vus[$champ] = $t[$champ]; |
|
| 133 | + } |
|
| 134 | + if ($options['score']) { |
|
| 135 | + // compter les points avec un peu de discernement : on pondere par la longueur du match compte en chars |
|
| 136 | + $score += $poids * strlen(implode('', array_column($regs, 0))); |
|
| 137 | + } |
|
| 138 | 138 | |
| 139 | - if ($options['matches']) { |
|
| 140 | - $matches[$champ] = $regs; |
|
| 141 | - } |
|
| 139 | + if ($options['matches']) { |
|
| 140 | + $matches[$champ] = $regs; |
|
| 141 | + } |
|
| 142 | 142 | |
| 143 | - if ( |
|
| 144 | - !$options['champs'] |
|
| 145 | - and !$options['score'] |
|
| 146 | - and !$options['matches'] |
|
| 147 | - ) { |
|
| 148 | - break; |
|
| 149 | - } |
|
| 150 | - } |
|
| 151 | - } |
|
| 143 | + if ( |
|
| 144 | + !$options['champs'] |
|
| 145 | + and !$options['score'] |
|
| 146 | + and !$options['matches'] |
|
| 147 | + ) { |
|
| 148 | + break; |
|
| 149 | + } |
|
| 150 | + } |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | - if ($vu) { |
|
| 154 | - if (!isset($results)) { |
|
| 155 | - $results = []; |
|
| 156 | - } |
|
| 157 | - $results[$id] = []; |
|
| 158 | - if ($champs_vus) { |
|
| 159 | - $results[$id]['champs'] = $champs_vus; |
|
| 160 | - } |
|
| 161 | - if ($score) { |
|
| 162 | - $results[$id]['score'] = $score; |
|
| 163 | - } |
|
| 164 | - if ($matches) { |
|
| 165 | - $results[$id]['matches'] = $matches; |
|
| 166 | - } |
|
| 167 | - } |
|
| 168 | - } |
|
| 169 | - } |
|
| 153 | + if ($vu) { |
|
| 154 | + if (!isset($results)) { |
|
| 155 | + $results = []; |
|
| 156 | + } |
|
| 157 | + $results[$id] = []; |
|
| 158 | + if ($champs_vus) { |
|
| 159 | + $results[$id]['champs'] = $champs_vus; |
|
| 160 | + } |
|
| 161 | + if ($score) { |
|
| 162 | + $results[$id]['score'] = $score; |
|
| 163 | + } |
|
| 164 | + if ($matches) { |
|
| 165 | + $results[$id]['matches'] = $matches; |
|
| 166 | + } |
|
| 167 | + } |
|
| 168 | + } |
|
| 169 | + } |
|
| 170 | 170 | |
| 171 | 171 | |
| 172 | - // Gerer les donnees associees |
|
| 173 | - // ici on est un peu naze : pas capables de reconstruire une jointure complexe |
|
| 174 | - // on ne sait passer que par table de laison en 1 coup |
|
| 175 | - if ( |
|
| 176 | - isset($jointures[$table]) |
|
| 177 | - and $joints = recherche_en_base( |
|
| 178 | - $recherche, |
|
| 179 | - $jointures[$table], |
|
| 180 | - array_merge($options, ['jointures' => false]) |
|
| 181 | - ) |
|
| 182 | - ) { |
|
| 183 | - include_spip('action/editer_liens'); |
|
| 184 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 185 | - $cle_depart = id_table_objet($table); |
|
| 186 | - $table_depart = table_objet($table, $serveur); |
|
| 187 | - $desc_depart = $trouver_table($table_depart, $serveur); |
|
| 188 | - $depart_associable = objet_associable($table); |
|
| 189 | - foreach ($joints as $table_liee => $ids_trouves) { |
|
| 190 | - // on peut definir une fonction de recherche jointe pour regler les cas particuliers |
|
| 191 | - if ( |
|
| 192 | - !( |
|
| 193 | - $rechercher_joints = charger_fonction("rechercher_joints_{$table}_{$table_liee}", 'inc', true) |
|
| 194 | - or $rechercher_joints = charger_fonction("rechercher_joints_objet_{$table_liee}", 'inc', true) |
|
| 195 | - or $rechercher_joints = charger_fonction("rechercher_joints_{$table}_objet_lie", 'inc', true) |
|
| 196 | - ) |
|
| 197 | - ) { |
|
| 198 | - $cle_arrivee = id_table_objet($table_liee); |
|
| 199 | - $table_arrivee = table_objet($table_liee, $serveur); |
|
| 200 | - $desc_arrivee = $trouver_table($table_arrivee, $serveur); |
|
| 201 | - // cas simple : $cle_depart dans la table_liee |
|
| 202 | - if (isset($desc_arrivee['field'][$cle_depart])) { |
|
| 203 | - $s = sql_select( |
|
| 204 | - "$cle_depart, $cle_arrivee", |
|
| 205 | - $desc_arrivee['table_sql'], |
|
| 206 | - sql_in($cle_arrivee, array_keys($ids_trouves)), |
|
| 207 | - '', |
|
| 208 | - '', |
|
| 209 | - '', |
|
| 210 | - '', |
|
| 211 | - $serveur |
|
| 212 | - ); |
|
| 213 | - } // cas simple : $cle_arrivee dans la table |
|
| 214 | - elseif (isset($desc_depart['field'][$cle_arrivee])) { |
|
| 215 | - $s = sql_select( |
|
| 216 | - "$cle_depart, $cle_arrivee", |
|
| 217 | - $desc_depart['table_sql'], |
|
| 218 | - sql_in($cle_arrivee, array_keys($ids_trouves)), |
|
| 219 | - '', |
|
| 220 | - '', |
|
| 221 | - '', |
|
| 222 | - '', |
|
| 223 | - $serveur |
|
| 224 | - ); |
|
| 225 | - } |
|
| 226 | - // sinon cherchons une table de liaison |
|
| 227 | - // cas recherche principale article, objet lie document : passer par spip_documents_liens |
|
| 228 | - elseif ($l = objet_associable($table_liee)) { |
|
| 229 | - [$primary, $table_liens] = $l; |
|
| 230 | - $s = sql_select( |
|
| 231 | - "id_objet as $cle_depart, $primary as $cle_arrivee", |
|
| 232 | - $table_liens, |
|
| 233 | - ["objet='$table'", sql_in($primary, array_keys($ids_trouves))], |
|
| 234 | - '', |
|
| 235 | - '', |
|
| 236 | - '', |
|
| 237 | - '', |
|
| 238 | - $serveur |
|
| 239 | - ); |
|
| 240 | - } // cas recherche principale auteur, objet lie article: passer par spip_auteurs_liens |
|
| 241 | - elseif ($l = $depart_associable) { |
|
| 242 | - [$primary, $table_liens] = $l; |
|
| 243 | - $s = sql_select( |
|
| 244 | - "$primary as $cle_depart, id_objet as $cle_arrivee", |
|
| 245 | - $table_liens, |
|
| 246 | - ["objet='$table_liee'", sql_in('id_objet', array_keys($ids_trouves))], |
|
| 247 | - '', |
|
| 248 | - '', |
|
| 249 | - '', |
|
| 250 | - '', |
|
| 251 | - $serveur |
|
| 252 | - ); |
|
| 253 | - } // cas table de liaison generique spip_xxx_yyy |
|
| 254 | - elseif ( |
|
| 255 | - $t = $trouver_table($table_arrivee . '_' . $table_depart, $serveur) |
|
| 256 | - or $t = $trouver_table($table_depart . '_' . $table_arrivee, $serveur) |
|
| 257 | - ) { |
|
| 258 | - $s = sql_select( |
|
| 259 | - "$cle_depart,$cle_arrivee", |
|
| 260 | - $t['table_sql'], |
|
| 261 | - sql_in($cle_arrivee, array_keys($ids_trouves)), |
|
| 262 | - '', |
|
| 263 | - '', |
|
| 264 | - '', |
|
| 265 | - '', |
|
| 266 | - $serveur |
|
| 267 | - ); |
|
| 268 | - } |
|
| 269 | - } else { |
|
| 270 | - [$cle_depart, $cle_arrivee, $s] = $rechercher_joints( |
|
| 271 | - $table, |
|
| 272 | - $table_liee, |
|
| 273 | - array_keys($ids_trouves), |
|
| 274 | - $serveur |
|
| 275 | - ); |
|
| 276 | - } |
|
| 172 | + // Gerer les donnees associees |
|
| 173 | + // ici on est un peu naze : pas capables de reconstruire une jointure complexe |
|
| 174 | + // on ne sait passer que par table de laison en 1 coup |
|
| 175 | + if ( |
|
| 176 | + isset($jointures[$table]) |
|
| 177 | + and $joints = recherche_en_base( |
|
| 178 | + $recherche, |
|
| 179 | + $jointures[$table], |
|
| 180 | + array_merge($options, ['jointures' => false]) |
|
| 181 | + ) |
|
| 182 | + ) { |
|
| 183 | + include_spip('action/editer_liens'); |
|
| 184 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 185 | + $cle_depart = id_table_objet($table); |
|
| 186 | + $table_depart = table_objet($table, $serveur); |
|
| 187 | + $desc_depart = $trouver_table($table_depart, $serveur); |
|
| 188 | + $depart_associable = objet_associable($table); |
|
| 189 | + foreach ($joints as $table_liee => $ids_trouves) { |
|
| 190 | + // on peut definir une fonction de recherche jointe pour regler les cas particuliers |
|
| 191 | + if ( |
|
| 192 | + !( |
|
| 193 | + $rechercher_joints = charger_fonction("rechercher_joints_{$table}_{$table_liee}", 'inc', true) |
|
| 194 | + or $rechercher_joints = charger_fonction("rechercher_joints_objet_{$table_liee}", 'inc', true) |
|
| 195 | + or $rechercher_joints = charger_fonction("rechercher_joints_{$table}_objet_lie", 'inc', true) |
|
| 196 | + ) |
|
| 197 | + ) { |
|
| 198 | + $cle_arrivee = id_table_objet($table_liee); |
|
| 199 | + $table_arrivee = table_objet($table_liee, $serveur); |
|
| 200 | + $desc_arrivee = $trouver_table($table_arrivee, $serveur); |
|
| 201 | + // cas simple : $cle_depart dans la table_liee |
|
| 202 | + if (isset($desc_arrivee['field'][$cle_depart])) { |
|
| 203 | + $s = sql_select( |
|
| 204 | + "$cle_depart, $cle_arrivee", |
|
| 205 | + $desc_arrivee['table_sql'], |
|
| 206 | + sql_in($cle_arrivee, array_keys($ids_trouves)), |
|
| 207 | + '', |
|
| 208 | + '', |
|
| 209 | + '', |
|
| 210 | + '', |
|
| 211 | + $serveur |
|
| 212 | + ); |
|
| 213 | + } // cas simple : $cle_arrivee dans la table |
|
| 214 | + elseif (isset($desc_depart['field'][$cle_arrivee])) { |
|
| 215 | + $s = sql_select( |
|
| 216 | + "$cle_depart, $cle_arrivee", |
|
| 217 | + $desc_depart['table_sql'], |
|
| 218 | + sql_in($cle_arrivee, array_keys($ids_trouves)), |
|
| 219 | + '', |
|
| 220 | + '', |
|
| 221 | + '', |
|
| 222 | + '', |
|
| 223 | + $serveur |
|
| 224 | + ); |
|
| 225 | + } |
|
| 226 | + // sinon cherchons une table de liaison |
|
| 227 | + // cas recherche principale article, objet lie document : passer par spip_documents_liens |
|
| 228 | + elseif ($l = objet_associable($table_liee)) { |
|
| 229 | + [$primary, $table_liens] = $l; |
|
| 230 | + $s = sql_select( |
|
| 231 | + "id_objet as $cle_depart, $primary as $cle_arrivee", |
|
| 232 | + $table_liens, |
|
| 233 | + ["objet='$table'", sql_in($primary, array_keys($ids_trouves))], |
|
| 234 | + '', |
|
| 235 | + '', |
|
| 236 | + '', |
|
| 237 | + '', |
|
| 238 | + $serveur |
|
| 239 | + ); |
|
| 240 | + } // cas recherche principale auteur, objet lie article: passer par spip_auteurs_liens |
|
| 241 | + elseif ($l = $depart_associable) { |
|
| 242 | + [$primary, $table_liens] = $l; |
|
| 243 | + $s = sql_select( |
|
| 244 | + "$primary as $cle_depart, id_objet as $cle_arrivee", |
|
| 245 | + $table_liens, |
|
| 246 | + ["objet='$table_liee'", sql_in('id_objet', array_keys($ids_trouves))], |
|
| 247 | + '', |
|
| 248 | + '', |
|
| 249 | + '', |
|
| 250 | + '', |
|
| 251 | + $serveur |
|
| 252 | + ); |
|
| 253 | + } // cas table de liaison generique spip_xxx_yyy |
|
| 254 | + elseif ( |
|
| 255 | + $t = $trouver_table($table_arrivee . '_' . $table_depart, $serveur) |
|
| 256 | + or $t = $trouver_table($table_depart . '_' . $table_arrivee, $serveur) |
|
| 257 | + ) { |
|
| 258 | + $s = sql_select( |
|
| 259 | + "$cle_depart,$cle_arrivee", |
|
| 260 | + $t['table_sql'], |
|
| 261 | + sql_in($cle_arrivee, array_keys($ids_trouves)), |
|
| 262 | + '', |
|
| 263 | + '', |
|
| 264 | + '', |
|
| 265 | + '', |
|
| 266 | + $serveur |
|
| 267 | + ); |
|
| 268 | + } |
|
| 269 | + } else { |
|
| 270 | + [$cle_depart, $cle_arrivee, $s] = $rechercher_joints( |
|
| 271 | + $table, |
|
| 272 | + $table_liee, |
|
| 273 | + array_keys($ids_trouves), |
|
| 274 | + $serveur |
|
| 275 | + ); |
|
| 276 | + } |
|
| 277 | 277 | |
| 278 | - while ($t = is_array($s) ? array_shift($s) : sql_fetch($s)) { |
|
| 279 | - $id = $t[$cle_depart]; |
|
| 280 | - $joint = $ids_trouves[$t[$cle_arrivee]]; |
|
| 281 | - if (!isset($results)) { |
|
| 282 | - $results = []; |
|
| 283 | - } |
|
| 284 | - if (!isset($results[$id])) { |
|
| 285 | - $results[$id] = []; |
|
| 286 | - } |
|
| 287 | - if (isset($joint['score']) and $joint['score']) { |
|
| 288 | - if (!isset($results[$id]['score'])) { |
|
| 289 | - $results[$id]['score'] = 0; |
|
| 290 | - } |
|
| 291 | - $results[$id]['score'] += $joint['score']; |
|
| 292 | - } |
|
| 293 | - if (isset($joint['champs']) and $joint['champs']) { |
|
| 294 | - foreach ($joint['champs'] as $c => $val) { |
|
| 295 | - $results[$id]['champs'][$table_liee . '.' . $c] = $val; |
|
| 296 | - } |
|
| 297 | - } |
|
| 298 | - if (isset($joint['matches']) and $joint['matches']) { |
|
| 299 | - foreach ($joint['matches'] as $c => $val) { |
|
| 300 | - $results[$id]['matches'][$table_liee . '.' . $c] = $val; |
|
| 301 | - } |
|
| 302 | - } |
|
| 303 | - } |
|
| 304 | - } |
|
| 305 | - } |
|
| 278 | + while ($t = is_array($s) ? array_shift($s) : sql_fetch($s)) { |
|
| 279 | + $id = $t[$cle_depart]; |
|
| 280 | + $joint = $ids_trouves[$t[$cle_arrivee]]; |
|
| 281 | + if (!isset($results)) { |
|
| 282 | + $results = []; |
|
| 283 | + } |
|
| 284 | + if (!isset($results[$id])) { |
|
| 285 | + $results[$id] = []; |
|
| 286 | + } |
|
| 287 | + if (isset($joint['score']) and $joint['score']) { |
|
| 288 | + if (!isset($results[$id]['score'])) { |
|
| 289 | + $results[$id]['score'] = 0; |
|
| 290 | + } |
|
| 291 | + $results[$id]['score'] += $joint['score']; |
|
| 292 | + } |
|
| 293 | + if (isset($joint['champs']) and $joint['champs']) { |
|
| 294 | + foreach ($joint['champs'] as $c => $val) { |
|
| 295 | + $results[$id]['champs'][$table_liee . '.' . $c] = $val; |
|
| 296 | + } |
|
| 297 | + } |
|
| 298 | + if (isset($joint['matches']) and $joint['matches']) { |
|
| 299 | + foreach ($joint['matches'] as $c => $val) { |
|
| 300 | + $results[$id]['matches'][$table_liee . '.' . $c] = $val; |
|
| 301 | + } |
|
| 302 | + } |
|
| 303 | + } |
|
| 304 | + } |
|
| 305 | + } |
|
| 306 | 306 | |
| 307 | - return $results; |
|
| 307 | + return $results; |
|
| 308 | 308 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Formulaires |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | include_spip('inc/filtres'); |
@@ -35,22 +35,22 @@ discard block |
||
| 35 | 35 | * Saisie protégée |
| 36 | 36 | **/ |
| 37 | 37 | function protege_champ($texte) { |
| 38 | - if (is_array($texte)) { |
|
| 39 | - return array_map('protege_champ', $texte); |
|
| 40 | - } elseif ($texte === null) { |
|
| 41 | - return $texte; |
|
| 42 | - } elseif (is_bool($texte)) { |
|
| 43 | - return $texte ? '1' : ''; |
|
| 44 | - } elseif (is_string($texte) and $texte) { |
|
| 45 | - if (preg_match(',^[abis]:\d+[:;],', $texte) and @unserialize($texte) !== false) { |
|
| 46 | - // ne pas corrompre une valeur serialize |
|
| 47 | - return $texte; |
|
| 48 | - } elseif (strpbrk($texte, "&\"'<>") !== false) { |
|
| 49 | - return spip_htmlspecialchars($texte, ENT_QUOTES); |
|
| 50 | - } |
|
| 51 | - } |
|
| 52 | - |
|
| 53 | - return $texte; |
|
| 38 | + if (is_array($texte)) { |
|
| 39 | + return array_map('protege_champ', $texte); |
|
| 40 | + } elseif ($texte === null) { |
|
| 41 | + return $texte; |
|
| 42 | + } elseif (is_bool($texte)) { |
|
| 43 | + return $texte ? '1' : ''; |
|
| 44 | + } elseif (is_string($texte) and $texte) { |
|
| 45 | + if (preg_match(',^[abis]:\d+[:;],', $texte) and @unserialize($texte) !== false) { |
|
| 46 | + // ne pas corrompre une valeur serialize |
|
| 47 | + return $texte; |
|
| 48 | + } elseif (strpbrk($texte, "&\"'<>") !== false) { |
|
| 49 | + return spip_htmlspecialchars($texte, ENT_QUOTES); |
|
| 50 | + } |
|
| 51 | + } |
|
| 52 | + |
|
| 53 | + return $texte; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -64,17 +64,17 @@ discard block |
||
| 64 | 64 | * - false : pas de squelette trouvé |
| 65 | 65 | **/ |
| 66 | 66 | function existe_formulaire($form) { |
| 67 | - if (substr($form, 0, 11) == 'FORMULAIRE_') { |
|
| 68 | - $form = strtolower(substr($form, 11)); |
|
| 69 | - } else { |
|
| 70 | - $form = strtolower($form); |
|
| 71 | - } |
|
| 67 | + if (substr($form, 0, 11) == 'FORMULAIRE_') { |
|
| 68 | + $form = strtolower(substr($form, 11)); |
|
| 69 | + } else { |
|
| 70 | + $form = strtolower($form); |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - if (!$form) { |
|
| 74 | - return ''; |
|
| 75 | - } // on ne sait pas, le nom du formulaire n'est pas fourni ici |
|
| 73 | + if (!$form) { |
|
| 74 | + return ''; |
|
| 75 | + } // on ne sait pas, le nom du formulaire n'est pas fourni ici |
|
| 76 | 76 | |
| 77 | - return trouver_fond($form, 'formulaires/') ? $form : false; |
|
| 77 | + return trouver_fond($form, 'formulaires/') ? $form : false; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -83,31 +83,31 @@ discard block |
||
| 83 | 83 | * @return false|array |
| 84 | 84 | */ |
| 85 | 85 | function test_formulaire_inclus_par_modele() { |
| 86 | - $trace = debug_backtrace(0, 20); |
|
| 87 | - $trace_fonctions = array_column($trace, 'function'); |
|
| 88 | - $trace_fonctions = array_map('strtolower', $trace_fonctions); |
|
| 89 | - |
|
| 90 | - // regarder si un flag a ete leve juste avant l'appel de balise_FORMULAIRE_dyn |
|
| 91 | - if ( |
|
| 92 | - function_exists('arguments_balise_dyn_depuis_modele') |
|
| 93 | - and $form = arguments_balise_dyn_depuis_modele(null, 'read') |
|
| 94 | - ) { |
|
| 95 | - if (in_array('balise_formulaire__dyn', $trace_fonctions)) { |
|
| 96 | - $k = array_search('balise_formulaire__dyn', $trace_fonctions); |
|
| 97 | - if ($trace[$k]['args'][0] === $form) { |
|
| 98 | - return $trace[$k]['args']; |
|
| 99 | - } |
|
| 100 | - } |
|
| 101 | - } |
|
| 102 | - |
|
| 103 | - // fallback qui ne repose pas sur le flag lie a l'analyse de contexte_compil, |
|
| 104 | - // mais ne marche pas si executer_balise_dynamique est appelee via du php dans le squelette |
|
| 105 | - if (in_array('eval', $trace_fonctions) and in_array('inclure_modele', $trace_fonctions)) { |
|
| 106 | - $k = array_search('inclure_modele', $trace_fonctions); |
|
| 107 | - // les arguments de recuperer_fond() passes par inclure_modele() |
|
| 108 | - return $trace[$k - 1]['args'][1]['args']; |
|
| 109 | - } |
|
| 110 | - return false; |
|
| 86 | + $trace = debug_backtrace(0, 20); |
|
| 87 | + $trace_fonctions = array_column($trace, 'function'); |
|
| 88 | + $trace_fonctions = array_map('strtolower', $trace_fonctions); |
|
| 89 | + |
|
| 90 | + // regarder si un flag a ete leve juste avant l'appel de balise_FORMULAIRE_dyn |
|
| 91 | + if ( |
|
| 92 | + function_exists('arguments_balise_dyn_depuis_modele') |
|
| 93 | + and $form = arguments_balise_dyn_depuis_modele(null, 'read') |
|
| 94 | + ) { |
|
| 95 | + if (in_array('balise_formulaire__dyn', $trace_fonctions)) { |
|
| 96 | + $k = array_search('balise_formulaire__dyn', $trace_fonctions); |
|
| 97 | + if ($trace[$k]['args'][0] === $form) { |
|
| 98 | + return $trace[$k]['args']; |
|
| 99 | + } |
|
| 100 | + } |
|
| 101 | + } |
|
| 102 | + |
|
| 103 | + // fallback qui ne repose pas sur le flag lie a l'analyse de contexte_compil, |
|
| 104 | + // mais ne marche pas si executer_balise_dynamique est appelee via du php dans le squelette |
|
| 105 | + if (in_array('eval', $trace_fonctions) and in_array('inclure_modele', $trace_fonctions)) { |
|
| 106 | + $k = array_search('inclure_modele', $trace_fonctions); |
|
| 107 | + // les arguments de recuperer_fond() passes par inclure_modele() |
|
| 108 | + return $trace[$k - 1]['args'][1]['args']; |
|
| 109 | + } |
|
| 110 | + return false; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -122,19 +122,19 @@ discard block |
||
| 122 | 122 | **/ |
| 123 | 123 | function balise_FORMULAIRE__dist($p) { |
| 124 | 124 | |
| 125 | - // Cas d'un #FORMULAIRE_TOTO inexistant : renvoyer la chaine vide. |
|
| 126 | - // mais si #FORMULAIRE_{toto} on ne peut pas savoir a la compilation, continuer |
|
| 127 | - if (existe_formulaire($p->nom_champ) === false) { |
|
| 128 | - $p->code = "''"; |
|
| 129 | - $p->interdire_scripts = false; |
|
| 125 | + // Cas d'un #FORMULAIRE_TOTO inexistant : renvoyer la chaine vide. |
|
| 126 | + // mais si #FORMULAIRE_{toto} on ne peut pas savoir a la compilation, continuer |
|
| 127 | + if (existe_formulaire($p->nom_champ) === false) { |
|
| 128 | + $p->code = "''"; |
|
| 129 | + $p->interdire_scripts = false; |
|
| 130 | 130 | |
| 131 | - return $p; |
|
| 132 | - } |
|
| 131 | + return $p; |
|
| 132 | + } |
|
| 133 | 133 | |
| 134 | - // sinon renvoyer un code php dynamique |
|
| 135 | - $p = calculer_balise_dynamique($p, $p->nom_champ, []); |
|
| 134 | + // sinon renvoyer un code php dynamique |
|
| 135 | + $p = calculer_balise_dynamique($p, $p->nom_champ, []); |
|
| 136 | 136 | |
| 137 | - return $p; |
|
| 137 | + return $p; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
@@ -154,17 +154,17 @@ discard block |
||
| 154 | 154 | * - string : texte à afficher directement |
| 155 | 155 | */ |
| 156 | 156 | function balise_FORMULAIRE__dyn($form, ...$args) { |
| 157 | - $form = existe_formulaire($form); |
|
| 158 | - if (!$form) { |
|
| 159 | - return ''; |
|
| 160 | - } |
|
| 157 | + $form = existe_formulaire($form); |
|
| 158 | + if (!$form) { |
|
| 159 | + return ''; |
|
| 160 | + } |
|
| 161 | 161 | |
| 162 | - $contexte = balise_FORMULAIRE__contexte($form, $args); |
|
| 163 | - if (!is_array($contexte)) { |
|
| 164 | - return $contexte; |
|
| 165 | - } |
|
| 162 | + $contexte = balise_FORMULAIRE__contexte($form, $args); |
|
| 163 | + if (!is_array($contexte)) { |
|
| 164 | + return $contexte; |
|
| 165 | + } |
|
| 166 | 166 | |
| 167 | - return ["formulaires/$form", 3600, $contexte]; |
|
| 167 | + return ["formulaires/$form", 3600, $contexte]; |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -179,85 +179,85 @@ discard block |
||
| 179 | 179 | * string: Formulaire non applicable (message d’explication) |
| 180 | 180 | **/ |
| 181 | 181 | function balise_FORMULAIRE__contexte($form, $args) { |
| 182 | - // tester si ce formulaire vient d'etre poste (memes arguments) |
|
| 183 | - // pour ne pas confondre 2 #FORMULAIRES_XX identiques sur une meme page |
|
| 184 | - // si poste, on recupere les erreurs |
|
| 185 | - |
|
| 186 | - $je_suis_poste = false; |
|
| 187 | - if ( |
|
| 188 | - $post_form = _request('formulaire_action') |
|
| 189 | - and $post_form == $form |
|
| 190 | - and $p = _request('formulaire_action_args') |
|
| 191 | - and is_array($p = decoder_contexte_ajax($p, $post_form)) |
|
| 192 | - ) { |
|
| 193 | - // enlever le faux attribut de langue masque |
|
| 194 | - array_shift($p); |
|
| 195 | - if (formulaire__identifier($form, $args, $p)) { |
|
| 196 | - $je_suis_poste = true; |
|
| 197 | - } |
|
| 198 | - } |
|
| 199 | - |
|
| 200 | - $editable = true; |
|
| 201 | - $erreurs = $post = []; |
|
| 202 | - if ($je_suis_poste) { |
|
| 203 | - $post = traiter_formulaires_dynamiques(true); |
|
| 204 | - $e = "erreurs_$form"; |
|
| 205 | - $erreurs = $post[$e] ?? []; |
|
| 206 | - $editable = "editable_$form"; |
|
| 207 | - $editable = (!isset($post[$e])) |
|
| 208 | - || (is_countable($erreurs) ? count($erreurs) : 0) |
|
| 209 | - || (isset($post[$editable]) && $post[$editable]); |
|
| 210 | - } |
|
| 211 | - |
|
| 212 | - $valeurs = formulaire__charger($form, $args, $je_suis_poste); |
|
| 213 | - |
|
| 214 | - // si $valeurs n'est pas un tableau, le formulaire n'est pas applicable |
|
| 215 | - // C'est plus fort qu'editable qui est gere par le squelette |
|
| 216 | - // Idealement $valeur doit etre alors un message explicatif. |
|
| 217 | - if (!is_array($valeurs)) { |
|
| 218 | - return is_string($valeurs) ? $valeurs : ''; |
|
| 219 | - } |
|
| 220 | - |
|
| 221 | - // charger peut passer une action si le formulaire ne tourne pas sur self() |
|
| 222 | - // ou une action vide si elle ne sert pas |
|
| 223 | - $action = $valeurs['action'] ?? self('&', true); |
|
| 224 | - // bug IEx : si action finit par / |
|
| 225 | - // IE croit que le <form ... action=../ > est autoferme |
|
| 226 | - if (substr($action, -1) == '/') { |
|
| 227 | - // on ajoute une ancre pour feinter IE, au pire ca tue l'ancre qui finit par un / |
|
| 228 | - $action .= '#'; |
|
| 229 | - } |
|
| 230 | - |
|
| 231 | - // recuperer la saisie en cours si erreurs |
|
| 232 | - // seulement si c'est ce formulaire qui est poste |
|
| 233 | - // ou si on le demande explicitement par le parametre _forcer_request = true |
|
| 234 | - $dispo = ($je_suis_poste || (isset($valeurs['_forcer_request']) && $valeurs['_forcer_request'])); |
|
| 235 | - foreach (array_keys($valeurs) as $champ) { |
|
| 236 | - if ($champ[0] !== '_' and !in_array($champ, ['message_ok', 'message_erreur', 'editable'])) { |
|
| 237 | - if ($dispo and (($v = _request($champ)) !== null)) { |
|
| 238 | - $valeurs[$champ] = $v; |
|
| 239 | - } |
|
| 240 | - // nettoyer l'url des champs qui vont etre saisis |
|
| 241 | - if ($action) { |
|
| 242 | - $action = parametre_url($action, $champ, ''); |
|
| 243 | - } |
|
| 244 | - // proteger les ' et les " dans les champs que l'on va injecter |
|
| 245 | - $valeurs[$champ] = protege_champ($valeurs[$champ]); |
|
| 246 | - } |
|
| 247 | - } |
|
| 248 | - |
|
| 249 | - if ($action) { |
|
| 250 | - // nettoyer l'url |
|
| 251 | - $action = parametre_url($action, 'formulaire_action', ''); |
|
| 252 | - $action = parametre_url($action, 'formulaire_action_args', ''); |
|
| 253 | - $action = parametre_url($action, 'formulaire_action_sign', ''); |
|
| 254 | - } |
|
| 255 | - |
|
| 256 | - /** |
|
| 257 | - * @deprecated 4.0 |
|
| 258 | - * servait pour poster sur les actions de type editer_xxx() qui ne prenaient pas d'argument autrement que par _request('arg') et pour lesquelles il fallait donc passer un hash valide |
|
| 259 | - */ |
|
| 260 | - /* |
|
| 182 | + // tester si ce formulaire vient d'etre poste (memes arguments) |
|
| 183 | + // pour ne pas confondre 2 #FORMULAIRES_XX identiques sur une meme page |
|
| 184 | + // si poste, on recupere les erreurs |
|
| 185 | + |
|
| 186 | + $je_suis_poste = false; |
|
| 187 | + if ( |
|
| 188 | + $post_form = _request('formulaire_action') |
|
| 189 | + and $post_form == $form |
|
| 190 | + and $p = _request('formulaire_action_args') |
|
| 191 | + and is_array($p = decoder_contexte_ajax($p, $post_form)) |
|
| 192 | + ) { |
|
| 193 | + // enlever le faux attribut de langue masque |
|
| 194 | + array_shift($p); |
|
| 195 | + if (formulaire__identifier($form, $args, $p)) { |
|
| 196 | + $je_suis_poste = true; |
|
| 197 | + } |
|
| 198 | + } |
|
| 199 | + |
|
| 200 | + $editable = true; |
|
| 201 | + $erreurs = $post = []; |
|
| 202 | + if ($je_suis_poste) { |
|
| 203 | + $post = traiter_formulaires_dynamiques(true); |
|
| 204 | + $e = "erreurs_$form"; |
|
| 205 | + $erreurs = $post[$e] ?? []; |
|
| 206 | + $editable = "editable_$form"; |
|
| 207 | + $editable = (!isset($post[$e])) |
|
| 208 | + || (is_countable($erreurs) ? count($erreurs) : 0) |
|
| 209 | + || (isset($post[$editable]) && $post[$editable]); |
|
| 210 | + } |
|
| 211 | + |
|
| 212 | + $valeurs = formulaire__charger($form, $args, $je_suis_poste); |
|
| 213 | + |
|
| 214 | + // si $valeurs n'est pas un tableau, le formulaire n'est pas applicable |
|
| 215 | + // C'est plus fort qu'editable qui est gere par le squelette |
|
| 216 | + // Idealement $valeur doit etre alors un message explicatif. |
|
| 217 | + if (!is_array($valeurs)) { |
|
| 218 | + return is_string($valeurs) ? $valeurs : ''; |
|
| 219 | + } |
|
| 220 | + |
|
| 221 | + // charger peut passer une action si le formulaire ne tourne pas sur self() |
|
| 222 | + // ou une action vide si elle ne sert pas |
|
| 223 | + $action = $valeurs['action'] ?? self('&', true); |
|
| 224 | + // bug IEx : si action finit par / |
|
| 225 | + // IE croit que le <form ... action=../ > est autoferme |
|
| 226 | + if (substr($action, -1) == '/') { |
|
| 227 | + // on ajoute une ancre pour feinter IE, au pire ca tue l'ancre qui finit par un / |
|
| 228 | + $action .= '#'; |
|
| 229 | + } |
|
| 230 | + |
|
| 231 | + // recuperer la saisie en cours si erreurs |
|
| 232 | + // seulement si c'est ce formulaire qui est poste |
|
| 233 | + // ou si on le demande explicitement par le parametre _forcer_request = true |
|
| 234 | + $dispo = ($je_suis_poste || (isset($valeurs['_forcer_request']) && $valeurs['_forcer_request'])); |
|
| 235 | + foreach (array_keys($valeurs) as $champ) { |
|
| 236 | + if ($champ[0] !== '_' and !in_array($champ, ['message_ok', 'message_erreur', 'editable'])) { |
|
| 237 | + if ($dispo and (($v = _request($champ)) !== null)) { |
|
| 238 | + $valeurs[$champ] = $v; |
|
| 239 | + } |
|
| 240 | + // nettoyer l'url des champs qui vont etre saisis |
|
| 241 | + if ($action) { |
|
| 242 | + $action = parametre_url($action, $champ, ''); |
|
| 243 | + } |
|
| 244 | + // proteger les ' et les " dans les champs que l'on va injecter |
|
| 245 | + $valeurs[$champ] = protege_champ($valeurs[$champ]); |
|
| 246 | + } |
|
| 247 | + } |
|
| 248 | + |
|
| 249 | + if ($action) { |
|
| 250 | + // nettoyer l'url |
|
| 251 | + $action = parametre_url($action, 'formulaire_action', ''); |
|
| 252 | + $action = parametre_url($action, 'formulaire_action_args', ''); |
|
| 253 | + $action = parametre_url($action, 'formulaire_action_sign', ''); |
|
| 254 | + } |
|
| 255 | + |
|
| 256 | + /** |
|
| 257 | + * @deprecated 4.0 |
|
| 258 | + * servait pour poster sur les actions de type editer_xxx() qui ne prenaient pas d'argument autrement que par _request('arg') et pour lesquelles il fallait donc passer un hash valide |
|
| 259 | + */ |
|
| 260 | + /* |
|
| 261 | 261 | if (isset($valeurs['_action'])) { |
| 262 | 262 | $securiser_action = charger_fonction('securiser_action', 'inc'); |
| 263 | 263 | $secu = $securiser_action(reset($valeurs['_action']), end($valeurs['_action']), '', -1); |
@@ -267,59 +267,59 @@ discard block |
||
| 267 | 267 | } |
| 268 | 268 | */ |
| 269 | 269 | |
| 270 | - // empiler la lang en tant que premier argument implicite du CVT |
|
| 271 | - // pour permettre de la restaurer au moment du Verifier et du Traiter |
|
| 272 | - array_unshift($args, $GLOBALS['spip_lang']); |
|
| 273 | - |
|
| 274 | - $valeurs['formulaire_args'] = encoder_contexte_ajax($args, $form); |
|
| 275 | - $valeurs['erreurs'] = $erreurs; |
|
| 276 | - $valeurs['action'] = $action; |
|
| 277 | - $valeurs['form'] = $form; |
|
| 278 | - |
|
| 279 | - $valeurs['formulaire_sign'] = ''; |
|
| 280 | - if (!empty($GLOBALS['visiteur_session']['id_auteur'])) { |
|
| 281 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 282 | - $secu = $securiser_action($valeurs['form'], $valeurs['formulaire_args'], '', -1); |
|
| 283 | - $valeurs['formulaire_sign'] = $secu['hash']; |
|
| 284 | - } |
|
| 285 | - |
|
| 286 | - if (!isset($valeurs['id'])) { |
|
| 287 | - $valeurs['id'] = 'new'; |
|
| 288 | - } |
|
| 289 | - // editable peut venir de charger() ou de traiter() sinon |
|
| 290 | - if (!isset($valeurs['editable'])) { |
|
| 291 | - $valeurs['editable'] = $editable; |
|
| 292 | - } |
|
| 293 | - // dans tous les cas, renvoyer un espace ou vide (et pas un booleen) |
|
| 294 | - $valeurs['editable'] = ($valeurs['editable'] ? ' ' : ''); |
|
| 295 | - |
|
| 296 | - if ($je_suis_poste) { |
|
| 297 | - $valeurs['message_erreur'] = ''; |
|
| 298 | - if (isset($erreurs['message_erreur'])) { |
|
| 299 | - $valeurs['message_erreur'] = $erreurs['message_erreur']; |
|
| 300 | - } |
|
| 301 | - |
|
| 302 | - $valeurs['message_ok'] = ''; |
|
| 303 | - if (isset($post["message_ok_$form"])) { |
|
| 304 | - $valeurs['message_ok'] = $post["message_ok_$form"]; |
|
| 305 | - } elseif (isset($erreurs['message_ok'])) { |
|
| 306 | - $valeurs['message_ok'] = $erreurs['message_ok']; |
|
| 307 | - } |
|
| 308 | - |
|
| 309 | - // accessibilite : encapsuler toutes les erreurs dans un role='alert' |
|
| 310 | - // uniquement si c'est une string et au premier niveau (on ne touche pas au tableaux) |
|
| 311 | - // et si $k ne commence pas par un _ (c'est bien une vrai erreur sur un vrai champ) |
|
| 312 | - if (html5_permis()) { |
|
| 313 | - foreach ($erreurs as $k => $v) { |
|
| 314 | - if (is_string($v) and strlen(trim($v)) and strpos($k, '_') !== 0) { |
|
| 315 | - // on encapsule dans un span car ces messages sont en general simple, juste du texte, et deja dans un span dans le form |
|
| 316 | - $valeurs['erreurs'][$k] = "<span role='alert'>" . $erreurs[$k] . '</span>'; |
|
| 317 | - } |
|
| 318 | - } |
|
| 319 | - } |
|
| 320 | - } |
|
| 321 | - |
|
| 322 | - return $valeurs; |
|
| 270 | + // empiler la lang en tant que premier argument implicite du CVT |
|
| 271 | + // pour permettre de la restaurer au moment du Verifier et du Traiter |
|
| 272 | + array_unshift($args, $GLOBALS['spip_lang']); |
|
| 273 | + |
|
| 274 | + $valeurs['formulaire_args'] = encoder_contexte_ajax($args, $form); |
|
| 275 | + $valeurs['erreurs'] = $erreurs; |
|
| 276 | + $valeurs['action'] = $action; |
|
| 277 | + $valeurs['form'] = $form; |
|
| 278 | + |
|
| 279 | + $valeurs['formulaire_sign'] = ''; |
|
| 280 | + if (!empty($GLOBALS['visiteur_session']['id_auteur'])) { |
|
| 281 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 282 | + $secu = $securiser_action($valeurs['form'], $valeurs['formulaire_args'], '', -1); |
|
| 283 | + $valeurs['formulaire_sign'] = $secu['hash']; |
|
| 284 | + } |
|
| 285 | + |
|
| 286 | + if (!isset($valeurs['id'])) { |
|
| 287 | + $valeurs['id'] = 'new'; |
|
| 288 | + } |
|
| 289 | + // editable peut venir de charger() ou de traiter() sinon |
|
| 290 | + if (!isset($valeurs['editable'])) { |
|
| 291 | + $valeurs['editable'] = $editable; |
|
| 292 | + } |
|
| 293 | + // dans tous les cas, renvoyer un espace ou vide (et pas un booleen) |
|
| 294 | + $valeurs['editable'] = ($valeurs['editable'] ? ' ' : ''); |
|
| 295 | + |
|
| 296 | + if ($je_suis_poste) { |
|
| 297 | + $valeurs['message_erreur'] = ''; |
|
| 298 | + if (isset($erreurs['message_erreur'])) { |
|
| 299 | + $valeurs['message_erreur'] = $erreurs['message_erreur']; |
|
| 300 | + } |
|
| 301 | + |
|
| 302 | + $valeurs['message_ok'] = ''; |
|
| 303 | + if (isset($post["message_ok_$form"])) { |
|
| 304 | + $valeurs['message_ok'] = $post["message_ok_$form"]; |
|
| 305 | + } elseif (isset($erreurs['message_ok'])) { |
|
| 306 | + $valeurs['message_ok'] = $erreurs['message_ok']; |
|
| 307 | + } |
|
| 308 | + |
|
| 309 | + // accessibilite : encapsuler toutes les erreurs dans un role='alert' |
|
| 310 | + // uniquement si c'est une string et au premier niveau (on ne touche pas au tableaux) |
|
| 311 | + // et si $k ne commence pas par un _ (c'est bien une vrai erreur sur un vrai champ) |
|
| 312 | + if (html5_permis()) { |
|
| 313 | + foreach ($erreurs as $k => $v) { |
|
| 314 | + if (is_string($v) and strlen(trim($v)) and strpos($k, '_') !== 0) { |
|
| 315 | + // on encapsule dans un span car ces messages sont en general simple, juste du texte, et deja dans un span dans le form |
|
| 316 | + $valeurs['erreurs'][$k] = "<span role='alert'>" . $erreurs[$k] . '</span>'; |
|
| 317 | + } |
|
| 318 | + } |
|
| 319 | + } |
|
| 320 | + } |
|
| 321 | + |
|
| 322 | + return $valeurs; |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | /** |
@@ -331,51 +331,51 @@ discard block |
||
| 331 | 331 | * @return array |
| 332 | 332 | */ |
| 333 | 333 | function formulaire__charger($form, $args, $poste) { |
| 334 | - if ($charger_valeurs = charger_fonction('charger', "formulaires/$form", true)) { |
|
| 335 | - $valeurs = $charger_valeurs(...$args); |
|
| 336 | - } else { |
|
| 337 | - $valeurs = []; |
|
| 338 | - } |
|
| 339 | - |
|
| 340 | - $valeurs = pipeline( |
|
| 341 | - 'formulaire_charger', |
|
| 342 | - [ |
|
| 343 | - 'args' => ['form' => $form, 'args' => $args, 'je_suis_poste' => $poste], |
|
| 344 | - 'data' => $valeurs |
|
| 345 | - ] |
|
| 346 | - ); |
|
| 347 | - |
|
| 348 | - // prise en charge CVT multi etape |
|
| 349 | - if (is_array($valeurs) and isset($valeurs['_etapes'])) { |
|
| 350 | - include_spip('inc/cvt_multietapes'); |
|
| 351 | - $valeurs = cvtmulti_formulaire_charger_etapes( |
|
| 352 | - ['form' => $form, 'args' => $args, 'je_suis_poste' => $poste], |
|
| 353 | - $valeurs |
|
| 354 | - ); |
|
| 355 | - } |
|
| 356 | - |
|
| 357 | - // si $valeurs et false ou une chaine, pas de formulaire, donc pas de pipeline ! |
|
| 358 | - if (is_array($valeurs)) { |
|
| 359 | - if (!isset($valeurs['_pipelines'])) { |
|
| 360 | - $valeurs['_pipelines'] = []; |
|
| 361 | - } |
|
| 362 | - // l'ancien argument _pipeline devient maintenant _pipelines |
|
| 363 | - // reinjectons le vieux _pipeline au debut de _pipelines |
|
| 364 | - if (isset($valeurs['_pipeline'])) { |
|
| 365 | - $pipe = is_array($valeurs['_pipeline']) ? reset($valeurs['_pipeline']) : $valeurs['_pipeline']; |
|
| 366 | - $args = is_array($valeurs['_pipeline']) ? end($valeurs['_pipeline']) : []; |
|
| 367 | - |
|
| 368 | - $pipelines = [$pipe => $args]; |
|
| 369 | - $valeurs['_pipelines'] = array_merge($pipelines, $valeurs['_pipelines']); |
|
| 370 | - } |
|
| 371 | - |
|
| 372 | - // et enfin, ajoutons systematiquement un pipeline sur le squelette du formulaire |
|
| 373 | - // qui constitue le cas le plus courant d'utilisation du pipeline recuperer_fond |
|
| 374 | - // (performance, cela evite de s'injecter dans recuperer_fond utilise pour *tous* les squelettes) |
|
| 375 | - $valeurs['_pipelines']['formulaire_fond'] = ['form' => $form, 'args' => $args, 'je_suis_poste' => $poste]; |
|
| 376 | - } |
|
| 377 | - |
|
| 378 | - return $valeurs; |
|
| 334 | + if ($charger_valeurs = charger_fonction('charger', "formulaires/$form", true)) { |
|
| 335 | + $valeurs = $charger_valeurs(...$args); |
|
| 336 | + } else { |
|
| 337 | + $valeurs = []; |
|
| 338 | + } |
|
| 339 | + |
|
| 340 | + $valeurs = pipeline( |
|
| 341 | + 'formulaire_charger', |
|
| 342 | + [ |
|
| 343 | + 'args' => ['form' => $form, 'args' => $args, 'je_suis_poste' => $poste], |
|
| 344 | + 'data' => $valeurs |
|
| 345 | + ] |
|
| 346 | + ); |
|
| 347 | + |
|
| 348 | + // prise en charge CVT multi etape |
|
| 349 | + if (is_array($valeurs) and isset($valeurs['_etapes'])) { |
|
| 350 | + include_spip('inc/cvt_multietapes'); |
|
| 351 | + $valeurs = cvtmulti_formulaire_charger_etapes( |
|
| 352 | + ['form' => $form, 'args' => $args, 'je_suis_poste' => $poste], |
|
| 353 | + $valeurs |
|
| 354 | + ); |
|
| 355 | + } |
|
| 356 | + |
|
| 357 | + // si $valeurs et false ou une chaine, pas de formulaire, donc pas de pipeline ! |
|
| 358 | + if (is_array($valeurs)) { |
|
| 359 | + if (!isset($valeurs['_pipelines'])) { |
|
| 360 | + $valeurs['_pipelines'] = []; |
|
| 361 | + } |
|
| 362 | + // l'ancien argument _pipeline devient maintenant _pipelines |
|
| 363 | + // reinjectons le vieux _pipeline au debut de _pipelines |
|
| 364 | + if (isset($valeurs['_pipeline'])) { |
|
| 365 | + $pipe = is_array($valeurs['_pipeline']) ? reset($valeurs['_pipeline']) : $valeurs['_pipeline']; |
|
| 366 | + $args = is_array($valeurs['_pipeline']) ? end($valeurs['_pipeline']) : []; |
|
| 367 | + |
|
| 368 | + $pipelines = [$pipe => $args]; |
|
| 369 | + $valeurs['_pipelines'] = array_merge($pipelines, $valeurs['_pipelines']); |
|
| 370 | + } |
|
| 371 | + |
|
| 372 | + // et enfin, ajoutons systematiquement un pipeline sur le squelette du formulaire |
|
| 373 | + // qui constitue le cas le plus courant d'utilisation du pipeline recuperer_fond |
|
| 374 | + // (performance, cela evite de s'injecter dans recuperer_fond utilise pour *tous* les squelettes) |
|
| 375 | + $valeurs['_pipelines']['formulaire_fond'] = ['form' => $form, 'args' => $args, 'je_suis_poste' => $poste]; |
|
| 376 | + } |
|
| 377 | + |
|
| 378 | + return $valeurs; |
|
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | /** |
@@ -394,9 +394,9 @@ discard block |
||
| 394 | 394 | * @return bool |
| 395 | 395 | */ |
| 396 | 396 | function formulaire__identifier($form, $args, $p) { |
| 397 | - if ($identifier_args = charger_fonction('identifier', "formulaires/$form", true)) { |
|
| 398 | - return $identifier_args(...$args) === $identifier_args(...$p); |
|
| 399 | - } |
|
| 397 | + if ($identifier_args = charger_fonction('identifier', "formulaires/$form", true)) { |
|
| 398 | + return $identifier_args(...$args) === $identifier_args(...$p); |
|
| 399 | + } |
|
| 400 | 400 | |
| 401 | - return $args === $p; |
|
| 401 | + return $args === $p; |
|
| 402 | 402 | } |
@@ -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 | |
@@ -30,36 +30,36 @@ discard block |
||
| 30 | 30 | * `on` ou `off` |
| 31 | 31 | */ |
| 32 | 32 | function logo_supprimer($objet, $id_objet, $etat) { |
| 33 | - $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 34 | - $objet = objet_type($objet); |
|
| 35 | - $primary = id_table_objet($objet); |
|
| 36 | - include_spip('inc/chercher_logo'); |
|
| 37 | - |
|
| 38 | - // existe-t-il deja un logo ? |
|
| 39 | - $logo = $chercher_logo($id_objet, $primary, $etat); |
|
| 40 | - if ($logo) { |
|
| 41 | - # TODO : deprecated, a supprimer -> anciens logos IMG/artonxx.png pas en base |
|
| 42 | - if ((is_countable($logo) ? count($logo) : 0) < 6) { |
|
| 43 | - spip_log('Supprimer ancien logo ' . json_encode($logo, JSON_THROW_ON_ERROR), 'logo'); |
|
| 44 | - spip_unlink($logo[0]); |
|
| 45 | - } |
|
| 46 | - elseif ( |
|
| 47 | - $doc = $logo[5] |
|
| 48 | - and isset($doc['id_document']) |
|
| 49 | - and $id_document = $doc['id_document'] |
|
| 50 | - ) { |
|
| 51 | - include_spip('action/editer_liens'); |
|
| 52 | - // supprimer le lien dans la base |
|
| 53 | - objet_dissocier(['document' => $id_document], [$objet => $id_objet], ['role' => '*']); |
|
| 54 | - |
|
| 55 | - // verifier si il reste des liens avec d'autres objets et sinon supprimer |
|
| 56 | - $liens = objet_trouver_liens(['document' => $id_document], '*'); |
|
| 57 | - if (!count($liens)) { |
|
| 58 | - $supprimer_document = charger_fonction('supprimer_document', 'action'); |
|
| 59 | - $supprimer_document($doc['id_document']); |
|
| 60 | - } |
|
| 61 | - } |
|
| 62 | - } |
|
| 33 | + $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 34 | + $objet = objet_type($objet); |
|
| 35 | + $primary = id_table_objet($objet); |
|
| 36 | + include_spip('inc/chercher_logo'); |
|
| 37 | + |
|
| 38 | + // existe-t-il deja un logo ? |
|
| 39 | + $logo = $chercher_logo($id_objet, $primary, $etat); |
|
| 40 | + if ($logo) { |
|
| 41 | + # TODO : deprecated, a supprimer -> anciens logos IMG/artonxx.png pas en base |
|
| 42 | + if ((is_countable($logo) ? count($logo) : 0) < 6) { |
|
| 43 | + spip_log('Supprimer ancien logo ' . json_encode($logo, JSON_THROW_ON_ERROR), 'logo'); |
|
| 44 | + spip_unlink($logo[0]); |
|
| 45 | + } |
|
| 46 | + elseif ( |
|
| 47 | + $doc = $logo[5] |
|
| 48 | + and isset($doc['id_document']) |
|
| 49 | + and $id_document = $doc['id_document'] |
|
| 50 | + ) { |
|
| 51 | + include_spip('action/editer_liens'); |
|
| 52 | + // supprimer le lien dans la base |
|
| 53 | + objet_dissocier(['document' => $id_document], [$objet => $id_objet], ['role' => '*']); |
|
| 54 | + |
|
| 55 | + // verifier si il reste des liens avec d'autres objets et sinon supprimer |
|
| 56 | + $liens = objet_trouver_liens(['document' => $id_document], '*'); |
|
| 57 | + if (!count($liens)) { |
|
| 58 | + $supprimer_document = charger_fonction('supprimer_document', 'action'); |
|
| 59 | + $supprimer_document($doc['id_document']); |
|
| 60 | + } |
|
| 61 | + } |
|
| 62 | + } |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -76,200 +76,200 @@ discard block |
||
| 76 | 76 | * Erreur, sinon '' |
| 77 | 77 | */ |
| 78 | 78 | function logo_modifier($objet, $id_objet, $etat, $source) { |
| 79 | - $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 80 | - $objet = objet_type($objet); |
|
| 81 | - $primary = id_table_objet($objet); |
|
| 82 | - include_spip('inc/chercher_logo'); |
|
| 83 | - |
|
| 84 | - $mode = preg_replace(',\W,', '', $etat); |
|
| 85 | - if (!$mode) { |
|
| 86 | - spip_log("logo_modifier : etat $etat invalide", 'logo'); |
|
| 87 | - $erreur = 'etat invalide'; |
|
| 88 | - |
|
| 89 | - return $erreur; |
|
| 90 | - } |
|
| 91 | - // chercher dans la base |
|
| 92 | - $mode_document = 'logo' . $mode; |
|
| 93 | - |
|
| 94 | - include_spip('inc/documents'); |
|
| 95 | - $erreur = ''; |
|
| 96 | - |
|
| 97 | - if (!$source) { |
|
| 98 | - spip_log('spip_image_ajouter : source inconnue', 'logo'); |
|
| 99 | - $erreur = 'source inconnue'; |
|
| 100 | - |
|
| 101 | - return $erreur; |
|
| 102 | - } |
|
| 103 | - |
|
| 104 | - // fichier dans upload/ |
|
| 105 | - if (is_string($source)) { |
|
| 106 | - $tmp_name = false; |
|
| 107 | - if (file_exists($source)) { |
|
| 108 | - $tmp_name = $source; |
|
| 109 | - } elseif (file_exists($f = determine_upload() . $source)) { |
|
| 110 | - $tmp_name = $f; |
|
| 111 | - } |
|
| 112 | - if (!$tmp_name) { |
|
| 113 | - spip_log('spip_image_ajouter : source inconnue', 'logo'); |
|
| 114 | - $erreur = 'source inconnue'; |
|
| 115 | - |
|
| 116 | - return $erreur; |
|
| 117 | - } |
|
| 118 | - $source = [ |
|
| 119 | - 'tmp_name' => $tmp_name, |
|
| 120 | - 'name' => basename($tmp_name), |
|
| 121 | - ]; |
|
| 122 | - } elseif ($erreur = check_upload_error($source['error'], '', true)) { |
|
| 123 | - return $erreur; |
|
| 124 | - } |
|
| 125 | - |
|
| 126 | - // supprimer le logo eventueel existant |
|
| 127 | - // TODO : si un logo existe, le modifier plutot que supprimer + reinserer (mais il faut gerer le cas ou il est utilise par plusieurs objets, donc pas si simple) |
|
| 128 | - // mais de toute facon l'interface actuelle oblige a supprimer + reinserer |
|
| 129 | - if (empty($GLOBALS['logo_migrer_en_base'])) { |
|
| 130 | - logo_supprimer($objet, $id_objet, $etat); |
|
| 131 | - } |
|
| 132 | - |
|
| 133 | - |
|
| 134 | - include_spip('inc/autoriser'); |
|
| 135 | - $source['mode'] = $mode_document; |
|
| 136 | - $ajouter_documents = charger_fonction('ajouter_documents', 'action'); |
|
| 137 | - autoriser_exception('associerdocuments', $objet, $id_objet); |
|
| 138 | - $ajoutes = $ajouter_documents('new', [$source], $objet, $id_objet, $mode_document); |
|
| 139 | - autoriser_exception('associerdocuments', $objet, $id_objet, false); |
|
| 140 | - |
|
| 141 | - $id_document = reset($ajoutes); |
|
| 142 | - |
|
| 143 | - if (!is_numeric($id_document)) { |
|
| 144 | - $erreur = ($id_document ?: 'Erreur inconnue'); |
|
| 145 | - spip_log("Erreur ajout logo : $erreur pour source=" . json_encode($source, JSON_THROW_ON_ERROR), 'logo'); |
|
| 146 | - return $erreur; |
|
| 147 | - } |
|
| 148 | - |
|
| 149 | - return ''; // tout est bon, pas d'erreur |
|
| 79 | + $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 80 | + $objet = objet_type($objet); |
|
| 81 | + $primary = id_table_objet($objet); |
|
| 82 | + include_spip('inc/chercher_logo'); |
|
| 83 | + |
|
| 84 | + $mode = preg_replace(',\W,', '', $etat); |
|
| 85 | + if (!$mode) { |
|
| 86 | + spip_log("logo_modifier : etat $etat invalide", 'logo'); |
|
| 87 | + $erreur = 'etat invalide'; |
|
| 88 | + |
|
| 89 | + return $erreur; |
|
| 90 | + } |
|
| 91 | + // chercher dans la base |
|
| 92 | + $mode_document = 'logo' . $mode; |
|
| 93 | + |
|
| 94 | + include_spip('inc/documents'); |
|
| 95 | + $erreur = ''; |
|
| 96 | + |
|
| 97 | + if (!$source) { |
|
| 98 | + spip_log('spip_image_ajouter : source inconnue', 'logo'); |
|
| 99 | + $erreur = 'source inconnue'; |
|
| 100 | + |
|
| 101 | + return $erreur; |
|
| 102 | + } |
|
| 103 | + |
|
| 104 | + // fichier dans upload/ |
|
| 105 | + if (is_string($source)) { |
|
| 106 | + $tmp_name = false; |
|
| 107 | + if (file_exists($source)) { |
|
| 108 | + $tmp_name = $source; |
|
| 109 | + } elseif (file_exists($f = determine_upload() . $source)) { |
|
| 110 | + $tmp_name = $f; |
|
| 111 | + } |
|
| 112 | + if (!$tmp_name) { |
|
| 113 | + spip_log('spip_image_ajouter : source inconnue', 'logo'); |
|
| 114 | + $erreur = 'source inconnue'; |
|
| 115 | + |
|
| 116 | + return $erreur; |
|
| 117 | + } |
|
| 118 | + $source = [ |
|
| 119 | + 'tmp_name' => $tmp_name, |
|
| 120 | + 'name' => basename($tmp_name), |
|
| 121 | + ]; |
|
| 122 | + } elseif ($erreur = check_upload_error($source['error'], '', true)) { |
|
| 123 | + return $erreur; |
|
| 124 | + } |
|
| 125 | + |
|
| 126 | + // supprimer le logo eventueel existant |
|
| 127 | + // TODO : si un logo existe, le modifier plutot que supprimer + reinserer (mais il faut gerer le cas ou il est utilise par plusieurs objets, donc pas si simple) |
|
| 128 | + // mais de toute facon l'interface actuelle oblige a supprimer + reinserer |
|
| 129 | + if (empty($GLOBALS['logo_migrer_en_base'])) { |
|
| 130 | + logo_supprimer($objet, $id_objet, $etat); |
|
| 131 | + } |
|
| 132 | + |
|
| 133 | + |
|
| 134 | + include_spip('inc/autoriser'); |
|
| 135 | + $source['mode'] = $mode_document; |
|
| 136 | + $ajouter_documents = charger_fonction('ajouter_documents', 'action'); |
|
| 137 | + autoriser_exception('associerdocuments', $objet, $id_objet); |
|
| 138 | + $ajoutes = $ajouter_documents('new', [$source], $objet, $id_objet, $mode_document); |
|
| 139 | + autoriser_exception('associerdocuments', $objet, $id_objet, false); |
|
| 140 | + |
|
| 141 | + $id_document = reset($ajoutes); |
|
| 142 | + |
|
| 143 | + if (!is_numeric($id_document)) { |
|
| 144 | + $erreur = ($id_document ?: 'Erreur inconnue'); |
|
| 145 | + spip_log("Erreur ajout logo : $erreur pour source=" . json_encode($source, JSON_THROW_ON_ERROR), 'logo'); |
|
| 146 | + return $erreur; |
|
| 147 | + } |
|
| 148 | + |
|
| 149 | + return ''; // tout est bon, pas d'erreur |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | function logo_migrer_en_base($objet, $time_limit) { |
| 153 | 153 | |
| 154 | - $dir_logos_erreurs = sous_repertoire(_DIR_IMG, 'logo_erreurs'); |
|
| 155 | - $dir_logos = sous_repertoire(_DIR_IMG, 'logo'); |
|
| 156 | - $formats_logos = ['jpg', 'png', 'svg', 'gif']; |
|
| 157 | - if (isset($GLOBALS['formats_logos'])) { |
|
| 158 | - $formats_logos = $GLOBALS['formats_logos']; |
|
| 159 | - } |
|
| 160 | - |
|
| 161 | - |
|
| 162 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 163 | - $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 164 | - include_spip('inc/chercher_logo'); |
|
| 165 | - $_id_objet = id_table_objet($objet); |
|
| 166 | - $table = table_objet_sql($objet); |
|
| 167 | - $type = type_du_logo($_id_objet); |
|
| 168 | - $desc = $trouver_table($table); |
|
| 169 | - |
|
| 170 | - // on desactive les revisions |
|
| 171 | - $liste_objets_versionnes = $GLOBALS['meta']['objets_versions'] ?? ''; |
|
| 172 | - unset($GLOBALS['meta']['objets_versions']); |
|
| 173 | - // et le signalement des editions |
|
| 174 | - $articles_modif = $GLOBALS['meta']['articles_modif'] ?? ''; |
|
| 175 | - $GLOBALS['meta']['articles_modif'] = 'non'; |
|
| 176 | - |
|
| 177 | - foreach (['on', 'off'] as $mode) { |
|
| 178 | - $nom_base = $type . $mode; |
|
| 179 | - $dir = (defined('_DIR_LOGOS') ? _DIR_LOGOS : _DIR_IMG); |
|
| 180 | - |
|
| 181 | - $files = glob($dir . $nom_base . '*'); |
|
| 182 | - // est-ce que c'est une nouvelle tentative de migration ? |
|
| 183 | - // dans ce cas les logos sont deja dans IMG/logo/ |
|
| 184 | - if (!(is_countable($files) ? count($files) : 0)) { |
|
| 185 | - $files = glob($dir_logos . $nom_base . '*'); |
|
| 186 | - if (is_countable($files) ? count($files) : 0) { |
|
| 187 | - // mais il faut verifier si ils ont pas deja ete migres pour tout ou partie |
|
| 188 | - $filescheck = []; |
|
| 189 | - foreach ($files as $file) { |
|
| 190 | - $short = basename(dirname($file)) . DIRECTORY_SEPARATOR . basename($file); |
|
| 191 | - $filescheck[$short] = $file; |
|
| 192 | - } |
|
| 193 | - // trouver ceux deja migres |
|
| 194 | - $deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck)) . " AND mode LIKE 'logo%'"); |
|
| 195 | - if (is_countable($deja) ? count($deja) : 0) { |
|
| 196 | - $deja = array_column($deja, 'fichier'); |
|
| 197 | - $restant = array_diff(array_keys($filescheck), $deja); |
|
| 198 | - $files = []; |
|
| 199 | - if (count($restant)) { |
|
| 200 | - foreach ($restant as $r) { |
|
| 201 | - $files[] = $filescheck[$r]; |
|
| 202 | - } |
|
| 203 | - } |
|
| 204 | - } |
|
| 205 | - // et si il en reste on peut y aller... |
|
| 206 | - // mais il faut modifier $dir qui sert de base dans la suite |
|
| 207 | - if (is_countable($files) ? count($files) : 0) { |
|
| 208 | - $dir = $dir_logos; |
|
| 209 | - } |
|
| 210 | - } |
|
| 211 | - } |
|
| 212 | - |
|
| 213 | - $count = (is_countable($files) ? count($files) : 0); |
|
| 214 | - spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE); |
|
| 215 | - |
|
| 216 | - $deja = []; |
|
| 217 | - foreach ($files as $file) { |
|
| 218 | - $logo = substr($file, strlen($dir . $nom_base)); |
|
| 219 | - $logo = explode('.', $logo); |
|
| 220 | - if ( |
|
| 221 | - is_numeric($logo[0]) |
|
| 222 | - and ($id_objet = intval($logo[0]) or in_array($objet, ['site', 'rubrique'])) |
|
| 223 | - ) { |
|
| 224 | - if (!isset($deja[$id_objet])) { |
|
| 225 | - $logo = $chercher_logo($id_objet, $_id_objet, $mode); |
|
| 226 | - // if no logo in base |
|
| 227 | - if (!$logo or (is_countable($logo) ? count($logo) : 0) < 6) { |
|
| 228 | - foreach ($formats_logos as $format) { |
|
| 229 | - if (@file_exists($d = ($dir . ($nom = $nom_base . intval($id_objet) . '.' . $format)))) { |
|
| 230 | - if (isset($desc['field']['date_modif'])) { |
|
| 231 | - $date_modif = sql_getfetsel('date_modif', $table, "$_id_objet=$id_objet"); |
|
| 232 | - } else { |
|
| 233 | - $date_modif = null; |
|
| 234 | - } |
|
| 235 | - // s'assurer que le logo a les bon droits au passage (evite un echec en cas de sanitization d'un svg) |
|
| 236 | - @chmod($d, _SPIP_CHMOD & 0666); |
|
| 237 | - // logo_modifier commence par supprimer le logo existant, donc on le deplace pour pas le perdre |
|
| 238 | - @rename($d, $dir_logos . $nom); |
|
| 239 | - // et on le declare comme nouveau logo |
|
| 240 | - logo_modifier($objet, $id_objet, $mode, $dir_logos . $nom); |
|
| 241 | - if ($date_modif) { |
|
| 242 | - sql_updateq($table, ['date_modif' => $date_modif], "$_id_objet=$id_objet"); |
|
| 243 | - } |
|
| 244 | - break; |
|
| 245 | - } |
|
| 246 | - } |
|
| 247 | - } |
|
| 248 | - $deja[$id_objet] = true; |
|
| 249 | - } |
|
| 250 | - } |
|
| 251 | - // si le fichier est encore la on le move : rien a faire ici |
|
| 252 | - // (sauf si c'est une re-migration : il est deja dans logo/ donc il bouge pas) |
|
| 253 | - if ($dir !== $dir_logos and file_exists($file)) { |
|
| 254 | - @rename($file, $dir_logos_erreurs . basename($file)); |
|
| 255 | - } |
|
| 256 | - |
|
| 257 | - $count--; |
|
| 258 | - if ($count % 250 === 0) { |
|
| 259 | - spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE); |
|
| 260 | - } |
|
| 261 | - |
|
| 262 | - if ($time_limit and time() > $time_limit) { |
|
| 263 | - effacer_meta('drapeau_edition'); |
|
| 264 | - return; |
|
| 265 | - } |
|
| 266 | - } |
|
| 267 | - } |
|
| 268 | - |
|
| 269 | - if ($liste_objets_versionnes) { |
|
| 270 | - $GLOBALS['meta']['objets_versions'] = $liste_objets_versionnes; |
|
| 271 | - } |
|
| 272 | - $GLOBALS['meta']['articles_modif'] = $articles_modif; |
|
| 273 | - |
|
| 274 | - effacer_meta('drapeau_edition'); |
|
| 154 | + $dir_logos_erreurs = sous_repertoire(_DIR_IMG, 'logo_erreurs'); |
|
| 155 | + $dir_logos = sous_repertoire(_DIR_IMG, 'logo'); |
|
| 156 | + $formats_logos = ['jpg', 'png', 'svg', 'gif']; |
|
| 157 | + if (isset($GLOBALS['formats_logos'])) { |
|
| 158 | + $formats_logos = $GLOBALS['formats_logos']; |
|
| 159 | + } |
|
| 160 | + |
|
| 161 | + |
|
| 162 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 163 | + $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 164 | + include_spip('inc/chercher_logo'); |
|
| 165 | + $_id_objet = id_table_objet($objet); |
|
| 166 | + $table = table_objet_sql($objet); |
|
| 167 | + $type = type_du_logo($_id_objet); |
|
| 168 | + $desc = $trouver_table($table); |
|
| 169 | + |
|
| 170 | + // on desactive les revisions |
|
| 171 | + $liste_objets_versionnes = $GLOBALS['meta']['objets_versions'] ?? ''; |
|
| 172 | + unset($GLOBALS['meta']['objets_versions']); |
|
| 173 | + // et le signalement des editions |
|
| 174 | + $articles_modif = $GLOBALS['meta']['articles_modif'] ?? ''; |
|
| 175 | + $GLOBALS['meta']['articles_modif'] = 'non'; |
|
| 176 | + |
|
| 177 | + foreach (['on', 'off'] as $mode) { |
|
| 178 | + $nom_base = $type . $mode; |
|
| 179 | + $dir = (defined('_DIR_LOGOS') ? _DIR_LOGOS : _DIR_IMG); |
|
| 180 | + |
|
| 181 | + $files = glob($dir . $nom_base . '*'); |
|
| 182 | + // est-ce que c'est une nouvelle tentative de migration ? |
|
| 183 | + // dans ce cas les logos sont deja dans IMG/logo/ |
|
| 184 | + if (!(is_countable($files) ? count($files) : 0)) { |
|
| 185 | + $files = glob($dir_logos . $nom_base . '*'); |
|
| 186 | + if (is_countable($files) ? count($files) : 0) { |
|
| 187 | + // mais il faut verifier si ils ont pas deja ete migres pour tout ou partie |
|
| 188 | + $filescheck = []; |
|
| 189 | + foreach ($files as $file) { |
|
| 190 | + $short = basename(dirname($file)) . DIRECTORY_SEPARATOR . basename($file); |
|
| 191 | + $filescheck[$short] = $file; |
|
| 192 | + } |
|
| 193 | + // trouver ceux deja migres |
|
| 194 | + $deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck)) . " AND mode LIKE 'logo%'"); |
|
| 195 | + if (is_countable($deja) ? count($deja) : 0) { |
|
| 196 | + $deja = array_column($deja, 'fichier'); |
|
| 197 | + $restant = array_diff(array_keys($filescheck), $deja); |
|
| 198 | + $files = []; |
|
| 199 | + if (count($restant)) { |
|
| 200 | + foreach ($restant as $r) { |
|
| 201 | + $files[] = $filescheck[$r]; |
|
| 202 | + } |
|
| 203 | + } |
|
| 204 | + } |
|
| 205 | + // et si il en reste on peut y aller... |
|
| 206 | + // mais il faut modifier $dir qui sert de base dans la suite |
|
| 207 | + if (is_countable($files) ? count($files) : 0) { |
|
| 208 | + $dir = $dir_logos; |
|
| 209 | + } |
|
| 210 | + } |
|
| 211 | + } |
|
| 212 | + |
|
| 213 | + $count = (is_countable($files) ? count($files) : 0); |
|
| 214 | + spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE); |
|
| 215 | + |
|
| 216 | + $deja = []; |
|
| 217 | + foreach ($files as $file) { |
|
| 218 | + $logo = substr($file, strlen($dir . $nom_base)); |
|
| 219 | + $logo = explode('.', $logo); |
|
| 220 | + if ( |
|
| 221 | + is_numeric($logo[0]) |
|
| 222 | + and ($id_objet = intval($logo[0]) or in_array($objet, ['site', 'rubrique'])) |
|
| 223 | + ) { |
|
| 224 | + if (!isset($deja[$id_objet])) { |
|
| 225 | + $logo = $chercher_logo($id_objet, $_id_objet, $mode); |
|
| 226 | + // if no logo in base |
|
| 227 | + if (!$logo or (is_countable($logo) ? count($logo) : 0) < 6) { |
|
| 228 | + foreach ($formats_logos as $format) { |
|
| 229 | + if (@file_exists($d = ($dir . ($nom = $nom_base . intval($id_objet) . '.' . $format)))) { |
|
| 230 | + if (isset($desc['field']['date_modif'])) { |
|
| 231 | + $date_modif = sql_getfetsel('date_modif', $table, "$_id_objet=$id_objet"); |
|
| 232 | + } else { |
|
| 233 | + $date_modif = null; |
|
| 234 | + } |
|
| 235 | + // s'assurer que le logo a les bon droits au passage (evite un echec en cas de sanitization d'un svg) |
|
| 236 | + @chmod($d, _SPIP_CHMOD & 0666); |
|
| 237 | + // logo_modifier commence par supprimer le logo existant, donc on le deplace pour pas le perdre |
|
| 238 | + @rename($d, $dir_logos . $nom); |
|
| 239 | + // et on le declare comme nouveau logo |
|
| 240 | + logo_modifier($objet, $id_objet, $mode, $dir_logos . $nom); |
|
| 241 | + if ($date_modif) { |
|
| 242 | + sql_updateq($table, ['date_modif' => $date_modif], "$_id_objet=$id_objet"); |
|
| 243 | + } |
|
| 244 | + break; |
|
| 245 | + } |
|
| 246 | + } |
|
| 247 | + } |
|
| 248 | + $deja[$id_objet] = true; |
|
| 249 | + } |
|
| 250 | + } |
|
| 251 | + // si le fichier est encore la on le move : rien a faire ici |
|
| 252 | + // (sauf si c'est une re-migration : il est deja dans logo/ donc il bouge pas) |
|
| 253 | + if ($dir !== $dir_logos and file_exists($file)) { |
|
| 254 | + @rename($file, $dir_logos_erreurs . basename($file)); |
|
| 255 | + } |
|
| 256 | + |
|
| 257 | + $count--; |
|
| 258 | + if ($count % 250 === 0) { |
|
| 259 | + spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE); |
|
| 260 | + } |
|
| 261 | + |
|
| 262 | + if ($time_limit and time() > $time_limit) { |
|
| 263 | + effacer_meta('drapeau_edition'); |
|
| 264 | + return; |
|
| 265 | + } |
|
| 266 | + } |
|
| 267 | + } |
|
| 268 | + |
|
| 269 | + if ($liste_objets_versionnes) { |
|
| 270 | + $GLOBALS['meta']['objets_versions'] = $liste_objets_versionnes; |
|
| 271 | + } |
|
| 272 | + $GLOBALS['meta']['articles_modif'] = $articles_modif; |
|
| 273 | + |
|
| 274 | + effacer_meta('drapeau_edition'); |
|
| 275 | 275 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Autorisations |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | include_spip('base/abstract_sql'); |
@@ -38,89 +38,89 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | if (!function_exists('autoriser')) { |
| 41 | - /** |
|
| 42 | - * Autoriser une action |
|
| 43 | - * |
|
| 44 | - * Teste si une personne (par défaut le visiteur en cours) peut effectuer |
|
| 45 | - * une certaine action. Cette fonction est le point d'entrée de toutes |
|
| 46 | - * les autorisations. |
|
| 47 | - * |
|
| 48 | - * La fonction se charge d'appeler des fonctions d'autorisations spécifiques |
|
| 49 | - * aux actions demandées si elles existent. Elle cherche donc les fonctions |
|
| 50 | - * dans cet ordre : |
|
| 51 | - * |
|
| 52 | - * - autoriser_{type}_{faire}, sinon avec _dist |
|
| 53 | - * - autoriser_{type}, sinon avec _dist |
|
| 54 | - * - autoriser_{faire}, sinon avec _dist |
|
| 55 | - * - autoriser_{defaut}, sinon avec _dist |
|
| 56 | - * |
|
| 57 | - * Seul le premier argument est obligatoire. |
|
| 58 | - * |
|
| 59 | - * @note |
|
| 60 | - * Le paramètre `$type` attend par défaut un type d'objet éditorial, et à ce titre, |
|
| 61 | - * la valeur transmise se verra appliquer la fonction 'objet_type' pour uniformiser |
|
| 62 | - * cette valeur. |
|
| 63 | - * |
|
| 64 | - * Si ce paramètre n'a rien n'a voir avec un objet éditorial, par exemple |
|
| 65 | - * 'statistiques', un souligné avant le terme est ajouté afin d'indiquer |
|
| 66 | - * explicitement à la fonction autoriser de ne pas transformer la chaîne en type |
|
| 67 | - * d'objet. Cela donne pour cet exemple : `autoriser('detruire', '_statistiques')` |
|
| 68 | - * |
|
| 69 | - * @note |
|
| 70 | - * Le paramètre `$type`, en plus de l'uniformisation en type d'objet, se voit retirer |
|
| 71 | - * tous les soulignés du terme. Ainsi le type d'objet `livre_art` deviendra `livreart` |
|
| 72 | - * et SPIP cherchera une fonction `autoriser_livreart_{faire}`. Ceci permet |
|
| 73 | - * d'éviter une possible confusion si une fonction `autoriser_livre_art` existait : |
|
| 74 | - * quel serait le type, quel serait l'action ? |
|
| 75 | - * |
|
| 76 | - * Pour résumer, si le type d'objet éditorial a un souligné, tel que 'livre_art', |
|
| 77 | - * la fonction d'autorisation correspondante ne l'aura pas. |
|
| 78 | - * Exemple : `function autoriser_livreart_modifier_dist(...){...}` |
|
| 79 | - * |
|
| 80 | - * @api |
|
| 81 | - * @see autoriser_dist() |
|
| 82 | - * @see objet_type() |
|
| 83 | - * |
|
| 84 | - * @param string $faire |
|
| 85 | - * une action ('modifier', 'publier'...) |
|
| 86 | - * @param string|null $type |
|
| 87 | - * Type d’objet ou élément sur lequel appliquer l’action. |
|
| 88 | - * - null: indifférent à tout type d’élément ou objet éditorial |
|
| 89 | - * - string: objet éditorial (objet_type() est appliqué pour homogénéiser l’entrée) |
|
| 90 | - * - _string: autre élément (avec un souligné en premier caractère, désactive objet_type()). |
|
| 91 | - * Les soulignés seront retirés (cf. la note). |
|
| 92 | - * @param string|int|null $id |
|
| 93 | - * id de l'objet ou élément sur lequel on veut agir, si pertinent. |
|
| 94 | - * - null: non utile pour l’autorisation |
|
| 95 | - * - int: identifiant numérique (cas de tous les objets éditoriaux de SPIP) |
|
| 96 | - * - string: identifiant textuel |
|
| 97 | - * @param null|int|array $qui |
|
| 98 | - * - si null on prend alors visiteur_session |
|
| 99 | - * - un id_auteur (on regarde dans la base) |
|
| 100 | - * - un tableau auteur complet, y compris [restreint] |
|
| 101 | - * @param array $opt |
|
| 102 | - * options sous forme de tableau associatif |
|
| 103 | - * @return bool |
|
| 104 | - * true si la personne peut effectuer l'action |
|
| 105 | - */ |
|
| 106 | - function autoriser(string $faire, ?string $type = '', $id = null, $qui = null, array $opt = []): bool { |
|
| 107 | - // Charger les fonctions d'autorisation supplementaires |
|
| 108 | - static $pipe; |
|
| 109 | - if (!isset($pipe)) { |
|
| 110 | - $pipe = 1; |
|
| 111 | - pipeline('autoriser'); |
|
| 112 | - } |
|
| 113 | - |
|
| 114 | - return autoriser_dist($faire, $type, $id, $qui, $opt); |
|
| 115 | - } |
|
| 41 | + /** |
|
| 42 | + * Autoriser une action |
|
| 43 | + * |
|
| 44 | + * Teste si une personne (par défaut le visiteur en cours) peut effectuer |
|
| 45 | + * une certaine action. Cette fonction est le point d'entrée de toutes |
|
| 46 | + * les autorisations. |
|
| 47 | + * |
|
| 48 | + * La fonction se charge d'appeler des fonctions d'autorisations spécifiques |
|
| 49 | + * aux actions demandées si elles existent. Elle cherche donc les fonctions |
|
| 50 | + * dans cet ordre : |
|
| 51 | + * |
|
| 52 | + * - autoriser_{type}_{faire}, sinon avec _dist |
|
| 53 | + * - autoriser_{type}, sinon avec _dist |
|
| 54 | + * - autoriser_{faire}, sinon avec _dist |
|
| 55 | + * - autoriser_{defaut}, sinon avec _dist |
|
| 56 | + * |
|
| 57 | + * Seul le premier argument est obligatoire. |
|
| 58 | + * |
|
| 59 | + * @note |
|
| 60 | + * Le paramètre `$type` attend par défaut un type d'objet éditorial, et à ce titre, |
|
| 61 | + * la valeur transmise se verra appliquer la fonction 'objet_type' pour uniformiser |
|
| 62 | + * cette valeur. |
|
| 63 | + * |
|
| 64 | + * Si ce paramètre n'a rien n'a voir avec un objet éditorial, par exemple |
|
| 65 | + * 'statistiques', un souligné avant le terme est ajouté afin d'indiquer |
|
| 66 | + * explicitement à la fonction autoriser de ne pas transformer la chaîne en type |
|
| 67 | + * d'objet. Cela donne pour cet exemple : `autoriser('detruire', '_statistiques')` |
|
| 68 | + * |
|
| 69 | + * @note |
|
| 70 | + * Le paramètre `$type`, en plus de l'uniformisation en type d'objet, se voit retirer |
|
| 71 | + * tous les soulignés du terme. Ainsi le type d'objet `livre_art` deviendra `livreart` |
|
| 72 | + * et SPIP cherchera une fonction `autoriser_livreart_{faire}`. Ceci permet |
|
| 73 | + * d'éviter une possible confusion si une fonction `autoriser_livre_art` existait : |
|
| 74 | + * quel serait le type, quel serait l'action ? |
|
| 75 | + * |
|
| 76 | + * Pour résumer, si le type d'objet éditorial a un souligné, tel que 'livre_art', |
|
| 77 | + * la fonction d'autorisation correspondante ne l'aura pas. |
|
| 78 | + * Exemple : `function autoriser_livreart_modifier_dist(...){...}` |
|
| 79 | + * |
|
| 80 | + * @api |
|
| 81 | + * @see autoriser_dist() |
|
| 82 | + * @see objet_type() |
|
| 83 | + * |
|
| 84 | + * @param string $faire |
|
| 85 | + * une action ('modifier', 'publier'...) |
|
| 86 | + * @param string|null $type |
|
| 87 | + * Type d’objet ou élément sur lequel appliquer l’action. |
|
| 88 | + * - null: indifférent à tout type d’élément ou objet éditorial |
|
| 89 | + * - string: objet éditorial (objet_type() est appliqué pour homogénéiser l’entrée) |
|
| 90 | + * - _string: autre élément (avec un souligné en premier caractère, désactive objet_type()). |
|
| 91 | + * Les soulignés seront retirés (cf. la note). |
|
| 92 | + * @param string|int|null $id |
|
| 93 | + * id de l'objet ou élément sur lequel on veut agir, si pertinent. |
|
| 94 | + * - null: non utile pour l’autorisation |
|
| 95 | + * - int: identifiant numérique (cas de tous les objets éditoriaux de SPIP) |
|
| 96 | + * - string: identifiant textuel |
|
| 97 | + * @param null|int|array $qui |
|
| 98 | + * - si null on prend alors visiteur_session |
|
| 99 | + * - un id_auteur (on regarde dans la base) |
|
| 100 | + * - un tableau auteur complet, y compris [restreint] |
|
| 101 | + * @param array $opt |
|
| 102 | + * options sous forme de tableau associatif |
|
| 103 | + * @return bool |
|
| 104 | + * true si la personne peut effectuer l'action |
|
| 105 | + */ |
|
| 106 | + function autoriser(string $faire, ?string $type = '', $id = null, $qui = null, array $opt = []): bool { |
|
| 107 | + // Charger les fonctions d'autorisation supplementaires |
|
| 108 | + static $pipe; |
|
| 109 | + if (!isset($pipe)) { |
|
| 110 | + $pipe = 1; |
|
| 111 | + pipeline('autoriser'); |
|
| 112 | + } |
|
| 113 | + |
|
| 114 | + return autoriser_dist($faire, $type, $id, $qui, $opt); |
|
| 115 | + } |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | |
| 119 | 119 | // mes_fonctions peut aussi declarer des autorisations, il faut donc le charger |
| 120 | 120 | // mais apres la fonction autoriser() |
| 121 | 121 | if ($f = find_in_path('mes_fonctions.php')) { |
| 122 | - global $dossier_squelettes; |
|
| 123 | - include_once(_ROOT_CWD . $f); |
|
| 122 | + global $dossier_squelettes; |
|
| 123 | + include_once(_ROOT_CWD . $f); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
@@ -151,85 +151,85 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | function autoriser_dist(string $faire, ?string $type = '', $id = null, $qui = null, array $opt = []): bool { |
| 153 | 153 | |
| 154 | - if ($type === null) { |
|
| 155 | - $type = ''; |
|
| 156 | - } |
|
| 157 | - |
|
| 158 | - // Qui ? visiteur_session ? |
|
| 159 | - // si null ou '' (appel depuis #AUTORISER) on prend l'auteur loge |
|
| 160 | - if ($qui === null or $qui === '') { |
|
| 161 | - $qui = $GLOBALS['visiteur_session'] ?: []; |
|
| 162 | - $qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui); |
|
| 163 | - } elseif (is_numeric($qui)) { |
|
| 164 | - $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui); |
|
| 165 | - if (!$qui) { |
|
| 166 | - return false; |
|
| 167 | - } |
|
| 168 | - } |
|
| 169 | - |
|
| 170 | - // Admins restreints, on construit ici (pas generique mais...) |
|
| 171 | - // le tableau de toutes leurs rubriques (y compris les sous-rubriques) |
|
| 172 | - if (_ADMINS_RESTREINTS and is_array($qui)) { |
|
| 173 | - $qui['restreint'] = isset($qui['id_auteur']) ? liste_rubriques_auteur($qui['id_auteur']) : []; |
|
| 174 | - } |
|
| 175 | - |
|
| 176 | - spip_log( |
|
| 177 | - "autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?', |
|
| 178 | - 'autoriser' . _LOG_DEBUG |
|
| 179 | - ); |
|
| 180 | - |
|
| 181 | - // passer par objet_type pour avoir les alias |
|
| 182 | - // sauf si _ est le premier caractère. |
|
| 183 | - if ($type and $type[0] !== '_') { |
|
| 184 | - $type = objet_type($type, false); |
|
| 185 | - } |
|
| 186 | - // et supprimer les _ |
|
| 187 | - $type = str_replace('_', '', (string) $type); |
|
| 188 | - |
|
| 189 | - // Si une exception a ete decretee plus haut dans le code, l'appliquer |
|
| 190 | - if ( |
|
| 191 | - (isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) and autoriser_exception($faire, $type, $id, 'verifier')) |
|
| 192 | - or (isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) and autoriser_exception($faire, $type, '*', 'verifier')) |
|
| 193 | - ) { |
|
| 194 | - spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG); |
|
| 195 | - return true; |
|
| 196 | - } |
|
| 197 | - |
|
| 198 | - // Chercher une fonction d'autorisation |
|
| 199 | - // Dans l'ordre on va chercher autoriser_type_faire[_dist], autoriser_type[_dist], |
|
| 200 | - // autoriser_faire[_dist], autoriser_defaut[_dist] |
|
| 201 | - $fonctions = $type |
|
| 202 | - ? [ |
|
| 203 | - 'autoriser_' . $type . '_' . $faire, |
|
| 204 | - 'autoriser_' . $type . '_' . $faire . '_dist', |
|
| 205 | - 'autoriser_' . $type, |
|
| 206 | - 'autoriser_' . $type . '_dist', |
|
| 207 | - 'autoriser_' . $faire, |
|
| 208 | - 'autoriser_' . $faire . '_dist', |
|
| 209 | - 'autoriser_defaut', |
|
| 210 | - 'autoriser_defaut_dist' |
|
| 211 | - ] |
|
| 212 | - : [ |
|
| 213 | - 'autoriser_' . $faire, |
|
| 214 | - 'autoriser_' . $faire . '_dist', |
|
| 215 | - 'autoriser_defaut', |
|
| 216 | - 'autoriser_defaut_dist' |
|
| 217 | - ]; |
|
| 218 | - |
|
| 219 | - $a = false; |
|
| 220 | - foreach ($fonctions as $f) { |
|
| 221 | - if (function_exists($f)) { |
|
| 222 | - $a = $f($faire, $type, $id, $qui, $opt); |
|
| 223 | - break; |
|
| 224 | - } |
|
| 225 | - } |
|
| 226 | - |
|
| 227 | - spip_log( |
|
| 228 | - "$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'), |
|
| 229 | - 'autoriser' . _LOG_DEBUG |
|
| 230 | - ); |
|
| 231 | - |
|
| 232 | - return $a; |
|
| 154 | + if ($type === null) { |
|
| 155 | + $type = ''; |
|
| 156 | + } |
|
| 157 | + |
|
| 158 | + // Qui ? visiteur_session ? |
|
| 159 | + // si null ou '' (appel depuis #AUTORISER) on prend l'auteur loge |
|
| 160 | + if ($qui === null or $qui === '') { |
|
| 161 | + $qui = $GLOBALS['visiteur_session'] ?: []; |
|
| 162 | + $qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui); |
|
| 163 | + } elseif (is_numeric($qui)) { |
|
| 164 | + $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui); |
|
| 165 | + if (!$qui) { |
|
| 166 | + return false; |
|
| 167 | + } |
|
| 168 | + } |
|
| 169 | + |
|
| 170 | + // Admins restreints, on construit ici (pas generique mais...) |
|
| 171 | + // le tableau de toutes leurs rubriques (y compris les sous-rubriques) |
|
| 172 | + if (_ADMINS_RESTREINTS and is_array($qui)) { |
|
| 173 | + $qui['restreint'] = isset($qui['id_auteur']) ? liste_rubriques_auteur($qui['id_auteur']) : []; |
|
| 174 | + } |
|
| 175 | + |
|
| 176 | + spip_log( |
|
| 177 | + "autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?', |
|
| 178 | + 'autoriser' . _LOG_DEBUG |
|
| 179 | + ); |
|
| 180 | + |
|
| 181 | + // passer par objet_type pour avoir les alias |
|
| 182 | + // sauf si _ est le premier caractère. |
|
| 183 | + if ($type and $type[0] !== '_') { |
|
| 184 | + $type = objet_type($type, false); |
|
| 185 | + } |
|
| 186 | + // et supprimer les _ |
|
| 187 | + $type = str_replace('_', '', (string) $type); |
|
| 188 | + |
|
| 189 | + // Si une exception a ete decretee plus haut dans le code, l'appliquer |
|
| 190 | + if ( |
|
| 191 | + (isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) and autoriser_exception($faire, $type, $id, 'verifier')) |
|
| 192 | + or (isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) and autoriser_exception($faire, $type, '*', 'verifier')) |
|
| 193 | + ) { |
|
| 194 | + spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG); |
|
| 195 | + return true; |
|
| 196 | + } |
|
| 197 | + |
|
| 198 | + // Chercher une fonction d'autorisation |
|
| 199 | + // Dans l'ordre on va chercher autoriser_type_faire[_dist], autoriser_type[_dist], |
|
| 200 | + // autoriser_faire[_dist], autoriser_defaut[_dist] |
|
| 201 | + $fonctions = $type |
|
| 202 | + ? [ |
|
| 203 | + 'autoriser_' . $type . '_' . $faire, |
|
| 204 | + 'autoriser_' . $type . '_' . $faire . '_dist', |
|
| 205 | + 'autoriser_' . $type, |
|
| 206 | + 'autoriser_' . $type . '_dist', |
|
| 207 | + 'autoriser_' . $faire, |
|
| 208 | + 'autoriser_' . $faire . '_dist', |
|
| 209 | + 'autoriser_defaut', |
|
| 210 | + 'autoriser_defaut_dist' |
|
| 211 | + ] |
|
| 212 | + : [ |
|
| 213 | + 'autoriser_' . $faire, |
|
| 214 | + 'autoriser_' . $faire . '_dist', |
|
| 215 | + 'autoriser_defaut', |
|
| 216 | + 'autoriser_defaut_dist' |
|
| 217 | + ]; |
|
| 218 | + |
|
| 219 | + $a = false; |
|
| 220 | + foreach ($fonctions as $f) { |
|
| 221 | + if (function_exists($f)) { |
|
| 222 | + $a = $f($faire, $type, $id, $qui, $opt); |
|
| 223 | + break; |
|
| 224 | + } |
|
| 225 | + } |
|
| 226 | + |
|
| 227 | + spip_log( |
|
| 228 | + "$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'), |
|
| 229 | + 'autoriser' . _LOG_DEBUG |
|
| 230 | + ); |
|
| 231 | + |
|
| 232 | + return $a; |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | // une globale pour aller au plus vite dans la fonction generique ci dessus |
@@ -249,33 +249,33 @@ discard block |
||
| 249 | 249 | * @return bool |
| 250 | 250 | */ |
| 251 | 251 | function autoriser_exception(string $faire, ?string $type = '', $id = null, $autoriser = true): bool { |
| 252 | - // une static innaccessible par url pour verifier que la globale est positionnee a bon escient |
|
| 253 | - static $autorisation; |
|
| 254 | - // Tolérance avec certains appels |
|
| 255 | - if ($type === null) { |
|
| 256 | - $type = ''; |
|
| 257 | - } |
|
| 258 | - if ($id === null) { |
|
| 259 | - $id = 0; |
|
| 260 | - } |
|
| 261 | - if ($autoriser === 'verifier') { |
|
| 262 | - return isset($autorisation[$faire][$type][$id]); |
|
| 263 | - } |
|
| 264 | - if ($autoriser === true) { |
|
| 265 | - $GLOBALS['autoriser_exception'][$faire][$type][$id] = $autorisation[$faire][$type][$id] = true; |
|
| 266 | - } |
|
| 267 | - if ($autoriser === false) { |
|
| 268 | - if ($id === '*') { |
|
| 269 | - unset($GLOBALS['autoriser_exception'][$faire][$type]); |
|
| 270 | - unset($autorisation[$faire][$type]); |
|
| 271 | - } |
|
| 272 | - else { |
|
| 273 | - unset($GLOBALS['autoriser_exception'][$faire][$type][$id]); |
|
| 274 | - unset($autorisation[$faire][$type][$id]); |
|
| 275 | - } |
|
| 276 | - } |
|
| 277 | - |
|
| 278 | - return false; |
|
| 252 | + // une static innaccessible par url pour verifier que la globale est positionnee a bon escient |
|
| 253 | + static $autorisation; |
|
| 254 | + // Tolérance avec certains appels |
|
| 255 | + if ($type === null) { |
|
| 256 | + $type = ''; |
|
| 257 | + } |
|
| 258 | + if ($id === null) { |
|
| 259 | + $id = 0; |
|
| 260 | + } |
|
| 261 | + if ($autoriser === 'verifier') { |
|
| 262 | + return isset($autorisation[$faire][$type][$id]); |
|
| 263 | + } |
|
| 264 | + if ($autoriser === true) { |
|
| 265 | + $GLOBALS['autoriser_exception'][$faire][$type][$id] = $autorisation[$faire][$type][$id] = true; |
|
| 266 | + } |
|
| 267 | + if ($autoriser === false) { |
|
| 268 | + if ($id === '*') { |
|
| 269 | + unset($GLOBALS['autoriser_exception'][$faire][$type]); |
|
| 270 | + unset($autorisation[$faire][$type]); |
|
| 271 | + } |
|
| 272 | + else { |
|
| 273 | + unset($GLOBALS['autoriser_exception'][$faire][$type][$id]); |
|
| 274 | + unset($autorisation[$faire][$type][$id]); |
|
| 275 | + } |
|
| 276 | + } |
|
| 277 | + |
|
| 278 | + return false; |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | |
@@ -294,9 +294,9 @@ discard block |
||
| 294 | 294 | * @return bool true s'il a le droit, false sinon |
| 295 | 295 | **/ |
| 296 | 296 | function autoriser_defaut_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 297 | - return |
|
| 298 | - $qui['statut'] === '0minirezo' |
|
| 299 | - and !$qui['restreint']; |
|
| 297 | + return |
|
| 298 | + $qui['statut'] === '0minirezo' |
|
| 299 | + and !$qui['restreint']; |
|
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | /** |
@@ -316,10 +316,10 @@ discard block |
||
| 316 | 316 | * @return bool true s'il a le droit, false sinon |
| 317 | 317 | */ |
| 318 | 318 | function autoriser_loger_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 319 | - if ($qui['statut'] === '5poubelle') { |
|
| 320 | - return false; |
|
| 321 | - } |
|
| 322 | - return true; |
|
| 319 | + if ($qui['statut'] === '5poubelle') { |
|
| 320 | + return false; |
|
| 321 | + } |
|
| 322 | + return true; |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | /** |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | * @return bool true s'il a le droit, false sinon |
| 336 | 336 | **/ |
| 337 | 337 | function autoriser_ecrire_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 338 | - return isset($qui['statut']) and in_array($qui['statut'], ['0minirezo', '1comite']); |
|
| 338 | + return isset($qui['statut']) and in_array($qui['statut'], ['0minirezo', '1comite']); |
|
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | /** |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | * @return bool true s'il a le droit, false sinon |
| 355 | 355 | **/ |
| 356 | 356 | function autoriser_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 357 | - return in_array($qui['statut'], ['0minirezo', '1comite']); |
|
| 357 | + return in_array($qui['statut'], ['0minirezo', '1comite']); |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | /** |
@@ -374,18 +374,18 @@ discard block |
||
| 374 | 374 | **/ |
| 375 | 375 | function autoriser_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 376 | 376 | |
| 377 | - // Le visiteur a-t-il un statut prevu par la config ? |
|
| 378 | - if (strpos($GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',') !== false) { |
|
| 379 | - return test_previsualiser_objet_champ($type, $id, $qui, $opt); |
|
| 380 | - } |
|
| 377 | + // Le visiteur a-t-il un statut prevu par la config ? |
|
| 378 | + if (strpos($GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',') !== false) { |
|
| 379 | + return test_previsualiser_objet_champ($type, $id, $qui, $opt); |
|
| 380 | + } |
|
| 381 | 381 | |
| 382 | - // A-t-on un token de prévisualisation valable ? |
|
| 383 | - include_spip('inc/securiser_action'); |
|
| 384 | - if (decrire_token_previsu()) { |
|
| 385 | - return true; |
|
| 386 | - } |
|
| 382 | + // A-t-on un token de prévisualisation valable ? |
|
| 383 | + include_spip('inc/securiser_action'); |
|
| 384 | + if (decrire_token_previsu()) { |
|
| 385 | + return true; |
|
| 386 | + } |
|
| 387 | 387 | |
| 388 | - return false; |
|
| 388 | + return false; |
|
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | /** |
@@ -414,58 +414,58 @@ discard block |
||
| 414 | 414 | */ |
| 415 | 415 | function test_previsualiser_objet_champ(string $type = '', $id = null, array $qui = [], array $opt = []): bool { |
| 416 | 416 | |
| 417 | - // si pas de type et statut fourni, c'est une autorisation generale => OK |
|
| 418 | - if (!$type) { |
|
| 419 | - return true; |
|
| 420 | - } |
|
| 421 | - |
|
| 422 | - include_spip('base/objets'); |
|
| 423 | - $infos = lister_tables_objets_sql(table_objet_sql($type)); |
|
| 424 | - if (isset($infos['statut'])) { |
|
| 425 | - foreach ($infos['statut'] as $c) { |
|
| 426 | - if (isset($c['publie'])) { |
|
| 427 | - if (!isset($c['previsu'])) { |
|
| 428 | - return false; |
|
| 429 | - } // pas de previsu definie => NIET |
|
| 430 | - $champ = $c['champ']; |
|
| 431 | - if (!isset($opt[$champ])) { |
|
| 432 | - return false; |
|
| 433 | - } // pas de champ passe a la demande => NIET |
|
| 434 | - $previsu = explode(',', $c['previsu']); |
|
| 435 | - // regarder si ce statut est autorise pour l'auteur |
|
| 436 | - if (in_array($opt[$champ] . '/auteur', $previsu)) { |
|
| 437 | - // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
|
| 438 | - // sinon l’auteur en session |
|
| 439 | - include_spip('inc/securiser_action'); |
|
| 440 | - if ($desc = decrire_token_previsu()) { |
|
| 441 | - $id_auteur = $desc['id_auteur']; |
|
| 442 | - } elseif (isset($GLOBALS['visiteur_session']['id_auteur'])) { |
|
| 443 | - $id_auteur = intval($GLOBALS['visiteur_session']['id_auteur']); |
|
| 444 | - } else { |
|
| 445 | - $id_auteur = null; |
|
| 446 | - } |
|
| 447 | - |
|
| 448 | - if (!$id_auteur) { |
|
| 449 | - return false; |
|
| 450 | - } elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) { |
|
| 451 | - // dans ce cas (admin en general), pas de filtrage sur ce statut |
|
| 452 | - } elseif ( |
|
| 453 | - !sql_countsel( |
|
| 454 | - 'spip_auteurs_liens', |
|
| 455 | - 'id_auteur=' . intval($id_auteur) . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . intval($id) |
|
| 456 | - ) |
|
| 457 | - ) { |
|
| 458 | - return false; |
|
| 459 | - } // pas auteur de cet objet => NIET |
|
| 460 | - } elseif (!in_array($opt[$champ], $previsu)) { |
|
| 461 | - // le statut n'est pas dans ceux definis par la previsu => NIET |
|
| 462 | - return false; |
|
| 463 | - } |
|
| 464 | - } |
|
| 465 | - } |
|
| 466 | - } |
|
| 467 | - |
|
| 468 | - return true; |
|
| 417 | + // si pas de type et statut fourni, c'est une autorisation generale => OK |
|
| 418 | + if (!$type) { |
|
| 419 | + return true; |
|
| 420 | + } |
|
| 421 | + |
|
| 422 | + include_spip('base/objets'); |
|
| 423 | + $infos = lister_tables_objets_sql(table_objet_sql($type)); |
|
| 424 | + if (isset($infos['statut'])) { |
|
| 425 | + foreach ($infos['statut'] as $c) { |
|
| 426 | + if (isset($c['publie'])) { |
|
| 427 | + if (!isset($c['previsu'])) { |
|
| 428 | + return false; |
|
| 429 | + } // pas de previsu definie => NIET |
|
| 430 | + $champ = $c['champ']; |
|
| 431 | + if (!isset($opt[$champ])) { |
|
| 432 | + return false; |
|
| 433 | + } // pas de champ passe a la demande => NIET |
|
| 434 | + $previsu = explode(',', $c['previsu']); |
|
| 435 | + // regarder si ce statut est autorise pour l'auteur |
|
| 436 | + if (in_array($opt[$champ] . '/auteur', $previsu)) { |
|
| 437 | + // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
|
| 438 | + // sinon l’auteur en session |
|
| 439 | + include_spip('inc/securiser_action'); |
|
| 440 | + if ($desc = decrire_token_previsu()) { |
|
| 441 | + $id_auteur = $desc['id_auteur']; |
|
| 442 | + } elseif (isset($GLOBALS['visiteur_session']['id_auteur'])) { |
|
| 443 | + $id_auteur = intval($GLOBALS['visiteur_session']['id_auteur']); |
|
| 444 | + } else { |
|
| 445 | + $id_auteur = null; |
|
| 446 | + } |
|
| 447 | + |
|
| 448 | + if (!$id_auteur) { |
|
| 449 | + return false; |
|
| 450 | + } elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) { |
|
| 451 | + // dans ce cas (admin en general), pas de filtrage sur ce statut |
|
| 452 | + } elseif ( |
|
| 453 | + !sql_countsel( |
|
| 454 | + 'spip_auteurs_liens', |
|
| 455 | + 'id_auteur=' . intval($id_auteur) . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . intval($id) |
|
| 456 | + ) |
|
| 457 | + ) { |
|
| 458 | + return false; |
|
| 459 | + } // pas auteur de cet objet => NIET |
|
| 460 | + } elseif (!in_array($opt[$champ], $previsu)) { |
|
| 461 | + // le statut n'est pas dans ceux definis par la previsu => NIET |
|
| 462 | + return false; |
|
| 463 | + } |
|
| 464 | + } |
|
| 465 | + } |
|
| 466 | + } |
|
| 467 | + |
|
| 468 | + return true; |
|
| 469 | 469 | } |
| 470 | 470 | |
| 471 | 471 | /** |
@@ -481,51 +481,51 @@ discard block |
||
| 481 | 481 | * @return bool true s'il a le droit, false sinon |
| 482 | 482 | **/ |
| 483 | 483 | function autoriser_changerlangue_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 484 | - $multi_objets = explode(',', lire_config('multi_objets')); |
|
| 485 | - $gerer_trad_objets = explode(',', lire_config('gerer_trad_objets')); |
|
| 486 | - $table = table_objet_sql($type); |
|
| 487 | - if ( |
|
| 488 | - in_array($table, $multi_objets) |
|
| 489 | - or in_array($table, $gerer_trad_objets) |
|
| 490 | - ) { // affichage du formulaire si la configuration l'accepte |
|
| 491 | - $multi_secteurs = lire_config('multi_secteurs'); |
|
| 492 | - $champs = objet_info($type, 'field'); |
|
| 493 | - if ( |
|
| 494 | - $multi_secteurs === 'oui' |
|
| 495 | - and array_key_exists('id_rubrique', $champs) |
|
| 496 | - ) { |
|
| 497 | - // multilinguisme par secteur et objet rattaché à une rubrique |
|
| 498 | - $primary = id_table_objet($type); |
|
| 499 | - if ($table != 'spip_rubriques') { |
|
| 500 | - $id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=" . intval($id)); |
|
| 501 | - } else { |
|
| 502 | - $id_rubrique = $id; |
|
| 503 | - } |
|
| 504 | - $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 505 | - if (!$id_secteur > 0) { |
|
| 506 | - $id_secteur = $id_rubrique; |
|
| 507 | - } |
|
| 508 | - $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_secteur)); |
|
| 509 | - $langue_objet = sql_getfetsel('lang', "$table", "$primary=" . intval($id)); |
|
| 510 | - if ($langue_secteur != $langue_objet) { |
|
| 511 | - // configuration incohérente, on laisse l'utilisateur corriger la situation |
|
| 512 | - return true; |
|
| 513 | - } |
|
| 514 | - if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques |
|
| 515 | - return false; |
|
| 516 | - } else { |
|
| 517 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id)); |
|
| 518 | - if ($id_parent != 0) { |
|
| 519 | - // sous-rubriques : pas de choix de langue |
|
| 520 | - return false; |
|
| 521 | - } |
|
| 522 | - } |
|
| 523 | - } |
|
| 524 | - } else { |
|
| 525 | - return false; |
|
| 526 | - } |
|
| 527 | - |
|
| 528 | - return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 484 | + $multi_objets = explode(',', lire_config('multi_objets')); |
|
| 485 | + $gerer_trad_objets = explode(',', lire_config('gerer_trad_objets')); |
|
| 486 | + $table = table_objet_sql($type); |
|
| 487 | + if ( |
|
| 488 | + in_array($table, $multi_objets) |
|
| 489 | + or in_array($table, $gerer_trad_objets) |
|
| 490 | + ) { // affichage du formulaire si la configuration l'accepte |
|
| 491 | + $multi_secteurs = lire_config('multi_secteurs'); |
|
| 492 | + $champs = objet_info($type, 'field'); |
|
| 493 | + if ( |
|
| 494 | + $multi_secteurs === 'oui' |
|
| 495 | + and array_key_exists('id_rubrique', $champs) |
|
| 496 | + ) { |
|
| 497 | + // multilinguisme par secteur et objet rattaché à une rubrique |
|
| 498 | + $primary = id_table_objet($type); |
|
| 499 | + if ($table != 'spip_rubriques') { |
|
| 500 | + $id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=" . intval($id)); |
|
| 501 | + } else { |
|
| 502 | + $id_rubrique = $id; |
|
| 503 | + } |
|
| 504 | + $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 505 | + if (!$id_secteur > 0) { |
|
| 506 | + $id_secteur = $id_rubrique; |
|
| 507 | + } |
|
| 508 | + $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_secteur)); |
|
| 509 | + $langue_objet = sql_getfetsel('lang', "$table", "$primary=" . intval($id)); |
|
| 510 | + if ($langue_secteur != $langue_objet) { |
|
| 511 | + // configuration incohérente, on laisse l'utilisateur corriger la situation |
|
| 512 | + return true; |
|
| 513 | + } |
|
| 514 | + if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques |
|
| 515 | + return false; |
|
| 516 | + } else { |
|
| 517 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id)); |
|
| 518 | + if ($id_parent != 0) { |
|
| 519 | + // sous-rubriques : pas de choix de langue |
|
| 520 | + return false; |
|
| 521 | + } |
|
| 522 | + } |
|
| 523 | + } |
|
| 524 | + } else { |
|
| 525 | + return false; |
|
| 526 | + } |
|
| 527 | + |
|
| 528 | + return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | /** |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | * @return bool true s'il a le droit, false sinon |
| 542 | 542 | **/ |
| 543 | 543 | function autoriser_changertraduction_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 544 | - return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 544 | + return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 545 | 545 | } |
| 546 | 546 | |
| 547 | 547 | /** |
@@ -557,41 +557,41 @@ discard block |
||
| 557 | 557 | * @return bool true s'il a le droit, false sinon |
| 558 | 558 | **/ |
| 559 | 559 | function autoriser_dater_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 560 | - $table = table_objet($type); |
|
| 561 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 562 | - $desc = $trouver_table($table); |
|
| 563 | - if (!$desc) { |
|
| 564 | - return false; |
|
| 565 | - } |
|
| 566 | - |
|
| 567 | - if (!isset($opt['statut'])) { |
|
| 568 | - if (isset($desc['field']['statut'])) { |
|
| 569 | - $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . intval($id)); |
|
| 570 | - } else { |
|
| 571 | - $statut = 'publie'; |
|
| 572 | - } // pas de statut => publie |
|
| 573 | - } else { |
|
| 574 | - $statut = $opt['statut']; |
|
| 575 | - } |
|
| 576 | - |
|
| 577 | - // Liste des statuts publiés pour cet objet |
|
| 578 | - if (isset($desc['statut'][0]['publie'])) { |
|
| 579 | - $statuts_publies = explode(',', $desc['statut'][0]['publie']); |
|
| 580 | - } |
|
| 581 | - // Sinon en dur le statut "publie" |
|
| 582 | - else { |
|
| 583 | - $statuts_publies = ['publie']; |
|
| 584 | - } |
|
| 585 | - |
|
| 586 | - if ( |
|
| 587 | - in_array($statut, $statuts_publies) |
|
| 588 | - // Ou cas particulier géré en dur ici pour les articles |
|
| 589 | - or ($statut === 'prop' and $type === 'article' and $GLOBALS['meta']['post_dates'] === 'non') |
|
| 590 | - ) { |
|
| 591 | - return autoriser('modifier', $type, $id); |
|
| 592 | - } |
|
| 593 | - |
|
| 594 | - return false; |
|
| 560 | + $table = table_objet($type); |
|
| 561 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 562 | + $desc = $trouver_table($table); |
|
| 563 | + if (!$desc) { |
|
| 564 | + return false; |
|
| 565 | + } |
|
| 566 | + |
|
| 567 | + if (!isset($opt['statut'])) { |
|
| 568 | + if (isset($desc['field']['statut'])) { |
|
| 569 | + $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . intval($id)); |
|
| 570 | + } else { |
|
| 571 | + $statut = 'publie'; |
|
| 572 | + } // pas de statut => publie |
|
| 573 | + } else { |
|
| 574 | + $statut = $opt['statut']; |
|
| 575 | + } |
|
| 576 | + |
|
| 577 | + // Liste des statuts publiés pour cet objet |
|
| 578 | + if (isset($desc['statut'][0]['publie'])) { |
|
| 579 | + $statuts_publies = explode(',', $desc['statut'][0]['publie']); |
|
| 580 | + } |
|
| 581 | + // Sinon en dur le statut "publie" |
|
| 582 | + else { |
|
| 583 | + $statuts_publies = ['publie']; |
|
| 584 | + } |
|
| 585 | + |
|
| 586 | + if ( |
|
| 587 | + in_array($statut, $statuts_publies) |
|
| 588 | + // Ou cas particulier géré en dur ici pour les articles |
|
| 589 | + or ($statut === 'prop' and $type === 'article' and $GLOBALS['meta']['post_dates'] === 'non') |
|
| 590 | + ) { |
|
| 591 | + return autoriser('modifier', $type, $id); |
|
| 592 | + } |
|
| 593 | + |
|
| 594 | + return false; |
|
| 595 | 595 | } |
| 596 | 596 | |
| 597 | 597 | /** |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | * @return bool true s'il a le droit, false sinon |
| 611 | 611 | **/ |
| 612 | 612 | function autoriser_instituer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 613 | - return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 613 | + return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 614 | 614 | } |
| 615 | 615 | |
| 616 | 616 | /** |
@@ -628,12 +628,12 @@ discard block |
||
| 628 | 628 | * @return bool true s'il a le droit, false sinon |
| 629 | 629 | **/ |
| 630 | 630 | function autoriser_rubrique_publierdans_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 631 | - return |
|
| 632 | - ($qui['statut'] === '0minirezo') |
|
| 633 | - and ( |
|
| 634 | - !$qui['restreint'] or !$id |
|
| 635 | - or in_array($id, $qui['restreint']) |
|
| 636 | - ); |
|
| 631 | + return |
|
| 632 | + ($qui['statut'] === '0minirezo') |
|
| 633 | + and ( |
|
| 634 | + !$qui['restreint'] or !$id |
|
| 635 | + or in_array($id, $qui['restreint']) |
|
| 636 | + ); |
|
| 637 | 637 | } |
| 638 | 638 | |
| 639 | 639 | /** |
@@ -651,12 +651,12 @@ discard block |
||
| 651 | 651 | * @return bool true s'il a le droit, false sinon |
| 652 | 652 | **/ |
| 653 | 653 | function autoriser_rubrique_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 654 | - if (!empty($opt['id_parent'])) { |
|
| 655 | - return autoriser('creerrubriquedans', 'rubrique', $opt['id_parent'], $qui); |
|
| 656 | - } |
|
| 657 | - else { |
|
| 658 | - return autoriser('defaut', null, 0, $qui, $opt); |
|
| 659 | - } |
|
| 654 | + if (!empty($opt['id_parent'])) { |
|
| 655 | + return autoriser('creerrubriquedans', 'rubrique', $opt['id_parent'], $qui); |
|
| 656 | + } |
|
| 657 | + else { |
|
| 658 | + return autoriser('defaut', null, 0, $qui, $opt); |
|
| 659 | + } |
|
| 660 | 660 | } |
| 661 | 661 | |
| 662 | 662 | /** |
@@ -674,10 +674,10 @@ discard block |
||
| 674 | 674 | * @return bool true s'il a le droit, false sinon |
| 675 | 675 | **/ |
| 676 | 676 | function autoriser_rubrique_creerrubriquedans_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 677 | - return |
|
| 678 | - ($id or ($qui['statut'] === '0minirezo' and !$qui['restreint'])) |
|
| 679 | - and autoriser('voir', 'rubrique', $id) |
|
| 680 | - and autoriser('publierdans', 'rubrique', $id); |
|
| 677 | + return |
|
| 678 | + ($id or ($qui['statut'] === '0minirezo' and !$qui['restreint'])) |
|
| 679 | + and autoriser('voir', 'rubrique', $id) |
|
| 680 | + and autoriser('publierdans', 'rubrique', $id); |
|
| 681 | 681 | } |
| 682 | 682 | |
| 683 | 683 | /** |
@@ -695,10 +695,10 @@ discard block |
||
| 695 | 695 | * @return bool true s'il a le droit, false sinon |
| 696 | 696 | **/ |
| 697 | 697 | function autoriser_rubrique_creerarticledans_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 698 | - return |
|
| 699 | - $id |
|
| 700 | - and autoriser('voir', 'rubrique', $id) |
|
| 701 | - and autoriser('creer', 'article'); |
|
| 698 | + return |
|
| 699 | + $id |
|
| 700 | + and autoriser('voir', 'rubrique', $id) |
|
| 701 | + and autoriser('creer', 'article'); |
|
| 702 | 702 | } |
| 703 | 703 | |
| 704 | 704 | |
@@ -717,8 +717,8 @@ discard block |
||
| 717 | 717 | * @return bool true s'il a le droit, false sinon |
| 718 | 718 | **/ |
| 719 | 719 | function autoriser_rubrique_modifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 720 | - return |
|
| 721 | - autoriser('publierdans', 'rubrique', $id, $qui, $opt); |
|
| 720 | + return |
|
| 721 | + autoriser('publierdans', 'rubrique', $id, $qui, $opt); |
|
| 722 | 722 | } |
| 723 | 723 | |
| 724 | 724 | /** |
@@ -736,29 +736,29 @@ discard block |
||
| 736 | 736 | * @return bool true s'il a le droit, false sinon |
| 737 | 737 | **/ |
| 738 | 738 | function autoriser_rubrique_supprimer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 739 | - if (!$id = intval($id)) { |
|
| 740 | - return false; |
|
| 741 | - } |
|
| 739 | + if (!$id = intval($id)) { |
|
| 740 | + return false; |
|
| 741 | + } |
|
| 742 | 742 | |
| 743 | - if (sql_countsel('spip_rubriques', 'id_parent=' . intval($id))) { |
|
| 744 | - return false; |
|
| 745 | - } |
|
| 743 | + if (sql_countsel('spip_rubriques', 'id_parent=' . intval($id))) { |
|
| 744 | + return false; |
|
| 745 | + } |
|
| 746 | 746 | |
| 747 | - if (sql_countsel('spip_articles', 'id_rubrique=' . intval($id) . " AND (statut<>'poubelle')")) { |
|
| 748 | - return false; |
|
| 749 | - } |
|
| 747 | + if (sql_countsel('spip_articles', 'id_rubrique=' . intval($id) . " AND (statut<>'poubelle')")) { |
|
| 748 | + return false; |
|
| 749 | + } |
|
| 750 | 750 | |
| 751 | - $compte = pipeline( |
|
| 752 | - 'objet_compte_enfants', |
|
| 753 | - ['args' => ['objet' => 'rubrique', 'id_objet' => $id], 'data' => []] |
|
| 754 | - ); |
|
| 755 | - foreach ($compte as $objet => $n) { |
|
| 756 | - if ($n) { |
|
| 757 | - return false; |
|
| 758 | - } |
|
| 759 | - } |
|
| 751 | + $compte = pipeline( |
|
| 752 | + 'objet_compte_enfants', |
|
| 753 | + ['args' => ['objet' => 'rubrique', 'id_objet' => $id], 'data' => []] |
|
| 754 | + ); |
|
| 755 | + foreach ($compte as $objet => $n) { |
|
| 756 | + if ($n) { |
|
| 757 | + return false; |
|
| 758 | + } |
|
| 759 | + } |
|
| 760 | 760 | |
| 761 | - return autoriser('modifier', 'rubrique', $id); |
|
| 761 | + return autoriser('modifier', 'rubrique', $id); |
|
| 762 | 762 | } |
| 763 | 763 | |
| 764 | 764 | |
@@ -778,23 +778,23 @@ discard block |
||
| 778 | 778 | * @return bool true s'il a le droit, false sinon |
| 779 | 779 | **/ |
| 780 | 780 | function autoriser_article_modifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 781 | - if (!$id) { |
|
| 782 | - return false; |
|
| 783 | - } |
|
| 784 | - $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id)); |
|
| 785 | - |
|
| 786 | - return |
|
| 787 | - $r |
|
| 788 | - and |
|
| 789 | - ( |
|
| 790 | - autoriser('publierdans', 'rubrique', $r['id_rubrique'], $qui, $opt) |
|
| 791 | - or ( |
|
| 792 | - (!isset($opt['statut']) or !in_array($opt['statut'], ['publie', 'refuse'], true)) |
|
| 793 | - and in_array($qui['statut'], ['0minirezo', '1comite']) |
|
| 794 | - and in_array($r['statut'], ['prop', 'prepa', 'poubelle']) |
|
| 795 | - and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']) |
|
| 796 | - ) |
|
| 797 | - ); |
|
| 781 | + if (!$id) { |
|
| 782 | + return false; |
|
| 783 | + } |
|
| 784 | + $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id)); |
|
| 785 | + |
|
| 786 | + return |
|
| 787 | + $r |
|
| 788 | + and |
|
| 789 | + ( |
|
| 790 | + autoriser('publierdans', 'rubrique', $r['id_rubrique'], $qui, $opt) |
|
| 791 | + or ( |
|
| 792 | + (!isset($opt['statut']) or !in_array($opt['statut'], ['publie', 'refuse'], true)) |
|
| 793 | + and in_array($qui['statut'], ['0minirezo', '1comite']) |
|
| 794 | + and in_array($r['statut'], ['prop', 'prepa', 'poubelle']) |
|
| 795 | + and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']) |
|
| 796 | + ) |
|
| 797 | + ); |
|
| 798 | 798 | } |
| 799 | 799 | |
| 800 | 800 | /** |
@@ -812,13 +812,13 @@ discard block |
||
| 812 | 812 | * @return bool true s'il a le droit, false sinon |
| 813 | 813 | **/ |
| 814 | 814 | function autoriser_article_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 815 | - if (!empty($opt['id_parent'])) { |
|
| 816 | - // creerarticledans rappelle autoriser(creer,article) sans id, donc on verifiera condition du else aussi |
|
| 817 | - return autoriser('creerarticledans', 'rubrique', $opt['id_parent'], $qui); |
|
| 818 | - } |
|
| 819 | - else { |
|
| 820 | - return (sql_countsel('spip_rubriques') > 0 and in_array($qui['statut'], ['0minirezo', '1comite'])); |
|
| 821 | - } |
|
| 815 | + if (!empty($opt['id_parent'])) { |
|
| 816 | + // creerarticledans rappelle autoriser(creer,article) sans id, donc on verifiera condition du else aussi |
|
| 817 | + return autoriser('creerarticledans', 'rubrique', $opt['id_parent'], $qui); |
|
| 818 | + } |
|
| 819 | + else { |
|
| 820 | + return (sql_countsel('spip_rubriques') > 0 and in_array($qui['statut'], ['0minirezo', '1comite'])); |
|
| 821 | + } |
|
| 822 | 822 | } |
| 823 | 823 | |
| 824 | 824 | /** |
@@ -840,28 +840,28 @@ discard block |
||
| 840 | 840 | * @return bool true s'il a le droit, false sinon |
| 841 | 841 | */ |
| 842 | 842 | function autoriser_article_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 843 | - if ($qui['statut'] === '0minirezo') { |
|
| 844 | - return true; |
|
| 845 | - } |
|
| 846 | - // cas des articles : depend du statut de l'article et de l'auteur |
|
| 847 | - if (isset($opt['statut'])) { |
|
| 848 | - $statut = $opt['statut']; |
|
| 849 | - } else { |
|
| 850 | - if (!$id) { |
|
| 851 | - return false; |
|
| 852 | - } |
|
| 853 | - $statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id)); |
|
| 854 | - } |
|
| 855 | - |
|
| 856 | - return |
|
| 857 | - // si on est pas auteur de l'article, |
|
| 858 | - // seuls les propose et publies sont visibles |
|
| 859 | - in_array($statut, ['prop', 'publie']) |
|
| 860 | - // sinon si on est auteur, on a le droit de le voir, evidemment ! |
|
| 861 | - or |
|
| 862 | - ($id |
|
| 863 | - and $qui['id_auteur'] |
|
| 864 | - and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])); |
|
| 843 | + if ($qui['statut'] === '0minirezo') { |
|
| 844 | + return true; |
|
| 845 | + } |
|
| 846 | + // cas des articles : depend du statut de l'article et de l'auteur |
|
| 847 | + if (isset($opt['statut'])) { |
|
| 848 | + $statut = $opt['statut']; |
|
| 849 | + } else { |
|
| 850 | + if (!$id) { |
|
| 851 | + return false; |
|
| 852 | + } |
|
| 853 | + $statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id)); |
|
| 854 | + } |
|
| 855 | + |
|
| 856 | + return |
|
| 857 | + // si on est pas auteur de l'article, |
|
| 858 | + // seuls les propose et publies sont visibles |
|
| 859 | + in_array($statut, ['prop', 'publie']) |
|
| 860 | + // sinon si on est auteur, on a le droit de le voir, evidemment ! |
|
| 861 | + or |
|
| 862 | + ($id |
|
| 863 | + and $qui['id_auteur'] |
|
| 864 | + and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])); |
|
| 865 | 865 | } |
| 866 | 866 | |
| 867 | 867 | |
@@ -880,24 +880,24 @@ discard block |
||
| 880 | 880 | * @return bool true s'il a le droit, false sinon |
| 881 | 881 | **/ |
| 882 | 882 | function autoriser_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 883 | - # securite, mais on aurait pas du arriver ici ! |
|
| 884 | - if ( |
|
| 885 | - function_exists($f = 'autoriser_' . $type . '_voir') |
|
| 886 | - or function_exists($f = 'autoriser_' . $type . '_voir_dist') |
|
| 887 | - ) { |
|
| 888 | - return $f($faire, $type, $id, $qui, $opt); |
|
| 889 | - } |
|
| 883 | + # securite, mais on aurait pas du arriver ici ! |
|
| 884 | + if ( |
|
| 885 | + function_exists($f = 'autoriser_' . $type . '_voir') |
|
| 886 | + or function_exists($f = 'autoriser_' . $type . '_voir_dist') |
|
| 887 | + ) { |
|
| 888 | + return $f($faire, $type, $id, $qui, $opt); |
|
| 889 | + } |
|
| 890 | 890 | |
| 891 | - if ($qui['statut'] === '0minirezo') { |
|
| 892 | - return true; |
|
| 893 | - } |
|
| 894 | - // admins et redacteurs peuvent voir un auteur |
|
| 895 | - if ($type === 'auteur') { |
|
| 896 | - return in_array($qui['statut'], ['0minirezo', '1comite']); |
|
| 897 | - } |
|
| 898 | - // sinon par defaut tout est visible |
|
| 899 | - // sauf cas particuliers traites separemment (ie article) |
|
| 900 | - return true; |
|
| 891 | + if ($qui['statut'] === '0minirezo') { |
|
| 892 | + return true; |
|
| 893 | + } |
|
| 894 | + // admins et redacteurs peuvent voir un auteur |
|
| 895 | + if ($type === 'auteur') { |
|
| 896 | + return in_array($qui['statut'], ['0minirezo', '1comite']); |
|
| 897 | + } |
|
| 898 | + // sinon par defaut tout est visible |
|
| 899 | + // sauf cas particuliers traites separemment (ie article) |
|
| 900 | + return true; |
|
| 901 | 901 | } |
| 902 | 902 | |
| 903 | 903 | |
@@ -920,12 +920,12 @@ discard block |
||
| 920 | 920 | * @return bool true s'il a le droit, false sinon |
| 921 | 921 | **/ |
| 922 | 922 | function autoriser_webmestre_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 923 | - return |
|
| 924 | - (defined('_ID_WEBMESTRES') ? |
|
| 925 | - in_array($qui['id_auteur'], explode(':', _ID_WEBMESTRES)) |
|
| 926 | - : $qui['webmestre'] === 'oui') |
|
| 927 | - and $qui['statut'] === '0minirezo' |
|
| 928 | - and !$qui['restreint']; |
|
| 923 | + return |
|
| 924 | + (defined('_ID_WEBMESTRES') ? |
|
| 925 | + in_array($qui['id_auteur'], explode(':', _ID_WEBMESTRES)) |
|
| 926 | + : $qui['webmestre'] === 'oui') |
|
| 927 | + and $qui['statut'] === '0minirezo' |
|
| 928 | + and !$qui['restreint']; |
|
| 929 | 929 | } |
| 930 | 930 | |
| 931 | 931 | /** |
@@ -943,9 +943,9 @@ discard block |
||
| 943 | 943 | * @return bool true s'il a le droit, false sinon |
| 944 | 944 | **/ |
| 945 | 945 | function autoriser_configurer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 946 | - return |
|
| 947 | - $qui['statut'] === '0minirezo' |
|
| 948 | - and !$qui['restreint']; |
|
| 946 | + return |
|
| 947 | + $qui['statut'] === '0minirezo' |
|
| 948 | + and !$qui['restreint']; |
|
| 949 | 949 | } |
| 950 | 950 | |
| 951 | 951 | /** |
@@ -963,8 +963,8 @@ discard block |
||
| 963 | 963 | * @return bool true s'il a le droit, false sinon |
| 964 | 964 | **/ |
| 965 | 965 | function autoriser_sauvegarder_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 966 | - return |
|
| 967 | - $qui['statut'] === '0minirezo'; |
|
| 966 | + return |
|
| 967 | + $qui['statut'] === '0minirezo'; |
|
| 968 | 968 | } |
| 969 | 969 | |
| 970 | 970 | /** |
@@ -982,7 +982,7 @@ discard block |
||
| 982 | 982 | * @return bool true s'il a le droit, false sinon |
| 983 | 983 | **/ |
| 984 | 984 | function autoriser_detruire_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 985 | - return autoriser('webmestre', null, 0, $qui, $opt); |
|
| 985 | + return autoriser('webmestre', null, 0, $qui, $opt); |
|
| 986 | 986 | } |
| 987 | 987 | |
| 988 | 988 | /** |
@@ -1001,23 +1001,23 @@ discard block |
||
| 1001 | 1001 | * @return bool true s'il a le droit, false sinon |
| 1002 | 1002 | **/ |
| 1003 | 1003 | function autoriser_auteur_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1004 | - // les admins peuvent "previsualiser" une page auteur |
|
| 1005 | - if ( |
|
| 1006 | - $qui['statut'] === '0minirezo' |
|
| 1007 | - and !$qui['restreint'] |
|
| 1008 | - ) { |
|
| 1009 | - return true; |
|
| 1010 | - } elseif ($id === 0) { |
|
| 1011 | - return false; |
|
| 1012 | - } |
|
| 1013 | - // "Voir en ligne" si l'auteur a un article publie |
|
| 1014 | - $n = sql_fetsel( |
|
| 1015 | - 'A.id_article', |
|
| 1016 | - 'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)', |
|
| 1017 | - "A.statut='publie' AND L.id_auteur=" . sql_quote($id) |
|
| 1018 | - ); |
|
| 1004 | + // les admins peuvent "previsualiser" une page auteur |
|
| 1005 | + if ( |
|
| 1006 | + $qui['statut'] === '0minirezo' |
|
| 1007 | + and !$qui['restreint'] |
|
| 1008 | + ) { |
|
| 1009 | + return true; |
|
| 1010 | + } elseif ($id === 0) { |
|
| 1011 | + return false; |
|
| 1012 | + } |
|
| 1013 | + // "Voir en ligne" si l'auteur a un article publie |
|
| 1014 | + $n = sql_fetsel( |
|
| 1015 | + 'A.id_article', |
|
| 1016 | + 'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)', |
|
| 1017 | + "A.statut='publie' AND L.id_auteur=" . sql_quote($id) |
|
| 1018 | + ); |
|
| 1019 | 1019 | |
| 1020 | - return $n ? true : false; |
|
| 1020 | + return $n ? true : false; |
|
| 1021 | 1021 | } |
| 1022 | 1022 | |
| 1023 | 1023 | |
@@ -1046,7 +1046,7 @@ discard block |
||
| 1046 | 1046 | * @return bool true s'il a le droit, false sinon |
| 1047 | 1047 | **/ |
| 1048 | 1048 | function autoriser_auteur_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1049 | - return ($qui['statut'] === '0minirezo'); |
|
| 1049 | + return ($qui['statut'] === '0minirezo'); |
|
| 1050 | 1050 | } |
| 1051 | 1051 | |
| 1052 | 1052 | |
@@ -1067,75 +1067,75 @@ discard block |
||
| 1067 | 1067 | * @return bool true s'il a le droit, false sinon |
| 1068 | 1068 | **/ |
| 1069 | 1069 | function autoriser_auteur_modifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1070 | - $id = intval($id); |
|
| 1071 | - |
|
| 1072 | - // Si pas admin : seulement le droit de modifier ses donnees perso, mais pas statut ni login |
|
| 1073 | - // la modif de l'email doit etre verifiee ou notifiee si possible, mais c'est a l'interface de gerer ca |
|
| 1074 | - if (!in_array($qui['statut'], ['0minirezo'])) { |
|
| 1075 | - if ( |
|
| 1076 | - $id == $qui['id_auteur'] |
|
| 1077 | - && empty($opt['statut']) |
|
| 1078 | - && empty($opt['webmestre']) |
|
| 1079 | - && empty($opt['restreintes']) |
|
| 1080 | - && empty($opt['login']) |
|
| 1081 | - ) { |
|
| 1082 | - return true; |
|
| 1083 | - } |
|
| 1084 | - return false; |
|
| 1085 | - } |
|
| 1086 | - |
|
| 1087 | - // Un admin restreint peut modifier/creer un auteur non-admin mais il |
|
| 1088 | - // n'a le droit ni de le promouvoir admin, ni de changer les rubriques |
|
| 1089 | - if ($qui['restreint']) { |
|
| 1090 | - if (isset($opt['webmestre']) and $opt['webmestre']) { |
|
| 1091 | - return false; |
|
| 1092 | - } elseif ( |
|
| 1093 | - (isset($opt['statut']) and ($opt['statut'] === '0minirezo')) |
|
| 1094 | - or (isset($opt['restreintes']) and $opt['restreintes']) |
|
| 1095 | - ) { |
|
| 1096 | - return false; |
|
| 1097 | - } else { |
|
| 1098 | - if ($id == $qui['id_auteur']) { |
|
| 1099 | - if (isset($opt['statut']) and $opt['statut']) { |
|
| 1100 | - return false; |
|
| 1101 | - } else { |
|
| 1102 | - return true; |
|
| 1103 | - } |
|
| 1104 | - } else { |
|
| 1105 | - if ($id_auteur = intval($id)) { |
|
| 1106 | - $t = sql_fetsel('statut', 'spip_auteurs', "id_auteur=$id_auteur"); |
|
| 1107 | - if ($t and $t['statut'] != '0minirezo') { |
|
| 1108 | - return true; |
|
| 1109 | - } else { |
|
| 1110 | - return false; |
|
| 1111 | - } |
|
| 1112 | - } // id = 0 => creation |
|
| 1113 | - else { |
|
| 1114 | - return true; |
|
| 1115 | - } |
|
| 1116 | - } |
|
| 1117 | - } |
|
| 1118 | - } |
|
| 1119 | - |
|
| 1120 | - // Un admin complet fait ce qu'il veut |
|
| 1121 | - // sauf se degrader |
|
| 1122 | - if ($id == $qui['id_auteur'] && (isset($opt['statut']) and $opt['statut'])) { |
|
| 1123 | - return false; |
|
| 1124 | - } elseif ( |
|
| 1125 | - isset($opt['webmestre']) |
|
| 1126 | - and $opt['webmestre'] |
|
| 1127 | - and (defined('_ID_WEBMESTRES') |
|
| 1128 | - or !autoriser('webmestre')) |
|
| 1129 | - ) { |
|
| 1130 | - // et toucher au statut webmestre si il ne l'est pas lui meme |
|
| 1131 | - // ou si les webmestres sont fixes par constante (securite) |
|
| 1132 | - return false; |
|
| 1133 | - } // et modifier un webmestre si il ne l'est pas lui meme |
|
| 1134 | - elseif (intval($id) and !autoriser('webmestre') and autoriser('webmestre', '', 0, $id)) { |
|
| 1135 | - return false; |
|
| 1136 | - } else { |
|
| 1137 | - return true; |
|
| 1138 | - } |
|
| 1070 | + $id = intval($id); |
|
| 1071 | + |
|
| 1072 | + // Si pas admin : seulement le droit de modifier ses donnees perso, mais pas statut ni login |
|
| 1073 | + // la modif de l'email doit etre verifiee ou notifiee si possible, mais c'est a l'interface de gerer ca |
|
| 1074 | + if (!in_array($qui['statut'], ['0minirezo'])) { |
|
| 1075 | + if ( |
|
| 1076 | + $id == $qui['id_auteur'] |
|
| 1077 | + && empty($opt['statut']) |
|
| 1078 | + && empty($opt['webmestre']) |
|
| 1079 | + && empty($opt['restreintes']) |
|
| 1080 | + && empty($opt['login']) |
|
| 1081 | + ) { |
|
| 1082 | + return true; |
|
| 1083 | + } |
|
| 1084 | + return false; |
|
| 1085 | + } |
|
| 1086 | + |
|
| 1087 | + // Un admin restreint peut modifier/creer un auteur non-admin mais il |
|
| 1088 | + // n'a le droit ni de le promouvoir admin, ni de changer les rubriques |
|
| 1089 | + if ($qui['restreint']) { |
|
| 1090 | + if (isset($opt['webmestre']) and $opt['webmestre']) { |
|
| 1091 | + return false; |
|
| 1092 | + } elseif ( |
|
| 1093 | + (isset($opt['statut']) and ($opt['statut'] === '0minirezo')) |
|
| 1094 | + or (isset($opt['restreintes']) and $opt['restreintes']) |
|
| 1095 | + ) { |
|
| 1096 | + return false; |
|
| 1097 | + } else { |
|
| 1098 | + if ($id == $qui['id_auteur']) { |
|
| 1099 | + if (isset($opt['statut']) and $opt['statut']) { |
|
| 1100 | + return false; |
|
| 1101 | + } else { |
|
| 1102 | + return true; |
|
| 1103 | + } |
|
| 1104 | + } else { |
|
| 1105 | + if ($id_auteur = intval($id)) { |
|
| 1106 | + $t = sql_fetsel('statut', 'spip_auteurs', "id_auteur=$id_auteur"); |
|
| 1107 | + if ($t and $t['statut'] != '0minirezo') { |
|
| 1108 | + return true; |
|
| 1109 | + } else { |
|
| 1110 | + return false; |
|
| 1111 | + } |
|
| 1112 | + } // id = 0 => creation |
|
| 1113 | + else { |
|
| 1114 | + return true; |
|
| 1115 | + } |
|
| 1116 | + } |
|
| 1117 | + } |
|
| 1118 | + } |
|
| 1119 | + |
|
| 1120 | + // Un admin complet fait ce qu'il veut |
|
| 1121 | + // sauf se degrader |
|
| 1122 | + if ($id == $qui['id_auteur'] && (isset($opt['statut']) and $opt['statut'])) { |
|
| 1123 | + return false; |
|
| 1124 | + } elseif ( |
|
| 1125 | + isset($opt['webmestre']) |
|
| 1126 | + and $opt['webmestre'] |
|
| 1127 | + and (defined('_ID_WEBMESTRES') |
|
| 1128 | + or !autoriser('webmestre')) |
|
| 1129 | + ) { |
|
| 1130 | + // et toucher au statut webmestre si il ne l'est pas lui meme |
|
| 1131 | + // ou si les webmestres sont fixes par constante (securite) |
|
| 1132 | + return false; |
|
| 1133 | + } // et modifier un webmestre si il ne l'est pas lui meme |
|
| 1134 | + elseif (intval($id) and !autoriser('webmestre') and autoriser('webmestre', '', 0, $id)) { |
|
| 1135 | + return false; |
|
| 1136 | + } else { |
|
| 1137 | + return true; |
|
| 1138 | + } |
|
| 1139 | 1139 | } |
| 1140 | 1140 | |
| 1141 | 1141 | |
@@ -1154,7 +1154,7 @@ discard block |
||
| 1154 | 1154 | * @return bool true s'il a le droit, false sinon |
| 1155 | 1155 | **/ |
| 1156 | 1156 | function autoriser_associerauteurs_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1157 | - return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 1157 | + return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 1158 | 1158 | } |
| 1159 | 1159 | |
| 1160 | 1160 | |
@@ -1173,7 +1173,7 @@ discard block |
||
| 1173 | 1173 | * @return bool true s'il a le droit, false sinon |
| 1174 | 1174 | **/ |
| 1175 | 1175 | function autoriser_chargerftp_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1176 | - return $qui['statut'] === '0minirezo'; |
|
| 1176 | + return $qui['statut'] === '0minirezo'; |
|
| 1177 | 1177 | } |
| 1178 | 1178 | |
| 1179 | 1179 | /** |
@@ -1191,7 +1191,7 @@ discard block |
||
| 1191 | 1191 | * @return bool true s'il a le droit, false sinon |
| 1192 | 1192 | **/ |
| 1193 | 1193 | function autoriser_debug_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1194 | - return $qui['statut'] === '0minirezo'; |
|
| 1194 | + return $qui['statut'] === '0minirezo'; |
|
| 1195 | 1195 | } |
| 1196 | 1196 | |
| 1197 | 1197 | /** |
@@ -1208,54 +1208,54 @@ discard block |
||
| 1208 | 1208 | * @return array Liste des rubriques |
| 1209 | 1209 | **/ |
| 1210 | 1210 | function liste_rubriques_auteur($id_auteur, $raz = false) { |
| 1211 | - static $restreint = []; |
|
| 1212 | - |
|
| 1213 | - if (!$id_auteur = intval($id_auteur)) { |
|
| 1214 | - return []; |
|
| 1215 | - } |
|
| 1216 | - if ($raz) { |
|
| 1217 | - unset($restreint[$id_auteur]); |
|
| 1218 | - } elseif (isset($restreint[$id_auteur])) { |
|
| 1219 | - return $restreint[$id_auteur]; |
|
| 1220 | - } |
|
| 1221 | - |
|
| 1222 | - $rubriques = []; |
|
| 1223 | - if ( |
|
| 1224 | - (!isset($GLOBALS['meta']['version_installee']) |
|
| 1225 | - or $GLOBALS['meta']['version_installee'] > 16428) |
|
| 1226 | - and $r = sql_allfetsel( |
|
| 1227 | - 'id_objet', |
|
| 1228 | - 'spip_auteurs_liens', |
|
| 1229 | - 'id_auteur=' . intval($id_auteur) . " AND objet='rubrique' AND id_objet!=0" |
|
| 1230 | - ) |
|
| 1231 | - and is_countable($r) ? count($r) : 0 |
|
| 1232 | - ) { |
|
| 1233 | - $r = array_column($r, 'id_objet'); |
|
| 1234 | - |
|
| 1235 | - // recuperer toute la branche, au format chaine enumeration |
|
| 1236 | - include_spip('inc/rubriques'); |
|
| 1237 | - $r = calcul_branche_in($r); |
|
| 1238 | - $r = explode(',', $r); |
|
| 1239 | - |
|
| 1240 | - // passer les rubriques en index, elimine les doublons |
|
| 1241 | - $r = array_flip($r); |
|
| 1242 | - // recuperer les index seuls |
|
| 1243 | - $r = array_keys($r); |
|
| 1244 | - // combiner pour avoir un tableau id_rubrique=>id_rubrique |
|
| 1245 | - // est-ce vraiment utile ? (on preserve la forme donnee par le code precedent) |
|
| 1246 | - $rubriques = array_combine($r, $r); |
|
| 1247 | - } |
|
| 1248 | - |
|
| 1249 | - // Affecter l'auteur session le cas echeant |
|
| 1250 | - if ( |
|
| 1251 | - isset($GLOBALS['visiteur_session']['id_auteur']) |
|
| 1252 | - and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur |
|
| 1253 | - ) { |
|
| 1254 | - $GLOBALS['visiteur_session']['restreint'] = $rubriques; |
|
| 1255 | - } |
|
| 1256 | - |
|
| 1257 | - |
|
| 1258 | - return $restreint[$id_auteur] = $rubriques; |
|
| 1211 | + static $restreint = []; |
|
| 1212 | + |
|
| 1213 | + if (!$id_auteur = intval($id_auteur)) { |
|
| 1214 | + return []; |
|
| 1215 | + } |
|
| 1216 | + if ($raz) { |
|
| 1217 | + unset($restreint[$id_auteur]); |
|
| 1218 | + } elseif (isset($restreint[$id_auteur])) { |
|
| 1219 | + return $restreint[$id_auteur]; |
|
| 1220 | + } |
|
| 1221 | + |
|
| 1222 | + $rubriques = []; |
|
| 1223 | + if ( |
|
| 1224 | + (!isset($GLOBALS['meta']['version_installee']) |
|
| 1225 | + or $GLOBALS['meta']['version_installee'] > 16428) |
|
| 1226 | + and $r = sql_allfetsel( |
|
| 1227 | + 'id_objet', |
|
| 1228 | + 'spip_auteurs_liens', |
|
| 1229 | + 'id_auteur=' . intval($id_auteur) . " AND objet='rubrique' AND id_objet!=0" |
|
| 1230 | + ) |
|
| 1231 | + and is_countable($r) ? count($r) : 0 |
|
| 1232 | + ) { |
|
| 1233 | + $r = array_column($r, 'id_objet'); |
|
| 1234 | + |
|
| 1235 | + // recuperer toute la branche, au format chaine enumeration |
|
| 1236 | + include_spip('inc/rubriques'); |
|
| 1237 | + $r = calcul_branche_in($r); |
|
| 1238 | + $r = explode(',', $r); |
|
| 1239 | + |
|
| 1240 | + // passer les rubriques en index, elimine les doublons |
|
| 1241 | + $r = array_flip($r); |
|
| 1242 | + // recuperer les index seuls |
|
| 1243 | + $r = array_keys($r); |
|
| 1244 | + // combiner pour avoir un tableau id_rubrique=>id_rubrique |
|
| 1245 | + // est-ce vraiment utile ? (on preserve la forme donnee par le code precedent) |
|
| 1246 | + $rubriques = array_combine($r, $r); |
|
| 1247 | + } |
|
| 1248 | + |
|
| 1249 | + // Affecter l'auteur session le cas echeant |
|
| 1250 | + if ( |
|
| 1251 | + isset($GLOBALS['visiteur_session']['id_auteur']) |
|
| 1252 | + and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur |
|
| 1253 | + ) { |
|
| 1254 | + $GLOBALS['visiteur_session']['restreint'] = $rubriques; |
|
| 1255 | + } |
|
| 1256 | + |
|
| 1257 | + |
|
| 1258 | + return $restreint[$id_auteur] = $rubriques; |
|
| 1259 | 1259 | } |
| 1260 | 1260 | |
| 1261 | 1261 | /** |
@@ -1273,7 +1273,7 @@ discard block |
||
| 1273 | 1273 | * @return bool true s'il a le droit, false sinon |
| 1274 | 1274 | **/ |
| 1275 | 1275 | function autoriser_rubrique_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1276 | - return autoriser('previsualiser'); |
|
| 1276 | + return autoriser('previsualiser'); |
|
| 1277 | 1277 | } |
| 1278 | 1278 | |
| 1279 | 1279 | /** |
@@ -1291,7 +1291,7 @@ discard block |
||
| 1291 | 1291 | * @return bool true s'il a le droit, false sinon |
| 1292 | 1292 | **/ |
| 1293 | 1293 | function autoriser_rubrique_iconifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1294 | - return autoriser('publierdans', 'rubrique', $id, $qui, $opt); |
|
| 1294 | + return autoriser('publierdans', 'rubrique', $id, $qui, $opt); |
|
| 1295 | 1295 | } |
| 1296 | 1296 | |
| 1297 | 1297 | /** |
@@ -1309,9 +1309,9 @@ discard block |
||
| 1309 | 1309 | * @return bool true s'il a le droit, false sinon |
| 1310 | 1310 | **/ |
| 1311 | 1311 | function autoriser_auteur_iconifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1312 | - $id = intval($id); |
|
| 1313 | - return (($id == $qui['id_auteur']) or |
|
| 1314 | - (($qui['statut'] === '0minirezo') and !$qui['restreint'])); |
|
| 1312 | + $id = intval($id); |
|
| 1313 | + return (($id == $qui['id_auteur']) or |
|
| 1314 | + (($qui['statut'] === '0minirezo') and !$qui['restreint'])); |
|
| 1315 | 1315 | } |
| 1316 | 1316 | |
| 1317 | 1317 | /** |
@@ -1329,8 +1329,8 @@ discard block |
||
| 1329 | 1329 | * @return bool true s'il a le droit, false sinon |
| 1330 | 1330 | **/ |
| 1331 | 1331 | function autoriser_iconifier_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1332 | - // par defaut, on a le droit d'iconifier si on a le droit de modifier |
|
| 1333 | - return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 1332 | + // par defaut, on a le droit d'iconifier si on a le droit de modifier |
|
| 1333 | + return autoriser('modifier', $type, $id, $qui, $opt); |
|
| 1334 | 1334 | } |
| 1335 | 1335 | |
| 1336 | 1336 | |
@@ -1350,7 +1350,7 @@ discard block |
||
| 1350 | 1350 | * @return true |
| 1351 | 1351 | **/ |
| 1352 | 1352 | function autoriser_ok_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1353 | - return true; |
|
| 1353 | + return true; |
|
| 1354 | 1354 | } |
| 1355 | 1355 | |
| 1356 | 1356 | /** |
@@ -1369,7 +1369,7 @@ discard block |
||
| 1369 | 1369 | * @return false |
| 1370 | 1370 | **/ |
| 1371 | 1371 | function autoriser_niet_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1372 | - return false; |
|
| 1372 | + return false; |
|
| 1373 | 1373 | } |
| 1374 | 1374 | |
| 1375 | 1375 | /** |
@@ -1387,11 +1387,11 @@ discard block |
||
| 1387 | 1387 | * @return bool true s'il a le droit, false sinon |
| 1388 | 1388 | **/ |
| 1389 | 1389 | function autoriser_base_reparer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1390 | - if (!autoriser('detruire') or _request('reinstall')) { |
|
| 1391 | - return false; |
|
| 1392 | - } |
|
| 1390 | + if (!autoriser('detruire') or _request('reinstall')) { |
|
| 1391 | + return false; |
|
| 1392 | + } |
|
| 1393 | 1393 | |
| 1394 | - return true; |
|
| 1394 | + return true; |
|
| 1395 | 1395 | } |
| 1396 | 1396 | |
| 1397 | 1397 | /** |
@@ -1409,7 +1409,7 @@ discard block |
||
| 1409 | 1409 | * @return true |
| 1410 | 1410 | **/ |
| 1411 | 1411 | function autoriser_infosperso_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1412 | - return true; |
|
| 1412 | + return true; |
|
| 1413 | 1413 | } |
| 1414 | 1414 | |
| 1415 | 1415 | /** |
@@ -1427,7 +1427,7 @@ discard block |
||
| 1427 | 1427 | * @return true |
| 1428 | 1428 | **/ |
| 1429 | 1429 | function autoriser_langage_configurer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1430 | - return true; |
|
| 1430 | + return true; |
|
| 1431 | 1431 | } |
| 1432 | 1432 | |
| 1433 | 1433 | /** |
@@ -1445,7 +1445,7 @@ discard block |
||
| 1445 | 1445 | * @return bool true s'il a le droit, false sinon |
| 1446 | 1446 | **/ |
| 1447 | 1447 | function autoriser_configurerlangage_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1448 | - return autoriser('configurer', '_langage', $id, $qui, $opt); |
|
| 1448 | + return autoriser('configurer', '_langage', $id, $qui, $opt); |
|
| 1449 | 1449 | } |
| 1450 | 1450 | |
| 1451 | 1451 | /** |
@@ -1463,7 +1463,7 @@ discard block |
||
| 1463 | 1463 | * @return true |
| 1464 | 1464 | **/ |
| 1465 | 1465 | function autoriser_preferences_configurer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1466 | - return true; |
|
| 1466 | + return true; |
|
| 1467 | 1467 | } |
| 1468 | 1468 | |
| 1469 | 1469 | /** |
@@ -1481,7 +1481,7 @@ discard block |
||
| 1481 | 1481 | * @return bool true s'il a le droit, false sinon |
| 1482 | 1482 | **/ |
| 1483 | 1483 | function autoriser_configurerpreferences_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1484 | - return autoriser('configurer', '_preferences', $id, $qui, $opt); |
|
| 1484 | + return autoriser('configurer', '_preferences', $id, $qui, $opt); |
|
| 1485 | 1485 | } |
| 1486 | 1486 | |
| 1487 | 1487 | /** |
@@ -1499,8 +1499,8 @@ discard block |
||
| 1499 | 1499 | * @return bool true s'il a le droit, false sinon |
| 1500 | 1500 | **/ |
| 1501 | 1501 | function autoriser_menudeveloppement_menugrandeentree_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1502 | - return (isset($GLOBALS['visiteur_session']['prefs']['activer_menudev']) |
|
| 1503 | - and $GLOBALS['visiteur_session']['prefs']['activer_menudev'] === 'oui'); |
|
| 1502 | + return (isset($GLOBALS['visiteur_session']['prefs']['activer_menudev']) |
|
| 1503 | + and $GLOBALS['visiteur_session']['prefs']['activer_menudev'] === 'oui'); |
|
| 1504 | 1504 | } |
| 1505 | 1505 | |
| 1506 | 1506 | /** |
@@ -1519,7 +1519,7 @@ discard block |
||
| 1519 | 1519 | * @return true |
| 1520 | 1520 | **/ |
| 1521 | 1521 | function autoriser_menugrandeentree_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1522 | - return true; |
|
| 1522 | + return true; |
|
| 1523 | 1523 | } |
| 1524 | 1524 | |
| 1525 | 1525 | /** |
@@ -1537,7 +1537,7 @@ discard block |
||
| 1537 | 1537 | * @return true |
| 1538 | 1538 | **/ |
| 1539 | 1539 | function autoriser_auteurs_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1540 | - return true; |
|
| 1540 | + return true; |
|
| 1541 | 1541 | } |
| 1542 | 1542 | |
| 1543 | 1543 | /** |
@@ -1555,7 +1555,7 @@ discard block |
||
| 1555 | 1555 | * @return bool true s'il a le droit, false sinon |
| 1556 | 1556 | **/ |
| 1557 | 1557 | function autoriser_auteurs_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1558 | - return autoriser('voir', '_auteurs', $id, $qui, $opt); |
|
| 1558 | + return autoriser('voir', '_auteurs', $id, $qui, $opt); |
|
| 1559 | 1559 | } |
| 1560 | 1560 | |
| 1561 | 1561 | /** |
@@ -1573,7 +1573,7 @@ discard block |
||
| 1573 | 1573 | * @return true |
| 1574 | 1574 | **/ |
| 1575 | 1575 | function autoriser_articles_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1576 | - return true; |
|
| 1576 | + return true; |
|
| 1577 | 1577 | } |
| 1578 | 1578 | |
| 1579 | 1579 | /** |
@@ -1591,7 +1591,7 @@ discard block |
||
| 1591 | 1591 | * @return bool true s'il a le droit, false sinon |
| 1592 | 1592 | **/ |
| 1593 | 1593 | function autoriser_articles_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1594 | - return autoriser('voir', '_articles', $id, $qui, $opt); |
|
| 1594 | + return autoriser('voir', '_articles', $id, $qui, $opt); |
|
| 1595 | 1595 | } |
| 1596 | 1596 | |
| 1597 | 1597 | /** |
@@ -1609,7 +1609,7 @@ discard block |
||
| 1609 | 1609 | * @return true |
| 1610 | 1610 | **/ |
| 1611 | 1611 | function autoriser_rubriques_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1612 | - return true; |
|
| 1612 | + return true; |
|
| 1613 | 1613 | } |
| 1614 | 1614 | |
| 1615 | 1615 | /** |
@@ -1627,7 +1627,7 @@ discard block |
||
| 1627 | 1627 | * @return bool true s'il a le droit, false sinon |
| 1628 | 1628 | **/ |
| 1629 | 1629 | function autoriser_rubriques_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1630 | - return autoriser('voir', '_rubriques', $id, $qui, $opt); |
|
| 1630 | + return autoriser('voir', '_rubriques', $id, $qui, $opt); |
|
| 1631 | 1631 | } |
| 1632 | 1632 | |
| 1633 | 1633 | /** |
@@ -1645,7 +1645,7 @@ discard block |
||
| 1645 | 1645 | * @return bool true s'il a le droit, false sinon |
| 1646 | 1646 | **/ |
| 1647 | 1647 | function autoriser_articlecreer_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1648 | - return verifier_table_non_vide(); |
|
| 1648 | + return verifier_table_non_vide(); |
|
| 1649 | 1649 | } |
| 1650 | 1650 | |
| 1651 | 1651 | |
@@ -1666,7 +1666,7 @@ discard block |
||
| 1666 | 1666 | * @return bool true s'il a le droit, false sinon |
| 1667 | 1667 | **/ |
| 1668 | 1668 | function autoriser_auteurcreer_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1669 | - return autoriser('creer', 'auteur', $id, $qui, $opt); |
|
| 1669 | + return autoriser('creer', 'auteur', $id, $qui, $opt); |
|
| 1670 | 1670 | } |
| 1671 | 1671 | |
| 1672 | 1672 | /** |
@@ -1684,13 +1684,13 @@ discard block |
||
| 1684 | 1684 | * @return bool true s'il a le droit, false sinon |
| 1685 | 1685 | **/ |
| 1686 | 1686 | function autoriser_visiteurs_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1687 | - include_spip('base/abstract_sql'); |
|
| 1688 | - return |
|
| 1689 | - $qui['statut'] === '0minirezo' and !$qui['restreint'] |
|
| 1690 | - and ( |
|
| 1691 | - $GLOBALS['meta']['accepter_visiteurs'] != 'non' |
|
| 1692 | - or sql_countsel('spip_auteurs', 'statut in ("6forum", "nouveau")') > 0 |
|
| 1693 | - ); |
|
| 1687 | + include_spip('base/abstract_sql'); |
|
| 1688 | + return |
|
| 1689 | + $qui['statut'] === '0minirezo' and !$qui['restreint'] |
|
| 1690 | + and ( |
|
| 1691 | + $GLOBALS['meta']['accepter_visiteurs'] != 'non' |
|
| 1692 | + or sql_countsel('spip_auteurs', 'statut in ("6forum", "nouveau")') > 0 |
|
| 1693 | + ); |
|
| 1694 | 1694 | } |
| 1695 | 1695 | |
| 1696 | 1696 | /** |
@@ -1708,7 +1708,7 @@ discard block |
||
| 1708 | 1708 | * @return bool true s'il a le droit, false sinon |
| 1709 | 1709 | **/ |
| 1710 | 1710 | function autoriser_suiviedito_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1711 | - return $qui['statut'] === '0minirezo'; |
|
| 1711 | + return $qui['statut'] === '0minirezo'; |
|
| 1712 | 1712 | } |
| 1713 | 1713 | |
| 1714 | 1714 | /** |
@@ -1726,7 +1726,7 @@ discard block |
||
| 1726 | 1726 | * @return bool true s'il a le droit, false sinon |
| 1727 | 1727 | **/ |
| 1728 | 1728 | function autoriser_synchro_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1729 | - return $qui['statut'] === '0minirezo'; |
|
| 1729 | + return $qui['statut'] === '0minirezo'; |
|
| 1730 | 1730 | } |
| 1731 | 1731 | |
| 1732 | 1732 | /** |
@@ -1744,7 +1744,7 @@ discard block |
||
| 1744 | 1744 | * @return bool true s'il a le droit, false sinon |
| 1745 | 1745 | **/ |
| 1746 | 1746 | function autoriser_configurerinteractions_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1747 | - return autoriser('configurer', '_interactions', $id, $qui, $opt); |
|
| 1747 | + return autoriser('configurer', '_interactions', $id, $qui, $opt); |
|
| 1748 | 1748 | } |
| 1749 | 1749 | |
| 1750 | 1750 | /** |
@@ -1762,7 +1762,7 @@ discard block |
||
| 1762 | 1762 | * @return bool true s'il a le droit, false sinon |
| 1763 | 1763 | **/ |
| 1764 | 1764 | function autoriser_configurerlangue_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1765 | - return autoriser('configurer', '_langue', $id, $qui, $opt); |
|
| 1765 | + return autoriser('configurer', '_langue', $id, $qui, $opt); |
|
| 1766 | 1766 | } |
| 1767 | 1767 | |
| 1768 | 1768 | /** |
@@ -1780,7 +1780,7 @@ discard block |
||
| 1780 | 1780 | * @return bool true s'il a le droit, false sinon |
| 1781 | 1781 | **/ |
| 1782 | 1782 | function autoriser_configurermultilinguisme_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1783 | - return autoriser('configurer', '_multilinguisme', $id, $qui, $opt); |
|
| 1783 | + return autoriser('configurer', '_multilinguisme', $id, $qui, $opt); |
|
| 1784 | 1784 | } |
| 1785 | 1785 | |
| 1786 | 1786 | /** |
@@ -1798,7 +1798,7 @@ discard block |
||
| 1798 | 1798 | * @return bool true s'il a le droit, false sinon |
| 1799 | 1799 | **/ |
| 1800 | 1800 | function autoriser_configurercontenu_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1801 | - return autoriser('configurer', '_contenu', $id, $qui, $opt); |
|
| 1801 | + return autoriser('configurer', '_contenu', $id, $qui, $opt); |
|
| 1802 | 1802 | } |
| 1803 | 1803 | |
| 1804 | 1804 | /** |
@@ -1816,7 +1816,7 @@ discard block |
||
| 1816 | 1816 | * @return bool true s'il a le droit, false sinon |
| 1817 | 1817 | **/ |
| 1818 | 1818 | function autoriser_configureravancees_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1819 | - return autoriser('configurer', '_avancees', $id, $qui, $opt); |
|
| 1819 | + return autoriser('configurer', '_avancees', $id, $qui, $opt); |
|
| 1820 | 1820 | } |
| 1821 | 1821 | |
| 1822 | 1822 | /** |
@@ -1834,7 +1834,7 @@ discard block |
||
| 1834 | 1834 | * @return bool true s'il a le droit, false sinon |
| 1835 | 1835 | **/ |
| 1836 | 1836 | function autoriser_adminplugin_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1837 | - return autoriser('configurer', '_plugins', $id, $qui, $opt); |
|
| 1837 | + return autoriser('configurer', '_plugins', $id, $qui, $opt); |
|
| 1838 | 1838 | } |
| 1839 | 1839 | |
| 1840 | 1840 | /** |
@@ -1852,7 +1852,7 @@ discard block |
||
| 1852 | 1852 | * @return bool true s'il a le droit, false sinon |
| 1853 | 1853 | **/ |
| 1854 | 1854 | function autoriser_admintech_menu_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1855 | - return autoriser('detruire', $type, $id, $qui, $opt); |
|
| 1855 | + return autoriser('detruire', $type, $id, $qui, $opt); |
|
| 1856 | 1856 | } |
| 1857 | 1857 | |
| 1858 | 1858 | /** |
@@ -1870,7 +1870,7 @@ discard block |
||
| 1870 | 1870 | * @return bool true s'il a le droit, false sinon |
| 1871 | 1871 | **/ |
| 1872 | 1872 | function autoriser_queue_purger_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1873 | - return autoriser('webmestre'); |
|
| 1873 | + return autoriser('webmestre'); |
|
| 1874 | 1874 | } |
| 1875 | 1875 | |
| 1876 | 1876 | |
@@ -1890,11 +1890,11 @@ discard block |
||
| 1890 | 1890 | * @return bool true s'il a le droit, false sinon |
| 1891 | 1891 | **/ |
| 1892 | 1892 | function autoriser_echafauder_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 1893 | - if (test_espace_prive()) { |
|
| 1894 | - return intval($qui['id_auteur']) ? true : false; |
|
| 1895 | - } else { |
|
| 1896 | - return autoriser('webmestre', '', $id, $qui, $opt); |
|
| 1897 | - } |
|
| 1893 | + if (test_espace_prive()) { |
|
| 1894 | + return intval($qui['id_auteur']) ? true : false; |
|
| 1895 | + } else { |
|
| 1896 | + return autoriser('webmestre', '', $id, $qui, $opt); |
|
| 1897 | + } |
|
| 1898 | 1898 | } |
| 1899 | 1899 | |
| 1900 | 1900 | |
@@ -1909,27 +1909,27 @@ discard block |
||
| 1909 | 1909 | * Identifiants d'auteurs |
| 1910 | 1910 | */ |
| 1911 | 1911 | function auteurs_objet($objet, $id_objet, $cond = '') { |
| 1912 | - $objet = objet_type($objet); |
|
| 1913 | - $where = [ |
|
| 1914 | - 'objet=' . sql_quote($objet), |
|
| 1915 | - 'id_objet=' . intval($id_objet) |
|
| 1916 | - ]; |
|
| 1917 | - if (!empty($cond)) { |
|
| 1918 | - if (is_array($cond)) { |
|
| 1919 | - $where = array_merge($where, $cond); |
|
| 1920 | - } else { |
|
| 1921 | - $where[] = $cond; |
|
| 1922 | - } |
|
| 1923 | - } |
|
| 1924 | - $auteurs = sql_allfetsel( |
|
| 1925 | - 'id_auteur', |
|
| 1926 | - 'spip_auteurs_liens', |
|
| 1927 | - $where |
|
| 1928 | - ); |
|
| 1929 | - if (is_array($auteurs)) { |
|
| 1930 | - return array_column($auteurs, 'id_auteur'); |
|
| 1931 | - } |
|
| 1932 | - return []; |
|
| 1912 | + $objet = objet_type($objet); |
|
| 1913 | + $where = [ |
|
| 1914 | + 'objet=' . sql_quote($objet), |
|
| 1915 | + 'id_objet=' . intval($id_objet) |
|
| 1916 | + ]; |
|
| 1917 | + if (!empty($cond)) { |
|
| 1918 | + if (is_array($cond)) { |
|
| 1919 | + $where = array_merge($where, $cond); |
|
| 1920 | + } else { |
|
| 1921 | + $where[] = $cond; |
|
| 1922 | + } |
|
| 1923 | + } |
|
| 1924 | + $auteurs = sql_allfetsel( |
|
| 1925 | + 'id_auteur', |
|
| 1926 | + 'spip_auteurs_liens', |
|
| 1927 | + $where |
|
| 1928 | + ); |
|
| 1929 | + if (is_array($auteurs)) { |
|
| 1930 | + return array_column($auteurs, 'id_auteur'); |
|
| 1931 | + } |
|
| 1932 | + return []; |
|
| 1933 | 1933 | } |
| 1934 | 1934 | |
| 1935 | 1935 | /** |
@@ -1944,11 +1944,11 @@ discard block |
||
| 1944 | 1944 | * - false : serveur SQL indisponible |
| 1945 | 1945 | */ |
| 1946 | 1946 | function auteurs_article($id_article, $cond = '') { |
| 1947 | - return sql_allfetsel( |
|
| 1948 | - 'id_auteur', |
|
| 1949 | - 'spip_auteurs_liens', |
|
| 1950 | - "objet='article' AND id_objet=" . intval($id_article) . ($cond ? " AND $cond" : '') |
|
| 1951 | - ); |
|
| 1947 | + return sql_allfetsel( |
|
| 1948 | + 'id_auteur', |
|
| 1949 | + 'spip_auteurs_liens', |
|
| 1950 | + "objet='article' AND id_objet=" . intval($id_article) . ($cond ? " AND $cond" : '') |
|
| 1951 | + ); |
|
| 1952 | 1952 | } |
| 1953 | 1953 | |
| 1954 | 1954 | |
@@ -1962,7 +1962,7 @@ discard block |
||
| 1962 | 1962 | */ |
| 1963 | 1963 | function acces_restreint_rubrique($id_rubrique) { |
| 1964 | 1964 | |
| 1965 | - return (isset($GLOBALS['connect_id_rubrique'][$id_rubrique])); |
|
| 1965 | + return (isset($GLOBALS['connect_id_rubrique'][$id_rubrique])); |
|
| 1966 | 1966 | } |
| 1967 | 1967 | |
| 1968 | 1968 | |
@@ -1975,12 +1975,12 @@ discard block |
||
| 1975 | 1975 | * @return bool true si un parent existe |
| 1976 | 1976 | */ |
| 1977 | 1977 | function verifier_table_non_vide($table = 'spip_rubriques') { |
| 1978 | - static $done = []; |
|
| 1979 | - if (!isset($done[$table])) { |
|
| 1980 | - $done[$table] = sql_countsel($table) > 0; |
|
| 1981 | - } |
|
| 1978 | + static $done = []; |
|
| 1979 | + if (!isset($done[$table])) { |
|
| 1980 | + $done[$table] = sql_countsel($table) > 0; |
|
| 1981 | + } |
|
| 1982 | 1982 | |
| 1983 | - return $done[$table]; |
|
| 1983 | + return $done[$table]; |
|
| 1984 | 1984 | } |
| 1985 | 1985 | |
| 1986 | 1986 | /** |
@@ -2007,15 +2007,15 @@ discard block |
||
| 2007 | 2007 | */ |
| 2008 | 2008 | function autoriser_inscrireauteur_dist($faire, $quoi, $id, $qui, $opt) { |
| 2009 | 2009 | |
| 2010 | - $s = array_search($quoi, $GLOBALS['liste_des_statuts']); |
|
| 2011 | - switch ($s) { |
|
| 2012 | - case 'info_redacteurs': |
|
| 2013 | - return ($GLOBALS['meta']['accepter_inscriptions'] === 'oui'); |
|
| 2014 | - case 'info_visiteurs': |
|
| 2015 | - return ($GLOBALS['meta']['accepter_visiteurs'] === 'oui' or $GLOBALS['meta']['forums_publics'] === 'abo'); |
|
| 2016 | - } |
|
| 2010 | + $s = array_search($quoi, $GLOBALS['liste_des_statuts']); |
|
| 2011 | + switch ($s) { |
|
| 2012 | + case 'info_redacteurs': |
|
| 2013 | + return ($GLOBALS['meta']['accepter_inscriptions'] === 'oui'); |
|
| 2014 | + case 'info_visiteurs': |
|
| 2015 | + return ($GLOBALS['meta']['accepter_visiteurs'] === 'oui' or $GLOBALS['meta']['forums_publics'] === 'abo'); |
|
| 2016 | + } |
|
| 2017 | 2017 | |
| 2018 | - return false; |
|
| 2018 | + return false; |
|
| 2019 | 2019 | } |
| 2020 | 2020 | |
| 2021 | 2021 | /** |
@@ -2033,7 +2033,7 @@ discard block |
||
| 2033 | 2033 | * @return bool true s'il a le droit, false sinon |
| 2034 | 2034 | **/ |
| 2035 | 2035 | function autoriser_inscription_relancer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 2036 | - return $qui['statut'] === '0minirezo' and !$qui['restreint']; |
|
| 2036 | + return $qui['statut'] === '0minirezo' and !$qui['restreint']; |
|
| 2037 | 2037 | } |
| 2038 | 2038 | |
| 2039 | 2039 | /** |
@@ -2051,5 +2051,5 @@ discard block |
||
| 2051 | 2051 | * @return bool true s'il a le droit, false sinon |
| 2052 | 2052 | **/ |
| 2053 | 2053 | function autoriser_phpinfos_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 2054 | - return autoriser('webmestre'); |
|
| 2054 | + return autoriser('webmestre'); |
|
| 2055 | 2055 | } |
@@ -4,585 +4,585 @@ |
||
| 4 | 4 | // ** ne pas modifier le fichier ** |
| 5 | 5 | |
| 6 | 6 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 7 | - return; |
|
| 7 | + return; |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | $GLOBALS[$GLOBALS['idx_lang']] = array( |
| 11 | 11 | |
| 12 | - // A |
|
| 13 | - 'activer_plugin' => 'Aktivera insticksmodulen', |
|
| 14 | - 'affichage' => 'Visa', |
|
| 15 | - 'aide_non_disponible' => 'Den här delen av direkthjälpen finns inte i det aktuella språket', |
|
| 16 | - 'auteur' => 'Redaktör', |
|
| 17 | - 'avis_acces_interdit' => 'Tillträde förbjudet.', |
|
| 18 | - 'avis_article_modifie' => 'Varning, @nom_auteur_modif@ har arbetat på den här artikeln för @date_diff@ minuter sen', |
|
| 19 | - 'avis_aucun_resultat' => 'Hittade inga resultat', |
|
| 20 | - 'avis_chemin_invalide_1' => 'Sökvägen du har angett', |
|
| 21 | - 'avis_chemin_invalide_2' => 'är ogiltig. Återgå till den föregående sidan och kontrollera den angivna informationen', |
|
| 22 | - 'avis_connexion_echec_1' => 'Anslutningen till SQL-servern misslyckades.', |
|
| 23 | - 'avis_connexion_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.', |
|
| 24 | - 'avis_connexion_echec_3' => '<b>OBS</b> På många servrar måste du <b>begära</b> aktivering av din databas innan du kan använda den. Om du inte lyckas med uppkopplingen, se till att den är aktiverad.', |
|
| 25 | - 'avis_connexion_ldap_echec_1' => 'Anslutning till LDAP-server misslyckades.', |
|
| 26 | - 'avis_connexion_ldap_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.', |
|
| 27 | - 'avis_connexion_ldap_echec_3' => 'Alternativt kan du välja att inte använda LDAP stöd för att importera användare.', |
|
| 28 | - 'avis_deplacement_rubrique' => 'Varning! Den här avdelningen innehåller @contient_breves@ notiser@scb@: om du flyttar den, markera i kryssrutan för att bekräfta.', |
|
| 29 | - 'avis_erreur_connexion_mysql' => 'Fel på SQL-förbindelsen', |
|
| 30 | - 'avis_espace_interdit' => '<b>Förbjudet område</b><p>SPIP är redan installerat.', # MODIF |
|
| 31 | - 'avis_lecture_noms_bases_1' => 'Installerings-scriptet kunde inte läsa namnen på de installerade databaserna.', |
|
| 32 | - 'avis_lecture_noms_bases_2' => 'Antingen finns det ingen tillgänglig databas eller så är funktionen som listar |
|
| 12 | + // A |
|
| 13 | + 'activer_plugin' => 'Aktivera insticksmodulen', |
|
| 14 | + 'affichage' => 'Visa', |
|
| 15 | + 'aide_non_disponible' => 'Den här delen av direkthjälpen finns inte i det aktuella språket', |
|
| 16 | + 'auteur' => 'Redaktör', |
|
| 17 | + 'avis_acces_interdit' => 'Tillträde förbjudet.', |
|
| 18 | + 'avis_article_modifie' => 'Varning, @nom_auteur_modif@ har arbetat på den här artikeln för @date_diff@ minuter sen', |
|
| 19 | + 'avis_aucun_resultat' => 'Hittade inga resultat', |
|
| 20 | + 'avis_chemin_invalide_1' => 'Sökvägen du har angett', |
|
| 21 | + 'avis_chemin_invalide_2' => 'är ogiltig. Återgå till den föregående sidan och kontrollera den angivna informationen', |
|
| 22 | + 'avis_connexion_echec_1' => 'Anslutningen till SQL-servern misslyckades.', |
|
| 23 | + 'avis_connexion_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.', |
|
| 24 | + 'avis_connexion_echec_3' => '<b>OBS</b> På många servrar måste du <b>begära</b> aktivering av din databas innan du kan använda den. Om du inte lyckas med uppkopplingen, se till att den är aktiverad.', |
|
| 25 | + 'avis_connexion_ldap_echec_1' => 'Anslutning till LDAP-server misslyckades.', |
|
| 26 | + 'avis_connexion_ldap_echec_2' => 'Återgå till den föregående sidan och kontrollera informationen du angivit.', |
|
| 27 | + 'avis_connexion_ldap_echec_3' => 'Alternativt kan du välja att inte använda LDAP stöd för att importera användare.', |
|
| 28 | + 'avis_deplacement_rubrique' => 'Varning! Den här avdelningen innehåller @contient_breves@ notiser@scb@: om du flyttar den, markera i kryssrutan för att bekräfta.', |
|
| 29 | + 'avis_erreur_connexion_mysql' => 'Fel på SQL-förbindelsen', |
|
| 30 | + 'avis_espace_interdit' => '<b>Förbjudet område</b><p>SPIP är redan installerat.', # MODIF |
|
| 31 | + 'avis_lecture_noms_bases_1' => 'Installerings-scriptet kunde inte läsa namnen på de installerade databaserna.', |
|
| 32 | + 'avis_lecture_noms_bases_2' => 'Antingen finns det ingen tillgänglig databas eller så är funktionen som listar |
|
| 33 | 33 | databaser inaktiverad av säkerhetsskäl (det är fallet hos många webbvärdar).', |
| 34 | - 'avis_lecture_noms_bases_3' => 'I fråga om det andra alternativet är det möjligt att en databas med ditt användarnamn kan användas:', |
|
| 35 | - 'avis_non_acces_page' => 'Du har inte tillgång till den här sidan.', |
|
| 36 | - 'avis_operation_echec' => 'Operationen misslyckades.', |
|
| 37 | - 'avis_operation_impossible' => 'Operationen omöjlig att genomföra', |
|
| 38 | - 'avis_suppression_base' => 'OBS! Radering av data är permanent och kan inte göras ogjord.', |
|
| 34 | + 'avis_lecture_noms_bases_3' => 'I fråga om det andra alternativet är det möjligt att en databas med ditt användarnamn kan användas:', |
|
| 35 | + 'avis_non_acces_page' => 'Du har inte tillgång till den här sidan.', |
|
| 36 | + 'avis_operation_echec' => 'Operationen misslyckades.', |
|
| 37 | + 'avis_operation_impossible' => 'Operationen omöjlig att genomföra', |
|
| 38 | + 'avis_suppression_base' => 'OBS! Radering av data är permanent och kan inte göras ogjord.', |
|
| 39 | 39 | |
| 40 | - // B |
|
| 41 | - 'bouton_acces_ldap' => 'Lägg till en LDAP-katalog >>', |
|
| 42 | - 'bouton_ajouter' => 'Lägg till', |
|
| 43 | - 'bouton_annuler' => 'Avbryt', |
|
| 44 | - 'bouton_demande_publication' => 'Begär att den här artikeln ska publiceras', |
|
| 45 | - 'bouton_desactive_tout' => 'Avaktivera alla', |
|
| 46 | - 'bouton_desinstaller' => 'Avinstallera', |
|
| 47 | - 'bouton_effacer_tout' => 'Radera ALLA', |
|
| 48 | - 'bouton_envoyer_message' => 'Färdigt meddelande: skicka', |
|
| 49 | - 'bouton_modifier' => 'Ändra', |
|
| 50 | - 'bouton_radio_afficher' => 'Visa', |
|
| 51 | - 'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Synas i listan över anslutna redaktörere', |
|
| 52 | - 'bouton_radio_envoi_annonces_adresse' => 'Skicka meddelanden till adressen:', |
|
| 53 | - 'bouton_radio_envoi_liste_nouveautes' => 'Skicka lista över senaste notiser', |
|
| 54 | - 'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Inte synas i listan över anslutna redaktörere', |
|
| 55 | - 'bouton_radio_non_envoi_annonces_editoriales' => 'Skicka inga redaktionella meddelanden', |
|
| 56 | - 'bouton_redirection' => 'OMPEKA', |
|
| 57 | - 'bouton_relancer_installation' => 'Kör installationen igen', |
|
| 58 | - 'bouton_suivant' => 'Nästa', |
|
| 59 | - 'bouton_tenter_recuperation' => 'Försök till reparation', |
|
| 60 | - 'bouton_test_proxy' => 'Testa proxyn', |
|
| 61 | - 'bouton_vider_cache' => 'Töm cachen', |
|
| 40 | + // B |
|
| 41 | + 'bouton_acces_ldap' => 'Lägg till en LDAP-katalog >>', |
|
| 42 | + 'bouton_ajouter' => 'Lägg till', |
|
| 43 | + 'bouton_annuler' => 'Avbryt', |
|
| 44 | + 'bouton_demande_publication' => 'Begär att den här artikeln ska publiceras', |
|
| 45 | + 'bouton_desactive_tout' => 'Avaktivera alla', |
|
| 46 | + 'bouton_desinstaller' => 'Avinstallera', |
|
| 47 | + 'bouton_effacer_tout' => 'Radera ALLA', |
|
| 48 | + 'bouton_envoyer_message' => 'Färdigt meddelande: skicka', |
|
| 49 | + 'bouton_modifier' => 'Ändra', |
|
| 50 | + 'bouton_radio_afficher' => 'Visa', |
|
| 51 | + 'bouton_radio_apparaitre_liste_redacteurs_connectes' => 'Synas i listan över anslutna redaktörere', |
|
| 52 | + 'bouton_radio_envoi_annonces_adresse' => 'Skicka meddelanden till adressen:', |
|
| 53 | + 'bouton_radio_envoi_liste_nouveautes' => 'Skicka lista över senaste notiser', |
|
| 54 | + 'bouton_radio_non_apparaitre_liste_redacteurs_connectes' => 'Inte synas i listan över anslutna redaktörere', |
|
| 55 | + 'bouton_radio_non_envoi_annonces_editoriales' => 'Skicka inga redaktionella meddelanden', |
|
| 56 | + 'bouton_redirection' => 'OMPEKA', |
|
| 57 | + 'bouton_relancer_installation' => 'Kör installationen igen', |
|
| 58 | + 'bouton_suivant' => 'Nästa', |
|
| 59 | + 'bouton_tenter_recuperation' => 'Försök till reparation', |
|
| 60 | + 'bouton_test_proxy' => 'Testa proxyn', |
|
| 61 | + 'bouton_vider_cache' => 'Töm cachen', |
|
| 62 | 62 | |
| 63 | - // C |
|
| 64 | - 'cache_modifiable_webmestre' => 'Den här parametern kan ändras av den webbansvariga.', |
|
| 65 | - 'calendrier_synchro' => 'Om du använder ett kalenderprogram som är kompatibelt med <b>iCal</b> kan du synkronisera det med informationen på den här webbplatsen.', |
|
| 66 | - 'config_activer_champs' => 'Aktivera följande fält', |
|
| 67 | - 'config_choix_base_sup' => 'Ge namnet på en databas på servern', |
|
| 68 | - 'config_erreur_base_sup' => 'SPIP har inte tillgång till de existerande databaserna', |
|
| 69 | - 'config_info_base_sup_disponibles' => 'Ytterligare databaser dit databasfrågor kan skickas:', |
|
| 70 | - 'config_info_logos' => 'Alla objekt på sajten kan kan ha sin egen logotype och dessutom en "mouseover" logotype', |
|
| 71 | - 'config_info_logos_utiliser' => 'Använd logotyper', |
|
| 72 | - 'config_info_logos_utiliser_non' => 'Använd inte logotyper', |
|
| 73 | - 'config_info_logos_utiliser_survol' => 'Använd "mouseover" logotyper', |
|
| 74 | - 'config_info_logos_utiliser_survol_non' => 'Använd inte "mouseover" logotyper', |
|
| 75 | - 'config_info_redirection' => 'Genom att aktivera det här valet kan du skapa virtuella artiklar, som enbart är länkar till artiklar som publicerats på andra sajter oavsett om det är SPIP-sajter eller ej.', |
|
| 76 | - 'config_redirection' => 'Virtuella artiklar', |
|
| 77 | - 'config_titre_base_sup' => 'Konfigurera ytterligare en databas', |
|
| 78 | - 'config_titre_base_sup_choix' => 'Välj ytterligare en databas', |
|
| 79 | - 'connexion_ldap' => 'ldapuppkoppling:', |
|
| 63 | + // C |
|
| 64 | + 'cache_modifiable_webmestre' => 'Den här parametern kan ändras av den webbansvariga.', |
|
| 65 | + 'calendrier_synchro' => 'Om du använder ett kalenderprogram som är kompatibelt med <b>iCal</b> kan du synkronisera det med informationen på den här webbplatsen.', |
|
| 66 | + 'config_activer_champs' => 'Aktivera följande fält', |
|
| 67 | + 'config_choix_base_sup' => 'Ge namnet på en databas på servern', |
|
| 68 | + 'config_erreur_base_sup' => 'SPIP har inte tillgång till de existerande databaserna', |
|
| 69 | + 'config_info_base_sup_disponibles' => 'Ytterligare databaser dit databasfrågor kan skickas:', |
|
| 70 | + 'config_info_logos' => 'Alla objekt på sajten kan kan ha sin egen logotype och dessutom en "mouseover" logotype', |
|
| 71 | + 'config_info_logos_utiliser' => 'Använd logotyper', |
|
| 72 | + 'config_info_logos_utiliser_non' => 'Använd inte logotyper', |
|
| 73 | + 'config_info_logos_utiliser_survol' => 'Använd "mouseover" logotyper', |
|
| 74 | + 'config_info_logos_utiliser_survol_non' => 'Använd inte "mouseover" logotyper', |
|
| 75 | + 'config_info_redirection' => 'Genom att aktivera det här valet kan du skapa virtuella artiklar, som enbart är länkar till artiklar som publicerats på andra sajter oavsett om det är SPIP-sajter eller ej.', |
|
| 76 | + 'config_redirection' => 'Virtuella artiklar', |
|
| 77 | + 'config_titre_base_sup' => 'Konfigurera ytterligare en databas', |
|
| 78 | + 'config_titre_base_sup_choix' => 'Välj ytterligare en databas', |
|
| 79 | + 'connexion_ldap' => 'ldapuppkoppling:', |
|
| 80 | 80 | |
| 81 | - // D |
|
| 82 | - 'date_mot_heures' => 'h', |
|
| 81 | + // D |
|
| 82 | + 'date_mot_heures' => 'h', |
|
| 83 | 83 | |
| 84 | - // E |
|
| 85 | - 'email' => 'e-post', |
|
| 86 | - 'email_2' => 'e-post:', |
|
| 87 | - 'entree_adresse_annuaire' => 'Katalogens adress', |
|
| 88 | - 'entree_adresse_email' => 'Din e-postadress', |
|
| 89 | - 'entree_base_donnee_1' => 'Adress till databasen', |
|
| 90 | - 'entree_base_donnee_2' => '(Ofta är det samma adress som till din webbplats, ibland är det "localhost" och ibland lämnas det helt tomt.)', |
|
| 91 | - 'entree_biographie' => 'Kort biografi med några få ord.', |
|
| 92 | - 'entree_chemin_acces' => '<b>Fyll i</b> sökvägen:', |
|
| 93 | - 'entree_cle_pgp' => 'Din PGP-nyckel', |
|
| 94 | - 'entree_contenu_rubrique' => '(Några få ord som beskriver innehållet i avdelningen)', |
|
| 95 | - 'entree_identifiants_connexion' => 'Dina anslutningsuppgifter', |
|
| 96 | - 'entree_informations_connexion_ldap' => 'Fyll i det här formuläret med uppgifter om din anslutning till LDAP. Din system eller nätverks administratör kan ge dig dessa.', |
|
| 97 | - 'entree_infos_perso' => 'Vem är du?', |
|
| 98 | - 'entree_interieur_rubrique' => 'I avdelning:', |
|
| 99 | - 'entree_liens_sites' => '<b>Hyperlänk</b> (referens, sajt att besöka...)', |
|
| 100 | - 'entree_login' => 'Dina användaruppgifter', |
|
| 101 | - 'entree_login_connexion_1' => 'Användarupgifter för anslutningen', |
|
| 102 | - 'entree_login_connexion_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)', |
|
| 103 | - 'entree_mot_passe' => 'Ditt lösenord', |
|
| 104 | - 'entree_mot_passe_1' => 'Lösenord för anslutningen', |
|
| 105 | - 'entree_mot_passe_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)', |
|
| 106 | - 'entree_nom_fichier' => 'Skriv in filnamnet @texte_compresse@', |
|
| 107 | - 'entree_nom_pseudo' => 'Ditt namn eller alias', |
|
| 108 | - 'entree_nom_pseudo_1' => '(Ditt namn eller alias)', |
|
| 109 | - 'entree_nom_site' => 'Din webbplats namn', |
|
| 110 | - 'entree_nouveau_passe' => 'Nytt lösenord', |
|
| 111 | - 'entree_passe_ldap' => 'Lösenord', |
|
| 112 | - 'entree_port_annuaire' => 'Katalogens portnummer', |
|
| 113 | - 'entree_signature' => 'Signatur', |
|
| 114 | - 'entree_titre_obligatoire' => '<b>Title</b> [Krävs]<br />', |
|
| 115 | - 'entree_url' => 'Din webbplats URL', |
|
| 116 | - 'erreur_plugin_fichier_absent' => 'Filen saknas', |
|
| 117 | - 'erreur_plugin_fichier_def_absent' => 'Definitionsfilen saknas', |
|
| 118 | - 'erreur_plugin_nom_fonction_interdit' => 'Förbjudet namn för funktionen', |
|
| 119 | - 'erreur_plugin_nom_manquant' => 'plugin-namnet saknas', |
|
| 120 | - 'erreur_plugin_prefix_manquant' => 'Pluginens prefix odefinierad', |
|
| 121 | - 'erreur_plugin_tag_plugin_absent' => '<plugin> saknas i definitionsfilen', |
|
| 122 | - 'erreur_plugin_version_manquant' => 'Denna plugin saknar version.', |
|
| 84 | + // E |
|
| 85 | + 'email' => 'e-post', |
|
| 86 | + 'email_2' => 'e-post:', |
|
| 87 | + 'entree_adresse_annuaire' => 'Katalogens adress', |
|
| 88 | + 'entree_adresse_email' => 'Din e-postadress', |
|
| 89 | + 'entree_base_donnee_1' => 'Adress till databasen', |
|
| 90 | + 'entree_base_donnee_2' => '(Ofta är det samma adress som till din webbplats, ibland är det "localhost" och ibland lämnas det helt tomt.)', |
|
| 91 | + 'entree_biographie' => 'Kort biografi med några få ord.', |
|
| 92 | + 'entree_chemin_acces' => '<b>Fyll i</b> sökvägen:', |
|
| 93 | + 'entree_cle_pgp' => 'Din PGP-nyckel', |
|
| 94 | + 'entree_contenu_rubrique' => '(Några få ord som beskriver innehållet i avdelningen)', |
|
| 95 | + 'entree_identifiants_connexion' => 'Dina anslutningsuppgifter', |
|
| 96 | + 'entree_informations_connexion_ldap' => 'Fyll i det här formuläret med uppgifter om din anslutning till LDAP. Din system eller nätverks administratör kan ge dig dessa.', |
|
| 97 | + 'entree_infos_perso' => 'Vem är du?', |
|
| 98 | + 'entree_interieur_rubrique' => 'I avdelning:', |
|
| 99 | + 'entree_liens_sites' => '<b>Hyperlänk</b> (referens, sajt att besöka...)', |
|
| 100 | + 'entree_login' => 'Dina användaruppgifter', |
|
| 101 | + 'entree_login_connexion_1' => 'Användarupgifter för anslutningen', |
|
| 102 | + 'entree_login_connexion_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)', |
|
| 103 | + 'entree_mot_passe' => 'Ditt lösenord', |
|
| 104 | + 'entree_mot_passe_1' => 'Lösenord för anslutningen', |
|
| 105 | + 'entree_mot_passe_2' => '(Är ibland samma som lösenordet för FTP-åtkomst och ibland kan det lämnas tomt)', |
|
| 106 | + 'entree_nom_fichier' => 'Skriv in filnamnet @texte_compresse@', |
|
| 107 | + 'entree_nom_pseudo' => 'Ditt namn eller alias', |
|
| 108 | + 'entree_nom_pseudo_1' => '(Ditt namn eller alias)', |
|
| 109 | + 'entree_nom_site' => 'Din webbplats namn', |
|
| 110 | + 'entree_nouveau_passe' => 'Nytt lösenord', |
|
| 111 | + 'entree_passe_ldap' => 'Lösenord', |
|
| 112 | + 'entree_port_annuaire' => 'Katalogens portnummer', |
|
| 113 | + 'entree_signature' => 'Signatur', |
|
| 114 | + 'entree_titre_obligatoire' => '<b>Title</b> [Krävs]<br />', |
|
| 115 | + 'entree_url' => 'Din webbplats URL', |
|
| 116 | + 'erreur_plugin_fichier_absent' => 'Filen saknas', |
|
| 117 | + 'erreur_plugin_fichier_def_absent' => 'Definitionsfilen saknas', |
|
| 118 | + 'erreur_plugin_nom_fonction_interdit' => 'Förbjudet namn för funktionen', |
|
| 119 | + 'erreur_plugin_nom_manquant' => 'plugin-namnet saknas', |
|
| 120 | + 'erreur_plugin_prefix_manquant' => 'Pluginens prefix odefinierad', |
|
| 121 | + 'erreur_plugin_tag_plugin_absent' => '<plugin> saknas i definitionsfilen', |
|
| 122 | + 'erreur_plugin_version_manquant' => 'Denna plugin saknar version.', |
|
| 123 | 123 | |
| 124 | - // I |
|
| 125 | - 'ical_info1' => 'Denna sida visar flera metoder att hålla dig informerad om aktiviteter på sajten.', |
|
| 126 | - 'ical_info2' => 'För mer information, tveka inte om att besöka <a href="@spipnet@">SPIP’s dokumentation</a>.', # MODIF |
|
| 127 | - 'ical_info_calendrier' => 'Du kan använda två kalendrar. En är en sajtkarta med alla publicerade artiklar. Den andra innehåller redaktionella meddelanden och dina senaste privata meddelanden: Den är personlig, tack vare en genererad nyckel som du kan förändra när som helst genom att byta lösenord.', |
|
| 128 | - 'ical_methode_http' => 'Nerladdning', |
|
| 129 | - 'ical_methode_webcal' => 'Synkronisering (webcal://)', # MODIF |
|
| 130 | - 'ical_texte_prive' => 'Den här kalendern som är personlig, innnehåller dina egna redaktionella händelser på den här sajten (uppgifter, egna möten, inlämnade artiklar och nyheter...).', |
|
| 131 | - 'ical_texte_public' => 'Den här kalendern låter dig följa den publika aktiviteten på sajten (publicerade artiklar och nyheter).', |
|
| 132 | - 'ical_texte_rss' => 'Du kan syndikerar de senaste nyheterna på den är sajten i vilken XML/RSS-läsare som helst. Det är samma format som gör det möjligt att läsa de senaste nyheterna på andra sajter som använder ett kompatibelt format. (syndikerade sajter).', |
|
| 133 | - 'ical_titre_js' => 'Javascript', |
|
| 134 | - 'ical_titre_mailing' => 'E-postlista', |
|
| 135 | - 'ical_titre_rss' => 'Syndikeringsfiler', |
|
| 136 | - 'icone_activer_cookie' => 'Sätt en cookie', |
|
| 137 | - 'icone_admin_plugin' => 'Hantera plugin’s', |
|
| 138 | - 'icone_afficher_auteurs' => 'Visa redaktörer', |
|
| 139 | - 'icone_afficher_visiteurs' => 'Visa besökare', |
|
| 140 | - 'icone_arret_discussion' => 'Avsluta diskussionen', |
|
| 141 | - 'icone_calendrier' => 'Kalender', |
|
| 142 | - 'icone_creer_auteur' => 'Skapa en ny redaktör och koppla honom (henne) till den här artikeln', |
|
| 143 | - 'icone_creer_mot_cle' => 'Skapa ett nytt nyckelord och länka det till artikeln', |
|
| 144 | - 'icone_creer_rubrique_2' => 'Skapa en ny avdelning', |
|
| 145 | - 'icone_modifier_article' => 'Editera artikeln', |
|
| 146 | - 'icone_modifier_rubrique' => 'Editera avdelningen', |
|
| 147 | - 'icone_relancer_signataire' => 'Kontakta personen igen', |
|
| 148 | - 'icone_retour' => 'Tillbaka', |
|
| 149 | - 'icone_retour_article' => 'Tillbaka till artikeln', |
|
| 150 | - 'icone_supprimer_cookie' => 'Radera cookien', |
|
| 151 | - 'icone_supprimer_rubrique' => 'Radera den här avdelningen', |
|
| 152 | - 'icone_supprimer_signature' => 'Radera den här signaturen', |
|
| 153 | - 'icone_valider_signature' => 'Validera signaturen', |
|
| 154 | - 'image_administrer_rubrique' => 'Du kan hantera den här avdelningen', |
|
| 155 | - 'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF |
|
| 156 | - 'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF |
|
| 157 | - 'info_1_article' => '1 artikel', |
|
| 158 | - 'info_activer_cookie' => 'Du kan aktivera en <b>administrationscookie</b>, som tillåter dig |
|
| 124 | + // I |
|
| 125 | + 'ical_info1' => 'Denna sida visar flera metoder att hålla dig informerad om aktiviteter på sajten.', |
|
| 126 | + 'ical_info2' => 'För mer information, tveka inte om att besöka <a href="@spipnet@">SPIP’s dokumentation</a>.', # MODIF |
|
| 127 | + 'ical_info_calendrier' => 'Du kan använda två kalendrar. En är en sajtkarta med alla publicerade artiklar. Den andra innehåller redaktionella meddelanden och dina senaste privata meddelanden: Den är personlig, tack vare en genererad nyckel som du kan förändra när som helst genom att byta lösenord.', |
|
| 128 | + 'ical_methode_http' => 'Nerladdning', |
|
| 129 | + 'ical_methode_webcal' => 'Synkronisering (webcal://)', # MODIF |
|
| 130 | + 'ical_texte_prive' => 'Den här kalendern som är personlig, innnehåller dina egna redaktionella händelser på den här sajten (uppgifter, egna möten, inlämnade artiklar och nyheter...).', |
|
| 131 | + 'ical_texte_public' => 'Den här kalendern låter dig följa den publika aktiviteten på sajten (publicerade artiklar och nyheter).', |
|
| 132 | + 'ical_texte_rss' => 'Du kan syndikerar de senaste nyheterna på den är sajten i vilken XML/RSS-läsare som helst. Det är samma format som gör det möjligt att läsa de senaste nyheterna på andra sajter som använder ett kompatibelt format. (syndikerade sajter).', |
|
| 133 | + 'ical_titre_js' => 'Javascript', |
|
| 134 | + 'ical_titre_mailing' => 'E-postlista', |
|
| 135 | + 'ical_titre_rss' => 'Syndikeringsfiler', |
|
| 136 | + 'icone_activer_cookie' => 'Sätt en cookie', |
|
| 137 | + 'icone_admin_plugin' => 'Hantera plugin’s', |
|
| 138 | + 'icone_afficher_auteurs' => 'Visa redaktörer', |
|
| 139 | + 'icone_afficher_visiteurs' => 'Visa besökare', |
|
| 140 | + 'icone_arret_discussion' => 'Avsluta diskussionen', |
|
| 141 | + 'icone_calendrier' => 'Kalender', |
|
| 142 | + 'icone_creer_auteur' => 'Skapa en ny redaktör och koppla honom (henne) till den här artikeln', |
|
| 143 | + 'icone_creer_mot_cle' => 'Skapa ett nytt nyckelord och länka det till artikeln', |
|
| 144 | + 'icone_creer_rubrique_2' => 'Skapa en ny avdelning', |
|
| 145 | + 'icone_modifier_article' => 'Editera artikeln', |
|
| 146 | + 'icone_modifier_rubrique' => 'Editera avdelningen', |
|
| 147 | + 'icone_relancer_signataire' => 'Kontakta personen igen', |
|
| 148 | + 'icone_retour' => 'Tillbaka', |
|
| 149 | + 'icone_retour_article' => 'Tillbaka till artikeln', |
|
| 150 | + 'icone_supprimer_cookie' => 'Radera cookien', |
|
| 151 | + 'icone_supprimer_rubrique' => 'Radera den här avdelningen', |
|
| 152 | + 'icone_supprimer_signature' => 'Radera den här signaturen', |
|
| 153 | + 'icone_valider_signature' => 'Validera signaturen', |
|
| 154 | + 'image_administrer_rubrique' => 'Du kan hantera den här avdelningen', |
|
| 155 | + 'impossible_modifier_login_auteur' => 'Impossible de modifier le login.', # MODIF |
|
| 156 | + 'impossible_modifier_pass_auteur' => 'Impossible de modifier le mot de passe.', # MODIF |
|
| 157 | + 'info_1_article' => '1 artikel', |
|
| 158 | + 'info_activer_cookie' => 'Du kan aktivera en <b>administrationscookie</b>, som tillåter dig |
|
| 159 | 159 | att enkelt växla mellan den publika och den privata delen.', |
| 160 | - 'info_administrateur' => 'Administratör', |
|
| 161 | - 'info_administrateur_1' => 'Administratör', |
|
| 162 | - 'info_administrateur_2' => 'på sajten (<i>använd med försiktighet</i>)', |
|
| 163 | - 'info_administrateur_site_01' => 'Om du är en sajt-administratör, var vänlig', |
|
| 164 | - 'info_administrateur_site_02' => 'klicka på den här länken', |
|
| 165 | - 'info_administrateurs' => 'Administratörer', |
|
| 166 | - 'info_administrer_rubrique' => 'Du kan hantera den här avdelningen', |
|
| 167 | - 'info_adresse' => 'till adressen:', |
|
| 168 | - 'info_adresse_url' => 'Din sajts publika URL', |
|
| 169 | - 'info_aide_en_ligne' => 'SPIP Online Hjälp', |
|
| 170 | - 'info_ajout_image' => 'När du lägget till filer som bifogade dokument till en artikel, |
|
| 160 | + 'info_administrateur' => 'Administratör', |
|
| 161 | + 'info_administrateur_1' => 'Administratör', |
|
| 162 | + 'info_administrateur_2' => 'på sajten (<i>använd med försiktighet</i>)', |
|
| 163 | + 'info_administrateur_site_01' => 'Om du är en sajt-administratör, var vänlig', |
|
| 164 | + 'info_administrateur_site_02' => 'klicka på den här länken', |
|
| 165 | + 'info_administrateurs' => 'Administratörer', |
|
| 166 | + 'info_administrer_rubrique' => 'Du kan hantera den här avdelningen', |
|
| 167 | + 'info_adresse' => 'till adressen:', |
|
| 168 | + 'info_adresse_url' => 'Din sajts publika URL', |
|
| 169 | + 'info_aide_en_ligne' => 'SPIP Online Hjälp', |
|
| 170 | + 'info_ajout_image' => 'När du lägget till filer som bifogade dokument till en artikel, |
|
| 171 | 171 | kan SPIP automatiskt skapa miniatyrer av de |
| 172 | 172 | inlagda bilderna. Det tillåter till exempel |
| 173 | 173 | att man automatiskt skapar ett galleri eller en portfolio.', |
| 174 | - 'info_ajouter_rubrique' => 'lägg till en annan avdelning:', |
|
| 175 | - 'info_annonce_nouveautes' => 'Senaste nyheterna', |
|
| 176 | - 'info_article' => 'artikel', |
|
| 177 | - 'info_article_2' => 'artiklar', |
|
| 178 | - 'info_article_a_paraitre' => 'Fördaterade artiklar som kommer att publiceras', |
|
| 179 | - 'info_articles_02' => 'artiklar', |
|
| 180 | - 'info_articles_2' => 'Artiklar', |
|
| 181 | - 'info_articles_auteur' => 'Den här redaktörens artiklar', |
|
| 182 | - 'info_articles_trouves' => 'Artiklar hittade', |
|
| 183 | - 'info_attente_validation' => 'Dina artiklar som väntar på validering', |
|
| 184 | - 'info_aujourdhui' => 'idag:', |
|
| 185 | - 'info_auteurs' => 'Redaktörer', |
|
| 186 | - 'info_auteurs_par_tri' => 'Redaktörer@partri@', |
|
| 187 | - 'info_auteurs_trouves' => 'Redaktörer funna', |
|
| 188 | - 'info_authentification_externe' => 'Extern autentifiering', |
|
| 189 | - 'info_avertissement' => 'Varning', |
|
| 190 | - 'info_barre_outils' => 'med dess verktygsfält?', |
|
| 191 | - 'info_base_installee' => 'Databasen är skapad', |
|
| 192 | - 'info_chapeau' => 'Ingress', |
|
| 193 | - 'info_chapeau_2' => 'Introduktion:', |
|
| 194 | - 'info_chemin_acces_1' => 'inställningar: <b>sökväg i katalogen</b>', |
|
| 195 | - 'info_chemin_acces_2' => 'Från och med nu måste du konfigurera sökvägen till katalogen information. Det är nödvändigt för att kunna läsa användarprofilerna som är sparade i katalogen.', |
|
| 196 | - 'info_chemin_acces_annuaire' => 'Inställningar: <b>Sökväg i katalogen</b>', |
|
| 197 | - 'info_choix_base' => 'Tredje steget:', |
|
| 198 | - 'info_code_acces' => 'Glöm inte ditt eget lösenord!', |
|
| 199 | - 'info_config_suivi' => 'Om den här adressen är en mailing lista, kan du under adressen visa var man kan registrera sig. Det kan vara en URL (till exempel en webbsida där man kan registrera sig), eller en e-postadress med en speciell ärenderad (till exempel: <tt>@adresse_suivi@?subject=subscribe</tt>):', |
|
| 200 | - 'info_config_suivi_explication' => 'Du kan anmäla dig till sajtens nyhetsbrev. Du kommer då att automatiskt få meddelanden om artiklar och nyheter som laddats upp för publicering.', |
|
| 201 | - 'info_confirmer_passe' => 'Bekräfta ditt nya lösenord:', |
|
| 202 | - 'info_connexion_base' => 'Försöker att ansluta till databasen', |
|
| 203 | - 'info_connexion_ldap_ok' => 'Din förbindelse till LDAP-servern lyckades.</b><p> Du kan gå vidare till nästa steg.</p>', # MODIF |
|
| 204 | - 'info_connexion_mysql' => 'Din databasförbindelse', |
|
| 205 | - 'info_connexion_ok' => 'Förbindelsen lyckades.', |
|
| 206 | - 'info_contact' => 'Kontakt', |
|
| 207 | - 'info_contenu_articles' => 'Innehåll i artiklarna', |
|
| 208 | - 'info_creation_paragraphe' => '(För att skapa stycken, räcker det att lämna tomma rader.)', # MODIF |
|
| 209 | - 'info_creation_rubrique' => 'Innan du kan skriva artiklar,<br /> måste du skapa åtminstone en avdelning.<br />', |
|
| 210 | - 'info_creation_tables' => 'Skapar databastabeller', |
|
| 211 | - 'info_creer_base' => '<b>Skapa</b> en ny databas:', |
|
| 212 | - 'info_dans_rubrique' => 'I avdelningen:', |
|
| 213 | - 'info_date_publication_anterieure' => 'Datum för tidigare publicering:', |
|
| 214 | - 'info_date_referencement' => 'DATUM DÅ SAJTEN LÄNKADES:', |
|
| 215 | - 'info_derniere_etape' => 'Klart!', |
|
| 216 | - 'info_descriptif' => 'Beskrivning:', |
|
| 217 | - 'info_desinstaller_plugin' => 'raderar data och avaktiverar tillägget', |
|
| 218 | - 'info_discussion_cours' => 'Pågående diskussion', |
|
| 219 | - 'info_ecrire_article' => 'Innan du kan skriva artiklar, ymåste du skapa minst en avdelning.', |
|
| 220 | - 'info_email_envoi' => 'Avsändaren mailadress (frivilligt)', |
|
| 221 | - 'info_email_envoi_txt' => 'Skriv in avsändarens e-postadress som används när man sänder mejlen (som default används mottagarens adress som avsändaradress) :', |
|
| 222 | - 'info_email_webmestre' => 'Webmasterns mejladress (frivillig)', # MODIF |
|
| 223 | - 'info_envoi_email_automatique' => 'Automatisk e-post', |
|
| 224 | - 'info_envoyer_maintenant' => 'Skicka nu', |
|
| 225 | - 'info_etape_suivante' => 'Gå till nästa steg', |
|
| 226 | - 'info_etape_suivante_1' => 'Du kan fortsätta till nästa steg.', |
|
| 227 | - 'info_etape_suivante_2' => 'Du kan fortsätta till nästa steg.', |
|
| 228 | - 'info_exportation_base' => 'Exportera databasen till @archive@', |
|
| 229 | - 'info_facilite_suivi_activite' => 'För att underlätta att följa de redaktionella; |
|
| 174 | + 'info_ajouter_rubrique' => 'lägg till en annan avdelning:', |
|
| 175 | + 'info_annonce_nouveautes' => 'Senaste nyheterna', |
|
| 176 | + 'info_article' => 'artikel', |
|
| 177 | + 'info_article_2' => 'artiklar', |
|
| 178 | + 'info_article_a_paraitre' => 'Fördaterade artiklar som kommer att publiceras', |
|
| 179 | + 'info_articles_02' => 'artiklar', |
|
| 180 | + 'info_articles_2' => 'Artiklar', |
|
| 181 | + 'info_articles_auteur' => 'Den här redaktörens artiklar', |
|
| 182 | + 'info_articles_trouves' => 'Artiklar hittade', |
|
| 183 | + 'info_attente_validation' => 'Dina artiklar som väntar på validering', |
|
| 184 | + 'info_aujourdhui' => 'idag:', |
|
| 185 | + 'info_auteurs' => 'Redaktörer', |
|
| 186 | + 'info_auteurs_par_tri' => 'Redaktörer@partri@', |
|
| 187 | + 'info_auteurs_trouves' => 'Redaktörer funna', |
|
| 188 | + 'info_authentification_externe' => 'Extern autentifiering', |
|
| 189 | + 'info_avertissement' => 'Varning', |
|
| 190 | + 'info_barre_outils' => 'med dess verktygsfält?', |
|
| 191 | + 'info_base_installee' => 'Databasen är skapad', |
|
| 192 | + 'info_chapeau' => 'Ingress', |
|
| 193 | + 'info_chapeau_2' => 'Introduktion:', |
|
| 194 | + 'info_chemin_acces_1' => 'inställningar: <b>sökväg i katalogen</b>', |
|
| 195 | + 'info_chemin_acces_2' => 'Från och med nu måste du konfigurera sökvägen till katalogen information. Det är nödvändigt för att kunna läsa användarprofilerna som är sparade i katalogen.', |
|
| 196 | + 'info_chemin_acces_annuaire' => 'Inställningar: <b>Sökväg i katalogen</b>', |
|
| 197 | + 'info_choix_base' => 'Tredje steget:', |
|
| 198 | + 'info_code_acces' => 'Glöm inte ditt eget lösenord!', |
|
| 199 | + 'info_config_suivi' => 'Om den här adressen är en mailing lista, kan du under adressen visa var man kan registrera sig. Det kan vara en URL (till exempel en webbsida där man kan registrera sig), eller en e-postadress med en speciell ärenderad (till exempel: <tt>@adresse_suivi@?subject=subscribe</tt>):', |
|
| 200 | + 'info_config_suivi_explication' => 'Du kan anmäla dig till sajtens nyhetsbrev. Du kommer då att automatiskt få meddelanden om artiklar och nyheter som laddats upp för publicering.', |
|
| 201 | + 'info_confirmer_passe' => 'Bekräfta ditt nya lösenord:', |
|
| 202 | + 'info_connexion_base' => 'Försöker att ansluta till databasen', |
|
| 203 | + 'info_connexion_ldap_ok' => 'Din förbindelse till LDAP-servern lyckades.</b><p> Du kan gå vidare till nästa steg.</p>', # MODIF |
|
| 204 | + 'info_connexion_mysql' => 'Din databasförbindelse', |
|
| 205 | + 'info_connexion_ok' => 'Förbindelsen lyckades.', |
|
| 206 | + 'info_contact' => 'Kontakt', |
|
| 207 | + 'info_contenu_articles' => 'Innehåll i artiklarna', |
|
| 208 | + 'info_creation_paragraphe' => '(För att skapa stycken, räcker det att lämna tomma rader.)', # MODIF |
|
| 209 | + 'info_creation_rubrique' => 'Innan du kan skriva artiklar,<br /> måste du skapa åtminstone en avdelning.<br />', |
|
| 210 | + 'info_creation_tables' => 'Skapar databastabeller', |
|
| 211 | + 'info_creer_base' => '<b>Skapa</b> en ny databas:', |
|
| 212 | + 'info_dans_rubrique' => 'I avdelningen:', |
|
| 213 | + 'info_date_publication_anterieure' => 'Datum för tidigare publicering:', |
|
| 214 | + 'info_date_referencement' => 'DATUM DÅ SAJTEN LÄNKADES:', |
|
| 215 | + 'info_derniere_etape' => 'Klart!', |
|
| 216 | + 'info_descriptif' => 'Beskrivning:', |
|
| 217 | + 'info_desinstaller_plugin' => 'raderar data och avaktiverar tillägget', |
|
| 218 | + 'info_discussion_cours' => 'Pågående diskussion', |
|
| 219 | + 'info_ecrire_article' => 'Innan du kan skriva artiklar, ymåste du skapa minst en avdelning.', |
|
| 220 | + 'info_email_envoi' => 'Avsändaren mailadress (frivilligt)', |
|
| 221 | + 'info_email_envoi_txt' => 'Skriv in avsändarens e-postadress som används när man sänder mejlen (som default används mottagarens adress som avsändaradress) :', |
|
| 222 | + 'info_email_webmestre' => 'Webmasterns mejladress (frivillig)', # MODIF |
|
| 223 | + 'info_envoi_email_automatique' => 'Automatisk e-post', |
|
| 224 | + 'info_envoyer_maintenant' => 'Skicka nu', |
|
| 225 | + 'info_etape_suivante' => 'Gå till nästa steg', |
|
| 226 | + 'info_etape_suivante_1' => 'Du kan fortsätta till nästa steg.', |
|
| 227 | + 'info_etape_suivante_2' => 'Du kan fortsätta till nästa steg.', |
|
| 228 | + 'info_exportation_base' => 'Exportera databasen till @archive@', |
|
| 229 | + 'info_facilite_suivi_activite' => 'För att underlätta att följa de redaktionella; |
|
| 230 | 230 | aktiviteterna, kan SPIP skicka medddelanden via e-post, exempelvis till en maillista för redaktörer, |
| 231 | 231 | angående publiceringar och godkännanden.', # MODIF |
| 232 | - 'info_fichiers_authent' => 'Lösenordsfil ".htpasswd"', |
|
| 233 | - 'info_gauche_auteurs' => 'Här hittar du alla redaktörer på sajten. |
|
| 232 | + 'info_fichiers_authent' => 'Lösenordsfil ".htpasswd"', |
|
| 233 | + 'info_gauche_auteurs' => 'Här hittar du alla redaktörer på sajten. |
|
| 234 | 234 | Status på var och en av dem visas av färgen på ikonen (administratör = grön; redaktör = gul).', |
| 235 | - 'info_gauche_auteurs_exterieurs' => 'Externa redaktörer utan behörighet på sajten, visas med en blå ikon; raderade redaktörer med en soptunna.', # MODIF |
|
| 236 | - 'info_generation_miniatures_images' => 'Skapande av tumnagelbilder.', |
|
| 237 | - 'info_hebergeur_desactiver_envoi_email' => 'Vissa webhotell avaktiverar automatisk mejl |
|
| 235 | + 'info_gauche_auteurs_exterieurs' => 'Externa redaktörer utan behörighet på sajten, visas med en blå ikon; raderade redaktörer med en soptunna.', # MODIF |
|
| 236 | + 'info_generation_miniatures_images' => 'Skapande av tumnagelbilder.', |
|
| 237 | + 'info_hebergeur_desactiver_envoi_email' => 'Vissa webhotell avaktiverar automatisk mejl |
|
| 238 | 238 | på deras servrar. Om så är fallet kan följande |
| 239 | 239 | funktioner hos SPIP inte användas.', |
| 240 | - 'info_hier' => 'I går:', |
|
| 241 | - 'info_identification_publique' => 'Din publika identitet...', |
|
| 242 | - 'info_image_process' => 'Välj den bästa metoden för att skapa miniatyrer genom att klicka på motsvarande bild.', |
|
| 243 | - 'info_image_process2' => '<b>OBS!.</b> <i>Om du inte kan se någon bild, så är din server inte konfigurerad för att använda sådana verktyg. Om du vill använda dessa finesser så kontakta din leverantörs tekniska support och be dem installera utökningarna för «GD» eller «Imagick».</i>', # MODIF |
|
| 244 | - 'info_informations_personnelles' => 'Personlig information', |
|
| 245 | - 'info_inscription_automatique' => 'Automatisk registreing av nya redaktörer', |
|
| 246 | - 'info_jeu_caractere' => 'Sajtens teckenuppsättning', |
|
| 247 | - 'info_jours' => 'dagar', |
|
| 248 | - 'info_laisser_champs_vides' => 'Lämna dessa fält tomma)', |
|
| 249 | - 'info_langues' => 'Sajtens språk', |
|
| 250 | - 'info_lien_hypertexte' => 'Hyperlänk:', |
|
| 251 | - 'info_liste_redacteurs_connectes' => 'Inlogggade redaktörer', |
|
| 252 | - 'info_login_existant' => 'Användarnamnet finns redan.', |
|
| 253 | - 'info_login_trop_court' => 'Användarnamnet är för kort.', |
|
| 254 | - 'info_logos' => 'Logotyperna', |
|
| 255 | - 'info_maximum' => 'maximum:', |
|
| 256 | - 'info_meme_rubrique' => 'I samma avdelning', |
|
| 257 | - 'info_message_en_redaction' => 'utkorg', |
|
| 258 | - 'info_message_technique' => 'Tekniskt meddelande:', |
|
| 259 | - 'info_messagerie_interne' => 'Internmeddelande', |
|
| 260 | - 'info_mise_a_niveau_base' => 'SQL database upgradering', |
|
| 261 | - 'info_mise_a_niveau_base_2' => '{{Warning!}} Du har installerat {äldre} |
|
| 240 | + 'info_hier' => 'I går:', |
|
| 241 | + 'info_identification_publique' => 'Din publika identitet...', |
|
| 242 | + 'info_image_process' => 'Välj den bästa metoden för att skapa miniatyrer genom att klicka på motsvarande bild.', |
|
| 243 | + 'info_image_process2' => '<b>OBS!.</b> <i>Om du inte kan se någon bild, så är din server inte konfigurerad för att använda sådana verktyg. Om du vill använda dessa finesser så kontakta din leverantörs tekniska support och be dem installera utökningarna för «GD» eller «Imagick».</i>', # MODIF |
|
| 244 | + 'info_informations_personnelles' => 'Personlig information', |
|
| 245 | + 'info_inscription_automatique' => 'Automatisk registreing av nya redaktörer', |
|
| 246 | + 'info_jeu_caractere' => 'Sajtens teckenuppsättning', |
|
| 247 | + 'info_jours' => 'dagar', |
|
| 248 | + 'info_laisser_champs_vides' => 'Lämna dessa fält tomma)', |
|
| 249 | + 'info_langues' => 'Sajtens språk', |
|
| 250 | + 'info_lien_hypertexte' => 'Hyperlänk:', |
|
| 251 | + 'info_liste_redacteurs_connectes' => 'Inlogggade redaktörer', |
|
| 252 | + 'info_login_existant' => 'Användarnamnet finns redan.', |
|
| 253 | + 'info_login_trop_court' => 'Användarnamnet är för kort.', |
|
| 254 | + 'info_logos' => 'Logotyperna', |
|
| 255 | + 'info_maximum' => 'maximum:', |
|
| 256 | + 'info_meme_rubrique' => 'I samma avdelning', |
|
| 257 | + 'info_message_en_redaction' => 'utkorg', |
|
| 258 | + 'info_message_technique' => 'Tekniskt meddelande:', |
|
| 259 | + 'info_messagerie_interne' => 'Internmeddelande', |
|
| 260 | + 'info_mise_a_niveau_base' => 'SQL database upgradering', |
|
| 261 | + 'info_mise_a_niveau_base_2' => '{{Warning!}} Du har installerat {äldre} |
|
| 262 | 262 | SPIP filer än de som redan |
| 263 | 263 | varit installerade på sajten: Du riskerar att förlora databasen |
| 264 | 264 | och ha en sajt som inte längre fungerar.<br />{{återinstallera |
| 265 | 265 | SPIP filerna.}}', |
| 266 | - 'info_modifier_auteur' => 'Editera detaljer för redaktören:', |
|
| 267 | - 'info_modifier_rubrique' => 'Editera avdelningen:', |
|
| 268 | - 'info_modifier_titre' => 'Editera: @titre@', |
|
| 269 | - 'info_mon_site_spip' => 'Min SPIP-sajt', |
|
| 270 | - 'info_moyenne' => 'genomsnitt:', |
|
| 271 | - 'info_multi_cet_article' => 'Den här artikelns språk:', |
|
| 272 | - 'info_multi_langues_choisies' => 'Var vänlig, välj tillgängliga språk för redaktörerna bland språken nedan. |
|
| 266 | + 'info_modifier_auteur' => 'Editera detaljer för redaktören:', |
|
| 267 | + 'info_modifier_rubrique' => 'Editera avdelningen:', |
|
| 268 | + 'info_modifier_titre' => 'Editera: @titre@', |
|
| 269 | + 'info_mon_site_spip' => 'Min SPIP-sajt', |
|
| 270 | + 'info_moyenne' => 'genomsnitt:', |
|
| 271 | + 'info_multi_cet_article' => 'Den här artikelns språk:', |
|
| 272 | + 'info_multi_langues_choisies' => 'Var vänlig, välj tillgängliga språk för redaktörerna bland språken nedan. |
|
| 273 | 273 | Språk som redan används på din sajt (högst upp på listan) kan inte avaktiveras.', |
| 274 | - 'info_multi_secteurs' => '... bara för avdelningarna i roten?', |
|
| 275 | - 'info_nom' => 'Namn', |
|
| 276 | - 'info_nom_destinataire' => 'Mottagarens namn', |
|
| 277 | - 'info_nom_site' => 'Din sajts namn', |
|
| 278 | - 'info_nombre_articles' => '@nb_articles@ artiklar,', |
|
| 279 | - 'info_nombre_rubriques' => '@nb_rubriques@ avdelningar,', |
|
| 280 | - 'info_nombre_sites' => '@nb_sites@ sajter,', |
|
| 281 | - 'info_non_deplacer' => 'Flytta inte...', |
|
| 282 | - 'info_non_envoi_liste_nouveautes' => 'Skicka inte listan med senaste nyheterna', |
|
| 283 | - 'info_non_modifiable' => 'kan inte förändras', |
|
| 284 | - 'info_non_suppression_mot_cle' => 'Jag vill inte radera nyckelordet.', |
|
| 285 | - 'info_notes' => 'Fotnoter', |
|
| 286 | - 'info_nouvel_article' => 'Ny artikel', |
|
| 287 | - 'info_nouvelle_traduction' => 'Ny översättning:', |
|
| 288 | - 'info_numero_article' => 'ARTIKEL NUMMER:', |
|
| 289 | - 'info_obligatoire_02' => '[Krävs]', # MODIF |
|
| 290 | - 'info_option_accepter_visiteurs' => 'Tillåt besökare registrera sig på den publika delen', |
|
| 291 | - 'info_option_ne_pas_accepter_visiteurs' => 'Avvisa besökarregistrering', |
|
| 292 | - 'info_options_avancees' => 'AVANCERADE INSTÄLLNINGAR', |
|
| 293 | - 'info_ou' => 'eller...', |
|
| 294 | - 'info_page_interdite' => 'Förbjuden sida', |
|
| 295 | - 'info_par_nom' => 'efter namn', |
|
| 296 | - 'info_par_nombre_article' => 'efter antal artiklar', |
|
| 297 | - 'info_par_statut' => 'efter status', |
|
| 298 | - 'info_par_tri' => '’(efter @tri@)’', |
|
| 299 | - 'info_passe_trop_court' => 'lösenordet är för kort.', |
|
| 300 | - 'info_passes_identiques' => 'De två lösenorden är inte identiska.', |
|
| 301 | - 'info_plus_cinq_car' => 'mer än 5 tecken', |
|
| 302 | - 'info_plus_cinq_car_2' => '(Mer än 5 tecken)', |
|
| 303 | - 'info_plus_trois_car' => '(Mer än 3 tecken)', |
|
| 304 | - 'info_popularite' => 'popularitet: @popularite@; besök: @visites@', |
|
| 305 | - 'info_post_scriptum' => 'Postscript', |
|
| 306 | - 'info_post_scriptum_2' => 'PS:', |
|
| 307 | - 'info_pour' => 'för', |
|
| 308 | - 'info_procedez_par_etape' => 'Var vänlig, fortsätt steg för steg', |
|
| 309 | - 'info_procedure_maj_version' => 'Uppdateringsproceduren skall köras för att |
|
| 274 | + 'info_multi_secteurs' => '... bara för avdelningarna i roten?', |
|
| 275 | + 'info_nom' => 'Namn', |
|
| 276 | + 'info_nom_destinataire' => 'Mottagarens namn', |
|
| 277 | + 'info_nom_site' => 'Din sajts namn', |
|
| 278 | + 'info_nombre_articles' => '@nb_articles@ artiklar,', |
|
| 279 | + 'info_nombre_rubriques' => '@nb_rubriques@ avdelningar,', |
|
| 280 | + 'info_nombre_sites' => '@nb_sites@ sajter,', |
|
| 281 | + 'info_non_deplacer' => 'Flytta inte...', |
|
| 282 | + 'info_non_envoi_liste_nouveautes' => 'Skicka inte listan med senaste nyheterna', |
|
| 283 | + 'info_non_modifiable' => 'kan inte förändras', |
|
| 284 | + 'info_non_suppression_mot_cle' => 'Jag vill inte radera nyckelordet.', |
|
| 285 | + 'info_notes' => 'Fotnoter', |
|
| 286 | + 'info_nouvel_article' => 'Ny artikel', |
|
| 287 | + 'info_nouvelle_traduction' => 'Ny översättning:', |
|
| 288 | + 'info_numero_article' => 'ARTIKEL NUMMER:', |
|
| 289 | + 'info_obligatoire_02' => '[Krävs]', # MODIF |
|
| 290 | + 'info_option_accepter_visiteurs' => 'Tillåt besökare registrera sig på den publika delen', |
|
| 291 | + 'info_option_ne_pas_accepter_visiteurs' => 'Avvisa besökarregistrering', |
|
| 292 | + 'info_options_avancees' => 'AVANCERADE INSTÄLLNINGAR', |
|
| 293 | + 'info_ou' => 'eller...', |
|
| 294 | + 'info_page_interdite' => 'Förbjuden sida', |
|
| 295 | + 'info_par_nom' => 'efter namn', |
|
| 296 | + 'info_par_nombre_article' => 'efter antal artiklar', |
|
| 297 | + 'info_par_statut' => 'efter status', |
|
| 298 | + 'info_par_tri' => '’(efter @tri@)’', |
|
| 299 | + 'info_passe_trop_court' => 'lösenordet är för kort.', |
|
| 300 | + 'info_passes_identiques' => 'De två lösenorden är inte identiska.', |
|
| 301 | + 'info_plus_cinq_car' => 'mer än 5 tecken', |
|
| 302 | + 'info_plus_cinq_car_2' => '(Mer än 5 tecken)', |
|
| 303 | + 'info_plus_trois_car' => '(Mer än 3 tecken)', |
|
| 304 | + 'info_popularite' => 'popularitet: @popularite@; besök: @visites@', |
|
| 305 | + 'info_post_scriptum' => 'Postscript', |
|
| 306 | + 'info_post_scriptum_2' => 'PS:', |
|
| 307 | + 'info_pour' => 'för', |
|
| 308 | + 'info_procedez_par_etape' => 'Var vänlig, fortsätt steg för steg', |
|
| 309 | + 'info_procedure_maj_version' => 'Uppdateringsproceduren skall köras för att |
|
| 310 | 310 | anpassa databasen till den nya versionen av SPIP.', |
| 311 | - 'info_proxy_ok' => 'Testen av proxy lyckades.', |
|
| 312 | - 'info_ps' => 'P.S.', |
|
| 313 | - 'info_publier' => 'publicera', |
|
| 314 | - 'info_publies' => 'Dina onlinepublicerade artiklar', |
|
| 315 | - 'info_question_accepter_visiteurs' => 'Om sajtens template tillåter besökare att registrera sig utan att gå in i den privata delen, var vänlig och aktivera följande option:', |
|
| 316 | - 'info_racine_site' => 'Sajtens bas', |
|
| 317 | - 'info_recharger_page' => 'Var vänlig och uppdatera sidan om en liten stund.', |
|
| 318 | - 'info_recherche_auteur_zero' => 'Inga resultat hittades för "@cherche_auteur@".', |
|
| 319 | - 'info_recommencer' => 'Var vänlig och försök igen.', |
|
| 320 | - 'info_redacteur_1' => 'Redaktör', |
|
| 321 | - 'info_redacteur_2' => 'för tillgång till den privata delen (<i>rekommenderas</i>)', |
|
| 322 | - 'info_redacteurs' => 'Redaktörer', |
|
| 323 | - 'info_redaction_en_cours' => 'UNDER ARBETE', |
|
| 324 | - 'info_redirection' => 'Ompekning', |
|
| 325 | - 'info_refuses' => 'Refuserade artiklar', |
|
| 326 | - 'info_reglage_ldap' => 'inställningar: <b>anpassar LDAP import</b>', |
|
| 327 | - 'info_renvoi_article' => '<b>Ompekning.</b> Den här artikeln pekar om till:', |
|
| 328 | - 'info_reserve_admin' => 'Enbart administratörer kan förändra adressen.', |
|
| 329 | - 'info_restreindre_rubrique' => 'Begränsa administrationen till avdelningen:', |
|
| 330 | - 'info_resultat_recherche' => 'Sökresultat:', |
|
| 331 | - 'info_rubriques' => 'Avdelningar', |
|
| 332 | - 'info_rubriques_02' => 'avdelningar', |
|
| 333 | - 'info_rubriques_trouvees' => 'Hittade avdelningar', |
|
| 334 | - 'info_sans_titre' => 'Utan titel', |
|
| 335 | - 'info_selection_chemin_acces' => '<b>Välj</b> åtkomstväg i katalogen:', |
|
| 336 | - 'info_signatures' => 'underskrifter', |
|
| 337 | - 'info_site' => 'Sajt', |
|
| 338 | - 'info_site_2' => 'sajt:', |
|
| 339 | - 'info_site_min' => 'sajt', |
|
| 340 | - 'info_site_reference_2' => 'Länkad sajt', |
|
| 341 | - 'info_site_web' => 'WEBBSAJT:', # MODIF |
|
| 342 | - 'info_sites' => 'sajter', |
|
| 343 | - 'info_sites_lies_mot' => 'Länkade sajter knutna till detta nyckelord', |
|
| 344 | - 'info_sites_proxy' => 'Använder en proxy', |
|
| 345 | - 'info_sites_trouves' => 'Hittade sajter', |
|
| 346 | - 'info_sous_titre' => 'Undertitel:', |
|
| 347 | - 'info_statut_administrateur' => 'Administratör', |
|
| 348 | - 'info_statut_auteur' => 'Redaktörens status:', # MODIF |
|
| 349 | - 'info_statut_auteur_a_confirmer' => 'Registreringar som skall godkännas', |
|
| 350 | - 'info_statut_auteur_autre' => 'Annan status:', |
|
| 351 | - 'info_statut_redacteur' => 'Redaktör', |
|
| 352 | - 'info_statut_utilisateurs_1' => 'Startinställningar för importerade användare', |
|
| 353 | - 'info_suivi_activite' => 'Följ upp aktiviteten på sajten', |
|
| 354 | - 'info_surtitre' => 'Övertitel:', |
|
| 355 | - 'info_syndication_integrale_1' => 'Din sajt publiceras RSS-filer för syndikering (Se <a href="@url@">@titre@</a>).', |
|
| 356 | - 'info_syndication_integrale_2' => 'Vill du skicka hela artiklar eller bara en sammanfattning på ett par hundra tecken?', |
|
| 357 | - 'info_table_prefix' => 'Det är möjligt att byta prefix i databastabellernas namn. (Du behöver göra det om di installerar flera sajter i samma databas). Prefixet måste skrivas utan accenter, med versaler utan mellanslag.', |
|
| 358 | - 'info_taille_maximale_vignette' => 'Maximal storlek på miniatyrer som skapats av systemet:', |
|
| 359 | - 'info_terminer_installation' => 'Du kan nu avsluta installationsprocessen.', |
|
| 360 | - 'info_texte' => 'Text', |
|
| 361 | - 'info_texte_explicatif' => 'Förklarande text', |
|
| 362 | - 'info_texte_long' => '(Texten är lång: Den kommer att synas i flera delar som sedan sammanfogas efter validering.)', |
|
| 363 | - 'info_texte_message' => 'Texten i ditt meddelande:', # MODIF |
|
| 364 | - 'info_texte_message_02' => 'Texten i ditt meddelande', |
|
| 365 | - 'info_titre' => 'Titel:', |
|
| 366 | - 'info_total' => 'total:', |
|
| 367 | - 'info_tous_articles_en_redaction' => 'Alla artiklar under arbete', |
|
| 368 | - 'info_tous_articles_presents' => 'Alla artiklar som publicerats i den här avdelningen', |
|
| 369 | - 'info_tous_les' => 'alla:', |
|
| 370 | - 'info_tout_site' => 'Hela sajten', |
|
| 371 | - 'info_tout_site2' => 'Artikeln har inte blivit översatt till det här språket.', |
|
| 372 | - 'info_tout_site3' => 'Artikeln har blivit översatt till det hör språket men vissa förändringar har gjorts senare i orginalartikeln. Översättningen behöver uppdateras.', |
|
| 373 | - 'info_tout_site4' => 'Artikeln har blivit översatt till det här språket och översättningen är aktuell.', |
|
| 374 | - 'info_tout_site5' => 'Orginalartikeln.', |
|
| 375 | - 'info_tout_site6' => '<b>OBS:</b> bara orginalartiklarna visas. |
|
| 311 | + 'info_proxy_ok' => 'Testen av proxy lyckades.', |
|
| 312 | + 'info_ps' => 'P.S.', |
|
| 313 | + 'info_publier' => 'publicera', |
|
| 314 | + 'info_publies' => 'Dina onlinepublicerade artiklar', |
|
| 315 | + 'info_question_accepter_visiteurs' => 'Om sajtens template tillåter besökare att registrera sig utan att gå in i den privata delen, var vänlig och aktivera följande option:', |
|
| 316 | + 'info_racine_site' => 'Sajtens bas', |
|
| 317 | + 'info_recharger_page' => 'Var vänlig och uppdatera sidan om en liten stund.', |
|
| 318 | + 'info_recherche_auteur_zero' => 'Inga resultat hittades för "@cherche_auteur@".', |
|
| 319 | + 'info_recommencer' => 'Var vänlig och försök igen.', |
|
| 320 | + 'info_redacteur_1' => 'Redaktör', |
|
| 321 | + 'info_redacteur_2' => 'för tillgång till den privata delen (<i>rekommenderas</i>)', |
|
| 322 | + 'info_redacteurs' => 'Redaktörer', |
|
| 323 | + 'info_redaction_en_cours' => 'UNDER ARBETE', |
|
| 324 | + 'info_redirection' => 'Ompekning', |
|
| 325 | + 'info_refuses' => 'Refuserade artiklar', |
|
| 326 | + 'info_reglage_ldap' => 'inställningar: <b>anpassar LDAP import</b>', |
|
| 327 | + 'info_renvoi_article' => '<b>Ompekning.</b> Den här artikeln pekar om till:', |
|
| 328 | + 'info_reserve_admin' => 'Enbart administratörer kan förändra adressen.', |
|
| 329 | + 'info_restreindre_rubrique' => 'Begränsa administrationen till avdelningen:', |
|
| 330 | + 'info_resultat_recherche' => 'Sökresultat:', |
|
| 331 | + 'info_rubriques' => 'Avdelningar', |
|
| 332 | + 'info_rubriques_02' => 'avdelningar', |
|
| 333 | + 'info_rubriques_trouvees' => 'Hittade avdelningar', |
|
| 334 | + 'info_sans_titre' => 'Utan titel', |
|
| 335 | + 'info_selection_chemin_acces' => '<b>Välj</b> åtkomstväg i katalogen:', |
|
| 336 | + 'info_signatures' => 'underskrifter', |
|
| 337 | + 'info_site' => 'Sajt', |
|
| 338 | + 'info_site_2' => 'sajt:', |
|
| 339 | + 'info_site_min' => 'sajt', |
|
| 340 | + 'info_site_reference_2' => 'Länkad sajt', |
|
| 341 | + 'info_site_web' => 'WEBBSAJT:', # MODIF |
|
| 342 | + 'info_sites' => 'sajter', |
|
| 343 | + 'info_sites_lies_mot' => 'Länkade sajter knutna till detta nyckelord', |
|
| 344 | + 'info_sites_proxy' => 'Använder en proxy', |
|
| 345 | + 'info_sites_trouves' => 'Hittade sajter', |
|
| 346 | + 'info_sous_titre' => 'Undertitel:', |
|
| 347 | + 'info_statut_administrateur' => 'Administratör', |
|
| 348 | + 'info_statut_auteur' => 'Redaktörens status:', # MODIF |
|
| 349 | + 'info_statut_auteur_a_confirmer' => 'Registreringar som skall godkännas', |
|
| 350 | + 'info_statut_auteur_autre' => 'Annan status:', |
|
| 351 | + 'info_statut_redacteur' => 'Redaktör', |
|
| 352 | + 'info_statut_utilisateurs_1' => 'Startinställningar för importerade användare', |
|
| 353 | + 'info_suivi_activite' => 'Följ upp aktiviteten på sajten', |
|
| 354 | + 'info_surtitre' => 'Övertitel:', |
|
| 355 | + 'info_syndication_integrale_1' => 'Din sajt publiceras RSS-filer för syndikering (Se <a href="@url@">@titre@</a>).', |
|
| 356 | + 'info_syndication_integrale_2' => 'Vill du skicka hela artiklar eller bara en sammanfattning på ett par hundra tecken?', |
|
| 357 | + 'info_table_prefix' => 'Det är möjligt att byta prefix i databastabellernas namn. (Du behöver göra det om di installerar flera sajter i samma databas). Prefixet måste skrivas utan accenter, med versaler utan mellanslag.', |
|
| 358 | + 'info_taille_maximale_vignette' => 'Maximal storlek på miniatyrer som skapats av systemet:', |
|
| 359 | + 'info_terminer_installation' => 'Du kan nu avsluta installationsprocessen.', |
|
| 360 | + 'info_texte' => 'Text', |
|
| 361 | + 'info_texte_explicatif' => 'Förklarande text', |
|
| 362 | + 'info_texte_long' => '(Texten är lång: Den kommer att synas i flera delar som sedan sammanfogas efter validering.)', |
|
| 363 | + 'info_texte_message' => 'Texten i ditt meddelande:', # MODIF |
|
| 364 | + 'info_texte_message_02' => 'Texten i ditt meddelande', |
|
| 365 | + 'info_titre' => 'Titel:', |
|
| 366 | + 'info_total' => 'total:', |
|
| 367 | + 'info_tous_articles_en_redaction' => 'Alla artiklar under arbete', |
|
| 368 | + 'info_tous_articles_presents' => 'Alla artiklar som publicerats i den här avdelningen', |
|
| 369 | + 'info_tous_les' => 'alla:', |
|
| 370 | + 'info_tout_site' => 'Hela sajten', |
|
| 371 | + 'info_tout_site2' => 'Artikeln har inte blivit översatt till det här språket.', |
|
| 372 | + 'info_tout_site3' => 'Artikeln har blivit översatt till det hör språket men vissa förändringar har gjorts senare i orginalartikeln. Översättningen behöver uppdateras.', |
|
| 373 | + 'info_tout_site4' => 'Artikeln har blivit översatt till det här språket och översättningen är aktuell.', |
|
| 374 | + 'info_tout_site5' => 'Orginalartikeln.', |
|
| 375 | + 'info_tout_site6' => '<b>OBS:</b> bara orginalartiklarna visas. |
|
| 376 | 376 | Översättningarna är länkade till orginalet |
| 377 | 377 | med en färg som visar deras status:', |
| 378 | - 'info_travail_colaboratif' => 'Gemensamt arbete på artiklar', |
|
| 379 | - 'info_un_article' => 'en artikel,', |
|
| 380 | - 'info_un_site' => 'En sajt,', |
|
| 381 | - 'info_une_rubrique' => 'en avdelning,', |
|
| 382 | - 'info_une_rubrique_02' => '1 avdelning', |
|
| 383 | - 'info_url' => 'URL:', |
|
| 384 | - 'info_urlref' => 'Hyperlänk:', |
|
| 385 | - 'info_utilisation_spip' => 'SPIP är nu färdig att användas..', |
|
| 386 | - 'info_visites_par_mois' => 'Besökare per månad:', |
|
| 387 | - 'info_visiteur_1' => 'Besökare', |
|
| 388 | - 'info_visiteur_2' => 'på den publika delen', |
|
| 389 | - 'info_visiteurs' => 'Besökare', |
|
| 390 | - 'info_visiteurs_02' => 'Beökare på den publika delen', |
|
| 391 | - 'install_adresse_base_hebergeur' => 'Databasadress tillhandahållen av webbhotellet', |
|
| 392 | - 'install_echec_annonce' => 'Den här installationen kommer förmodligen inte att fungera, alternativt resulterar den i en sajt med reducerad funktionalitet ...', |
|
| 393 | - 'install_extension_mbstring' => 'SPIP fungerar inte med:', |
|
| 394 | - 'install_extension_php_obligatoire' => 'SPIP kräver ett tillägg till php:', |
|
| 395 | - 'install_login_base_hebergeur' => 'Login tilldelat av leverantören', |
|
| 396 | - 'install_nom_base_hebergeur' => 'Databasnamn tilldelat av leverantören:', |
|
| 397 | - 'install_pas_table' => 'Databasen har inga tabeller', |
|
| 398 | - 'install_pass_base_hebergeur' => 'Lösenord till databasen tilldelat av leverantören', |
|
| 399 | - 'install_php_version' => 'Versionen av PHP, @version@ är för gammal (minimum = @minimum@)', |
|
| 400 | - 'install_select_langue' => 'Välj ett språk, klicka sedan på knappen "fortsätt" för att starta installationen.', |
|
| 401 | - 'install_select_type_db' => 'Välj typ av databas :', |
|
| 402 | - 'install_select_type_mysql' => 'MySQL', |
|
| 403 | - 'install_select_type_sqlite2' => 'SQLite 2', |
|
| 404 | - 'install_select_type_sqlite3' => 'SQLite 3', |
|
| 405 | - 'install_tables_base' => 'Databasens tabeller', |
|
| 406 | - 'intem_redacteur' => 'redaktör', |
|
| 407 | - 'intitule_licence' => 'Licens', |
|
| 408 | - 'item_accepter_inscriptions' => 'Tillåt registreringar', |
|
| 409 | - 'item_activer_messages_avertissement' => 'Aktivera varningsmeddelanden', |
|
| 410 | - 'item_administrateur_2' => 'administratör', |
|
| 411 | - 'item_afficher_calendrier' => 'Visa i kalendern', |
|
| 412 | - 'item_autoriser_syndication_integrale' => 'Inkludera hela artiklar i syndikeringsfilerna', |
|
| 413 | - 'item_choix_administrateurs' => 'administratörer', |
|
| 414 | - 'item_choix_generation_miniature' => 'Generera miniatyrer automatiskt.', |
|
| 415 | - 'item_choix_non_generation_miniature' => 'Generera inte miniatyrer.', |
|
| 416 | - 'item_choix_redacteurs' => 'redaktörer', |
|
| 417 | - 'item_choix_visiteurs' => 'besökare till den publika delen', |
|
| 418 | - 'item_creer_fichiers_authent' => 'Skapa .htpasswd filer', |
|
| 419 | - 'item_login' => 'Login', |
|
| 420 | - 'item_messagerie_agenda' => 'Aktivera meddelandesystemet och kalendern', |
|
| 421 | - 'item_mots_cles_association_articles' => 'artiklar', |
|
| 422 | - 'item_mots_cles_association_rubriques' => 'avdelningar', |
|
| 423 | - 'item_mots_cles_association_sites' => 'länkade eller syndikerade sajter.', |
|
| 424 | - 'item_non' => 'Nej', |
|
| 425 | - 'item_non_accepter_inscriptions' => 'Tillåt inte registreringar', |
|
| 426 | - 'item_non_activer_messages_avertissement' => 'Inga varningsmeddelanden', |
|
| 427 | - 'item_non_afficher_calendrier' => 'Visa inte i kalendern', |
|
| 428 | - 'item_non_autoriser_syndication_integrale' => 'Skicka bara en sammanfattning', |
|
| 429 | - 'item_non_creer_fichiers_authent' => 'Skapa inte dessa filer', |
|
| 430 | - 'item_non_messagerie_agenda' => 'Avaktivera meddelandesystemet och kalendern', |
|
| 431 | - 'item_non_publier_articles' => 'Publicera inte artiklar innan deras publiceringsdatum.', |
|
| 432 | - 'item_nouvel_auteur' => 'Ny redaktör', |
|
| 433 | - 'item_nouvelle_rubrique' => 'Ny avdelning', |
|
| 434 | - 'item_oui' => 'Ja', |
|
| 435 | - 'item_publier_articles' => 'Publicera artiklarna utan att ta hänsyn till publiceringsdatum.', |
|
| 436 | - 'item_reponse_article' => 'Svara på artikeln', |
|
| 437 | - 'item_visiteur' => 'besökare', |
|
| 378 | + 'info_travail_colaboratif' => 'Gemensamt arbete på artiklar', |
|
| 379 | + 'info_un_article' => 'en artikel,', |
|
| 380 | + 'info_un_site' => 'En sajt,', |
|
| 381 | + 'info_une_rubrique' => 'en avdelning,', |
|
| 382 | + 'info_une_rubrique_02' => '1 avdelning', |
|
| 383 | + 'info_url' => 'URL:', |
|
| 384 | + 'info_urlref' => 'Hyperlänk:', |
|
| 385 | + 'info_utilisation_spip' => 'SPIP är nu färdig att användas..', |
|
| 386 | + 'info_visites_par_mois' => 'Besökare per månad:', |
|
| 387 | + 'info_visiteur_1' => 'Besökare', |
|
| 388 | + 'info_visiteur_2' => 'på den publika delen', |
|
| 389 | + 'info_visiteurs' => 'Besökare', |
|
| 390 | + 'info_visiteurs_02' => 'Beökare på den publika delen', |
|
| 391 | + 'install_adresse_base_hebergeur' => 'Databasadress tillhandahållen av webbhotellet', |
|
| 392 | + 'install_echec_annonce' => 'Den här installationen kommer förmodligen inte att fungera, alternativt resulterar den i en sajt med reducerad funktionalitet ...', |
|
| 393 | + 'install_extension_mbstring' => 'SPIP fungerar inte med:', |
|
| 394 | + 'install_extension_php_obligatoire' => 'SPIP kräver ett tillägg till php:', |
|
| 395 | + 'install_login_base_hebergeur' => 'Login tilldelat av leverantören', |
|
| 396 | + 'install_nom_base_hebergeur' => 'Databasnamn tilldelat av leverantören:', |
|
| 397 | + 'install_pas_table' => 'Databasen har inga tabeller', |
|
| 398 | + 'install_pass_base_hebergeur' => 'Lösenord till databasen tilldelat av leverantören', |
|
| 399 | + 'install_php_version' => 'Versionen av PHP, @version@ är för gammal (minimum = @minimum@)', |
|
| 400 | + 'install_select_langue' => 'Välj ett språk, klicka sedan på knappen "fortsätt" för att starta installationen.', |
|
| 401 | + 'install_select_type_db' => 'Välj typ av databas :', |
|
| 402 | + 'install_select_type_mysql' => 'MySQL', |
|
| 403 | + 'install_select_type_sqlite2' => 'SQLite 2', |
|
| 404 | + 'install_select_type_sqlite3' => 'SQLite 3', |
|
| 405 | + 'install_tables_base' => 'Databasens tabeller', |
|
| 406 | + 'intem_redacteur' => 'redaktör', |
|
| 407 | + 'intitule_licence' => 'Licens', |
|
| 408 | + 'item_accepter_inscriptions' => 'Tillåt registreringar', |
|
| 409 | + 'item_activer_messages_avertissement' => 'Aktivera varningsmeddelanden', |
|
| 410 | + 'item_administrateur_2' => 'administratör', |
|
| 411 | + 'item_afficher_calendrier' => 'Visa i kalendern', |
|
| 412 | + 'item_autoriser_syndication_integrale' => 'Inkludera hela artiklar i syndikeringsfilerna', |
|
| 413 | + 'item_choix_administrateurs' => 'administratörer', |
|
| 414 | + 'item_choix_generation_miniature' => 'Generera miniatyrer automatiskt.', |
|
| 415 | + 'item_choix_non_generation_miniature' => 'Generera inte miniatyrer.', |
|
| 416 | + 'item_choix_redacteurs' => 'redaktörer', |
|
| 417 | + 'item_choix_visiteurs' => 'besökare till den publika delen', |
|
| 418 | + 'item_creer_fichiers_authent' => 'Skapa .htpasswd filer', |
|
| 419 | + 'item_login' => 'Login', |
|
| 420 | + 'item_messagerie_agenda' => 'Aktivera meddelandesystemet och kalendern', |
|
| 421 | + 'item_mots_cles_association_articles' => 'artiklar', |
|
| 422 | + 'item_mots_cles_association_rubriques' => 'avdelningar', |
|
| 423 | + 'item_mots_cles_association_sites' => 'länkade eller syndikerade sajter.', |
|
| 424 | + 'item_non' => 'Nej', |
|
| 425 | + 'item_non_accepter_inscriptions' => 'Tillåt inte registreringar', |
|
| 426 | + 'item_non_activer_messages_avertissement' => 'Inga varningsmeddelanden', |
|
| 427 | + 'item_non_afficher_calendrier' => 'Visa inte i kalendern', |
|
| 428 | + 'item_non_autoriser_syndication_integrale' => 'Skicka bara en sammanfattning', |
|
| 429 | + 'item_non_creer_fichiers_authent' => 'Skapa inte dessa filer', |
|
| 430 | + 'item_non_messagerie_agenda' => 'Avaktivera meddelandesystemet och kalendern', |
|
| 431 | + 'item_non_publier_articles' => 'Publicera inte artiklar innan deras publiceringsdatum.', |
|
| 432 | + 'item_nouvel_auteur' => 'Ny redaktör', |
|
| 433 | + 'item_nouvelle_rubrique' => 'Ny avdelning', |
|
| 434 | + 'item_oui' => 'Ja', |
|
| 435 | + 'item_publier_articles' => 'Publicera artiklarna utan att ta hänsyn till publiceringsdatum.', |
|
| 436 | + 'item_reponse_article' => 'Svara på artikeln', |
|
| 437 | + 'item_visiteur' => 'besökare', |
|
| 438 | 438 | |
| 439 | - // J |
|
| 440 | - 'jour_non_connu_nc' => 'okänd', |
|
| 439 | + // J |
|
| 440 | + 'jour_non_connu_nc' => 'okänd', |
|
| 441 | 441 | |
| 442 | - // L |
|
| 443 | - 'lien_ajouter_auteur' => 'Lätt till redaktören', |
|
| 444 | - 'lien_email' => 'e-post', |
|
| 445 | - 'lien_nom_site' => 'SAJTENS NAMN:', |
|
| 446 | - 'lien_retirer_auteur' => 'Ta bort redaktören', |
|
| 447 | - 'lien_site' => 'sajt', |
|
| 448 | - 'lien_tout_deplier' => 'Expandera alla', |
|
| 449 | - 'lien_tout_replier' => 'Kollapsa alla', |
|
| 450 | - 'lien_tout_supprimer' => 'Radera alla', |
|
| 451 | - 'lien_trier_nom' => 'Sortera efter namn', |
|
| 452 | - 'lien_trier_nombre_articles' => 'Sortera efter artikelnummer', |
|
| 453 | - 'lien_trier_statut' => 'Sortera efter status', |
|
| 454 | - 'lien_voir_en_ligne' => 'SE ONLINE:', |
|
| 455 | - 'logo_article' => 'ARTIKELNS LOGOTYPE', # MODIF |
|
| 456 | - 'logo_auteur' => 'REDAKTÖRENS LOGOTYPE', # MODIF |
|
| 457 | - 'logo_rubrique' => 'Avdelningens logotype', # MODIF |
|
| 458 | - 'logo_site' => 'SAJTENS LOGOTYPE', # MODIF |
|
| 459 | - 'logo_standard_rubrique' => 'STANDARDLOGOTYPE FÖR AVDELNINGAR', # MODIF |
|
| 460 | - 'logo_survol' => 'LOGOTYPE FÖR MUS-ÖVER', # MODIF |
|
| 442 | + // L |
|
| 443 | + 'lien_ajouter_auteur' => 'Lätt till redaktören', |
|
| 444 | + 'lien_email' => 'e-post', |
|
| 445 | + 'lien_nom_site' => 'SAJTENS NAMN:', |
|
| 446 | + 'lien_retirer_auteur' => 'Ta bort redaktören', |
|
| 447 | + 'lien_site' => 'sajt', |
|
| 448 | + 'lien_tout_deplier' => 'Expandera alla', |
|
| 449 | + 'lien_tout_replier' => 'Kollapsa alla', |
|
| 450 | + 'lien_tout_supprimer' => 'Radera alla', |
|
| 451 | + 'lien_trier_nom' => 'Sortera efter namn', |
|
| 452 | + 'lien_trier_nombre_articles' => 'Sortera efter artikelnummer', |
|
| 453 | + 'lien_trier_statut' => 'Sortera efter status', |
|
| 454 | + 'lien_voir_en_ligne' => 'SE ONLINE:', |
|
| 455 | + 'logo_article' => 'ARTIKELNS LOGOTYPE', # MODIF |
|
| 456 | + 'logo_auteur' => 'REDAKTÖRENS LOGOTYPE', # MODIF |
|
| 457 | + 'logo_rubrique' => 'Avdelningens logotype', # MODIF |
|
| 458 | + 'logo_site' => 'SAJTENS LOGOTYPE', # MODIF |
|
| 459 | + 'logo_standard_rubrique' => 'STANDARDLOGOTYPE FÖR AVDELNINGAR', # MODIF |
|
| 460 | + 'logo_survol' => 'LOGOTYPE FÖR MUS-ÖVER', # MODIF |
|
| 461 | 461 | |
| 462 | - // M |
|
| 463 | - 'menu_aide_installation_choix_base' => 'Välj din databas', |
|
| 464 | - 'module_fichier_langue' => 'Språkfiler', |
|
| 465 | - 'module_raccourci' => 'Genväg', |
|
| 466 | - 'module_texte_affiche' => 'Visad text', |
|
| 467 | - 'module_texte_traduction' => 'Språkfilen « @module@ » finns i:', |
|
| 462 | + // M |
|
| 463 | + 'menu_aide_installation_choix_base' => 'Välj din databas', |
|
| 464 | + 'module_fichier_langue' => 'Språkfiler', |
|
| 465 | + 'module_raccourci' => 'Genväg', |
|
| 466 | + 'module_texte_affiche' => 'Visad text', |
|
| 467 | + 'module_texte_traduction' => 'Språkfilen « @module@ » finns i:', |
|
| 468 | 468 | |
| 469 | - // O |
|
| 470 | - 'onglet_contenu' => 'Innehåll', |
|
| 471 | - 'onglet_declarer_une_autre_base' => 'Ange en annan databas', |
|
| 472 | - 'onglet_discuter' => 'Diskutera', |
|
| 473 | - 'onglet_interactivite' => 'Interaktivitet', |
|
| 474 | - 'onglet_proprietes' => 'Egenskaper', |
|
| 475 | - 'onglet_repartition_actuelle' => 'nu', |
|
| 469 | + // O |
|
| 470 | + 'onglet_contenu' => 'Innehåll', |
|
| 471 | + 'onglet_declarer_une_autre_base' => 'Ange en annan databas', |
|
| 472 | + 'onglet_discuter' => 'Diskutera', |
|
| 473 | + 'onglet_interactivite' => 'Interaktivitet', |
|
| 474 | + 'onglet_proprietes' => 'Egenskaper', |
|
| 475 | + 'onglet_repartition_actuelle' => 'nu', |
|
| 476 | 476 | |
| 477 | - // P |
|
| 478 | - 'plugin_etat_developpement' => 'Under utveckling', |
|
| 479 | - 'plugin_etat_experimental' => 'exprimentell', |
|
| 480 | - 'plugin_etat_stable' => 'Stabil', |
|
| 481 | - 'plugin_etat_test' => 'under test', |
|
| 482 | - 'plugin_impossible_activer' => 'Omöjligt att aktivera pluginen @plugin@', |
|
| 483 | - 'plugin_necessite_plugin' => 'Version @version@ eller nyare av pluginen @plugin@ krävs.', # MODIF |
|
| 484 | - 'plugin_zip_active' => 'Fortsätt för att aktivera', |
|
| 485 | - 'plugin_zip_installe_finie' => 'Filen @zip@ har packats upp och installerats.', |
|
| 486 | - 'plugin_zip_installe_rep_finie' => 'Filen @zip@ har packats upp och installerats i katalogen @rep@', |
|
| 487 | - 'plugin_zip_installer' => 'Du kan installera nu.', |
|
| 488 | - 'plugins_actifs' => '@count@ aktiva plugins.', |
|
| 489 | - 'plugins_compte' => '@count@ plugins', |
|
| 490 | - 'plugins_disponibles' => '@count@ tillgängliga plugins.', |
|
| 491 | - 'plugins_erreur' => 'Fel i följande plugin: @plugins@', |
|
| 492 | - 'plugins_liste' => 'Lista över plugins', |
|
| 477 | + // P |
|
| 478 | + 'plugin_etat_developpement' => 'Under utveckling', |
|
| 479 | + 'plugin_etat_experimental' => 'exprimentell', |
|
| 480 | + 'plugin_etat_stable' => 'Stabil', |
|
| 481 | + 'plugin_etat_test' => 'under test', |
|
| 482 | + 'plugin_impossible_activer' => 'Omöjligt att aktivera pluginen @plugin@', |
|
| 483 | + 'plugin_necessite_plugin' => 'Version @version@ eller nyare av pluginen @plugin@ krävs.', # MODIF |
|
| 484 | + 'plugin_zip_active' => 'Fortsätt för att aktivera', |
|
| 485 | + 'plugin_zip_installe_finie' => 'Filen @zip@ har packats upp och installerats.', |
|
| 486 | + 'plugin_zip_installe_rep_finie' => 'Filen @zip@ har packats upp och installerats i katalogen @rep@', |
|
| 487 | + 'plugin_zip_installer' => 'Du kan installera nu.', |
|
| 488 | + 'plugins_actifs' => '@count@ aktiva plugins.', |
|
| 489 | + 'plugins_compte' => '@count@ plugins', |
|
| 490 | + 'plugins_disponibles' => '@count@ tillgängliga plugins.', |
|
| 491 | + 'plugins_erreur' => 'Fel i följande plugin: @plugins@', |
|
| 492 | + 'plugins_liste' => 'Lista över plugins', |
|
| 493 | 493 | |
| 494 | - // R |
|
| 495 | - 'required' => '[Krävs]', # MODIF |
|
| 494 | + // R |
|
| 495 | + 'required' => '[Krävs]', # MODIF |
|
| 496 | 496 | |
| 497 | - // T |
|
| 498 | - 'taille_cache_vide' => 'Cachen är tom.', |
|
| 499 | - 'text_article_propose_publication' => 'Artikel inlämnad för publicering. tveka inte att säga din mening i forumet längst ned på sidan.', # MODIF |
|
| 500 | - 'texte_admin_effacer_01' => 'Detta kommando raderar <i>all</i> information i databasen, |
|
| 497 | + // T |
|
| 498 | + 'taille_cache_vide' => 'Cachen är tom.', |
|
| 499 | + 'text_article_propose_publication' => 'Artikel inlämnad för publicering. tveka inte att säga din mening i forumet längst ned på sidan.', # MODIF |
|
| 500 | + 'texte_admin_effacer_01' => 'Detta kommando raderar <i>all</i> information i databasen, |
|
| 501 | 501 | inklusive <i>alla</i> uppgifter om användare. Efter att du använt det, måste du |
| 502 | 502 | installera om SPIP för att skapa en ny databas och den första administratören.', |
| 503 | - 'texte_adresse_annuaire_1' => '( Om din katalog är installerad på samma dator som din websajt, är det troligen «localhost».)', |
|
| 504 | - 'texte_ajout_auteur' => 'Följande redaktör lades till artikeln:', |
|
| 505 | - 'texte_annuaire_ldap_1' => 'Om du har tillgång till en LDAP-katalog kan du använda den för att importera användare till SPIP.', |
|
| 506 | - 'texte_article_statut' => 'Artikelns status:', |
|
| 507 | - 'texte_article_virtuel' => 'Virtuell artikel', |
|
| 508 | - 'texte_article_virtuel_reference' => '<b>Virtuell Artikel:</b> länkad artikel i din SPIP site, men ompekad till en annan URL. För att ta bort ompekningen, radera denna URL.', |
|
| 509 | - 'texte_aucun_resultat_auteur' => 'Inga resultat för "@cherche_auteur@".', |
|
| 510 | - 'texte_auteurs' => 'REDAKTÖRERNA', |
|
| 511 | - 'texte_choix_base_1' => 'Välj din databas:', |
|
| 512 | - 'texte_choix_base_2' => 'Databasservern innehåller flera databaser.', |
|
| 513 | - 'texte_choix_base_3' => '<b>Välj</b> den som din leverantör har gett dig:', |
|
| 514 | - 'texte_choix_table_prefix' => 'Prefix för tabeller:', |
|
| 515 | - 'texte_compte_element' => '@count@ objekt', |
|
| 516 | - 'texte_compte_elements' => '@count@ element', |
|
| 517 | - 'texte_jeu_caractere_3' => 'Din sajt använder följande teckenuppsättning:', |
|
| 518 | - 'texte_mise_a_niveau_base_1' => 'Du har just uppdaterat filerna i SPIP. |
|
| 503 | + 'texte_adresse_annuaire_1' => '( Om din katalog är installerad på samma dator som din websajt, är det troligen «localhost».)', |
|
| 504 | + 'texte_ajout_auteur' => 'Följande redaktör lades till artikeln:', |
|
| 505 | + 'texte_annuaire_ldap_1' => 'Om du har tillgång till en LDAP-katalog kan du använda den för att importera användare till SPIP.', |
|
| 506 | + 'texte_article_statut' => 'Artikelns status:', |
|
| 507 | + 'texte_article_virtuel' => 'Virtuell artikel', |
|
| 508 | + 'texte_article_virtuel_reference' => '<b>Virtuell Artikel:</b> länkad artikel i din SPIP site, men ompekad till en annan URL. För att ta bort ompekningen, radera denna URL.', |
|
| 509 | + 'texte_aucun_resultat_auteur' => 'Inga resultat för "@cherche_auteur@".', |
|
| 510 | + 'texte_auteurs' => 'REDAKTÖRERNA', |
|
| 511 | + 'texte_choix_base_1' => 'Välj din databas:', |
|
| 512 | + 'texte_choix_base_2' => 'Databasservern innehåller flera databaser.', |
|
| 513 | + 'texte_choix_base_3' => '<b>Välj</b> den som din leverantör har gett dig:', |
|
| 514 | + 'texte_choix_table_prefix' => 'Prefix för tabeller:', |
|
| 515 | + 'texte_compte_element' => '@count@ objekt', |
|
| 516 | + 'texte_compte_elements' => '@count@ element', |
|
| 517 | + 'texte_jeu_caractere_3' => 'Din sajt använder följande teckenuppsättning:', |
|
| 518 | + 'texte_mise_a_niveau_base_1' => 'Du har just uppdaterat filerna i SPIP. |
|
| 519 | 519 | Nu måste du uppgradera sajtens databas.', |
| 520 | - 'texte_modifier_article' => 'Redigera artikeln:', |
|
| 521 | - 'texte_multilinguisme' => 'Om du vill hantera artiklar på flera språk, med en avancerad navigering, kan du lägga till en option för språkval i artiklar och avdelningar, i enlighet med sajtens struktur.', # MODIF |
|
| 522 | - 'texte_multilinguisme_trad' => 'Dessutom kan du aktivera ett system för länkhantering av de olika översättningarna av en artikel.', # MODIF |
|
| 523 | - 'texte_non_compresse' => '<i>okomprimerad</i> (din server stöder inte denna funktion)', |
|
| 524 | - 'texte_nouvelle_version_spip_1' => 'Du har installerat en ny version av SPIP.', |
|
| 525 | - 'texte_plus_trois_car' => 'mer än tre tecken', |
|
| 526 | - 'texte_plusieurs_articles' => 'Flera redaktörer hittades för "@cherche_auteur@":', |
|
| 527 | - 'texte_recalcul_page' => 'Om du vill uppdatera |
|
| 520 | + 'texte_modifier_article' => 'Redigera artikeln:', |
|
| 521 | + 'texte_multilinguisme' => 'Om du vill hantera artiklar på flera språk, med en avancerad navigering, kan du lägga till en option för språkval i artiklar och avdelningar, i enlighet med sajtens struktur.', # MODIF |
|
| 522 | + 'texte_multilinguisme_trad' => 'Dessutom kan du aktivera ett system för länkhantering av de olika översättningarna av en artikel.', # MODIF |
|
| 523 | + 'texte_non_compresse' => '<i>okomprimerad</i> (din server stöder inte denna funktion)', |
|
| 524 | + 'texte_nouvelle_version_spip_1' => 'Du har installerat en ny version av SPIP.', |
|
| 525 | + 'texte_plus_trois_car' => 'mer än tre tecken', |
|
| 526 | + 'texte_plusieurs_articles' => 'Flera redaktörer hittades för "@cherche_auteur@":', |
|
| 527 | + 'texte_recalcul_page' => 'Om du vill uppdatera |
|
| 528 | 528 | enbart en sida, är det bäst att göra det från den publika delen genom att klicka på « Ladda om sidan ».', |
| 529 | - 'texte_recuperer_base' => 'Reparera databasen', |
|
| 530 | - 'texte_sous_titre' => 'Undertitel', |
|
| 531 | - 'texte_statistiques_visites' => '(mörka staplar: Söndag / mörk linje: genomsnittlig nivå)', |
|
| 532 | - 'texte_statut_attente_validation' => 'väntar på godkännande', |
|
| 533 | - 'texte_statut_publies' => 'publicerad online', |
|
| 534 | - 'texte_statut_refuses' => 'avvisad', |
|
| 535 | - 'texte_suppression_fichiers' => 'Använd detta kommando för att radera alla filer |
|
| 529 | + 'texte_recuperer_base' => 'Reparera databasen', |
|
| 530 | + 'texte_sous_titre' => 'Undertitel', |
|
| 531 | + 'texte_statistiques_visites' => '(mörka staplar: Söndag / mörk linje: genomsnittlig nivå)', |
|
| 532 | + 'texte_statut_attente_validation' => 'väntar på godkännande', |
|
| 533 | + 'texte_statut_publies' => 'publicerad online', |
|
| 534 | + 'texte_statut_refuses' => 'avvisad', |
|
| 535 | + 'texte_suppression_fichiers' => 'Använd detta kommando för att radera alla filer |
|
| 536 | 536 | i SPIP’s cache. Det gör det möjligt att tvinga fram en uppdatering av alla sidor om du |
| 537 | 537 | gjort viktiga förändringar i sajtens utseende eller struktur.', |
| 538 | - 'texte_sur_titre' => 'Övertitel', |
|
| 539 | - 'texte_table_ok' => ': den här tabellen är OK.', |
|
| 540 | - 'texte_tentative_recuperation' => 'Reparationsförsök', |
|
| 541 | - 'texte_tenter_reparation' => 'Försök att reparera databasen', |
|
| 542 | - 'texte_titre_02' => 'Ärenderad:', |
|
| 543 | - 'texte_titre_obligatoire' => '<b>Titel</b> [Krävs]', |
|
| 544 | - 'texte_travail_article' => '@nom_auteur_modif@ arbetade med den här artikeln för @date_diff@ minuter sedan', |
|
| 545 | - 'texte_vide' => 'tom', |
|
| 546 | - 'texte_vider_cache' => 'töm cachen', |
|
| 547 | - 'titre_admin_tech' => 'Tekniskt underhåll', |
|
| 548 | - 'titre_admin_vider' => 'Tekniskt underhåll', |
|
| 549 | - 'titre_cadre_afficher_article' => 'Visa artiklarna:', |
|
| 550 | - 'titre_cadre_afficher_traductions' => 'Visa status för översättningen för följande språk:', |
|
| 551 | - 'titre_cadre_ajouter_auteur' => 'LÄGG TILL EN REDAKTÖR:', |
|
| 552 | - 'titre_cadre_interieur_rubrique' => 'I Avdelningen', |
|
| 553 | - 'titre_cadre_numero_auteur' => 'Redaktör nummer', |
|
| 554 | - 'titre_cadre_signature_obligatoire' => '<b>Signatur</b> [krävs]<br />', |
|
| 555 | - 'titre_config_fonctions' => 'Sajtens konfiguration', |
|
| 556 | - 'titre_configuration' => 'Sajtens konfiguration', |
|
| 557 | - 'titre_connexion_ldap' => 'Optioner: <b>Din LDAP koppling</b>', |
|
| 558 | - 'titre_groupe_mots' => 'NYCKELORDSGRUPP:', |
|
| 559 | - 'titre_langue_article' => 'ARTIKELNS SPRÅK', # MODIF |
|
| 560 | - 'titre_langue_rubrique' => 'AVDELNINGENS SPRÅK', # MODIF |
|
| 561 | - 'titre_langue_trad_article' => 'ARTIKESPRÅK OCH ÖVERSÄTTNINGAR', |
|
| 562 | - 'titre_les_articles' => 'ARTIKLAR', |
|
| 563 | - 'titre_naviguer_dans_le_site' => 'Navigera i sajten...', |
|
| 564 | - 'titre_nouvelle_rubrique' => 'Ny avdelning', |
|
| 565 | - 'titre_numero_rubrique' => 'AVDELNING NUMMER:', |
|
| 566 | - 'titre_page_articles_edit' => 'Editera: @titre@', |
|
| 567 | - 'titre_page_articles_page' => 'Artiklar', |
|
| 568 | - 'titre_page_articles_tous' => 'Hela sajten', |
|
| 569 | - 'titre_page_calendrier' => 'Kalender @nom_mois@ @annee@', |
|
| 570 | - 'titre_page_config_contenu' => 'Sajtens inställningar', |
|
| 571 | - 'titre_page_delete_all' => 'total och oåterkallelig radering', |
|
| 572 | - 'titre_page_recherche' => 'Sökresultat @recherche@', |
|
| 573 | - 'titre_page_statistiques_referers' => 'Statistik (inkommande länkar)', |
|
| 574 | - 'titre_page_upgrade' => 'Uppgradera SPIP', |
|
| 575 | - 'titre_publication_articles_post_dates' => 'Tidsstyrd publicering av artiklar', |
|
| 576 | - 'titre_reparation' => 'Reparera', |
|
| 577 | - 'titre_suivi_petition' => 'Uppföljning av namninasamlingar', |
|
| 578 | - 'trad_article_traduction' => 'Alla versioner av den här artikeln:', |
|
| 579 | - 'trad_delier' => 'Sluta länka den här artikeln till dess översättningar', # MODIF |
|
| 580 | - 'trad_lier' => 'Den här artikeln är en översättning av artikel nummer:', |
|
| 581 | - 'trad_new' => 'Skriv en ny översättning av den här artikeln', # MODIF |
|
| 538 | + 'texte_sur_titre' => 'Övertitel', |
|
| 539 | + 'texte_table_ok' => ': den här tabellen är OK.', |
|
| 540 | + 'texte_tentative_recuperation' => 'Reparationsförsök', |
|
| 541 | + 'texte_tenter_reparation' => 'Försök att reparera databasen', |
|
| 542 | + 'texte_titre_02' => 'Ärenderad:', |
|
| 543 | + 'texte_titre_obligatoire' => '<b>Titel</b> [Krävs]', |
|
| 544 | + 'texte_travail_article' => '@nom_auteur_modif@ arbetade med den här artikeln för @date_diff@ minuter sedan', |
|
| 545 | + 'texte_vide' => 'tom', |
|
| 546 | + 'texte_vider_cache' => 'töm cachen', |
|
| 547 | + 'titre_admin_tech' => 'Tekniskt underhåll', |
|
| 548 | + 'titre_admin_vider' => 'Tekniskt underhåll', |
|
| 549 | + 'titre_cadre_afficher_article' => 'Visa artiklarna:', |
|
| 550 | + 'titre_cadre_afficher_traductions' => 'Visa status för översättningen för följande språk:', |
|
| 551 | + 'titre_cadre_ajouter_auteur' => 'LÄGG TILL EN REDAKTÖR:', |
|
| 552 | + 'titre_cadre_interieur_rubrique' => 'I Avdelningen', |
|
| 553 | + 'titre_cadre_numero_auteur' => 'Redaktör nummer', |
|
| 554 | + 'titre_cadre_signature_obligatoire' => '<b>Signatur</b> [krävs]<br />', |
|
| 555 | + 'titre_config_fonctions' => 'Sajtens konfiguration', |
|
| 556 | + 'titre_configuration' => 'Sajtens konfiguration', |
|
| 557 | + 'titre_connexion_ldap' => 'Optioner: <b>Din LDAP koppling</b>', |
|
| 558 | + 'titre_groupe_mots' => 'NYCKELORDSGRUPP:', |
|
| 559 | + 'titre_langue_article' => 'ARTIKELNS SPRÅK', # MODIF |
|
| 560 | + 'titre_langue_rubrique' => 'AVDELNINGENS SPRÅK', # MODIF |
|
| 561 | + 'titre_langue_trad_article' => 'ARTIKESPRÅK OCH ÖVERSÄTTNINGAR', |
|
| 562 | + 'titre_les_articles' => 'ARTIKLAR', |
|
| 563 | + 'titre_naviguer_dans_le_site' => 'Navigera i sajten...', |
|
| 564 | + 'titre_nouvelle_rubrique' => 'Ny avdelning', |
|
| 565 | + 'titre_numero_rubrique' => 'AVDELNING NUMMER:', |
|
| 566 | + 'titre_page_articles_edit' => 'Editera: @titre@', |
|
| 567 | + 'titre_page_articles_page' => 'Artiklar', |
|
| 568 | + 'titre_page_articles_tous' => 'Hela sajten', |
|
| 569 | + 'titre_page_calendrier' => 'Kalender @nom_mois@ @annee@', |
|
| 570 | + 'titre_page_config_contenu' => 'Sajtens inställningar', |
|
| 571 | + 'titre_page_delete_all' => 'total och oåterkallelig radering', |
|
| 572 | + 'titre_page_recherche' => 'Sökresultat @recherche@', |
|
| 573 | + 'titre_page_statistiques_referers' => 'Statistik (inkommande länkar)', |
|
| 574 | + 'titre_page_upgrade' => 'Uppgradera SPIP', |
|
| 575 | + 'titre_publication_articles_post_dates' => 'Tidsstyrd publicering av artiklar', |
|
| 576 | + 'titre_reparation' => 'Reparera', |
|
| 577 | + 'titre_suivi_petition' => 'Uppföljning av namninasamlingar', |
|
| 578 | + 'trad_article_traduction' => 'Alla versioner av den här artikeln:', |
|
| 579 | + 'trad_delier' => 'Sluta länka den här artikeln till dess översättningar', # MODIF |
|
| 580 | + 'trad_lier' => 'Den här artikeln är en översättning av artikel nummer:', |
|
| 581 | + 'trad_new' => 'Skriv en ny översättning av den här artikeln', # MODIF |
|
| 582 | 582 | |
| 583 | - // U |
|
| 584 | - 'utf8_convert_erreur_orig' => 'Fel: teckenkodningen @charset@ stöds inte.', |
|
| 583 | + // U |
|
| 584 | + 'utf8_convert_erreur_orig' => 'Fel: teckenkodningen @charset@ stöds inte.', |
|
| 585 | 585 | |
| 586 | - // V |
|
| 587 | - 'version' => 'Version:' |
|
| 586 | + // V |
|
| 587 | + 'version' => 'Version:' |
|
| 588 | 588 | ); |