Renamed conf->cookie_cryptkey into conf->file->cookie_cryptkey. The goal is to have all parameters defined inside file conf.php to be in $conf->file->xxx. Excep for database that are stored in $conf->db (historic reasons). This make code easier to understand and to know origine of a value (file or database).

This commit is contained in:
Laurent Destailleur
2009-05-24 00:19:06 +00:00
parent 29b707d380
commit e86917a148
3 changed files with 22 additions and 23 deletions

View File

@@ -128,21 +128,21 @@ function dol_loginfunction($langs,$conf,$mysoc)
$demologin=$tab[0];
$demopassword=$tab[1];
}
if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY))
{
$lastuser = '';
$lastentity = '';
if (! empty($conf->global->MAIN_MULTICOMPANY_COOKIE))
{
$entityCookieName = 'DOLENTITYID_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]);
if (isset($_COOKIE[$entityCookieName]))
{
include_once(DOL_DOCUMENT_ROOT . "/core/cookie.class.php");
$cryptkey = ( isset($conf->cookie->cryptkey) ? $conf->cookie->cryptkey : '' );
$cryptkey = (! empty($conf->file->cookie_cryptkey) ? $conf->file->cookie_cryptkey : '' );
$entityCookie = new DolCookie($cryptkey);
$cookieValue = $entityCookie->_getCookie($entityCookieName);
list($lastuser, $lastentity) = split('\|', $cookieValue);