diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 8ef77f3d282..f29d737eadf 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -56,7 +56,7 @@ abstract class Stats include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; } - $newpathofdestfile=$conf->user->dir_temp.'/'.get_class($this).'_'.__FUNCTION__.'_'.(empty($this->cachefilesuffix)?'':$this->cachefilesuffix.'_').$langs->defaultlang.'_user'.$user->id.'.cache'; + $newpathofdestfile=$conf->user->dir_temp.'/'.get_class($this).'_'.__FUNCTION__.'_'.(empty($this->cachefilesuffix)?'':$this->cachefilesuffix.'_').$langs->defaultlang.'_entity.'.$conf->entity.'_user'.$user->id.'.cache'; $newmask='0644'; $nowgmt = dol_now(); @@ -150,7 +150,7 @@ abstract class Stats include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; } - $newpathofdestfile=$conf->user->dir_temp.'/'.get_class($this).'_'.__FUNCTION__.'_'.(empty($this->cachefilesuffix)?'':$this->cachefilesuffix.'_').$langs->defaultlang.'_user'.$user->id.'.cache'; + $newpathofdestfile=$conf->user->dir_temp.'/'.get_class($this).'_'.__FUNCTION__.'_'.(empty($this->cachefilesuffix)?'':$this->cachefilesuffix.'_').$langs->defaultlang.'_entity.'.$conf->entity.'_user'.$user->id.'.cache'; $newmask='0644'; $nowgmt = dol_now(); @@ -276,7 +276,7 @@ abstract class Stats include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; } - $newpathofdestfile=$conf->user->dir_temp.'/'.get_class($this).'_'.__FUNCTION__.'_'.(empty($this->cachefilesuffix)?'':$this->cachefilesuffix.'_').$langs->defaultlang.'_user'.$user->id.'.cache'; + $newpathofdestfile=$conf->user->dir_temp.'/'.get_class($this).'_'.__FUNCTION__.'_'.(empty($this->cachefilesuffix)?'':$this->cachefilesuffix.'_').$langs->defaultlang.'_entity.'.$conf->entity.'_user'.$user->id.'.cache'; $newmask='0644'; $nowgmt = dol_now(); diff --git a/htdocs/install/mysql/tables/llx_c_type_resource.sql b/htdocs/install/mysql/tables/llx_c_type_resource.sql index 8ba088c075e..a12abb95f83 100644 --- a/htdocs/install/mysql/tables/llx_c_type_resource.sql +++ b/htdocs/install/mysql/tables/llx_c_type_resource.sql @@ -27,7 +27,7 @@ create table llx_c_type_resource ( - rowid integer PRIMARY KEY, + rowid integer AUTO_INCREMENT PRIMARY KEY, code varchar(32) NOT NULL, label varchar(64) NOT NULL, active tinyint DEFAULT 1 NOT NULL