FIX #14646
This commit is contained in:
parent
7c1bcfe66a
commit
c538dfb5b2
@ -624,13 +624,11 @@ class UserGroup extends CommonObject
|
|||||||
global $user, $conf;
|
global $user, $conf;
|
||||||
|
|
||||||
$this->datec = dol_now();
|
$this->datec = dol_now();
|
||||||
if (empty($this->nom) && !empty($this->name)) {
|
if (!empty($this->name)) {
|
||||||
$this->nom = $this->name;
|
$this->nom = $this->name; // Field for 'name' is called 'nom' in database
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->entity)) $this->entity = $conf->entity; // If not defined, we use default value
|
if (!isset($this->entity)) $this->entity = $conf->entity; // If not defined, we use default value
|
||||||
$entity = $this->entity;
|
|
||||||
if (!empty($conf->multicompany->enabled) && $conf->entity == 1) $entity = $this->entity;
|
|
||||||
|
|
||||||
return $this->createCommon($user, $notrigger);
|
return $this->createCommon($user, $notrigger);
|
||||||
}
|
}
|
||||||
@ -645,10 +643,8 @@ class UserGroup extends CommonObject
|
|||||||
{
|
{
|
||||||
global $user, $conf;
|
global $user, $conf;
|
||||||
|
|
||||||
$entity = $conf->entity;
|
if (!empty($this->name)) {
|
||||||
if (!empty($conf->multicompany->enabled) && $conf->entity == 1)
|
$this->nom = $this->name; // Field for 'name' is called 'nom' in database
|
||||||
{
|
|
||||||
$entity = $this->entity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->updateCommon($user, $notrigger);
|
return $this->updateCommon($user, $notrigger);
|
||||||
|
|||||||
@ -130,7 +130,6 @@ if (empty($reshook)) {
|
|||||||
$action = "create"; // Go back to create page
|
$action = "create"; // Go back to create page
|
||||||
} else {
|
} else {
|
||||||
$object->name = GETPOST("nom", 'nohtml');
|
$object->name = GETPOST("nom", 'nohtml');
|
||||||
//$object->nom = $object->name; // For backward compatibility
|
|
||||||
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'none')));
|
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'none')));
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
@ -205,7 +204,6 @@ if (empty($reshook)) {
|
|||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
$object->name = GETPOST("nom", 'nohtml');
|
$object->name = GETPOST("nom", 'nohtml');
|
||||||
//$object->nom = $object->name; // For backward compatibility
|
|
||||||
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'none')));
|
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'none')));
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user