2
0
forked from Wavyzz/dolibarr

Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	.travis.yml
	dev/setup/codesniffer/ruleset.xml
This commit is contained in:
Laurent Destailleur
2019-01-20 20:36:45 +01:00
11 changed files with 70 additions and 51 deletions

View File

@@ -574,7 +574,7 @@ if (! function_exists('dol_getprefix'))
/**
* Return a prefix to use for this Dolibarr instance, for session/cookie names or email id.
* The prefix for session is unique in a web context only and is unique for instance and avoid conflict
* between multi-instances, even when having two instances with one root dir or two instances in virtual servers.
* between multi-instances, even when having two instances with same root dir or two instances in same virtual servers.
* The prefix for email is unique if MAIL_PREFIX_FOR_EMAIL_ID is set to a value, otherwise value may be same than other instance.
*
* @param string $mode '' (prefix for session name) or 'email' (prefix for email id)
@@ -592,16 +592,16 @@ if (! function_exists('dol_getprefix'))
if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID;
else if (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"];
}
return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT, '3');
}
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 "readable" cookie name
return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT, '3');
// Use this for a "readable" key
//return dol_sanitizeFileName($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
}
return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
return dol_hash(DOL_DOCUMENT_ROOT.DOL_URL_ROOT, '3');
}
}