X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fcookie.php;fp=www%2Fecrire%2Finc%2Fcookie.php;h=5923bb8b6c6ce2312b7bd0e54c04c3e27a99d50a;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/inc/cookie.php b/www/ecrire/inc/cookie.php new file mode 100644 index 0000000..5923bb8 --- /dev/null +++ b/www/ecrire/inc/cookie.php @@ -0,0 +1,81 @@ + $value) { + if (substr($name,0,5)=='spip_' && substr($name,0,$prefix_long)!=$cookie_prefix) { + unset($_COOKIE[$name]); + unset($GLOBALS[$name]); + } + } + foreach ($_COOKIE as $name => $value) { + if (substr($name,0,$prefix_long)==$cookie_prefix) { + $spipname = preg_replace ('/^'.$cookie_prefix.'_/', 'spip_', $name); + $_COOKIE[$spipname] = $value; + $GLOBALS[$spipname] = $value; + } + } + +} + +// Idem faudrait creer exec/test_ajax, mais c'est si court. +// Tester si Ajax fonctionne pour ce brouteur +// (si on arrive la c'est que c'est bon, donc poser le cookie) + +// http://doc.spip.org/@exec_test_ajax_dist +function exec_test_ajax_dist() { + switch (_request('js')) { + // on est appele par