From 339debde3aa07ffda11307946819507f9a64bdae Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Mon, 25 Jun 2007 20:16:45 +0000 Subject: [PATCH] corrige l'enigme de #964 : le http_status 204 faisait planter l'ajax --- ecrire/public.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ecrire/public.php b/ecrire/public.php index 1d75181578..81b677116c 100644 --- a/ecrire/public.php +++ b/ecrire/public.php @@ -52,16 +52,18 @@ if (defined('_INC_PUBLIC')) { // Est-ce une action ? if ($action = _request('action')) { + define('_ESPACE_PRIVE', true); include_spip('inc/autoriser'); // chargement systematique pour les actions include_spip('inc/headers'); $var_f = charger_fonction($action, 'action'); $var_f(); - define('_ESPACE_PRIVE', true); if ($GLOBALS['redirect'] OR $GLOBALS['redirect'] = _request('redirect')) redirige_par_entete(urldecode($GLOBALS['redirect'])); - if (!headers_sent()) - http_status(204); // No Content + +# # pour un appel ajax ca provoque une erreur 500 +# if (!headers_sent()) +# http_status(204); // No Content exit; } -- GitLab