From ebcc68cdfad27dc5cd687f48486e874aa05fe712 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Aug 2014 13:09:06 +0200 Subject: [PATCH] Add commented code to use "clear" cookie. This help debug. --- htdocs/core/lib/functions.lib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7097bd2abae..f3add9e66c8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -221,7 +221,12 @@ function GETPOST($paramname,$check='',$method=0) */ function dol_getprefix() { - if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"])) return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT); + if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"])) + { + return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT); + // Use this for a "clear" cookie name + //return dol_sanitizeFileName($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT); + } else return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT); }