diff --git a/inc-public-global.php3 b/inc-public-global.php3 index 7821926ba9c834360fc049eb93af3691be67fc63..23b7b4c6d2e7011491dc205ab5229cec02bbc9f3 100644 --- a/inc-public-global.php3 +++ b/inc-public-global.php3 @@ -64,14 +64,14 @@ function calcule_header_et_page($fond, $delais) { include_local(find_in_path('inc-formulaire_admin.php3')); $tableau_des_erreurs = array(); - $header404 = false; + $http_status = 200; $page = afficher_page_globale ($fond, $delais, $use_cache); if (!$flag_preserver) { // si la page est vide, envoi d'un 404 if (preg_match('/^[[:space:]]*$/', $page['texte'])) { - $header404 = true; + $http_status = 404; header("HTTP/1.0 404"); header("Content-Type: text/html; charset=".lire_meta('charset')); } @@ -137,7 +137,7 @@ function calcule_header_et_page($fond, $delais) { $page = surligner_mots($page, $var_recherche); } - return array($header404, $page); + return array($http_status, $page); } // diff --git a/inc-public.php3 b/inc-public.php3 index b9ac3c80b07d672c876cf1244408f73c298a5889..89a780ff83cb32ade1715f760b54fc2f19fa2cc4 100644 --- a/inc-public.php3 +++ b/inc-public.php3 @@ -9,12 +9,12 @@ else { include ("ecrire/inc_version.php3"); include_local('inc-public-global.php3'); - list($header404, $page) = calcule_header_et_page($fond, $delai); + list($http_status, $page) = calcule_header_et_page($fond, $delai); // Si le 404 a ete renvoye (page vide), donner un message approprie // Page n'est plus necessairement vide a cause des boutons admin - if ($header404) { + if ($http_status == 404) { $qcq = _T('public:aucun_' . $fond); if (!$qcq) $qcq = _T('public:aucune_' . $fond); if (!$qcq) $qcq = _T('public:texte_vide');