X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fcookie.php;h=0e4c622ce327fc8bf5bd990c08055ded58215d58;hb=f854641371bdfbaba8fbab6212853d9795ba8cc8;hp=5648e26e7bc9eea340e2d3c26ed29abfecd79adc;hpb=52cf8ed924d5dcd0c28dde4b6c3196be6ec2d4f7;p=ptitvelo%2Fweb%2Fwww.git diff --git a/www/ecrire/inc/cookie.php b/www/ecrire/inc/cookie.php index 5648e26..0e4c622 100644 --- a/www/ecrire/inc/cookie.php +++ b/www/ecrire/inc/cookie.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2012 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -17,6 +17,9 @@ if (!defined('_ECRIRE_INC_VERSION')) return; // // http://doc.spip.org/@spip_setcookie function spip_setcookie ($name='', $value='', $expire=0, $path='AUTO', $domain='', $secure='') { + // liste des cookies en httponly (a passer en define si besoin) + $httponly = in_array($name, explode(' ', 'spip_session')); + $name = preg_replace ('/^spip_/', $GLOBALS['cookie_prefix'].'_', $name); if ($path == 'AUTO') $path = defined('_COOKIE_PATH')?_COOKIE_PATH:preg_replace(',^\w+://[^/]*,', '', url_de_base()); @@ -25,9 +28,6 @@ function spip_setcookie ($name='', $value='', $expire=0, $path='AUTO', $domain=' #spip_log("cookie('$name', '$value', '$expire', '$path', '$domain', '$secure', '$httponly'"); - // liste des cookies en httponly (a passer en define si besoin) - $httponly = in_array($name, explode(' ', 'spip_session')); - $a = ($httponly AND strnatcmp(phpversion(),'5.2.0') >= 0) ? @setcookie ($name, $value, $expire, $path, $domain, $secure, $httponly)