diff --git a/inc-public-global.php3 b/inc-public-global.php3 index 0e5243a30f4593685313d5352681db7489412749..6d8887b4ebafee13a3cf4efaef1e62f58bc4c60f 100644 --- a/inc-public-global.php3 +++ b/inc-public-global.php3 @@ -172,7 +172,7 @@ function inclure_page($fond, $delais_inclus, $contexte_inclus, $cache_incluant=' || ($GLOBALS['spip_lang'] != ($lang = lire_meta('langue_site')))) { include_ecrire('inc_lang.php3'); lang_select($lang); - $lang_select = true; // pour lang_dselect ci-dessous + $lang_select = true; // pour lang_dselect en sortie } // @header ne marchera qu'en output_buffering @@ -186,11 +186,10 @@ function inclure_page($fond, $delais_inclus, $contexte_inclus, $cache_incluant=' $page = obtenir_page ($contexte_inclus, $chemin_cache, $delais, $use_cache, $fond, true); - // Et enfin le contenu... - eval('?' . '>' . $page['texte']); + $page['lang_select'] = $lang_select; - if ($lang_select) - lang_dselect(); + // Retourner le contenu... + return $page; } diff --git a/inc-public.php3 b/inc-public.php3 index 62aed1b04bbcbaa08221d516dc475c0c9150b62a..f48c1df26ffb386a1cf78c1254efe19c37557e40 100644 --- a/inc-public.php3 +++ b/inc-public.php3 @@ -4,13 +4,16 @@ if (defined("_INC_PUBLIC")) { $page = inclure_page($fond, $delais, $contexte_inclus, $fichier_inclus); - /* if ($page['process_ins']) { - eval('?' . '>' . $page['texte']); - } else { - echo $page['texte']; - } */ + if ($GLOBALS['afficher_page'] == 'oui' + AND $GLOBALS['auteur_session']['statut'] == '0minirezo') { + @header('Content-Type: text/plain; charset='.lire_meta('charset')); + echo $page['texte']; + } else { + eval('?' . '>' . $page['texte']); + } - eval('?' . '>' . $page['texte']); + if ($page['lang_select']) + lang_dselect(); } // Premier appel inc-public