Merge pull request #13681 from frederic34/patch-6
fix phpunit usergroup class
This commit is contained in:
commit
39345a574e
@ -654,6 +654,9 @@ 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)) {
|
||||||
|
$this->nom = $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
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;
|
$entity = $this->entity;
|
||||||
|
|||||||
@ -132,7 +132,7 @@ if (empty($reshook)) {
|
|||||||
$action = "create"; // Go back to create page
|
$action = "create"; // Go back to create page
|
||||||
} else {
|
} else {
|
||||||
$object->name = trim(GETPOST("nom", 'nohtml'));
|
$object->name = trim(GETPOST("nom", 'nohtml'));
|
||||||
$object->nom = $object->name; // For backward compatibility
|
//$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
|
||||||
@ -215,7 +215,7 @@ if (empty($reshook)) {
|
|||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
$object->name = trim(GETPOST("nom", 'nohtml'));
|
$object->name = trim(GETPOST("nom", 'nohtml'));
|
||||||
$object->nom = $object->name; // For backward compatibility
|
//$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