Skip to content

Commit

Permalink
Fix: rename constants for multicompany cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Jan 10, 2012
1 parent cb286a2 commit 395ea68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions htdocs/main.inc.php
Expand Up @@ -567,7 +567,7 @@ function analyse_sql_and_script(&$var, $type)
}

// Create entity cookie, just used for login page
if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY) && !empty($conf->global->MAIN_MULTICOMPANY_COOKIE) && isset($_POST["entity"]))
if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_COOKIE_ENABLED) && isset($_POST["entity"]))
{
include_once(DOL_DOCUMENT_ROOT."/core/class/cookie.class.php");

Expand All @@ -576,7 +576,7 @@ function analyse_sql_and_script(&$var, $type)
$prefix=dol_getprefix();
$entityCookieName = 'DOLENTITYID_'.$prefix;
// TTL : is defined in the config page multicompany
$ttl = (! empty($conf->global->MAIN_MULTICOMPANY_COOKIE_TTL) ? $conf->global->MAIN_MULTICOMPANY_COOKIE_TTL : time()+60*60*8 );
$ttl = (! empty($conf->global->MULTICOMPANY_COOKIE_TTL) ? $conf->global->MULTICOMPANY_COOKIE_TTL : time()+60*60*8 );
// Cryptkey : will be created randomly in the config page multicompany
$cryptkey = (! empty($conf->file->cookie_cryptkey) ? $conf->file->cookie_cryptkey : '' );

Expand Down
2 changes: 1 addition & 1 deletion htdocs/master.inc.php
Expand Up @@ -137,7 +137,7 @@
{
$conf->entity = GETPOST("entity",'int');
}
else // TODO Does this "else" still usefull ?
else
{
$prefix=dol_getprefix();
$entityCookieName = 'DOLENTITYID_'.$prefix;
Expand Down

0 comments on commit 395ea68

Please sign in to comment.